6.4 The substitute procedure of this section only produces the 'outer-most' substitution when there are alternatives. Modify

Question:

6.4 The substitute procedure of this section only produces the 'outer-most' substitution when there are alternatives. Modify the procedure so that all possible alternative substitutions are produced through backtracking. For example:

?-substitute(a+b, f(A+B), new, NewTerm). A=a B = b NewTerm = f(new); A = a+b B = a+b NewTerm = f(new+new) Our original version only finds the first answer.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: