- summary production-find command documentation
Find productions by condition or action patterns.
|| `-c, --chunks` || Look _only_ for chunks that match the pattern. || || `-l, --lhs` || Match pattern only against the conditions (left-hand side) of productions (default). || || `-n, --nochunks` || _Disregard_ chunks when looking for the pattern. || || `-r, --rhs` || Match pattern against the actions (right-hand side) of productions. || || `-s, --show-bindings` || Show the bindings associated with a wildcard pattern. || || `pattern` || Any pattern that can appear in productions. ||
The production-find command is used to find productions in production memory that include conditions or actions that match a given `pattern`. The pattern given specifies one or more condition elements on the left hand side of productions (or negated conditions), or one or more actions on the right-hand side of productions. Any pattern that can appear in productions can be used in this command. In addition, the asterisk symbol, `*`, can be used as a wildcard for an attribute or value. It is important to note that the whole pattern, including the parenthesis, must be enclosed in curly braces for it to be parsed properly.
The variable names used in a call to production-find do not have to match the variable names used in the productions being retrieved.
The production-find command can also be restricted to apply to only certain types of productions, or to look only at the conditions or only at the actions of productions by using the flags.
Find productions that test that some object `gumby` has an attribute `alive` with value `t`. In addition, limit the rules to only those that test an operator named `foo`:
Note that in the above command, `<state></state>` does not have to match the exact variable name used in the production.
Find productions that propose the operator `foo`:
Find chunks that test the attribute ^pokey:
Examples using the water-jugs demo:
[cmd_sp]