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...
Saved in:
Published in | Journal of logical and algebraic methods in programming Vol. 135; p. 100894 |
---|---|
Main Authors | , , |
Format | Journal Article |
Language | English |
Published |
Elsevier Inc
01.10.2023
|
Online Access | Get full text |
Cover
Loading…
Summary: | 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 |