Download FRulekit: A Frame-Based Production System

Transcript
RULEKIT MANUAL
PAGE 14
8.3.8. give-named-firings <pname> N
returns: <production-firings> Returns a list of the firings of production <pname> which fired on cycle
N.
8.3.9. lhs-of <pname>
returns: CONDs Return the lhs condition patterns given a production name.
8.3.10. rhs-of <pname>
returns: PATTERNs Return the rhs patterns given a production name.
8.4. WME Creation
8.4.1. prod-responsible-for <?WME>
returns: <production-firing> Give the production firing which last added ?WME to WM if ?WME is
positive, and give the production firing which last deleted ?WME from WM if ?WME is negative.
8.4.2. possible-prods-responsible-for <?WME>
returns: <production-matches> not implemented. Give the production matches which could possibly
add/delete ?WME to/from WM.
8.4.3. in-wmp <CONDE>
returns: List of WMEs Return a list of WMEs in WM that match the given pattern. If CONDE is an
absence test, then it returns all WMEs that don’t match the pattern. Ignores variables; thus intracondition-element testing won’t work.
8.4.4. give-negs <production-firing>
returns: <PATTERNS> Note: not implemented. Give the most specific negation tests (i.e., if a
negation test has a variable in it, give the negation test with the variable replaced by it’s instantiation for
rule firing).
8.5. Tracing Goals
At the moment there is no single representation of goal trees in Rulekit. However, the following
functions are useful for tracing changes of goals’ states, regardless of representation. Note that the goal
trace data structure is independent of the OPS trace data structures. The goal trace is stored in the
string, *TRACE-TREE*.
• trace-pop-success <goalname>
Records a successful termination of a goal by writing into the goal trace data structure.
• trace-pop-failure <goalname>
Records an un-successful termination of a goal by writing into the goal trace data structure.
• trace-interrupt
Records that an interrupt from a goal tree has occurred.
• trace-push-goal <parent-name> <subgoal-name>
Records that a subgoal under parent-name has been activated.
• record-action <action>
Inserts given generic action into the goal trace tree.