Program Equivalence by Circular Reasoning
We propose a logic and a deductive system for stating and automatically proving the equivalence of programs in deterministic languages having a rewriting-based operational semantics. The deductive system is circular in nature and is proved sound and weakly complete; together, these results say that, when it terminates, our system correctly solves the program-equivalence problem as we state it. We show that our approach is suitable for proving the equivalence of both terminating and non-terminating programs, and also the equivalence of both concrete and symbolic programs. The latter are programs in which some statements or expressions are symbolic variables. By proving the equivalence between symbolic programs, one proves in one shot the equivalence of (possibly, infinitely) many concrete programs obtained by replacing the variables by concrete statements or expressions. A prototype of the proof system for a particular language was implemented and can be tested on-line.
KeywordsOperational Semantic Proof System Program Equivalence Deductive System Symbolic Execution
Unable to display preview. Download preview PDF.
- 1.Kundu, S., Tatlock, Z., Lerner, S.: Proving optimizations correct using parameterized program equivalence. In: Programming Languages Design and Implementation, pp. 327–337 (2009)Google Scholar
- 3.Godlin, B., Strichman, O.: Regression verification: proving the equivalence of similar programs. Software Testing, Verification and Reliability (2012), 10.1002/stvr.1472Google Scholar
- 6.Necula, G.C.: Translation validation for an optimizing compiler. In: PLDI, pp. 83–94. ACM (2000)Google Scholar
- 11.Somenzi, F., Kuehlmann, A.: Equivalence Checking. In: Electronic Design Automation For Integrated Circuits Handbook, vol. 2, ch. 4. Taylor & Francis (2006)Google Scholar
- 14.Roşu, G., Stefanescu, A.: Checking reachability using matching logic. In: Proceedings of the 27th Conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA 2012). ACM (2012) (to appear)Google Scholar
- 15.Arusoaie, A., Lucanu, D., Rusu, V.: A Generic Approach to Symbolic Execution. Research Report RR-8189, INRIA, http://hal.inria.fr/hal-00766220/
- 16.Bonsangue, M., Caltais, G., Goriac, E.-I., Lucanu, D., Rutten, J., Silva, A.: A decision procedure for bisimilarity of generalized regular expressions. In: Davies, J. (ed.) SBMF 2010. LNCS, vol. 6527, pp. 226–241. Springer, Heidelberg (2011)Google Scholar