Pattern matching - new user question



Robert Dodier wrote:
>
> I get a stack overflow or endless loop for this one.
> Pretty sure the rule is applied to a|b and c, then b|a and c,
> then a|b and c, ad infinitum.

Try something like this..


defmatch(b1,(AA|BB and CC));

brule(p):=block([AA,BB,CC],if (b1(p)=false or ordergreatp(BB,AA)) then 
false
                  else (BB|AA and CC)*(AA|CC)/(BB|CC));



RJF