An exchange format
Once a set of rules is selected, a many-to-one matching algorithm is applied. When associative and commutative (AC for short) operators are involved, an external one-to-one AC-matching algorithm described by S. Eker (in Computer Journal, 38(5):381-399, 1995. Associative-Commutative matching via bipartite graph matching) is called. This algorithm is not fully integrated in the interpreter, so data structure conversions are required and lower the efficiency of the AC-matching, already quite complex. Once a match is found, local evaluations are performed and if all succeed, the result term is built, taking advantage of the right-hand side of the rule and of term sharing.