|
4 | 4 | __function__ FOL-BC-ASK(_KB_, _query_) __returns__ a generator of substitutions
|
5 | 5 |  __return__ FOL-BC-OR(_KB_, _query_, { })
|
6 | 6 |
|
7 |
| -__generator__ FOL-BC-OR(_KB_, _goal_, _θ_) __yeilds__ a substitution |
| 7 | +__generator__ FOL-BC-OR(_KB_, _goal_, _θ_) __yields__ a substitution |
8 | 8 |  __for each__ rule (_lhs_ ⇒ _rhs_) __in__ FETCH-RULES-FOR-GOAL(_KB_, _goal_) __do__
|
9 | 9 |    (_lhs_, _rhs_) ← STANDARDIZE-VARIABLES((_lhs_, _rhs_))
|
10 | 10 |    __for each__ _θ_' __in__ FOL-BC-AND(_KB_, _lhs_, UNIFY(_rhs_, _goal_, _θ_)) __do__
|
11 |
| -     __yeild__ _θ_' |
| 11 | +     __yield__ _θ_' |
12 | 12 |
|
13 |
| -__generator__ FOL-BC-AND(_KB_, _goals_, _θ_) __yeilds__ a substitution |
| 13 | +__generator__ FOL-BC-AND(_KB_, _goals_, _θ_) __yields__ a substitution |
14 | 14 |  __if__ _θ_ = _failure_ __then return__
|
15 |
| - __else if__ LENGTH(_goals_) = 0 __then yeild__ _θ_ |
| 15 | + __else if__ LENGTH(_goals_) = 0 __then yield__ _θ_ |
16 | 16 |  __else do__
|
17 | 17 |    _first_, _rest_ ← FIRST(_goals_), REST(_goals_)
|
18 | 18 |    __for each__ _θ_' in FOL-BC-OR(_KB_, SUBST(_θ_, _first_), _θ_) __do__
|
19 | 19 |      __for each__ _θ_'' in FOL-BC-AND(_KB_, _rest_, _θ_') __do__
|
20 |
| -       __yeild__ _θ_'' |
| 20 | +       __yield__ _θ_'' |
21 | 21 |
|
22 | 22 | ---
|
23 |
| -__Figure__ ?? A simple backward-chaining algorithm for first-order knowledge bases. |
| 23 | +__Figure__ ?? A simple backward-chaining algorithm for first-order knowledge bases. |
0 commit comments