[go: up one dir, main page]
More Web Proxy on the site http://driver.im/ skip to main content
10.1007/978-3-642-28869-2_3guideproceedingsArticle/Chapter ViewAbstractPublication PagesConference Proceedingsacm-pubtype
Article

A formally verified SSA-Based middle-end: Static single assignment meets compcert

Published: 24 March 2012 Publication History

Abstract

CompCert is a formally verified compiler that generates compact and efficient PowerPC, ARM and x86 code for a large and realistic subset of the C language. However, CompCert foregoes using Static Single Assignment (SSA), an intermediate representation that allows for writing simpler and faster optimizers, and is used by many compilers. In fact, it has remained an open problem to verify formally a SSA-based compiler middle-end. We report on a formally verified, SSA-based, middle-end for CompCert. Our middle-end performs conversion from CompCert intermediate form to SSA form, optimization of SSA programs, including Global Value Numbering, and transforming out of SSA to intermediate form. In addition to provide the first formally verified SSA-based middle-end, we address two problems raised by Leroy [13]: giving a simple and intuitive formal semantics to SSA, and leveraging the global properties of SSA to reason locally about program optimizations.

References

[1]
Alpern, B., Wegman, M. N., Zadeck, F. K.: Detecting equality of variables in programs. In: POPL 1988. ACM (1988)
[2]
Appel, A. W.: SSA is functional programming. SIGPLAN Notices 33 (1998)
[3]
Blech, J. O., Glesner, S., Leitner, J., Mülling, S.: Optimizing code generation from SSA form: A comparison between two formal correctness proofs in Isabelle/HOL. In: COCV 2005. ENTCS. Elsevier (2005)
[4]
Briggs, P., Cooper, K. D., Harvey, T. J., Simpson, L. T.: Practical improvements to the construction and destruction of static single assignment form. In: SPE (1998)
[5]
Briggs, P., Cooper, K. D., Simpson, L. T.: Value numbering. In: SPE (1997)
[6]
Companion web page, http://www.irisa.fr/celtique/ext/compcertSSA
[7]
Cytron, R., Ferrante, J., Rosen, B. K., Wegman, M. N., Zadeck, F. K.: Efficiently computing static single assignment form and the control dependence graph. In: ACM TOPLAS (1991)
[8]
Dargaye, Z., Leroy, X.: Mechanized Verification of CPS Transformations. In: Dershowitz, N., Voronkov, A. (eds.) LPAR 2007. LNCS (LNAI), vol. 4790, pp. 211-225. Springer, Heidelberg (2007)
[9]
Hack, S., Grund, D., Goos, G.: Register Allocation for Programs in SSA-Form. In: Mycroft, A., Zeller, A. (eds.) CC 2006. LNCS, vol. 3923, pp. 247-262. Springer, Heidelberg (2006)
[10]
Knoop, J., Koschützki, D., Steffen, B.: Basic-Block Graphs: Living Dinosaurs? In: Koskimies, K. (ed.) CC 1998. LNCS, vol. 1383, pp. 65-79. Springer, Heidelberg (1998)
[11]
Knoop, J., Rüthing, O., Steffen, B.: Lazy code motion. In: PLDI 1992 (1992)
[12]
Lengauer, T., Tarjan, R. E.: A fast algorithm for finding dominators in a flowgraph. In: ACM TOPLAS (1979)
[13]
Leroy, X.: A formally verified compiler back-end. JAR 43(4) (2009)
[14]
The LLVM compiler infrastructure, http://llvm.org/
[15]
Mansky, W., Gunter, E.: A Framework for Formal Verification of Compiler Optimizations. In: Kaufmann, M., Paulson, L.C. (eds.) ITP 2010. LNCS, vol. 6172, pp. 371-386. Springer, Heidelberg (2010)
[16]
Matsuno, Y., Ohori, A.: A type system equivalent to static single assignment. In: PPDP 2006. ACM (2006)
[17]
Menon, V., Glew, N., Murphy, B. R., McCreight, A., Shpeisman, T., Adl-Tabatabai, A. R., Petersen, L.: A verifiable SSA program representation for aggressive compiler optimization. In: POPL 2006, ACM (2006)
[18]
Necula, G.: Translation validation for an optimizing compiler. In: PLDI 2000. ACM (2000)
[19]
Pnueli, A., Siegel, M. D., Singerman, E.: Translation Validation. In: Steffen, B. (ed.) TACAS 1998. LNCS, vol. 1384, pp. 151-166. Springer, Heidelberg (1998)
[20]
Rideau, L., Serpette, B. P., Leroy, X.: Tilting at windmills with Coq: Formal verification of a compilation algorithm for parallel moves. In: JAR (2008)
[21]
Stepp, M., Tate, R., Lerner, S.: Equality-Based Translation Validator for LLVM. In: Gopalakrishnan, G., Qadeer, S. (eds.) CAV 2011. LNCS, vol. 6806, pp. 737-742. Springer, Heidelberg (2011)
[22]
Tate, R., Stepp, M., Tatlock, Z., Lerner, S.: Equality saturation: a new approach to optimization. In: POPL 2009. ACM (2009)
[23]
Tristan, J. B., Govereau, P., Morrisett, G.: Evaluating value-graph translation validation for LLVM. In: PLDI 2011. ACM (2011)
[24]
Tristan, J. B., Leroy, X.: Verified validation of lazy code motion. In: PLDI 2009. ACM (2009)
[25]
Tristan, J. B., Leroy, X.: A simple, verified validator for software pipelining. In: POPL 2010. ACM (2010)
[26]
Zhao, J., Zdancewic, S., Nagarakatte, S., Martin, M.: Formalizing the LLVM intermediate representation for verified program transformation. In: POPL 2012. ACM (2012)

Cited By

View all
  1. A formally verified SSA-Based middle-end: Static single assignment meets compcert

      Recommendations

      Comments

      Please enable JavaScript to view thecomments powered by Disqus.

      Information & Contributors

      Information

      Published In

      cover image Guide Proceedings
      ESOP'12: Proceedings of the 21st European conference on Programming Languages and Systems
      March 2012
      599 pages
      ISBN:9783642288685
      • Editor:
      • Helmut Seidl

      Publisher

      Springer-Verlag

      Berlin, Heidelberg

      Publication History

      Published: 24 March 2012

      Qualifiers

      • Article

      Contributors

      Other Metrics

      Bibliometrics & Citations

      Bibliometrics

      Article Metrics

      • Downloads (Last 12 months)0
      • Downloads (Last 6 weeks)0
      Reflects downloads up to 10 Dec 2024

      Other Metrics

      Citations

      Cited By

      View all
      • (2023)BIRD: A Binary Intermediate Representation for Formally Verified Decompilation of X86-64 BinariesTests and Proofs10.1007/978-3-031-38828-6_1(3-20)Online publication date: 18-Jul-2023
      • (2017)Verified Spilling and Translation Validation with RepairInteractive Theorem Proving10.1007/978-3-319-66107-0_27(427-443)Online publication date: 26-Sep-2017
      • (2015)Verified Validation of Program SlicingProceedings of the 2015 Conference on Certified Programs and Proofs10.1145/2676724.2693169(109-117)Online publication date: 13-Jan-2015
      • (2014)Formal Verification of an SSA-Based Middle-End for CompCertACM Transactions on Programming Languages and Systems10.1145/257908036:1(1-35)Online publication date: 1-Mar-2014
      • (2013)Verifying quantitative reliability for programs that execute on unreliable hardwareACM SIGPLAN Notices10.1145/2544173.250954648:10(33-52)Online publication date: 29-Oct-2013
      • (2013)Verifying quantitative reliability for programs that execute on unreliable hardwareProceedings of the 2013 ACM SIGPLAN international conference on Object oriented programming systems languages & applications10.1145/2509136.2509546(33-52)Online publication date: 29-Oct-2013
      • (2013)Formal verification of SSA-based optimizations for LLVMACM SIGPLAN Notices10.1145/2499370.246216448:6(175-186)Online publication date: 16-Jun-2013
      • (2013)Formal verification of SSA-based optimizations for LLVMProceedings of the 34th ACM SIGPLAN Conference on Programming Language Design and Implementation10.1145/2491956.2462164(175-186)Online publication date: 16-Jun-2013
      • (2013)Formal Verification of Loop Bound Estimation for WCET AnalysisRevised Selected Papers of the 5th International Conference on Verified Software: Theories, Tools, Experiments - Volume 816410.1007/978-3-642-54108-7_15(281-303)Online publication date: 17-May-2013
      • (2012)Proof-producing synthesis of ML from higher-order logicACM SIGPLAN Notices10.1145/2398856.236454547:9(115-126)Online publication date: 9-Sep-2012
      • Show More Cited By

      View Options

      View options

      Media

      Figures

      Other

      Tables

      Share

      Share

      Share this Publication link

      Share on social media