Results 1 -
9 of
9
Programming in Equational Logic: Beyond Strong Sequentiality
, 1993
"... Orthogonal term rewriting systems (also known as regular systems) provide an elegant framework for programming in equational logic. O'Donnell showed that the parallel-outermost strategy, which replaces all outermost redexes in each step, is complete for such systems. Many of the reductions performed ..."
Abstract
-
Cited by 41 (0 self)
- Add to MetaCart
Orthogonal term rewriting systems (also known as regular systems) provide an elegant framework for programming in equational logic. O'Donnell showed that the parallel-outermost strategy, which replaces all outermost redexes in each step, is complete for such systems. Many of the reductions performed by this strategy could be wasteful in general. A lazy normalization algorithm that completely eliminated these wasteful reductions by reducing only "needed redexes" was later developed by Huet and Levy. However, this algorithm required the input programs to be restricted to the subclass of strongly sequential systems. This is because needed redexes do not exist for all orthogonal programs, and even when they do, they may not be computable. It is therefore quite natural to ask whether it is possible to devise a complete normalization algorithm for the entire class that minimizes (rather than eliminate) the wasteful reductions. In this paper we propose a solution to this problem using the concept of a necessary set of redexes. In such a set, at least one of the redexes must be reduced to normalize a term. We devise an algorithm to compute a necessary set for any term not in normal form and show that a strategy that repeatedly reduces all redexes in such a set is complete for orthogonal programs. We also show that our algorithm is "optimal" among all normalization algorithms that are based on left-hand sides alone. This means that our algorithm is lazy (like Huet-Levy's) on strongly sequential parts of a program and "relaxes laziness minimally" to handle the other parts and thus does not sacrifice generality for the sake of efficiency.
Compiling Pattern Matching by Term Decomposition
, 1989
"... We present a method for compiling pattern matching on lazy languages based on previous work by Laville and Huet-Levy. It consists of coding ambiguous linear sets of patterns using "Term Decomposition," and producing non ambiguous sets over terms with structural constraints on variables. The method c ..."
Abstract
-
Cited by 21 (0 self)
- Add to MetaCart
We present a method for compiling pattern matching on lazy languages based on previous work by Laville and Huet-Levy. It consists of coding ambiguous linear sets of patterns using "Term Decomposition," and producing non ambiguous sets over terms with structural constraints on variables. The method can also be applied to strict languages giving a match algorithm that includes only unavoidable tests when such an algorithm exists.
Adaptive Pattern Matching
, 1992
"... Pattern matching is an important operation used in many applications such as functional programming, rewriting and rule-based expert systems. By preprocessing the patterns into a DFA-like automaton, we can rapidly select the matching pattern(s) in a single scan of the relevant portions of the inp ..."
Abstract
-
Cited by 20 (4 self)
- Add to MetaCart
Pattern matching is an important operation used in many applications such as functional programming, rewriting and rule-based expert systems. By preprocessing the patterns into a DFA-like automaton, we can rapidly select the matching pattern(s) in a single scan of the relevant portions of the input term. This automaton is typically based on left-to-right traversal of the patterns. By adapting the traversal order to suit the set of input patterns, it is possible to considerably reduce the space and matching time requirements of the automaton.
Dependently Typed Pattern Matching
- Journal of Universal Computer Science
, 2003
"... The mechanism for declaring datatypes to model data structures in functional programming languages such as Standard ML and Haskell can offer both convenience in programming and clarity in code. With the introduction of dependent datatypes in DML, the programmer can model data structures with mor ..."
Abstract
-
Cited by 15 (8 self)
- Add to MetaCart
The mechanism for declaring datatypes to model data structures in functional programming languages such as Standard ML and Haskell can offer both convenience in programming and clarity in code. With the introduction of dependent datatypes in DML, the programmer can model data structures with more accuracy, thus capturing more program invariants. In this paper, we study some practical aspects of dependent datatypes that affect both type-checking and compiling pattern matching. The results, which have already been tested, demonstrate that dependent datatype can not only offer various programming benefits but also lead to performance gains, yielding a concrete case where safer programs run faster.
Fast Parallel Implementation of Lazy Languages - The EQUALS Experience
- Journal of Functional Programming
, 1992
"... This paper describes equals, a fast parallel implementation of a lazy functional language on a commercially available shared-memory parallel machine, the Sequent Symmetry. In contrast to previous implementations, we detect parallelism automatically using strictness analysis. Another important differ ..."
Abstract
-
Cited by 12 (4 self)
- Add to MetaCart
This paper describes equals, a fast parallel implementation of a lazy functional language on a commercially available shared-memory parallel machine, the Sequent Symmetry. In contrast to previous implementations, we detect parallelism automatically using strictness analysis. Another important difference between equals and previous implementations is the use of reference counting for memory management, instead of garbage collection. Our implementation shows that reference counting leads to very good scalability, low memory requirements and improved locality. We compare our results with other sequential (SML/NJ) and parallel (h; Gi-machine and GAML) implementations of functional languages.
ML pattern match compilation and partial evaluation
, 1996
"... : We derive a compiler for ML-style pattern matches. It is conceptually simple and produces reasonably good compiled matches. The derivation is inspired by the instrumentation and partial evaluation of naive string matchers. Following that paradigm, we first present a general and naive ML pattern ma ..."
Abstract
-
Cited by 10 (1 self)
- Add to MetaCart
: We derive a compiler for ML-style pattern matches. It is conceptually simple and produces reasonably good compiled matches. The derivation is inspired by the instrumentation and partial evaluation of naive string matchers. Following that paradigm, we first present a general and naive ML pattern matcher, instrument it to collect and exploit extra information, and show that partial evaluation of the instrumented general matcher with respect to a given match produces an efficient specialized matcher. We then discard the partial evaluator and show that a match compiler can be obtained just by slightly modifying the instrumented general matcher. The resulting match compiler is interesting in its own right, and naturally detects inexhaustive matches and redundant match rules. 1 Introduction Consel and Danvy [3] studied a general string matcher, taking two inputs: a pattern string to look for, and an object string to look in. The matcher finds the first occurrence (if any) of the pattern ...
Optimizing Pattern Matching
- In ICFP’01 Proceedings
, 2001
"... We present improvements to the backtracking technique of pattern-matching compilation. Several optimizations are introduced, such as commutation of patterns, use of exhaustiveness information, and control ow optimization through the use of labeled static exceptions and context information. These opt ..."
Abstract
-
Cited by 8 (0 self)
- Add to MetaCart
We present improvements to the backtracking technique of pattern-matching compilation. Several optimizations are introduced, such as commutation of patterns, use of exhaustiveness information, and control ow optimization through the use of labeled static exceptions and context information. These optimizations have been integrated in the ObjectiveCaml compiler. They have shown good results in increasing the speed of pattern-matching intensive programs, without increasing nal code size.
Some Practical Aspects of Dependent Datatypes
"... The mechanism for declaring datatypes to model data structures in functional programming languages such as Standard ML and Haskell can offer both convenience in programming and clarity in code. With the introduction of dependent datatypes in DML, the programmer can model data structures more accur ..."
Abstract
-
Cited by 4 (2 self)
- Add to MetaCart
The mechanism for declaring datatypes to model data structures in functional programming languages such as Standard ML and Haskell can offer both convenience in programming and clarity in code. With the introduction of dependent datatypes in DML, the programmer can model data structures more accurately, capturing more program invariants. In this paper, we study some practical aspects of dependent datatypes that affect both type-checking and compiling pattern matching as well as datatype representation. The results, which have already been tested, demonstrate that dependent datatype can not only offer various programming benefits but also lead to performance gains, yielding a concrete case where safer programs run faster.
A Framework for Lazy Parallel Evaluation of Equational Programs
"... Strongly sequential systems, developed by Huet and Levy [HL79], has formed the basis of equational programming languages. Experience with such languages so far suggests that even complex equational programs are based only on strongly sequential systems with constructors. ..."
Abstract
- Add to MetaCart
Strongly sequential systems, developed by Huet and Levy [HL79], has formed the basis of equational programming languages. Experience with such languages so far suggests that even complex equational programs are based only on strongly sequential systems with constructors.

