Title: Checking equivalence in a non-strict language
Abstract Program equivalence checking is the task of confirming that two programs have the same behavior on corresponding inputs. We develop a calculus based on symbolic execution and coinduction to check the equivalence of programs in a non-strict functional language. Additionally, we show that our calculus can be used to derive counterexamples for pairs of inequivalent programs, including counterexamples that arise from non-termination. We describe a fully automated approach for finding both equivalence proofs and counterexamples. Our implementation,nebula, proves equivalences of programs written in Haskell. We demonstratenebula’s practical effectiveness at both proving equivalence and producing counterexamples automatically by applyingnebulato existing benchmark properties.  more » « less
Award ID(s):
2220407 2131476 2219995 2318974 1565208
PAR ID:
10651042
Author(s) / Creator(s):
; ;
Publisher / Repository:
Cambridge University Press
Date Published:
Journal Name:
Journal of Functional Programming
Volume:
35
ISSN:
0956-7968
Subject(s) / Keyword(s):
Sponsoring Org:
National Science Foundation
More Like this
  1. Program equivalence checking is the task of confirming that two programs have the same behavior on corresponding inputs. We develop a calculus based on symbolic execution and coinduction to check the equivalence of programs in a non-strict functional language. Additionally, we show that our calculus can be used to derive counterexamples for pairs of inequivalent programs, including counterexamples that arise from non-termination. We describe a fully automated approach for finding both equivalence proofs and counterexamples. Our implementation, Nebula, proves equivalences of programs written in Haskell. We demonstrate Nebula's practical effectiveness at both proving equivalence and producing counterexamples automatically by applying Nebula to existing benchmark properties. 
    more » « less
  2. Abstract Active automata learning from membership and equivalence queries is a foundational problem with numerous applications. We propose a novel variant of the active automata learning problem: actively learn finite automata usingpreference queries—i.e., queries about the relative position of two sequences in a total preorder—instead of membership queries. Our solution isRemap, a novel algorithm which leverages a symbolic observation table along with unification and constraint solving to navigate a space of symbolic hypotheses (each representing a set of automata), and uses satisfiability-solving to construct a concrete automaton (specifically a Moore machine) from a symbolic hypothesis.Remapis guaranteed to correctly infer the minimal automaton with polynomial query complexity under exact equivalence queries, and achieves PAC–identification ($$\varepsilon $$ ε -approximate, with high probability) of the minimal automaton using sampling-based equivalence queries. Our empirical evaluations ofRemapon the task of learning reward machines for two reinforcement learning domains indicateRemapscales to large automata and is effective at learning correct automata from consistent teachers, under both exact and sampling-based equivalence queries. 
    more » « less
  3. Zero-knowledge (ZK) protocols enable software developers to provide proofs of their programs’ correctness to other parties without revealing the programs themselves. Regular expressions are pervasive in real-world software, and zero-knowledge protocols have been developed in the past for the problem of checking whether an individual string appears in the language of a regular expression, but no existing protocol addresses the more complex PSPACE-complete problem of proving that two regular expressions are equivalent. We introduceCrêpe, the first ZK protocol for encoding regular expression equivalence proofs and also the first ZK protocol to target a PSPACE-complete problem.Crêpeuses a custom calculus of proof rules based on regular expression derivatives and coinduction, and we introduce a sound and complete algorithm for generating proofs in our format. We testCrêpeon a suite of hundreds of regular expression equivalence proofs.Crêpecan validate large proofs in only a few seconds each. 
    more » « less
  4. A<sc>bstract</sc> We establish an equivalence between two different quantum quench problems, the joining local quantum quench and the Möbius quench, in the context of (1 + 1)-dimensional conformal field theory (CFT). Here, in the former, two initially decoupled systems (CFTs) on finite intervals are joined att= 0. In the latter, we consider the system that is initially prepared in the ground state of the regular homogeneous Hamiltonian on a finite interval and, aftert= 0, let it time-evolve by the so-called Möbius Hamiltonian that is spatially inhomogeneous. The equivalence allows us to relate the time-dependent physical observables in one of these problems to those in the other. As an application of the equivalence, we construct a holographic dual of the Möbius quench from that of the local quantum quench. The holographic geometry involves an end-of-the-world brane whose profile exhibits non-trivial dynamics. 
    more » « less
  5. Abstract We apply Bayesian optimization and reinforcement learning to a problem in topology: the question of when a knot bounds a ribbon disk. This question is relevant in an approach to disproving the four-dimensional smooth Poincaré conjecture; using our programs, we rule out many potential counterexamples to the conjecture. We also show that the programs are successful in detecting many ribbon knots in the range of up to 70 crossings. 
    more » « less