Program Equivalence by Circular Reasoning

Dorel Lucanu 1 Vlad Rusu 2
2 DREAMPAL - Dynamic Reconfigurable Massively Parallel Architectures and Languages
Université de Lille, Sciences et Technologies, Inria Lille - Nord Europe, CNRS - Centre National de la Recherche Scientifique
Abstract : We propose a logic and a deductive system for stating and automatically proving the equivalence of programs written in deterministic languages having a rewriting-based operational semantics. The chosen equivalence is parametric in a so-called observation relation, and it says that two programs satisfying the observation relation will inevitably be, in the future, in the observation relation again. This notion of equivalence generalises several well-known equivalences, and is shown to be appropriate for deterministic programs. The deductive system is circular in nature and is proved sound and weakly complete; together, these results say that, when it terminates, our system correctly solves the given program-equivalence problem. We show that our approach is suitable for proving equivalence for terminating and non-terminating programs as well as for concrete and symbolic programs. The latter are programs in which some statements or expressions are symbolic variables. By proving the equivalence between symbolic programs, one proves the equivalence of (infinitely) many concrete programs obtained by replacing the variables by concrete statements or expressions. The approach is illustrated by proving program equivalence in two languages from different programming paradigms. The examples in the paper, as well as other examples, can be checked using an online tool.
Document type :
Reports
Complete list of metadatas

Cited literature [23 references]  Display  Hide  Download

https://hal.inria.fr/hal-00744374
Contributor : Mister Dart <>
Submitted on : Sunday, December 8, 2013 - 8:32:33 PM
Last modification on : Thursday, February 21, 2019 - 10:34:09 AM
Long-term archiving on : Saturday, April 8, 2017 - 5:27:05 AM

File

ifm-facs-techreport.pdf
Files produced by the author(s)

Identifiers

  • HAL Id : hal-00744374, version 4

Citation

Dorel Lucanu, Vlad Rusu. Program Equivalence by Circular Reasoning. [Research Report] RR-8116, INRIA. 2013, pp.33. ⟨hal-00744374v4⟩

Share

Metrics

Record views

501

Files downloads

304