Proving Equivalence Between Complex Expressions Using Graph-to-Sequence Neural Models

06/01/2021
by   Steve Kommrusch, et al.
0

We target the problem of provably computing the equivalence between two complex expression trees. To this end, we formalize the problem of equivalence between two such programs as finding a set of semantics-preserving rewrite rules from one into the other, such that after the rewrite the two programs are structurally identical, and therefore trivially equivalent.We then develop a graph-to-sequence neural network system for program equivalence, trained to produce such rewrite sequences from a carefully crafted automatic example generation algorithm. We extensively evaluate our system on a rich multi-type linear algebra expression language, using arbitrary combinations of 100+ graph-rewriting axioms of equivalence. Our machine learning system guarantees correctness for all true negatives, and ensures 0 false positive by design. It outputs via inference a valid proof of equivalence for 93 equivalent expression pairs isolated for testing, using up to 50-term expressions. In all cases, the validity of the sequence produced and therefore the provable assertion of program equivalence is always computable, in negligible time.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
02/17/2020

Equivalence of Dataflow Graphs via Rewrite Rules Using a Graph-to-Sequence Neural Model

In this work we target the problem of provably computing the equivalence...
research
09/22/2021

Self-Supervised Learning to Prove Equivalence Between Programs via Semantics-Preserving Rewrite Rules

We target the problem of synthesizing proofs of semantic equivalence bet...
research
02/06/2019

Neural-Network Guided Expression Transformation

Optimizing compilers, as well as other translator systems, often work by...
research
08/24/2018

Towards a constraint solver for proving confluence with invariant and equivalence of realistic CHR programs

Confluence of a nondeterministic program ensures a functional input-outp...
research
02/19/2020

SPORES: Sum-Product Optimization via Relational Equality Saturation for Large Scale Linear Algebra

Machine learning algorithms are commonly specified in linear algebra (LA...
research
08/23/2023

A Frame Stack Semantics for Sequential Core Erlang

We present a small-step, frame stack style, semantics for sequential Cor...
research
10/21/2019

Parametrized Complexity of Expansion Height

Deciding whether two simplicial complexes are homotopy equivalent is a f...

Please sign up or login with your details

Forgot password? Click here to reset