## Towards Correctness of Program Transformations Through Unification and Critical Pair Computation (2010)

### Cached

### Download Links

Citations: | 1 - 1 self |

### BibTeX

@MISC{Rau10towardscorrectness,

author = {Conrad Rau and Manfred Schmidt-schauß and Johann Wolfgang Goethe-universität},

title = {Towards Correctness of Program Transformations Through Unification and Critical Pair Computation},

year = {2010}

}

### OpenURL

### Abstract

Abstract. Correctness of program transformations in extended lambda-calculi with a contextual semantics is usually based on reasoning about the operational semantics which is a rewrite semantics. A successful approach is the combination of a context lemma with the computation of overlaps between program transformations and the reduction rules, which results in so-called complete sets of diagrams. The method is similar to the computation of critical pairs for the completion of term rewriting systems. We explore cases where the computation of these overlaps can be done in a first order way by variants of critical pair computation that use unification algorithms. As a case study of an application we describe a finitary and decidable unification algorithm for the combination of the equational theory of left-commutativity modelling multi-sets, context variables and many-sorted unification. Sets of equations are restricted to be almost linear, i.e. every variable and context variable occurs at most once, where we allow one exception: variables of a sort without ground terms may occur several times. Every context variable must have an argument-sort in the free part of the signature. We also extend the unification algorithm by the treatment of binding-chains in let- and letrec-environments and by context-classes. This results in a unification algorithm that can be applied to all overlaps of normal-order reductions and transformations in an extended lambda calculus with letrec that we use as a case study. 1

### Citations

518 |
Simple word problems in universal algebras
- Knuth, Bendix
- 1970
(Show Context)
Citation Context ...instantiations of s1 and some li, i.e. to compute all the overlaps of li and s1, and the possible completions under reduction and transformation. This method is reminiscent of the Knuth-Bendix method =-=[KB70]-=-, but has to be adapted to an asymmetric situation, to extended instantiations and to higher-order terms. How to apply this method (with ad-hoc arguments) to an extended lambda-calculus is worked out ... |

269 | The revised report on the syntactic theories of sequential control and state
- Felleisen, Hieb
- 1989
(Show Context)
Citation Context ...ication is over an infinite set: the set of all contexts, and the criterion is termination, which is undecidable in general. Well-known tools to ease the proofs are context lemmas [Mil77], ciu-lemmas =-=[FH92]-=- and bisimulation, see e.g. [How89]. A context lemma usually shows that R[P1]⇓ ⇐⇒ R[P2]⇓ for a restricted set of reduction contexts R is sufficient to show equivalence of P1 and P2. The reduction rela... |

238 | Unification theory
- Baader, Snyder
- 2001
(Show Context)
Citation Context ...urs at most once, Complete sets of unifiers and sets of most general unifiers are defined as usual, but only covering the unifiers such that σ(si), σ(ti) are almost ground (see handbook articles like =-=[BS01]-=-). 3.2 Properties of the Equational Theory The analysis of the pure and combined equational theory E = LC can be done by elementary methods like induction on the number of equational rewriting steps. ... |

193 | Parameter-passing and the lambda calculus
- Crank, Felleisen
- 1991
(Show Context)
Citation Context ...ll-by-Need Calculus Lneed We define a simple call-by-need lambda calculus Lneed which is exactly the call-by-need calculus of [SS07]. Calculi that are related are in [SSSM10a,SSSM10b]. Also the paper =-=[AF97]-=- contains a related letrec-calculus. The set E of Lneed-expressions is as follows where x, xi are variables: si, s, t ∈ E ::= x | (s t) | (λx.s) | (letrec x1 = s1, . . . , xn = sn in t) We assign the ... |

104 |
Unification in the union of disjoint equational theories: Combining decision procedures
- Baader, Schulz
- 1996
(Show Context)
Citation Context ...th as they occur in no-reduction rules. The presented unification algorithm is applicable to terms with the mentioned extra constructs. We do not use the general unification combination algorithms in =-=[11,2]-=-, since we only have a special theory LC that models multi-sets of bindings in letrec-environments of our calculus, and moreover, it is not clear how to adapt the general combination method to context... |

101 | Equality in lazy computation systems
- Howe
(Show Context)
Citation Context ...he set of all contexts, and the criterion is termination, which is undecidable in general. Well-known tools to ease the proofs are context lemmas [Mil77], ciu-lemmas [FH92] and bisimulation, see e.g. =-=[How89]-=-. A context lemma usually shows that R[P1]⇓ ⇐⇒ R[P2]⇓ for a restricted set of reduction contexts R is sufficient to show equivalence of P1 and P2. The reduction relation ∗ −→ is often given as a set o... |

30 |
Fully Abstract Models of Typed λ-Calculi
- Milner
- 1977
(Show Context)
Citation Context ...unately, the quantification is over an infinite set: the set of all contexts, and the criterion is termination, which is undecidable in general. Well-known tools to ease the proofs are context lemmas =-=[Mil77]-=-, ciu-lemmas [FH92] and bisimulation, see e.g. [How89]. A context lemma usually shows that R[P1]⇓ ⇐⇒ R[P2]⇓ for a restricted set of reduction contexts R is sufficient to show equivalence of P1 and P2.... |

24 | A uniform axiomatic view of lists, multisets, and sets, and the unification algorithm, Fund - Dovier, Policriti, et al. - 1998 |

22 |
Unification in a combination of arbitrary disjoint equational theories
- Schmidt-Schauß
- 1988
(Show Context)
Citation Context ...th as they occur in no-reduction rules. The presented unification algorithm is applicable to terms with the mentioned extra constructs. We do not use the general unification combination algorithms in =-=[11,2]-=-, since we only have a special theory LC that models multi-sets of bindings in letrec-environments of our calculus, and moreover, it is not clear how to adapt the general combination method to context... |

8 | Set unification - Dovier, Pontelli, et al. |

8 | Simulation in the call-by-need lambdacalculus with letrec, case, constructors, and seq. Frank report 49 - Schmidt-Schauß, Sabel, et al. |

8 | Safety of Nöcker’s strictness analysis
- Schmidt-Schauß, Schütz, et al.
- 2008
(Show Context)
Citation Context ...s to be adapted to an asymmetric situation, to extended instantiations and to higher-order terms. How to apply this method (with ad-hoc arguments) to an extended lambda-calculus is worked out e.g. in =-=[SSSS08]-=- 2 Application to a Small Extended Lambda-Calculus In this section we introduce the syntax and semantics of a small call-by-need lambda calculus and use it as a case-study. Based on the definition of ... |

5 | Correctness of copy in calculi with letrec
- Schmidt-Schauß
- 2007
(Show Context)
Citation Context ...h uses a context lemma and complete sets of reduction diagrams. 2.1 The Call-by-Need Calculus Lneed We define a simple call-by-need lambda calculus Lneed which is exactly the call-by-need calculus of =-=[SS07]-=-. Calculi that are related are in [SSSM10a,SSSM10b]. Also the paper [AF97] contains a related letrec-calculus. The set E of Lneed-expressions is as follows where x, xi are variables: si, s, t ∈ E ::= ... |

1 |
Policriti & Gianfranco Rossi (1998): A Uniform Axiomatic View
- Dovier, Alberto
(Show Context)
Citation Context ..., that bindings can be reordered, we use the equational theory left-commutativity (LC) with the following axiom: env(x, env(y, z)) = env(y, env(x, z)) (for the LC-theory and unification modulo LC see =-=[6,5,4]-=-). The equational theory LC is a congruence relation on the terms, which is denoted as =LC . The pure equational theory is defined as restricted to the axiom-signature, i.e. to the terms T ({Env, Bind... |

1 |
Enrico Pontelli & Gianfranco Rossi (2006): Set unification
- Dovier
(Show Context)
Citation Context ..., that bindings can be reordered, we use the equational theory left-commutativity (LC) with the following axiom: env(x, env(y, z)) = env(y, env(x, z)) (for the LC-theory and unification modulo LC see =-=[6,5,4]-=-). The equational theory LC is a congruence relation on the terms, which is denoted as =LC . The pure equational theory is defined as restricted to the axiom-signature, i.e. to the terms T ({Env, Bind... |

1 |
Schmidt-Schauß (2007): Correctness of Copy in Calculi with Letrec
- Manfred
(Show Context)
Citation Context ... method to compute all overlaps of left hand sides of a set of transformations rules and the reduction rules of the calculus Lneed which is a call-by-need lambda calculus with a letrec-construct (see =-=[12]-=-). We show that a custom-tailored unification algorithm can be developed that is decidable and produces a complete and finite set of unifiers for the required equations. The following expressiveness i... |

1 |
Sabel (2010): On generic context lemmas for higher-order calculi with sharing
- Schmidt-Schauß, David
(Show Context)
Citation Context ...use the expression (λx.(Ω x)) is a WHNF, which is convergent by definition and Ω is a divergent expression. An important tool to prove contextual equivalence is a context lemma (see for example [10], =-=[13]-=-,[15]), which allows to restrict the class of contexts that have to be considered in the definition of the contextual equivalence from general C to R contexts. However, often S-contexts are more appro... |

1 |
Sabel & Elena Machkasova (2010): Simulation in the Call-by-Need LambdaCalculus with letrec
- Schmidt-Schauß, David
(Show Context)
Citation Context ...ts of reduction diagrams. 2.1 The Call-by-Need Calculus Lneed We define a simple call-by-need lambda calculus Lneed which is exactly the call-by-need calculus of [12]. Calculi that are related are in =-=[14]-=-, and [1]. The set E of Lneed-expressions is as follows where x, xi are variables: si, s, t ∈ E ::= x | (s t) | (λx.s) | (letrec x1 = s1, . . . , xn = sn in t) We assign the names application, abstrac... |

1 |
Schütz & David Sabel (2008): Safety of Nöcker’s Strictness Analysis
- Schmidt-Schauß, Marko
(Show Context)
Citation Context ...rrectness of program transformations by inductive methods. Since our case study is done for a small calculus, the demand for extending the method to other calculi like the extended lambda calculus in =-=[15]-=- would justify further research. In Section 2 we present the syntax and operational semantics of a small call-by-need lambda calculus with a cyclic let. The normal order reduction rules and transforma... |