Operationally-based program equivalence proofs using LCTRSs

We propose an operationally-based framework for deductive proofs of program equivalence. It is based on encoding the language semantics as logically constrained term rewriting systems (LCTRSs) and the two programs as terms. As a novelty of our method, we show that it enables relational reasoning abo...

Ausführliche Beschreibung

Gespeichert in:
Bibliographische Detailangaben
Veröffentlicht in:Journal of logical and algebraic methods in programming 2023-10, Vol.135, p.100894, Article 100894
Hauptverfasser: Ciobâcă, Ştefan, Lucanu, Dorel, Buruiană, Andrei Sebastian
Format: Artikel
Sprache:eng
Online-Zugang:Volltext
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
Beschreibung
Zusammenfassung:We propose an operationally-based framework for deductive proofs of program equivalence. It is based on encoding the language semantics as logically constrained term rewriting systems (LCTRSs) and the two programs as terms. As a novelty of our method, we show that it enables relational reasoning about programs in various settings, which are encoded in the operational semantics. For example, we show how our method can be used to prove programs that are equivalent when considering an unbounded stack, but where the equivalence fails to hold if the stack is bounded. We also show how to formalize read-sets and write-sets of symbolic expressions and statements by extending the operational semantics in a conservative way. This enables the relational verification of program schemas, which we exploit to prove compiler optimizations that cannot be handled by other tools. Our method requires an extension of standard LCTRSs with axiomatized symbols, which generate new research questions. We also present a prototype implementation that proves the practical feasibility of our approach.
ISSN:2352-2208
DOI:10.1016/j.jlamp.2023.100894