24 citations found. Retrieving documents...
P. Wadler, Efficient Compilation of Pattern Matching, in S.L. Peyton-Jones, Ed, The Implementation of Functional Programming Languages, Prentice Hall, 1987. 33

 Home/Search   Document Not in Database   Summary   Related Articles   Check  

This paper is cited in the following contexts:
Adaptive Pattern Matching - Sekar, Ramesh (1992)   (9 citations)  (Correct)

....a decade. Christian [4] obtained dramatic speedups in a Knuth Bendix completion system by using an automaton for unprioritized patterns based on left to right traversal. Graf [9] also describes a similar automaton for unprioritized patterns. In functional programming, Augustsson [1, 2] and Wadler [26] describe pattern matching techniques that are also based on left to right traversal, but do deal with priorities. The methods of Augustsson and Wadler are economical in terms of space usage, but may reexamine symbols in the input term. In the worst case, these methods can degenerate to the naive ....

P. Wadler, Efficient Compilation of Pattern Matching, in S.L. Peyton-Jones, Ed, The Implementation of Functional Programming Languages, Prentice Hall, 1987. 33


The implementation of the Gofer functional programming system - Jones (1994)   (45 citations)  (Correct)

....of pattern matching After the transformations described in the previous section, the only significant complication in the representation of Gofer programs is the use of patterns in function bindings. This section describes a program transformation, based closely on Wadler s description in [54], that reduces pattern matching in function definitions to a particularly simple form. For example, the standard map function, usually defined as: map f [ map f (x:xs) f x : map f xs is translated to: map o2 o1 = case o1 of [ o4:o3) o2 o4 : map o2 o3 Given our ....

P. Wadler. Efficient compilation of pattern matching. Chapter 5 in [48].


Recovering Sequentiality in Functional-Logic Programs - Mariño, Moreno-Navarro   (Correct)

....and different variables as in the left hand sides of program rules, Occ are occurrences defined in the standard way and Rules are program rules. Trees without or nodes are called sequential, otherwise they are parallel definitional trees. Definitional trees are used like the case expressions in [21]: 6 Definition 2 (Definitional Tree) T is a definitional tree for pattern iff one of the following cases holds: 1. T is rule(l = r) where l = r is a program rule such that l is a variant of . 2. T is branch( o, T 1 , T k ) where the T i are definitional trees for [c x 1 : x ar(c) ....

Philip Wadler. Efficient compilation of pattern matching. In Peyton-Jones, editor, The Implementation of Functional Programming Languages, pages 78--103. Prentice-Hall, 1987.


A New Means of Ensuring Termination of Deforestation With an.. - Sørensen (1993)   (2 citations)  (Correct)

....definitions may have at most 3 one pattern matching argument and only with non nested patterns. This restriction is not essential; it is adopted simply to be able to state the deforestation algorithm concisely. Also, methods exist for translating arbitrary patterns into the restricted form [Aug85, Wad87]. Secondly, patterns are linear. One can extend deforestation to non linear patterns or, equivalently, to a language which can test equality on terms. In doing so, certain interesting problems do appear, see [Sor93b] Before we can state the deforestation algorithm we introduce some notation. In ....

P. L. Wadler. Efficient compilation of pattern-matching. In The implementation of Functional Programming Languages,. Ed. S. L. Peyton Jones, Prentice-Hall, 1987.


Implementing Escher on a Graph Reduction Machine - Eder (1999)   (Correct)

....built in functions are added during compilation to enforce this. 9 There is a member for every number of arguments. Each free function only evaluates the first out of several arguments. The definitions of functions, which are strict in more than one argument, can be translated into this form [24]. 10 See next paragraph. 11 Function nodes are sometimes referred to as info or descriptor nodes. references . code . function arity function constructor arguments Function call: Function node: Fig. 1. Representation of function calls on the EMA heap 3.3 Machine architecture EMA ....

P. Wadler. Efficient Compilation of Pattern Matching. In S. Peyton-Jones, editor, The Implementation of Functional Programming Languages, pages 78--103. Prentice Hall, 1987.


Yet another way of Set-processing: The Escher style and its.. - Eder (1999)   (1 citation)  (Correct)

....set environment to the argument, and rewriting to the set body. 19 There is a member for every number of arguments. Each evalSet function only evaluates the first out of several arguments. The definition of functions, which are strict in more than one argument, can be translated into this form [25]. When a function which appears in a (set) pattern, say a disjunction, is evaluated, it first checks the identifier of the function in the call node on the stack. 20 If the identifier of this function is the identifier of a function which can match on our disjunction, e.g. a call to emptyset, ....

P. Wadler. Efficient Compilation of Pattern Matching. In S. Peyton-Jones, editor, The Implementation of Functional Programming Languages, pages 78--103. Prentice Hall, 1987.


Garbage Recycling: Transforming Programs to Reuse Garbage - Hamilton (1995)   (Correct)

....The branches in a case expression can either be separated by the j character or by a newline character. The patterns used in the branches of case expressions may not be nested. Methods to transform case expressions with nested patterns into ones without nested patterns are described in [ 1 ] and [ 20 ] . The intended evaluation mechanism for the language is lazy evaluation. However, the basic functions are strict in all their arguments. Also, pattern matching is strict, and when a case expression is evaluated, the selector is evaluated to head normal form before the appropriate branch of the ....

P. Wadler. Efficient compilation of pattern matching. In S.L. Peyton Jones, editor, The Implementation of Functional Programming Languages, pages 78--103. Prentice Hall, 1987.


Higher Order Deforestation - Hamilton (1995)   (18 citations)  (Correct)

....and p 1 : e 1 : p k : e k are called the branches. Branches can be separated by either the j or the newline character. The patterns in case expressions may not be nested. Methods to transform case expressions with nested patterns to ones without nested patterns are described in [ 1 ] and [ 12 ] . As in [ 13 ] an expression other than a case expression is defined to be linear with respect to a variable if the number of occurrences of the variable within the expression is not more than one. A case expression is defined to be linear with respect to a variable if the total number of ....

P. Wadler. Efficient compilation of pattern matching. In S.L. Peyton Jones, editor, The Implementation of Functional Programming Languages, pages 78--103. Prentice Hall, 1987.


DML - A Meta-language and System for the Generation of.. - Pettersson, Fritzson (1992)   (5 citations)  (Correct)

....to Scheme. Most importantly, pattern matching constructs must be transformed to the appropriate tests and component extractions. The first implementation of DML used the traditional method of compiling pattern matching constructs, which is well described by Augustsson 1985 [3] and Wadler 1987 [26]. Recently, the DML implementation was improved by replacing this with a new, more efficient pattern match compilation method by Pettersson, 19] 5.4 Compiler Generation When the transformations above have been applied, code generation to Scheme is a simple matter of un parsing the intermediate ....

Philip Wadler. Efficient compilation of pattern-matching. In The Implementation of Functional Programming Languages, S. Peyton Jones. Prentice-Hall, 1987.


Adaptive Pattern Matching - Sekar, Ramesh, Ramakrishnan (1992)   (9 citations)  (Correct)

....3g f1; 2; 3g 6= b f1g 1 f2; 3g Figure 1: Left to right (left) and adaptive automata (right) for f(x; a; b) f(b; a; a) f(x; a; y) with textual order priority. Here x and y denote variables. Pattern matching automata have been extensively studied for well over a decade. Augustsson [1] and Wadler [14] describe pattern matching techniques based on left to right traversal. A drawback with these methods is that they may reexamine symbols potentially several times; so in the worst case they may end up testing each pattern separately against the input term. This drawback is overcome by the methods ....

P. Wadler, Efficient Compilation of Pattern Matching, in S.L. Peyton-Jones, Ed, The Implementation of Functional Programming Languages, Prentice Hall International, 1987.


Extending First Order Deforestation - Hamilton (1995)   (4 citations)  (Correct)

....by the variable v 2 . There is therefore no need to add explicit head and tail operators to the basic functions. The patterns used in case expressions may not be nested. Methods to transform case expressions with nested patterns into ones without nested patterns are described in [ 1 ] and [ 13 ] . In the reformulations of the deforestation algorithm given in [ 4 ] 2 ] 3 ] and [ 8 ] pattern matching function definitions are used rather than case expressions. Less transformation rules are required when this approach is taken, but these rules are slightly more difficult to ....

P. Wadler. Efficient compilation of pattern matching. In S.L. Peyton Jones, editor, The Implementation of Functional Programming Languages, pages 78--103. Prentice Hall, 1987.


A Positive Supercompiler - Sørensen, Glück, Jones (1993)   (3 citations)  (Correct)

....and positive supercompilation is easiest to explain for explicit case expressions. Second, case expressions may only have non nested patterns. This restriction is quite common, and semantics preserving methods exist for translating arbitrary patterns into the restricted form (Augustsson, 1985; Wadler, 1987). Third, we have adopted an explicit equality construct. For a data type with a finite set of constructors, equality can be programmed by means of case expressions, i.e. by listing all possible cases. We avoid this approach because examples become longer. While the difference between positive ....

Wadler, P.L. 1987. Efficient compilation of pattern-matching. In The Implementation of Functional Programming Languages, Peyton Jones S.L. (ed.), Prentice-Hall.


Turchin's Supercompiler Revisited - An operational theory of.. - Sørensen (1996)   (Correct)

....definitions may have at most one pattern matching argument, and only non nested patterns. These restrictions are quite customary in the literature and are adopted simply for a concise statement of our metaalgorithms; methods exist for translating arbitrary patterns into the restricted form [Aug85,Wad87b]. In some examples we assume for simplicity that functions may be defined by several pattern matching arguments and that our metaalgorithms have been extended to handle this. 5 Some of these notions are defined by certain grammars in later sections. The redefinitions are in all cases equivalent ....

P. L. Wadler. Efficient compilation of pattern-matching. In The implementation of Functional Programming Languages. Ed. S. L. Peyton Jones, Prentice-Hall, 1987.


A New Means of Ensuring Termination of Deforestation - Sørensen (1993)   (Correct)

....account. Second, the language admits only simple patterns, i.e. patterns which are exactly one constructor deep. Also, each function definition must not contain more that one pattern matching argument. Again, methods exist for transforming an arbitrary (first order) program to this form [Aug85] [Wad87b], and again we should ask ourselves whether the deforestation algorithm handles the transformed programs sensibly, or whether it might be more profitable to extend the deforestation technique to the larger language, at the expense of our analysis becoming more complicated. We prefer to state our ....

P. L. Wadler. Efficient compilation of pattern-matching. In The implementation of Functional Programming Languages,. Ed. S. L. Peyton Jones, Prentice-Hall, 1987.


Determining Usage Information in Lazy Functional Languages - Hamilton (1995)   (Correct)

....The branches in a case expression can either be separated by the j character or by a newline character. The patterns used in the branches of case expressions may not be nested. Methods to transform case expressions with nested patterns into ones without nested patterns are described in [ 2 ] and [ 21 ] . The intended evaluation mechanism for the language is lazy evaluation. However, the basic functions are strict in all their arguments. Also, pattern matching is strict, and when a case expression is evaluated, the selector is evaluated to head normal form before the appropriate branch of the ....

P. Wadler. Efficient compilation of pattern matching. In S.L. Peyton Jones, editor, The Implementation of Functional Programming Languages, pages 78--103. Prentice Hall, 1987.


Implementing the Rewriting Computational Model of Escher - Eder (1998)   (Correct)

....by introducing calls to built in functions which force the evaluation of expressions before a case statement is evaluated; an example is given below. The patterns in case expressions are simple one level patterns. More complex forms of pattern matching can easily be translated into this form [Wad87]. Local functions are lifted out using the traditional way of lambda lifting [Joh85] Local let definitions define simple variables, not functions. Example: The length function (on the left) is strict in its (first) argument. The compiler introduces the built in function free1 in the machine ....

Philip Wadler. Efficient Compilation of Pattern Matching. In Simon Peyton-Jones, editor, The Implementation of Functional Programming Languages, pages 78--103.


Perfect Supercompilation - Secher (1999)   (2 citations)  (Correct)

....case FALSE is returned. Notice how the pattern function next is only defined for non empty lists, i.e. the function is only defined for one of the two possible list constructors. Also, the one pattern per function restriction forces us to introduce an auxiliary function m2 . Well known methods [1, 36] exist for transforming arbitrary patterns into the restricted form we require. The exclusion of local definitions (e.g. where clauses) can be remedied by a technique called lambda lifting [12] In the rest of this text we will need some standard notation to be able to treat terms in a formal ....

WADLER, P. Efficient compilation of pattern matching. In The Implementation of Functional Programming Languages, S. Peyton-Jones, Ed. Prentice-Hall, 1987.


Compilation by Transformation in Non-Strict Functional Languages - Santos (1995)   (12 citations)  (Correct)

....out some of the syntactic constructs of the language that can be expressed in terms of other simpler constructs. The process of desugaring is often described as a source to source transformation [HMM86, Pey87] Examples of such transformations are compilation of pattern matching [Aug85, Wad87] compilation of list comprehensions [Aug87, Pey87] compilation of overloading [PJ93, Aug93] ffl another way in which program transformation is used during the compilation process occurs when the program needs to be transformed in order to be compiled using a given implementation ....

Philip Wadler. Efficient compilation of pattern-matching. In [Pey87], 1987.


Compilation of non-linear, second order patterns on S-expressions - Queinnec (1990)   (Correct)

....data to be matched. Pattern matching is gaining more and more audience within functional languages. Pattern matching is used to define functions, or just expressions, that perform case analyses. First introduced in NPL [Burstall 69] and SASL [Turner 76] then in ML [Weis 89] or Haskell [Hudak Wadler 90] case construct is an archetypic example of the use of pattern matching within functional languages. Pattern matching is also a key concept in rule based expert systems and has long been known in the Lisp community. Most text books on Lisp [Abelson Sussman 85, Kessler 88, Queinnec 84, Winston ....

....segment variable x is used for reference since the first argument of and will bind x. This pattern accepts any non empty list of which all terms are equal. Examples are (bar) foo foo foo foo) The and pattern closely corresponds to the as pattern which appears in ML or Haskell [Hudak Wadler 90]. not pattern) accepts anything that is not accepted by pattern. Segment variables may be bound or referenced. ssetq append name pattern1 pattern2 ) accepts any datum which first terms are accepted by pattern1 while other terms are accepted by pattern2 . Moreover, just after succeeding ....

[Article contains additional citation context not shown here]

Philip Wadler, Efficient Compilation of Pattern-Matching, in PeytonJones86.


Implementing lazy functional languages on stock hardware: the.. - Jones (1992)   (186 citations)  (Correct)

.... For example: case t of Leaf n e1 Branch t1 t2 e2 (In a high level programming language, data values are usually taken apart using various pattern matching constructs, but its is well known how to translate such constructs into case expressions with simple single level patterns (Wadler [1987]) We here assume that this translation has been performed. These operations of construction and pattern matching are so pervasive in functional programs that they deserve particular attention. Compilers sometimes implement the built in types (list, tuples, numbers) in special magic ways, and ....

....is saturated (that is, gives to the function exactly the number of arguments it expects) ffl Pattern matching is performed only by case expressions, and the patterns in case expressions are simple one level patterns. More complex forms of pattern matching can easily be translated into this form (Wadler [1987]) The value scrutinised by a case expression can be an arbitrary expression, and is not restricted to be a simple variable or constant. Nothing would be gained by such a restriction, and some performance would be lost because a closure for the expression would be unnecessarily built and then ....

P Wadler [1987], "Efficient compilation of pattern matching," in The implementation of functional programming languages, SL Peyton Jones, ed., Prentice Hall, 78--103.


When Will Deforestation Stop? - Ferguson, Wadler   Self-citation (Wadler)   (Correct)

.... c v 1 : v k This describes a first order language, with functions possibly involving the matching of a single simple pattern (i.e. only one constructor deep) Compilation to such a form requires only well known techniques, being essentially equivalent to compiling to simple case expressions [Aug85, Wad87a]. The key step is replacing a pattern match several constructors deep with a corresponding number of simple pattern matches, introducing appropriate new functions. The intended semantics is the usual normal order reduction of the lambda calculus. Pattern matching, however, is strict: when a ....

P. L. Wadler, Efficient compilation of pattern-matching. In The Implementation of Functional Programming Languages, Prentice Hall, 1987, S. L. Peyton Jones.


Deforestation: Transforming programs to eliminate trees - Wadler (1990)   (316 citations)  Self-citation (Wadler)   (Correct)

....1 : t 1 ; p n : t n are called the branches. Function definitions have the form f v 1 : v k = t Example definitions are shown in Figure 1. The patterns in case terms may not be nested. Methods to transform case terms with nested patterns to ones without nested patterns are well known [1, 14]. The language is typed using the Hindley Milner polymorphic type system [8, 9, 5] found in LML and other languages; the reader is assumed to be familiar with this type system. Each constructor c and function f has a fixed arity k . For example, the constructor Nil has arity 0, the constructor ....

P. L. Wadler, Efficient compilation of pattern-matching. In [10].


A Practical Subtyping System For Erlang - Marlow (1997)   (36 citations)  Self-citation (Wadler)   (Correct)

....X En 1 end prog : f 1(X1) E1 ; f n (Xn ) En program Figure 4: Expressions c; d constructors ff; fi type variables U ; V : P j U union type j R P ; Q : cfU g prime type R : ff cs remainder j 1 cs j 0 Figure 5: Types expressions. Algorithms to do this are well known [Aug85, Wad87]. ffl Case expressions always have a default alternative, of the form X E . A special form of this is used to indicate that the alternative should never be taken: X empty(X ) where empty is a built in function which always fails. ffl Interprocess communication is omitted for now. We ....

....when the inferred type is large and complicated. We intend to explore this problem as future work. 9.3 Pattern Matching In order to typecheck the full Erlang language, we must compile the pattern matching into simple case expressions. Standard algorithms exist to perform this transformation [Aug85, Wad87]. In most cases, the use of pattern matching compilation in our type checker is transparent to the programmer, but there are cases where unexpected types are derived. For example, one possible way to write the boolean and function is as follows: and(true,true) true; and(false,X) false; ....

P. Wadler. Efficient compilation of patternmatching. In [Pey87], 1987.


The Coq Proof Assistant - Reference Manual Version 6.1 - Barras, Boutin, Cornes.. (1997)   (21 citations)  (Correct)

No context found.

P. Wadler. Efficient compilation of pattern matching. In S.L. Peyton Jones, editor, The Implementation of Functional Programming Languages. Prentice-Hall, 1987.

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