A Language-Independent Proof System for Full Program EquivalenceReport as inadecuate




A Language-Independent Proof System for Full Program Equivalence - Download this document for free, or read online. Document in PDF available to download.

1 Department of Computer Science Lasi 2 DREAMPAL - Dynamic Reconfigurable Massively Parallel Architectures and Languages Inria Lille - Nord Europe, CRIStAL - Centre de Recherche en Informatique, Signal et Automatique de Lille - UMR 9189 3 UIUC - University of Illinois at Urbana Champaign

Abstract : Two programs are mutually equivalent if, for the same input, either they both diverge or they both terminate with the same result. Mutual equivalence is an adequate notion of equivalence for programs written in deterministic languages. It is useful in many contexts, such as capturing the correctness of program transformations within the same language, or capturing the correctness of compilers between two different languages. In this paper we introduce a language-independent proof system for mutual equivalence, which is para-metric in the operational semantics of two languages and in a state-similarity relation. The proof system is sound: if it terminates then it establishes the mutual equivalence of the programs given to it as input. We illustrate it on two programs in two different languages an imperative one and a functional one, that both compute the Collatz sequence. The Collatz sequence is an interesting case study since it is not known wether the sequence terminates or not; nevertheless, our proof system shows that the two programs are mutually equivalent even if we cannot establish termination or divergence of either one.





Author: Stefan Ciobaca - Dorel Lucanu - Vlad Rusu - Grigore Rosu -

Source: https://hal.archives-ouvertes.fr/



DOWNLOAD PDF




Related documents