| OCR Text |
Show 119 The denotation of A' is a set of tuples defined by: {[t1, t 2, ... , tn] I (P implies A'(t'1, t'2, ... , t'n)) & t1 ==E t'1 & tz ==E t'z & ··· & tn ==E t'n}. The coincidence of derivability and logical implication is a d1rect result of Plotkin 's work [92]. This assumes that the unification algorithm for the theory defined in P is complete. 6.2.4 A Funlog Interpreter The Funlog interpreter described here can be best conceptualized as con-sisting of two cooperating processes. One is called the driving process and the other the answer-collector process. The driving process invokes the modified resolution procedure which is based on semantic unification. The process answer-collector does "back substitutions" (analogous to standard Prolog): it in-vokes the procedure Reduce to reduce the function terms that provide bindings for the variables that relate to the ultimate answers. In the case that a function term is not reducible because of its being "blocked" by some uninstantiated variables, further bindings can reactivate its reduction. Note that function reduc-tions can be directly supported by the answer-collector process: a goal state-ment like ?- X == f(a) will cause f(a) to be reduced by the answer-collector. Notice also that as long as only ground terms are allowed for reduction, the user can write conditional rewrite rules, like where P 0, ... , P k are Pro log predicates. The applicability of a conditional rewrite rule depends on the evaluation of the predicates in the body. This provides a way for the user to use Prolog predicates as conditions for reduction . As another programming feature, the user can write goals like ?- AAB = filter(odd, [2,5,7,9]). To prove the equality, the interpreter directly invokes the semantic unification, which reduces the term filter (odd, [ 2, 5, 7, 9]) until two sides become unifiable. |