[Next] [Previous] [Up] [Top] [Contents]

5 Assumption handling

5.1 Creating assumptions


An assumable clause is a clause that may succeed assuming that something is true. An assumable clause together with the bindings of variables in the clause before it is evaluated is known as an assumption context. If the evaluation succeeds, an assumption is generated corresponding to the assumption context and the result of the evaluation. After more rules have been fired, an assumable clause may no longer succeed or may yield a different result if it is evaluated again. Every clauses which is asserted to a database due to the assumable clause succeeding is tagged with an assumption, so that the clause can be retracted from the database if the assumption turns out to be false.

The rule in figure 5 contains an assumable clause with keyword notKnown. When this rule is fired, the assumable clause may be evaluated several times with different bindings for the variable ?value. If the subclause succeeds when the variable is bound to particular values (because an appropriate lowNaturalNumber clause is found on the database) then the assumable clause fails. If the subclause fails, the assumable clause succeeds, an assumption is generated and a clause with keyword highNaturalNumber is asserted to the database tagged with this assumption. An assumable clause with keyword notKnown can only succeed or fail; no variables can be bound so at most one assumption can be generated for each assumption context.


When the assumable clause with keyword total in figure 6 is evaluated, the subclause is evaluated and the resulting bindings of ?value are added up. The result is unified with ?totalValue, and the assumable clause succeeds on the assumption that this is the correct total. Further clauses may be asserted with keyword lowNaturalNumber, causing a different total and corresponding assumption to be generated when the rule is fired again. Thus there may be multiple assumptions corresponding to the same assumption context, but only one of them can ultimately be true.



Efficient Forward Chaining for Declarative Rules in a Multi-Agent Modelling Language - 16 FEB 95
[Next] [Previous] [Up] [Top] [Contents]

Generated with CERN WebMaker