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

02/17/2020
by   Steve Kommrusch, et al.
0

In this work we target the problem of provably computing the equivalence between two programs represented as dataflow graphs. To this end, we formalize the problem of equivalence between two 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 the first 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 system outputs via inference a correct rewrite sequence for 96 program pairs isolated for testing, using 30-term programs. And in all cases, the validity of the sequence produced and therefore the provable assertion of program equivalence is computable, in negligible time.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
06/01/2021

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

We target the problem of provably computing the equivalence between two ...
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
05/16/2022

Strong Equivalence of Logic Programs with Counting

In answer set programming, two groups of rules are considered strongly e...
research
02/06/2019

Neural-Network Guided Expression Transformation

Optimizing compilers, as well as other translator systems, often work by...
research
11/05/2008

When are two algorithms the same?

People usually regard algorithms as more abstract than the programs that...
research
09/25/2017

Intensional Constructed Numbers: Towards Formalizing the Notion of Algorithm

This work is meant to be a step towards the formal definition of the not...
research
05/01/2020

From Equations to Distinctions: Two Interpretations of Effectful Computations

There are several ways to define program equivalence for functional prog...

Please sign up or login with your details

Forgot password? Click here to reset