The pf 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.
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.
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:
pf {(<s> ^gumby <gv> ^operator.name foo)(<gv> ^alive t)}
Find productions that propose the operator foo:
pf -rhs {(<x> ^operator <op> +)(<op> ^name foo)}
Find chunks that test the attribute ^pokey:
pf -chunks {(<x> ^pokey *)}