2014 · 109 citations · 21 references
Mathematical ProgrammingC11 Memory ModelEngineeringCompiler TechnologyVerificationComputer ArchitectureSoftware EngineeringWeak Memory ModelMemory Model (Programming)Software AnalysisFormal VerificationProgram TransformationCompilersParallel ComputingProgramming Language TheoryCommon Compiler OptimisationsCompiler SupportComputer EngineeringComputer ScienceProgram OptimizationRoach MotelOptimizing CompilerProgram AnalysisAutomated ReasoningFormal MethodsFormal Coq ProofsSystem Software
We show that the weak memory model introduced by the 2011 C and C++ standards does not permit many common source-to-source program transformations (such as expression linearisation and "roach motel" reorderings) that modern compilers perform and that are deemed to be correct. As such it cannot be used to define the semantics of intermediate languages of compilers, as, for instance, LLVM aimed to. We consider a number of possible local fixes, some strengthening and some weakening the model. We evaluate the proposed fixes by determining which program transformations are valid with respect to each of the patched models. We provide formal Coq proofs of their correctness or counterexamples as appropriate.
21
Formal verification of a realistic compiler
Xavier Leroy · Communications of the ACM · 2009 · 1.1K citations · Full text
Jeremy Manson, William Pugh, Sarita V. Adve · 2005 · 724 citations
Engineering, Computer Architecture, Software Engineering +20
Jade Alglave, Luc Maranget, Michael Tautschnig · ACM Transactions on Programming Languages and Systems · 2014 · 326 citations · Full text
Mark Batty, Scott Owens, Susmit Sarkar et al. · 2011 · 261 citations