Abstract
Automatic translation validation across the unoptimized intermediate representation (IR) of the original source code and the optimized executable assembly code is a desirable capability, and has the potential to compete with existing approaches to verified compilation such as CompCert. A difficult subproblem is the automatic identification of the correlations across the transitions between the two programs' respective locations. We present a counterexample-guided algorithm to identify these correlations in a robust and scalable manner. Our algorithm has both theoretical and empirical advantages over prior work in this problem space.
Supplemental Material
- 2019. Polybench/C. https://sourceforge.net/projects/polybench/.Google Scholar
- 2020. [ONLINE-DEMO] Online demo of the equivalence checker. http://compiler.ai/.Google Scholar
- 2020. diet libc webpage. https://www.fefe.de/dietlibc/.Google Scholar
- 2020. OpenBSD libc sources. https://github.com/openbsd/src/tree/master/lib/libc.Google Scholar
- 2020. Yices2 bug report. https://github.com/SRI-CSL/yices2/issues/146.Google Scholar
- Alfred V. Aho, Monica S. Lam, Ravi Sethi, and Jefrey D. Ullman. 2006. Compilers: Principles, Techniques, and Tools (2Nd Edition). Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA.Google Scholar
Digital Library
- Clark Barrett, Yi Fang, Benjamin Goldberg, Ying Hu, Amir Pnueli, and Lenore Zuck. 2005. TVOC: A Translation Validator for Optimizing Compilers. In Computer Aided Verification, Kousha Etessami and Sriram K. Rajamani (Eds.). Springer Berlin Heidelberg, Berlin, Heidelberg, 291-295. https://doi.org/10.1007/11513988_29 Google Scholar
Digital Library
- Nick Benton. 2004. Simple Relational Correctness Proofs for Static Analyses and Program Transformations. In Proceedings of the 31st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (Venice, Italy) (POPL ¿04). Association for Computing Machinery, New York, NY, USA, 14 ¿ 25. https://doi.org/10.1145/964001.964003 Google Scholar
Digital Library
- Frédéric Besson, Sandrine Blazy, and Pierre Wilke. 2014. A Precise and Abstract Memory Model for C Using Symbolic Values. In Programming Languages and Systems, Jacques Garrigue (Ed.). Springer International Publishing, Cham, 449-468. https://doi.org/10.1007/978-3-319-12736-1_24 Google Scholar
Cross Ref
- Z. Chen, Z. Gong, J. J. Szaday, D. C. Wong, D. Padua, A. Nicolau, A. V. Veidenbaum, N. Watkinson, Z. Sura, S. Maleki, J. Torrellas, and G. DeJong. 2017. LORE: A loop repository for the evaluation of compilers. In 2017 IEEE International Symposium on Workload Characterization (IISWC). 219-228. https://doi.org/10.1109/IISWC. 2017.8167779 Google Scholar
Cross Ref
- Berkeley Churchill, Oded Padon, Rahul Sharma, and Alex Aiken. 2019. Semantic Program Alignment for Equivalence Checking. In Proceedings of the 40th ACM SIGPLAN Conference on Programming Language Design and Implementation (Phoenix, AZ, USA) ( PLDI 2019). ACM, New York, NY, USA, 1027-1040. https://doi.org/10.1145/3314221.3314596 Google Scholar
Digital Library
- Manjeet Dahiya and Sorav Bansal. 2017a. Black-Box Equivalence Checking Across Compiler Optimizations. In Programming Languages and Systems-15th Asian Symposium, APLAS 2017, Suzhou, China, November 27-29, 2017, Proceedings. 127-147. https://doi.org/10.1007/978-3-319-71237-6_7 Google Scholar
Cross Ref
- Manjeet Dahiya and Sorav Bansal. 2017b. Modeling Undefined Behaviour Semantics for Checking Equivalence Across Compiler Optimizations. In Hardware and Software: Verification and Testing-13th International Haifa Verification Conference, HVC 2017, Haifa, Israel, November 13-15, 2017, Proceedings. 19-34. https://doi.org/10.1007/978-3-319-70389-3_2 Google Scholar
Cross Ref
- Saumya Debray, Robert Muth, and Matthew Weippert. 1998. Alias Analysis of Executable Code. In Proceedings of the 25th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (San Diego, California, USA) ( POPL '98). ACM, New York, NY, USA, 12-24. https://doi.org/10.1145/268946.268948 Google Scholar
Digital Library
- Dennis Felsing, Sarah Grebing, Vladimir Klebanov, Philipp Rümmer, and Mattias Ulbrich. 2014. Automating Regression Verification. In Proceedings of the 29th ACM/IEEE International Conference on Automated Software Engineering (Vasteras, Sweden) (ASE '14). ACM, New York, NY, USA, 349-360. https://doi.org/10.1145/2642937.2642987 Google Scholar
Digital Library
- Cormac Flanagan and K. RustanM. Leino. 2001. Houdini, an Annotation Assistant for ESC/Java. In FME 2001: Formal Methods for Increasing Software Productivity. Lecture Notes in Computer Science, Vol. 2021. Springer Berlin Heidelberg, 500-517. https://doi.org/10.1007/3-540-45251-6_29 Google Scholar
Cross Ref
- Shubhani Gupta, Aseem Saxena, Anmol Mahajan, and Sorav Bansal. 2018. Efective Use of SMT Solvers for Program Equivalence Checking Through Invariant-Sketching and Query-Decomposition. In Theory and Applications of Satisfiability Testing-SAT 2018, Olaf Beyersdorf and Christoph M. Wintersteiger (Eds.). Springer International Publishing, Cham, 365-382. https://doi.org/10.1007/978-3-319-94144-8_22 Google Scholar
Cross Ref
- C. A. R. Hoare. 1969. An Axiomatic Basis for Computer Programming. Commun. ACM 12, 10 (Oct. 1969 ), 576 ¿ 580. https://doi.org/10.1145/363235.363259 Google Scholar
Digital Library
- ISO. 2011. ISO/IEC 9899:2011 Information technology-Programming languages-C. International Organization for Standardization, Geneva, Switzerland. 683 ( est.) pages. http ://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail. htm?csnumber=57853Google Scholar
- Aditya Kanade, Amitabha Sanyal, and Uday P. Khedker. 2009. Validation of GCC Optimizers Through Trace Generation. Softw. Pract. Exper. 39, 6 (April 2009 ), 611-639. https://doi.org/10.1002/spe.v39: 6 Google Scholar
Cross Ref
- Moritz Kiefer, Vladimir Klebanov, and Mattias Ulbrich. 2018. Relational Program Reasoning Using Compiler IR. J. Autom. Reason. 60, 3 (March 2018 ), 337-363. https://doi.org/10.1007/s10817-017-9433-5 Google Scholar
Digital Library
- Sudipta Kundu, Zachary Tatlock, and Sorin Lerner. 2009. Proving Optimizations Correct Using Parameterized Program Equivalence. In Proceedings of the 2009 ACM SIGPLAN Conference on Programming Language Design and Implementation (Dublin, Ireland) ( PLDI '09). ACM, New York, NY, USA, 327-337. https://doi.org/10.1145/1542476.1542513 Google Scholar
Digital Library
- Shuvendu Lahiri, Chris Hawblitzel, Ming Kawaguchi, and Henrique Rebelo. 2012. SymDif: A language-agnostic semantic dif tool for imperative programs. In Computer Aided Verification (CAV '12) (Tool description). Springer. https://doi.org/10. 1007/978-3-642-31424-7_54 Google Scholar
Digital Library
- Xavier Leroy. 2006. Formal certification of a compiler back-end, or: programming a compiler with a proof assistant. In 33rd ACM symposium on Principles of Programming Languages. ACM Press, 42-54. https://doi.org/10.1145/1111037.1111042 Google Scholar
Digital Library
- A. Leung, D. Bounov, and S. Lerner. 2015. C-to-Verilog translation validation. In Formal Methods and Models for Codesign (MEMOCODE), 2015 ACM/IEEE International Conference on. 42-47. https://doi.org/10.1109/MEMCOD. 2015.7340466 Google Scholar
Digital Library
- Nuno P. Lopes and José Monteiro. 2016. Automatic Equivalence Checking of Programs with Uninterpreted Functions and Integer Arithmetic. Int. J. Softw. Tools Technol. Transf. 18, 4 (Aug. 2016 ), 359-374. https://doi.org/10.1007/s10009-015-0366-1 Google Scholar
Digital Library
- Saeed Maleki, Yaoqing Gao, Maria J. Garzarán, Tommy Wong, and David A. Padua. 2011. An Evaluation of Vectorizing Compilers. In Proceedings of the 2011 International Conference on Parallel Architectures and Compilation Techniques (PACT '11). IEEE Computer Society, Washington, DC, USA, 372-382. https://doi.org/10.1109/PACT. 2011.68 Google Scholar
Digital Library
- Robin Milner. 1971. An Algebraic Definition of Simulation Between Programs. Technical Report. Stanford, CA, USA.Google Scholar
- Markus Müller-Olm and Helmut Seidl. 2005. Analysis of Modular Arithmetic. In Programming Languages and Systems, Mooly Sagiv (Ed.). Springer Berlin Heidelberg, Berlin, Heidelberg, 46-60. https://doi.org/10.1145/1275497.1275504 Google Scholar
Digital Library
- KedarS. Namjoshi and LenoreD. Zuck. 2013. Witnessing Program Transformations. In Static Analysis, Francesco Logozzo and Manuel Fähndrich (Eds.). Lecture Notes in Computer Science, Vol. 7935. Springer Berlin Heidelberg, 304-323. https://doi.org/10.1007/978-3-642-38856-9_17 Google Scholar
Cross Ref
- George C. Necula. 2000. Translation Validation for an Optimizing Compiler. In Proceedings of the ACM SIGPLAN 2000 Conference on Programming Language Design and Implementation (Vancouver, British Columbia, Canada) ( PLDI '00). ACM, New York, NY, USA, 83-94. https://doi.org/10.1145/349299.349314 Google Scholar
Digital Library
- Amir Pnueli, Michael Siegel, and Eli Singerman. 1998. Translation Validation. In Proceedings of the 4th International Conference on Tools and Algorithms for Construction and Analysis of Systems (TACAS '98). Springer-Verlag, London, UK, UK, 151-166. https://doi.org/10.5555/646482.691453 Google Scholar
Digital Library
- Arnd Poetzsch-Hefter and Marek Gawkowski. 2005. Towards Proof Generating Compilers. Electron. Notes Theor. Comput. Sci. 132, 1 (May 2005 ), 37-51. https://doi.org/10.1016/j.entcs. 2005. 03.023 Google Scholar
Digital Library
- Rahul Sharma, Eric Schkufza, Berkeley Churchill, and Alex Aiken. 2013. Data-driven Equivalence Checking. In Proceedings of the 2013 ACM SIGPLAN International Conference on Object Oriented Programming Systems Languages & Applications (Indianapolis, Indiana, USA) ( OOPSLA '13). ACM, New York, NY, USA, 391-406. https://doi.org/10.1145/2509136.2509509 Google Scholar
Digital Library
- Michael Stepp, Ross Tate, and Sorin Lerner. 2011. Equality-based Translation Validator for LLVM. In Proceedings of the 23rd International Conference on Computer Aided Verification (Snowbird, UT) (CAV'11). Springer-Verlag, Berlin, Heidelberg, 737-742. https://doi.org/10.1007/978-3-642-22110-1_59 Google Scholar
Cross Ref
- Ofer Strichman and Benny Godlin. 2008. Regression Verification-A Practical Way to Verify Programs. In Verified Software: Theories, Tools, Experiments, Bertrand Meyer and Jim Woodcock (Eds.). Lecture Notes in Computer Science, Vol. 4171. Springer Berlin Heidelberg, 496-501. https://doi.org/10.1007/978-3-540-69149-5_54 Google Scholar
Digital Library
- Ross Tate, Michael Stepp, Zachary Tatlock, and Sorin Lerner. 2009. Equality Saturation: a New Approach to Optimization. In POPL '09: Proceedings of the 36th annual ACM SIGPLAN-SIGACT symposium on Principles of Programming Languages (Savannah, GA, USA). ACM, New York, NY, USA, 264-276. https://doi.org/10.1145/1480881.1480915 Google Scholar
Digital Library
- Jean-Baptiste Tristan, Paul Govereau, and Greg Morrisett. 2011. Evaluating Value-graph Translation Validation for LLVM. In Proceedings of the 32Nd ACM SIGPLAN Conference on Programming Language Design and Implementation (San Jose, California, USA) ( PLDI '11). ACM, New York, NY, USA, 295-305. https://doi.org/10.1145/1993498.1993533 Google Scholar
Digital Library
- Anna Zaks and Amir Pnueli. 2008. CoVaC: Compiler Validation by Program Analysis of the Cross-Product. In Proceedings of the 15th International Symposium on Formal Methods (Turku, Finland) (FM '08). Springer-Verlag, Berlin, Heidelberg, 35-51. https://doi.org/10.1007/978-3-540-68237-0_5 Google Scholar
Digital Library
- Lenore Zuck, Amir Pnueli, Yi Fang, and Benjamin Goldberg. 2003. VOC: A Methodology for the Translation Validation of Optimizing Compilers. 9, 3 (mar 2003 ), 223-247. https://doi.org/10.3217/jucs-009-03-0223 Google Scholar
Cross Ref
- Lenore Zuck, Amir Pnueli, Benjamin Goldberg, Clark Barrett, Yi Fang, and Ying Hu. 2005. Translation and Run-Time Validation of Loop Transformations. Form. Methods Syst. Des. 27, 3 (Nov. 2005 ), 335-360. https://doi.org/10.1007/s10703-005-3402-z Google Scholar
Digital Library
Index Terms
Counterexample-guided correlation algorithm for translation validation
Recommendations
Translation and Run-Time Validation of Loop Transformations
This paper presents new approaches to the validation of loop optimizations that compilers use to obtain the highest performance from modern architectures. Rather than verify the compiler, the approach of translation validation performs a validation ...
Formal Verification of Optimizing Transformations during High-level Synthesis
ISEC'19: Proceedings of the 12th Innovations on Software Engineering Conference (formerly known as India Software Engineering Conference)Translation validation is the process of proving that the target code is a correct translation of the source program being compiled. In this work, we propose a translation validation method to verify code motion transformations involving loops applied ...
Counterexample-Guided Abstraction Refinement for Component-Based Systems
COMPSAC '14: Proceedings of the 2014 IEEE 38th Annual Computer Software and Applications ConferenceCompositional verification of invariants is a technique for alleviating the state explosion problem in component-based verification. The efficiency of these methods depends on abstraction, which leads to verification incompleteness. In this paper, we ...






Comments