NextPrevUpTopContentsIndex

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>])
                      [:documentation <doc-string>])

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 behavior of the context is to be modified and is explained in Meta Rule Protocol. If :documentation is given, then doc-string should be a string and the value can be retrieved by calling the function documentation with doc-type context .


KnowledgeWorks and Prolog User Guide (Macintosh version) - 11 Jul 2006

NextPrevUpTopContentsIndex