## A Single-Step Term-Graph Reduction System for Proof Assistants

Citations: | 1 - 0 self |

### BibTeX

@MISC{Mol_asingle-step,

author = {Maarten De Mol and Marko Van Eekelen and Rinus Plasmeijer},

title = {A Single-Step Term-Graph Reduction System for Proof Assistants},

year = {}

}

### OpenURL

### Abstract

Abstract. In this paper, we will define a custom term-graph reduction system for a simplified lazy functional language. Our custom system is geared towards flexibility, which is accomplished by leaving the choice of redex free and by making use of single-step reduction. It is therefore more suited for formal reasoning than the well-established standard reduction systems, which usually fix a single redex and realize multi-step reduction only. We will show that our custom system is correct with respect to the standard systems, by proving that it is confluent and allows standard lazy functional evaluation as a possible reduction path. Our reduction system is used in the foundation of Sparkle. Sparkle is the dedicated proof assistant for Clean, a lazy functional programming language based on term-graph rewriting. An important reasoning step in Sparkle is the replacement of an expression with one of its reducts. The flexibility of our underlying reduction mechanism ensures that as many reduction options as possible are available for this reasoning step, which improves the ease of reasoning. Because our reduction system is based on a simplified lazy functional language, our results can be applied to any other functional language based on term-graph rewriting as well. 1

### Citations

225 | Report on programming language Haskel a non-strict, purely functional language version 1.2
- Hudak, Jones, et al.
- 1992
(Show Context)
Citation Context ...uction system is based on a simplified lazy functional language, our results can be applied to any other functional language based on term-graph rewriting as well. 1 Introduction Clean[20] and Haskell=-=[14]-=- are lazy functional programming languages that have a semantics based on term-graph rewriting. In 2001, the distribution of Clean was extended with the dedicated proof assistant Sparkle[8]. With this... |

186 | The call-by-need lambda calculus
- Ariola, Felleisen
- 1997
(Show Context)
Citation Context ...a 6 ˆ .2: (confluence - head/head version) ∀e∈E∀r1,r2∈R[Joinable(〈〉, r1, 〈〉, r2) ⇒ ∃r3,r4∈R[HeadReduce(r3, HeadReduce(r1, e)) = HeadReduce(r4, HeadReduce(r2, e))]]Proof: Assume e ∈ E, r1, r2 ∈ R and =-=[1]-=-Joinable(〈〉, r1, 〈〉, r2). As can be seen in Table 1, on each kind of expression there is only one kind of reduction rule available. Therefore, r1 and r2 must be of the same kind. Due to assumption [1]... |

181 | A Natural Semantics for Lazy Evaluation
- Launchbury
- 1993
(Show Context)
Citation Context ...tion system, which must be sufficiently flexible. Of course, it also has to support lazy evaluation, graphs and sharing. Normally, the natural choice would be the well-established system of Launchbury=-=[16]-=-. This system, however, is geared towards evaluation: it uses multi-step reduction and fixes a single redex. Therefore, both partial and inner reductions are not elements of its formal reduction relat... |

106 |
graph rewriting
- Barendregt
- 1987
(Show Context)
Citation Context ...st be of the same kind. Due to assumption [1], r1 and r2 cannot be the same and cannot be expand’s. Therefore, r1 and r2 can only be different applications of lift bind: Assume [2]r1 = (lift bind i), =-=[3]-=-r2 = (lift bind j), [4]i ̸= j. [5]e = (let xs =bs in e1), [6]1 ≤ i < j (if i > j then simply swap them), [7]xs = 〈xs1 :xi :xs2 :xj :xs3〉 (with #xs1 = i-1 and #xs2 = j-i-1), [8]bs = 〈bs1 :bi :bs2 :bj :... |

22 | Theorem proving for functional programmers – Sparkle: A functional theorem prover
- Mol, Eekelen, et al.
- 2001
(Show Context)
Citation Context ...nd Haskell[14] are lazy functional programming languages that have a semantics based on term-graph rewriting. In 2001, the distribution of Clean was extended with the dedicated proof assistant Sparkle=-=[8]-=-. With this new tool, it became much easier to reason about lazy functional programs, and to formally prove logic properties of these programs. Industry is beginning to acknowledge the importance of f... |

18 | A rewriting calculus for cyclic higher-order term graphs
- Baldan, Bertolissi, et al.
- 2006
(Show Context)
Citation Context ...Therefore, r1 and r2 must be of the same kind. Due to assumption [1], r1 and r2 cannot be the same and cannot be expand’s. Therefore, r1 and r2 can only be different applications of lift bind: Assume =-=[2]-=-r1 = (lift bind i), [3]r2 = (lift bind j), [4]i ̸= j. [5]e = (let xs =bs in e1), [6]1 ≤ i < j (if i > j then simply swap them), [7]xs = 〈xs1 :xi :xs2 :xj :xs3〉 (with #xs1 = i-1 and #xs2 = j-i-1), [8]b... |

18 |
Term graph rewriting: theory and practice
- Sleep, Plasmeijer, et al.
- 1993
(Show Context)
Citation Context ... sharing and cycles. It uses both unification andmatching constraints, leading to a term-graph representation in an equational style. This calculus is more general than classical term graph rewriting=-=[18, 3]-=-, which can be simulated in it. We feel that our work can serve as a first basis for creating a reduction system for a proof assistant based on the ρg-calculus. Another issue of future work concerns t... |

18 |
The Concurrent Clean language report, version 2.0. http://www.cs.kun.nl/~clean
- Plasmeijer, Eekelen
- 2001
(Show Context)
Citation Context ... Because our reduction system is based on a simplified lazy functional language, our results can be applied to any other functional language based on term-graph rewriting as well. 1 Introduction Clean=-=[20]-=- and Haskell[14] are lazy functional programming languages that have a semantics based on term-graph rewriting. In 2001, the distribution of Clean was extended with the dedicated proof assistant Spark... |

14 |
Graph rewriting aspects of functional programming
- Barendsen, Smetsers
- 1999
(Show Context)
Citation Context ... Due to assumption [1], r1 and r2 cannot be the same and cannot be expand’s. Therefore, r1 and r2 can only be different applications of lift bind: Assume [2]r1 = (lift bind i), [3]r2 = (lift bind j), =-=[4]-=-i ̸= j. [5]e = (let xs =bs in e1), [6]1 ≤ i < j (if i > j then simply swap them), [7]xs = 〈xs1 :xi :xs2 :xj :xs3〉 (with #xs1 = i-1 and #xs2 = j-i-1), [8]bs = 〈bs1 :bi :bs2 :bj :bs3〉 (with #bs1 = i-1 a... |

7 | Towards an operational semantics for a parallel non-strict functional language
- Hall, Baker-Finch, et al.
- 1998
(Show Context)
Citation Context ...lift performed by r1 has pushed additional bindings upwards. This is not necessary in the reverse case, because the lift of j takes place behind the lift of i. Choose [11]r3 = (lift bind j + #ys) and =-=[12]-=-r4 = (lift bind i). Now, using HR as abbreviation for HeadReduce, the following holds: HR(r3, HR(r1, e)) {2,5} = HR(r3, HR(lift bind i, let xs =bs in e1)) {11,HR,7,8,9} = HR(lift bind j+#ys, let 〈xs1 ... |

6 | Proving Correctness of Programs with I/O - a paradigm comparison - Butterfield, Strong - 2001 |

5 | Eekelen. Reasoning about deterministic concurrent functional I/O
- Dowse, Butterfield, et al.
- 2004
(Show Context)
Citation Context ...ten in industrial practice (for instance, see [17]). Since its introduction[7], Sparkle has been used in practice for various purposes. It has been used for proving properties of I/O-programs by Dowse=-=[10]-=- and Butterfield[6]. An extension for dealing with temporal properties has been proposed for it by Tejfel, Horváth and Koszik[19, 13]. It has been used in educationat the Radboud University of Nijmeg... |

3 | Extending the sparkle core language with object abstraction
- Tejfel, Horváth, et al.
(Show Context)
Citation Context ...poses. It has been used for proving properties of I/O-programs by Dowse[10] and Butterfield[6]. An extension for dealing with temporal properties has been proposed for it by Tejfel, Horváth and Koszik=-=[19, 13]-=-. It has been used in educationat the Radboud University of Nijmegen. Furthermore, support for class-generic properties has been added to it by van Kesteren[15]. Building proofs with Sparkle consists... |

2 |
A proof tool dedicated to clean - the first prototype
- Mol, Eekelen
- 1999
(Show Context)
Citation Context ...l programming languages are well suited for formal methods. Consequently, functional languages are being used increasingly often in industrial practice (for instance, see [17]). Since its introduction=-=[7]-=-, Sparkle has been used in practice for various purposes. It has been used for proving properties of I/O-programs by Dowse[10] and Butterfield[6]. An extension for dealing with temporal properties has... |

2 | Tejfel M.: Proving Invariants of Functional Programs
- Horváth, Kozsik
- 2003
(Show Context)
Citation Context ...poses. It has been used for proving properties of I/O-programs by Dowse[10] and Butterfield[6]. An extension for dealing with temporal properties has been proposed for it by Tejfel, Horváth and Koszik=-=[19, 13]-=-. It has been used in educationat the Radboud University of Nijmegen. Furthermore, support for class-generic properties has been added to it by van Kesteren[15]. Building proofs with Sparkle consists... |

1 |
Proving confluence of term-graph reduction for sparkle
- Mol, Eekelen, et al.
- 2007
(Show Context)
Citation Context ...ntifier that points to a specific subexpression within a compound expression. The basic operations on locations are Get and Set. For a full formalization of locations we refer to the technical report =-=[9]-=-. Here, we introduce locations informally only: Notation 4.6 ˆ .1: (locations and operations on locations) Let L denote the set of available locations, Get : L×E ↩→ E the function that gets the subexp... |

1 |
A duality between proof systems for cyclic term graphs
- Grabmayer
(Show Context)
Citation Context ...to be increased, because the let lift performed by r1 has pushed additional bindings upwards. This is not necessary in the reverse case, because the lift of j takes place behind the lift of i. Choose =-=[11]-=-r3 = (lift bind j + #ys) and [12]r4 = (lift bind i). Now, using HR as abbreviation for HeadReduce, the following holds: HR(r3, HR(r1, e)) {2,5} = HR(r3, HR(lift bind i, let xs =bs in e1)) {11,HR,7,8,9... |

1 |
Proof support for general type classes
- Kesteren, Mol, et al.
- 2004
(Show Context)
Citation Context ...or it by Tejfel, Horváth and Koszik[19, 13]. It has been used in educationat the Radboud University of Nijmegen. Furthermore, support for class-generic properties has been added to it by van Kesteren=-=[15]-=-. Building proofs with Sparkle consists of the repeated application of reasoning steps. Sparkle offers a library of about 40 reasoning steps, some of which are generic for formal reasoning, and some o... |