Next Prev Up Top Contents Index

3.1.5.2 Contexts

Contexts are the groups into which rules are partitioned. The context default-context always exists. Contexts are defined by:

<context> ::=
          (defcontext <context-name>
                      [:strategy <CRS>]
                      [:auto-return t | nil]
                      [:meta <meta-actions>])

where <context-name> is a symbol, <CRS> is a conflict resolution strategy defaulting to (priority recency order) (see below). If :auto-return is set to t (the default) then when the context has no more rules to fire, control passes to the next context on the agenda, but if it is nil an error occurs (a rule in the context should have issued a (return) instruction explicitly). The :meta option is necessary only if the default behaviour of the context is to be modified and is explained in Meta Rule Protocol.


LispWorks KnowledgeWorks and Prolog User Guide - 14 Dec 2001

Next Prev Up Top Contents Index