NAME

production-find - Find matching Soar productions

SYNOPSIS

production-find [-lhs | -rhs] [-show-bindings] [-chunks | -no-chunks] {pattern}

DESCRIPTION

The production-find command is used to find Soar productions by matching a given pattern against the production components. Productions may be found that test a particular left-hand side pattern or produce particular right-hand side preferences. For convenience, the production-find command has the predefined alias pf.

OPTIONS

If given, an option must match one of the following choices:
-lhs
The following pattern applies to the left-hand side of productions. This is the default.
-rhs
The following pattern applies to the right-hand side of productions.
-show-bindings
Show the bindings associated with the following pattern.
-chunks
Search only for chunks (learned productions) that match the following pattern.
-nochunks
Search all productions except chunks that match the following pattern.

The syntax of pattern is exactly the syntax of a sequence of clauses within a Soar production. In addition, the symbol * may be used as a wildcard for an attribute or value. Note that variables names do not have to match the specific names used in productions.

EXAMPLES

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:

production-find {(<s> ^gumby <gv> ^operator.name foo)(<gv> ^alive t)}

Find productions that propose the operator foo:

production-find -rhs {(<x> ^operator <op> +)(<op> ^name foo)}

Find chunks that test the attribute ^pokey:

production-find -chunks {(<x> ^pokey *)}

WARNINGS

Note that curly braces or double quotes must be used around the pattern to override the normal Tcl parsing.

SEE ALSO

sp