This module provides a couple of operators and predicates to
define forward chaining clauses. A forward chaining clause is
recognized by the (<=)/2 operator. A forward chaining clause
has the form "Action <= Condition" where the action part can be
arbitrary Prolog goals. A forward chaining clause will be
rewritten into multiple delta computation rules.
Action <= Condition % Forward Chaining Clause.
The module provides a new hypothetical reasoning verbs post/1. This verb first invokes the delta computation rules to determine a new agenda, then uses assumez/1 to assume the given fact and finally continues with the new agenda. By delete set inclusion the delta computation can also yield counter factual reasoning.Example:
:- forward q/2.
post(q(X)) <= posted(p(X)).
?- post(p(a)), q(X).
X = a
The delta computation has functor F/N+1 for an arriving fact with a functor F/N. Each literal in the body of a forward chaining clause has to be annotated either for delete set inclusion phaseout/1, for delta computation posted/1 or for both phaseout_posted/1. Non-annotated lit-erals are condition goals that are executed in backward chaining fashion.The following delta computation predicates are provided:
The following forward chaining condition goals are recognized:
The following forward chaining rule term expansion is recognized: