skip to main content
research-article

Data-driven equivalence checking

Published:29 October 2013Publication History
Skip Abstract Section

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.

References

  1. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  2. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  3. G. Balakrishnan and T.W. Reps. WYSINWYX: What you see is not what you execute. ACM Trans. Program. Lang. Syst., 32(6), 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. S. Bansal and A. Aiken. Automatic generation of peephole superoptimizers. In ASPLOS, pages 394--403, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Z. Chen and A. Storjohann. A BLAS based C library for exact linear algebra on integer matrices. In ISSAC, pages 92--99, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. D. W. Currie, A. J. Hu, and S. P. Rajan. Automatic formal verification of DSP software. In DAC, pages 130--135, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. L. M. de Moura and N. Bjørner. Z3: An efficient SMT solver. In TACAS, pages 337--340, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  9. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  10. X. Feng and A. J. Hu. Automatic formal verification for scheduled VLIW code. In LCTES-SCOPES, pages 85--92, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. X. Feng and A. J. Hu. Cutpoints for formal equivalence verification of embedded software. In EMSOFT, pages 307--316, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. P. Godefroid and A. Taly. Automated synthesis of symbolic instruction encodings from I/O samples. In PLDI, pages 441--452, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. B. Godlin and O. Strichman. Regression verification. In DAC, pages 466--471, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  15. S. Gulwani. Program analysis using random interpretation. In Ph.D. Dissertation, UC-Berkeley, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. S. Gulwani, S. Jha, A. Tiwari, and R. Venkatesan. Synthesis of loop-free programs. In PLDI, pages 62--73, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. D. Jackson and D. A. Ladd. Semantic Diff: A tool for summarizing the effects of modifications. In ICSM, pages 243--252, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  19. D. E. Knuth. The Art of Computer Programming, Volume II: Seminumerical Algorithms, 2nd Edition. Addison-Wesley, 1981. ISBN 0-201-03822-6.Google ScholarGoogle Scholar
  20. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  21. X. Leroy. The CompCert C verified compiler documentation and users manual, 2013. URL http://compcert.inria.fr/man/manual.pdf.Google ScholarGoogle Scholar
  22. H. Massalin. Superoptimizer - a look at the smallest program. In ASPLOS, pages 122--126, 1987. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  24. V. Menon, K. Pingali, and N. Mateev. Fractal symbolic analysis. ACM Trans. Program. Lang. Syst., 25(6):776--813, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. G. C. Necula. Translation validation for an optimizing compiler. In PLDI, pages 83--94, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  27. N. Partush and E. Yahav. Abstract semantic differencing for numerical programs. In SAS, pages 238--258, 2013.Google ScholarGoogle ScholarCross RefCross Ref
  28. S. Person, M. B. Dwyer, S. G. Elbaum, and C. S. Pasareanu. Differential symbolic execution. In SIGSOFT FSE, pages 226--237, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. A. Pnueli, M. Siegel, and E. Singerman. Translation validation. In TACAS, pages 151--166, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. D. A. Ramos and D. R. Engler. Practical, low-effort equivalence verification of real code. In CAV, pages 669--685, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. T.W. Reps, S. Sagiv, and G. Yorsh. Symbolic implementation of the best transformer. In VMCAI, pages 252--266, 2004.Google ScholarGoogle ScholarCross RefCross Ref
  32. M. Rinard. Credible compilers. Technical report, Massachusetts Institute of Technology, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. E. Schkufza, R. Sharma, and A. Aiken. Stochastic superoptimization. In ASPLOS, pages 305--316, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  35. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  36. R. Tate, M. Stepp, Z. Tatlock, and S. Lerner. Equality saturation: a new approach to optimization. In POPL, pages 264--276, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. A. V. Thakur and T. W. Reps. A method for symbolic computation of abstract operations. In CAV, pages 174--192, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. J.-B. Tristan, P. Govereau, and G. Morrisett. Evaluating valuegraph translation validation for LLVM. In PLDI, pages 295--305, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. A. Turing. Checking a large routine. In The early British computer conferences, pages 70--72. MIT Press, Cambridge, MA, USA, 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. H. S. Warren. Hacker's Delight. Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA, 2002. ISBN 0201914654. Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  42. Y. Xie and A. Aiken. Scalable error detection using boolean satisfiability. In POPL, pages 351--363, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Data-driven equivalence checking

        Recommendations

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in

        Full Access

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader
        About Cookies On This Site

        We use cookies to ensure that we give you the best experience on our website.

        Learn more

        Got it!