Program Equivalence by Circular Reasoning

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.

Data and Resources

Additional Info

Field Value
Source https://inria.hal.science/hal-00744374
Author Lucanu, Dorel, Rusu, Vlad
Maintainer CCSD
Last Updated May 7, 2026, 21:58 (UTC)
Created May 7, 2026, 21:58 (UTC)
Identifier Report N°: RR-8116
Language en
Rights https://about.hal.science/hal-authorisation-v1/
contributor Department of Computer Science [Lasi] ; Alexandru Ioan Cuza University of Iași = Universitatea Alexandru Ioan Cuza din Iași = Alexandru Ioan Cuza University [Iași] = Université Alexandru Ioan Cuza de Iași (UAIC)
creator Lucanu, Dorel
date 2013-05-07T00:00:00
harvest_object_id 596c3b43-8dfd-4839-822d-9bba8b6c92f7
harvest_source_id 3374d638-d20b-4672-ba96-a23232d55657
harvest_source_title test moissonnage SELUNE
metadata_modified 2026-03-13T00:00:00
set_spec type:REPORT