Lazy AC-Pattern Matching for Rewriting
نویسندگان
چکیده
We define a lazy pattern-matching mechanism modulo associativity and commutativity. The solutions of a pattern-matching problem are stored in a lazy list composed of a first substitution at the head and a non-evaluated object that encodes the remaining computations. We integrate the lazy AC-matching in a strategy language: rewriting rule and strategy application produce a lazy list of terms.
منابع مشابه
Lazy Rewriting on Eager
We deene Lazy Term Rewriting Systems and show that they can be realized by local adaptations of an eager implementation of conventional term rewriting systems. The overhead of lazy evaluation is only incurred when lazy evaluation is actually performed. Our method is modelled by a transformation of term rewriting systems, which concisely expresses the intricate interaction between pattern matchi...
متن کاملLeft-incompatible Term Rewriting Systems and Functional Strategy
This paper extends left-incompatible term rewriting systems defined by Toyama et.al.[17]. It is also shown that the functional strategy is normalizing in the class, where the functional strategy is the reduction strategy that finds index by some rule selection method and top-down and left-to-right lazy pattern matching method.
متن کاملAssociative-commutative rewriting via flattening
AC-rewriting is simulated by using flattened terms, flattened rewrite rules, extensions and specializations with respect to the AC-operators, therefore allowing us to reduce AC-pattern matching and AC-unification to permutative matching and permutative unification respectively.
متن کاملPartial Categorical Multi-Combinators and Church-Rosser Theorems
Categorical Multi Combinators form a rewriting system developed with the aim of providing e cient implementations of lazy functional languages The core of the system of Categorical Multi Combinators consists of only four rewriting laws with a very low pattern matching complexity This system allows the equivalent of several reductions to be performed at once as functions form frames with all the...
متن کاملBuilding Interpreters with Rewriting Strategies
Programming language semantics based on pure rewrite rules suffers from the gap between the rewriting strategy implemented in rewriting engines and the intended evaluation strategy. This paper shows how programmable rewriting strategies can be used to implement interpreters for programming languages based on rewrite rules. The advantage of this approach is that reduction rules are first class e...
متن کامل