Semantic Equivalence Checking for HHVM Bytecode

We describe a semantic differencing tool used to compare the byte-codes generated by two different compilers for Hack/PHP at Facebook. The tool is a prover for a simple relational Hoare logic for low-level code and is used in testing, allowing the developers to focus on semantically significant differences between the outputs of the two compilers.

[1]  Daniel Jackson,et al.  Semantic Diff: a tool for summarizing the effects of modifications , 1994, Proceedings 1994 International Conference on Software Maintenance.

[2]  Shuvendu K. Lahiri,et al.  SYMDIFF: A Language-Agnostic Semantic Diff Tool for Imperative Programs , 2012, CAV.

[3]  Xavier Leroy,et al.  Validating Register Allocation and Spilling , 2010, CC.

[4]  Chung-Kil Hur,et al.  Biorthogonality, step-indexing and compiler correctness , 2009, ICFP.

[5]  Guilherme Ottoni,et al.  HHVM JIT: a profile-guided, region-based compiler for PHP and Hack , 2018, PLDI.

[6]  Nick Benton Abstracting Allocation , 2006, CSL.

[7]  Nick Benton A Typed, Compositional Logic for a Stack-Based Abstract Machine , 2005, APLAS.

[8]  Benjamin Grégoire,et al.  Formal certification of code-based cryptographic proofs , 2009, POPL '09.

[9]  Xavier Leroy,et al.  Formal verification of a realistic compiler , 2009, CACM.

[10]  Nick Benton Abstracting allocation : The new new thing , 2006 .

[11]  Nick Benton,et al.  Simple relational correctness proofs for static analyses and program transformations , 2004, POPL.

[12]  Gilles Barthe,et al.  Probabilistic Relational Reasoning for Differential Privacy , 2012, TOPL.

[13]  Nick Benton,et al.  Reading, Writing and Relations Towards Extensional Semantics for Effect Analyses , 2006 .

[14]  Andrew W. Appel,et al.  An indexed model of recursive types for foundational proof-carrying code , 2001, TOPL.

[15]  Nicolas Tabareau,et al.  Compiling functional types to relational specifications for low level imperative code , 2009, TLDI '09.

[16]  Andrew W. Appel,et al.  A very modal model of a modern, major, general type system , 2007, POPL '07.