ABSTRACT
This paper describes a cross-version compiler validator and measures its effectiveness on the CLR JIT compiler. The validator checks for semantically equivalent assembly language output from various versions of the compiler, including versions across a seven-month time period, across two architectures (x86 and ARM), across two compilation scenarios (JIT and MDIL), and across optimizations levels. For month-to-month comparisons, the validator achieves a false alarm rate of just 2.2%. To help understand reported semantic differences, the validator performs a root-cause analysis on the counterexample traces generated by the underlying automated theorem proving tools. This root-cause analysis groups most of the counterexamples into a small number of buckets, reducing the number of counterexamples analyzed by hand by anywhere from 53% to 96%. The validator ran on over 500,000 methods across a large suite of test programs, finding 12 previously unknown correctness and performance bugs in the CLR compiler.
- M. Barnett, B.-Y. E. Chang, R. DeLine, B. Jacobs, and K. R. M. Leino. Boogie: A modular reusable verifier for object-oriented programs. In Formal Methods for Components and Objects (FMCO), volume 4111, 2006. Google ScholarDigital Library
- A. Bessey, K. Block, B. Chelf, A. Chou, B. Fulton, S. Hallem, C. Henri-Gros, A. Kamsky, S. McPeak, and D. Engler. A few billion lines of code later: using static analysis to find bugs in the real world. In Communications of the ACM, Feb. 2010. Google ScholarDigital Library
- J. Chen, C. Hawblitzel, F. Perry, M. Emmi, J. Condit, D. Coetzee, and P. Pratikakis. Type-preserving compilation for large-scale optimizing object-oriented compilers. SIGPLAN Not., 43(6):183–192, 2008. Google ScholarDigital Library
- L. M. de Moura and N. Bjørner. Z3: An efficient SMT solver. In TACAS, pages 337–340, 2008.Google ScholarDigital Library
- C. Hawblitzel and E. Petrank. Automated verification of practical garbage collectors. In POPL, pages 441–453, 2009. Google ScholarDigital Library
- M. Jose and R. Majumdar. Cause clue clauses: Error localization using maximum satisfiability. In PLDI, 2011. Google ScholarDigital Library
- S. K. Lahiri, C. Hawblitzel, M. Kawaguchi, and H. Rebˆ elo. Symdiff: A language-agnostic semantic diff tool for imperative programs. In Computer Aided Verification (CAV ˇ S12), 2012. Google ScholarDigital Library
- X. Leroy. Formal certification of a compiler back-end or: programming a compiler with a proof assistant. In Principles of Programming Languages (POPL ’06), pages 42–54, 2006. Google ScholarDigital Library
- G. C. Necula. Translation validation for an optimizing compiler. In Programming Language Design and Implementation (PLDI ’00), pages 83–94, 2000. Google ScholarDigital Library
- A. Pardoe. Clr inside out: Program silverlight with the coreclr. In MSDN Magazine, Aug. 2008.Google Scholar
- A. Pnueli, M. Siegel, and E. Singerman. Translation validation. In Tools and Algorithms for Construction and Analysis of Systems (TACAS ’98), pages 151–166, 1998. Google ScholarDigital Library
- S. Ramaswamy. Deep dive into the kernel of .NET on Windows Phone 8. In Build Conference, Nov. 2012.Google Scholar
- D. Ramos and D. Engler. Practical, low-effort equivalence verification of real code. In CAV, 2011. Google ScholarDigital Library
- M. Stepp, R. Tate, and S. Lerner. Equality-based translation validator for llvm. In CAV, 2011. Google ScholarDigital Library
- R. Tate, M. Stepp, Z. Tatlock, and S. Lerner. Equality saturation: a new approach to optimization. In Principles of Programming Languages (POPL ’09), pages 264–276, 2009. Google ScholarDigital Library
- J. Tristan, P. Govereau, and G. Morrisett. Evaluating value-graph translation validation for llvm. In Programming Language Design and Implementation (PLDI ’11), pages 295–305, 2011. Google ScholarDigital Library
- X. Yang, Y. Chen, E. Eide, and J. Regehr. Finding and understanding bugs in c compilers. In PLDI. ACM Press, 2011. Google ScholarDigital Library
- J. Zhao, S. Zdancewic, S. Nagarakatte, and M. M. K. Martin. Formalizing the llvm intermediate representation for verified program transformation. In POPL, 2012. Google ScholarDigital Library
Index Terms
- Will you still compile me tomorrow? static cross-version compiler validation
Recommendations
Validating software pipelining optimizations
CASES '02: Proceedings of the 2002 international conference on Compilers, architecture, and synthesis for embedded systemsThe paper presents a method for translation validation of a specific optimization, software pipelining optimization, used to increase the instruction level parallelism in EPIC type of architectures. Using a methodology as in [15] to establish simulation ...
Language-parametric compiler validation with application to LLVM
ASPLOS '21: Proceedings of the 26th ACM International Conference on Architectural Support for Programming Languages and Operating SystemsWe propose a new design for a Translation Validation (TV) system geared towards practical use with modern optimizing compilers, such as LLVM. Unlike existing TV systems, which are custom-tailored for a particular sequence of transformations and a ...
Compiler-Assisted Multiple Instruction Word Retry for VLIW Architectures
Very Long Instruction Word (VLIW) architectures can enhance performance by exploiting fine-grained instruction level parallelism. In this paper, we describe a compiler assisted multiple instruction word retry scheme for VLIW architectures. A read buffer ...
Comments