## When Do Match-Compilation Heuristics Matter? (2000)

### Cached

### Download Links

Citations: | 8 - 1 self |

### BibTeX

@TECHREPORT{Scott00whendo,

author = {Kevin Scott and Norman Ramsey},

title = {When Do Match-Compilation Heuristics Matter?},

institution = {},

year = {2000}

}

### Years of Citing Articles

### OpenURL

### Abstract

Modern, statically typed, functional languages define functions by pattern matching. Although pattern matching is defined in terms of sequential checking of a value against one pattern after another, real implementations translate patterns into automata that can test a value against many patterns at once. Decision trees are popular automata.

### Citations

618 |
The Definition of Standard ML (Revised
- Milner, Tofte, et al.
- 1997
(Show Context)
Citation Context ...pplying the function. Pattern matching is especially well suited to defining functions over algebraic datatypes, and it is widely used in statically typed functional languages, including Standard ML (=-=Milner et al. 1997-=-), Objective CAML (Leroy et al. 1998), Haskell (Hudak et al. 1992; Peyton Jones et al. 1999), and Miranda (Turner 1985). Although the semantics of pattern matching is given by a sequence of comparison... |

565 |
Data Reduction and Error Analysis for the Physical Sciences, 2nd Ed., WCB/McGraw-Hill
- Bevington, Robinson
- 1992
(Show Context)
Citation Context ...heuristics on running time is not obvious on casual inspection, but there is a statistical correlation between running times and some static measures of cost. We have computed the linear correlation (=-=Bevington and Robinson 1992-=-, x11.2) between running times, number of nodes, and average path length. Table 5 shows these correlations. The results show that the static measures may help predict the running times of the vliw and... |

546 | The Implementation of Functional Programming Languages - Jones - 1987 |

228 | Report on the programming language haskell: a non-strict, purely functional language version 1.2
- Hudak, Jones, et al.
- 1992
(Show Context)
Citation Context ...to de ning functions over algebraic datatypes, and it is widely used in statically typed functional languages, including Standard ML (Milner et al. 1997), Objective CAML (Leroy et al. 1998), Haskell (=-=Hudak et al. 1992��-=-� Peyton Jones et al. 1999), and Miranda (Turner 1985). Although the semantics of pattern matching is given by a sequence of comparisons of argument values against patterns, no implementation takes su... |

146 |
a non-strict functional language with polymorphic types
- Turner, Miranda
- 1985
(Show Context)
Citation Context ...dely used in statically typed functional languages, including Standard ML (Milner et al. 1997), Objective CAML (Leroy et al. 1998), Haskell (Hudak et al. 1992� Peyton Jones et al. 1999), and Miranda=-= (Turner 1985-=-). Although the semantics of pattern matching is given by a sequence of comparisons of argument values against patterns, no implementation takes such a 1ssimple, ine cient approach. A sequence of patt... |

141 | Pattern Matching in Trees - Homann, O'Donnell - 1982 |

103 |
Haskell 98: A non-strict, purely functional language
- Jones, Hughes
- 1999
(Show Context)
Citation Context ...algebraic datatypes, and it is widely used in statically typed functional languages, including Standard ML (Milner et al. 1997), Objective CAML (Leroy et al. 1998), Haskell (Hudak et al. 1992� Peyto=-=n Jones et al. 1999-=-), and Miranda (Turner 1985). Although the semantics of pattern matching is given by a sequence of comparisons of argument values against patterns, no implementation takes such a 1ssimple, ine cient a... |

83 | Compiling pattern matching - Augustsson - 1985 |

65 | Compiling a Functional Language
- Cardelli
- 1984
(Show Context)
Citation Context ...r of examination, o er the most opportunities for optimization anyway. Optimizing the number of nodes in a decision tree may be NP-hard, and so several sources have suggested optimization heuristics (=-=Cardelli 1984� Ba-=-udinet and MacQueen 1985� Maranget 1992� Ramsey 1999). The primary contribution of this paper is an experimental evaluation of these heuristics. We consider three measures of the cost of a tree: t... |

52 | New Jersey MachineCode toolkit
- Ramsey, Fernandez
- 1995
(Show Context)
Citation Context ...by adding the number of rules that appear in the frontiers sets of each child. The GAML compiler (Maranget 1992) uses this heuristic as its primary heuristic, and the New Jersey Machine-Code Toolkit (=-=Ramsey and Fernandez 1995-=-) uses this heuristic. Small Branching Factor This heuristic assigns to path a score ;N, where N is the number of outgoing edges from the TEST node that would be created, plus 1 for the default tree i... |

44 |
The Objective Caml system, documentation, and user's guide
- Leroy
- 1998
(Show Context)
Citation Context ...ng is especially well suited to de ning functions over algebraic datatypes, and it is widely used in statically typed functional languages, including Standard ML (Milner et al. 1997), Objective CAML (=-=Leroy et al. 1998),-=- Haskell (Hudak et al. 1992� Peyton Jones et al. 1999), and Miranda (Turner 1985). Although the semantics of pattern matching is given by a sequence of comparisons of argument values against pattern... |

40 | an experimental applicative language - Burstall, MacQueen, et al. - 1980 |

39 | Efficient Compilation of Pattern-Matching - Wadler - 1987 |

39 | HOPE: An experimental applicative language - Burstall, MacQueen, et al. - 1980 |

35 | Call by need computations in non-ambiguous linear term rewriting systems - Huet, Lévy - 1979 |

29 | The complexity of trie index construction - Comer, Sethi - 1977 |

24 | Compiling pattern matching by term decomposition - Puel, Suhrez - 1990 |

18 |
The De nition of Standard ML (Revised
- Milner, Tofte, et al.
- 1997
(Show Context)
Citation Context ...applying the function. Pattern matching is especially well suited to de ning functions over algebraic datatypes, and it is widely used in statically typed functional languages, including Standard ML (=-=Milner et al. 1997),-=- Objective CAML (Leroy et al. 1998), Haskell (Hudak et al. 1992� Peyton Jones et al. 1999), and Miranda (Turner 1985). Although the semantics of pattern matching is given by a sequence of comparison... |

12 | Comparison of priority rules in pattern matching and term rewriting - Laville - 1991 |

12 | ML pattern match compilation and partial evaluation
- Sestoft
- 1996
(Show Context)
Citation Context ...osts by factors of 2{20. 1 One match-compilation algorithm produces trees in which the internal nodes contain bothaword designation and a value, with two outgoing edges labeled \equal" and \unequ=-=al" (Sestoft 1996). These tre-=-es are then post-processed into the decision trees described here. 2sConstructors C Patterns p ::= x j C(p1�:::�p n)� n 0 Subject trees t ::= C(t1�:::�t n)� n 0 Paths ::= j k: Substitution... |

11 | Compiling lazy pattern matching
- Maranget
- 1992
(Show Context)
Citation Context ...es for optimization anyway. Optimizing the number of nodes in a decision tree may be NP-hard, and so several sources have suggested optimization heuristics (Cardelli 1984� Baudinet and MacQueen 1985=-=� Maranget 1992��-=-� Ramsey 1999). The primary contribution of this paper is an experimental evaluation of these heuristics. We consider three measures of the cost of a tree: the number of nodes, the length of the longe... |

5 | Tree pattern matching for ml. Extended Abstract
- Baudinet, MacQueen
- 1985
(Show Context)
Citation Context ...n, o er the most opportunities for optimization anyway. Optimizing the number of nodes in a decision tree may be NP-hard, and so several sources have suggested optimization heuristics (Cardelli 1984��=-=� Baudinet and MacQueen 1985� -=-Maranget 1992� Ramsey 1999). The primary contribution of this paper is an experimental evaluation of these heuristics. We consider three measures of the cost of a tree: the number of nodes, the leng... |

1 | The SML/NJ match compiler. Internal documentation obtained from Dave MacQueen - Aitken - 1992 |

1 | The Standard ML basis library. Book in preparation. Preliminary version available at http://cm.bell-labs.com/cm/cs/what/smlnj/doc/basis/index.html - Gansner, Reppy, et al. - 1999 |

1 |
Match compiler for New Jersey Machine-Code Toolkit (ML version). This source code can be downloaded from http://www.cs.virginia.edu/nr/toolkit, or it can be browsed at http://www.cs.virginia.edu/nr/toolkit/working/sml/WWW/match.html
- Ramsey
- 1999
(Show Context)
Citation Context ...tion anyway. Optimizing the number of nodes in a decision tree may be NP-hard, and so several sources have suggested optimization heuristics (Cardelli 1984� Baudinet and MacQueen 1985� Maranget 19=-=92� Ramsey 1999-=-). The primary contribution of this paper is an experimental evaluation of these heuristics. We consider three measures of the cost of a tree: the number of nodes, the length of the longest path from ... |