Abstract
We present a data driven algorithm for equivalence checking of two loops. The algorithm infers simulation relations using data from test runs. Once a candidate simulation relation has been obtained, off-the-shelf SMT solvers are used to check whether the simulation relation actually holds. The algorithm is sound: insufficient data will cause the proof to fail. We demonstrate a prototype implementation, called DDEC, of our algorithm, which is the first sound equivalence checker for loops written in x86 assembly.
- T. Arons, E. Elster, L. Fix, S. Mador-Haim, M. Mishaeli, J. Shalev, E. Singerman, A. Tiemeyer, M. Y. Vardi, and L. D. Zuck. Formal verification of backward compatibility of microcode. In CAV, pages 185--198, 2005. Google Scholar
Digital Library
- D. F. Bacon, S. L. Graham, and O. J. Sharp. Compiler transformations for high-performance computing. ACM Comput. Surv., 26(4):345--420, 1994. Google Scholar
Digital Library
- G. Balakrishnan and T.W. Reps. WYSINWYX: What you see is not what you execute. ACM Trans. Program. Lang. Syst., 32(6), 2010. Google Scholar
Digital Library
- S. Bansal and A. Aiken. Automatic generation of peephole superoptimizers. In ASPLOS, pages 394--403, 2006. Google Scholar
Digital Library
- Z. Chen and A. Storjohann. A BLAS based C library for exact linear algebra on integer matrices. In ISSAC, pages 92--99, 2005. Google Scholar
Digital Library
- D. W. Currie, A. J. Hu, and S. P. Rajan. Automatic formal verification of DSP software. In DAC, pages 130--135, 2000. Google Scholar
Digital Library
- L. M. de Moura and N. Bjørner. Z3: An efficient SMT solver. In TACAS, pages 337--340, 2008. Google Scholar
Digital Library
- I. Dillig, T. Dillig, and A. Aiken. Small formulas for large programs: On-line constraint simplification in scalable static analysis. In SAS, pages 236--252, 2010. Google Scholar
Digital Library
- M. D. Ernst, J. H. Perkins, P. J. Guo, S. McCamant, C. Pacheco, M. S. Tschantz, and C. Xiao. The Daikon system for dynamic detection of likely invariants. Sci. Comput. Program., 69(1-3):35--45, 2007. Google Scholar
Digital Library
- X. Feng and A. J. Hu. Automatic formal verification for scheduled VLIW code. In LCTES-SCOPES, pages 85--92, 2002. Google Scholar
Digital Library
- X. Feng and A. J. Hu. Cutpoints for formal equivalence verification of embedded software. In EMSOFT, pages 307--316, 2005. Google Scholar
Digital Library
- P. Godefroid and A. Taly. Automated synthesis of symbolic instruction encodings from I/O samples. In PLDI, pages 441--452, 2012. Google Scholar
Digital Library
- B. Godlin and O. Strichman. Regression verification. In DAC, pages 466--471, 2009. Google Scholar
Digital Library
- B. Goldberg, L. D. Zuck, and C. W. Barrett. Into the loops: Practical issues in translation validation for optimizing compilers. Electr. Notes Theor. Comput. Sci., 132(1):53--71, 2005. Google Scholar
Digital Library
- S. Gulwani. Program analysis using random interpretation. In Ph.D. Dissertation, UC-Berkeley, 2005. Google Scholar
Digital Library
- S. Gulwani, S. Jha, A. Tiwari, and R. Venkatesan. Synthesis of loop-free programs. In PLDI, pages 62--73, 2011. Google Scholar
Digital Library
- D. Jackson and D. A. Ladd. Semantic Diff: A tool for summarizing the effects of modifications. In ICSM, pages 243--252, 1994. Google Scholar
Digital Library
- R. Joshi, G. Nelson, and Y. Zhou. Denali: A practical algorithm for generating optimal code. ACM Trans. Program. Lang. Syst., 28(6):967--989, 2006. Google Scholar
Digital Library
- D. E. Knuth. The Art of Computer Programming, Volume II: Seminumerical Algorithms, 2nd Edition. Addison-Wesley, 1981. ISBN 0-201-03822-6.Google Scholar
- S. K. Lahiri, C. Hawblitzel, M. Kawaguchi, and H. Rebêlo. SYMDIFF: A language-agnostic semantic diff tool for imperative programs. In CAV, pages 712--717, 2012. Google Scholar
Digital Library
- X. Leroy. The CompCert C verified compiler documentation and users manual, 2013. URL http://compcert.inria.fr/man/manual.pdf.Google Scholar
- H. Massalin. Superoptimizer - a look at the smallest program. In ASPLOS, pages 122--126, 1987. Google Scholar
Digital Library
- T. Matsumoto, H. Saito, and M. Fujita. Equivalence checking of C programs by locally performing symbolic simulation on dependence graphs. In ISQED, pages 370--375, 2006. Google Scholar
Digital Library
- V. Menon, K. Pingali, and N. Mateev. Fractal symbolic analysis. ACM Trans. Program. Lang. Syst., 25(6):776--813, 2003. Google Scholar
Digital Library
- G. C. Necula. Translation validation for an optimizing compiler. In PLDI, pages 83--94, 2000. Google Scholar
Digital Library
- T. Nguyen, D. Kapur, W. Weimer, and S. Forrest. Using dynamic analysis to discover polynomial and array invariants. In ICSE, pages 683--693, 2012. Google Scholar
Digital Library
- N. Partush and E. Yahav. Abstract semantic differencing for numerical programs. In SAS, pages 238--258, 2013.Google Scholar
Cross Ref
- S. Person, M. B. Dwyer, S. G. Elbaum, and C. S. Pasareanu. Differential symbolic execution. In SIGSOFT FSE, pages 226--237, 2008. Google Scholar
Digital Library
- A. Pnueli, M. Siegel, and E. Singerman. Translation validation. In TACAS, pages 151--166, 1998. Google Scholar
Digital Library
- D. A. Ramos and D. R. Engler. Practical, low-effort equivalence verification of real code. In CAV, pages 669--685, 2011. Google Scholar
Digital Library
- T.W. Reps, S. Sagiv, and G. Yorsh. Symbolic implementation of the best transformer. In VMCAI, pages 252--266, 2004.Google Scholar
Cross Ref
- M. Rinard. Credible compilers. Technical report, Massachusetts Institute of Technology, 1999. Google Scholar
Digital Library
- E. Schkufza, R. Sharma, and A. Aiken. Stochastic superoptimization. In ASPLOS, pages 305--316, 2013. Google Scholar
Digital Library
- R. Sharma, S. Gupta, B. Hariharan, A. Aiken, P. Liang, and A. V. Nori. A data driven approach for algebraic loop invariants. In ESOP, pages 574--592, 2013. Google Scholar
Digital Library
- K. C. Shashidhar, M. Bruynooghe, F. Catthoor, and G. Janssens. Verification of source code transformations by program equivalence checking. In CC, pages 221--236, 2005. Google Scholar
Digital Library
- R. Tate, M. Stepp, Z. Tatlock, and S. Lerner. Equality saturation: a new approach to optimization. In POPL, pages 264--276, 2009. Google Scholar
Digital Library
- A. V. Thakur and T. W. Reps. A method for symbolic computation of abstract operations. In CAV, pages 174--192, 2012. Google Scholar
Digital Library
- J.-B. Tristan, P. Govereau, and G. Morrisett. Evaluating valuegraph translation validation for LLVM. In PLDI, pages 295--305, 2011. Google Scholar
Digital Library
- A. Turing. Checking a large routine. In The early British computer conferences, pages 70--72. MIT Press, Cambridge, MA, USA, 1989. Google Scholar
Digital Library
- H. S. Warren. Hacker's Delight. Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA, 2002. ISBN 0201914654. Google Scholar
Digital Library
- C. M. Wintersteiger, Y. Hamadi, and L. M. de Moura. Efficiently solving quantified bit-vector formulas. Formal Methods in System Design, 42(1):3--23, 2013. Google Scholar
Digital Library
- Y. Xie and A. Aiken. Scalable error detection using boolean satisfiability. In POPL, pages 351--363, 2005. Google Scholar
Digital Library
Index Terms
Data-driven equivalence checking
Recommendations
Data-driven equivalence checking
OOPSLA '13: Proceedings of the 2013 ACM SIGPLAN international conference on Object oriented programming systems languages & applicationsWe present a data driven algorithm for equivalence checking of two loops. The algorithm infers simulation relations using data from test runs. Once a candidate simulation relation has been obtained, off-the-shelf SMT solvers are used to check whether ...
Conditionally correct superoptimization
OOPSLA 2015: Proceedings of the 2015 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and ApplicationsThe aggressive optimization of heavily used kernels is an important problem in high-performance computing. However, both general purpose compilers and highly specialized tools such as superoptimizers often do not have sufficient static knowledge of ...
Conditionally correct superoptimization
OOPSLA '15The aggressive optimization of heavily used kernels is an important problem in high-performance computing. However, both general purpose compilers and highly specialized tools such as superoptimizers often do not have sufficient static knowledge of ...







Comments