Self-Supervised Learning to Prove Equivalence Between Straight-Line Programs via Rewrite Rules
Steve Kommrusch, Martin Monperrus, Louis-No\"el Pouchet

TL;DR
This paper introduces S4Eq, a neural network-based system that uses rewrite rules and self-supervised training to automatically prove semantic equivalence between straight-line programs, achieving high success rates.
Contribution
The paper presents a novel transformer-based neural architecture with an incremental self-supervised training method for generating program equivalence proofs.
Findings
Achieves 97% proof success on a large dataset.
Effectively generates rewrite sequences for program equivalence.
Introduces a new training technique for proof generation.
Abstract
We target the problem of automatically synthesizing proofs of semantic equivalence between two programs made of sequences of statements. We represent programs using abstract syntax trees (AST), where a given set of semantics-preserving rewrite rules can be applied on a specific AST pattern to generate a transformed and semantically equivalent program. In our system, two programs are equivalent if there exists a sequence of application of these rewrite rules that leads to rewriting one program into the other. We propose a neural network architecture based on a transformer model to generate proofs of equivalence between program pairs. The system outputs a sequence of rewrites, and the validity of the sequence is simply checked by verifying it can be applied. If no valid sequence is produced by the neural network, the system reports the programs as non-equivalent, ensuring by design no…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Engineering Research · Software Testing and Debugging Techniques · Logic, programming, and type systems
