Compiling pattern matching to good decision trees

13 years 6 months ago
Compiling pattern matching to good decision trees
We address the issue of compiling ML pattern matching to compact and efficient decisions trees. Traditionally, compilation to decision trees is optimized by (1) implementing decision trees as dags with maximal sharing; (2) guiding a simple compiler with heuristics. We first design new heuristics that are inspired by necessity, a concept from lazy pattern matching that we rephrase in terms of decision tree semantics. Thereby, we simplify previous semantic frameworks and demonstrate a straightforward connection between necessity and decision tree runtime efficiency. We complete our study by experiments, showing that optimizing compilation to decision trees is competitive with the optimizing match compiler of Le Fessant and Maranget (2001). Categories and Subject Descriptors D 3. 3 [Programming Languages]: Language Constructs and Features--Patterns General Terms Design, Performance. Keywords Match Compilers, Decision Trees, Heuristics. Note This version includes an appendix, which is abs...
Luc Maranget
Added 13 Dec 2010
Updated 13 Dec 2010
Type Journal
Year 2008
Where ML
Authors Luc Maranget
Comments (0)