| Luc Maranget. Two techniques for compiling lazy pattern matching. Technical Report RR 2385, INRIA, October 1994. |
....proceeds by making branches of di erent constructors and ascribing the list of patterns to those branches. This approach has the disadvantage of space explosion. The combination of tree automata with failures is the basis for the current implementations of most common functional languages [Mar94, Ler90] The pattern matching of the SL system follows this approach, but the support of semantic notions and the non determinism of rewriting require extensions to the existing algorithms. 1. SL Patterns The SL patterns include common patterns such as wildcard patterns, variable patterns, ....
Luc Maranget. Two techniques for compiling lazy pattern matching. Research report 2385, INRIA, 1994.
....6.2 Theorem [Soundness of Optimization] If A . D ) E and t 2 A, then 1. t 2 D i t 2 E; and 2. for all x, we have t 2 D ) x; u) i t 2 E ) x; u) 13 7 Related Work The pattern match compilation techniques used in functional language compilers [BM85, PS90, Aug85, Wad87, Ler91, Mar94] are complementary to our pattern optimization technique. The goal of pattern match compilers is to generate lower level code for a good order of traversal in the input tree, requires few run time checks, whereas our technique performs a higher level optimization on patterns that should decrease ....
....checks for satis ability of the constraints [AW92] or nds a locally minimal solution [GTT93] In their setting, globally minimal solutions (which are crucial for us) may not necessarily exist. Pattern match compilation for lazy functional languages raises some subtle issues [PS90, Aug85, Wad87, Mar94] that go beyond what we have considered here. 8 Conclusions and Future Work We have developed a series of analyses on pattern matching that are applicable to typed languages based on tree automata, with ML style pattern matching plus OR and recursive patterns. These analyses are exhaustiveness ....
Luc Maranget. Two techniques for compiling lazy pattern matching. Technical Report 2385, INRIA Rocquencourt, October 1994.
....matching in functional languages notably those by Augustsson [Augu85] Wadler in [Peyt87] Cardelli [Card84] and the best fit pattern matching algorithm of Field [FiHa88] The algorithm on which our pattern matching compiler is based is an extension of the algorithm proposed by Wadler. Maranget [Mara94] as an extension of similar work [Lavi91, PuSu90, Mara92, SRR92, Kenn90] described two techniques for compiling lazy pattern matching. One of the schemes described is based on the pattern matching technique using backtracking automata adapted to the world of lazy pattern matching. These lazy ....
L Maranget, Two Techniques for Compiling Lazy Pattern Matching. Research Report 2385, INRIA Rocquencourt, October 1994.
....is independent from any other definition. Taking advantage of asynchrony, these rules are managed locally by queues for messages, and by an automaton that matches them with join patterns and forks accordingly the guarded processes. To this end, well known compilation techniques are available [15]. Besides, the embedding of large functional style definitions can be made reasonably efficient using tail recursion like optimizations. Finally, concrete values and built in functions can easily be added: The behaviour of their reserved names is given by specific ffi rules that describe the ....
L. Maranget. Two techniques for compiling lazy pattern matching. Research report 2385, INRIA, 1994.
....the potential size of decision trees. More concretely, a decision tree may have many leafs corresponding to non matched values, whereas knowing that one such values exist is the needed information. Rather, we check unused match cases and exhaustiveness before compilation with a simple algorithm [13] that solves the used matched case problem by basically traversing the decision tree without generating it. Advantages are not generating the tree, stopping search as soon as used match cases are found and applying various heuristics and matrix simpli cations which are not relevant to direct ....
....proof) most approaches describe heuristics. A typical and early work on such heuristics is [2] a more recent and thorough study is [16] Another, related in practice, approach relies on sequentiality theory to identify directions that are columns that must be tested by all possible matchers [10, 15, 17, 13]. However, computing directions is expansive, and one can consider relying on cheaper heuristics. These works rather apply to the decision trees, with a primary focus on reducing code size. It is unclear to us how to combine column and row optimization in practice and whether this would yield ....
Maranget, L. Two techniques for compiling lazy pattern matching. Research Report 2385, INRIA Rocquencourt, Oct. 1994.
No context found.
Luc Maranget. Two techniques for compiling lazy pattern matching. Technical Report RR 2385, INRIA, October 1994.
No context found.
L. Maranget. Two Techniques for Compiling Lazy Pattern Matching. Technical Report 2385, INRIA, 1994.
Online articles have much greater impact More about CiteSeer.IST Add search form to your site Submit documents Feedback
CiteSeer.IST - Copyright Penn State and NEC