Skeletal semantics and their interpretations

The development of mechanised language specification based on structured operational semantics, with applications to verified compilers and sound program analysis, requires huge effort. General theory and frameworks have been proposed to help with this effort. However, none of this work provides a systematic way of developing concrete and abstract semantics, connected together by a general consistency result. We introduce a skeletal semantics of a language, where each skeleton describes the complete semantic behaviour of a language construct. We define a general notion of interpretation, which provides a systematic and language-independent way of deriving semantic judgements from the skeletal semantics. We explore four generic interpretations: a simple well-formedness interpretation; a concrete interpretation; an abstract interpretation; and a constraint generator for flow-sensitive analysis. We prove general consistency results between interpretations, depending only on simple language-dependent lemmas. We illustrate our ideas using a simple While language.

[1]  David A. Schmidt Abstract Interpretation in the Operational Semantics Hierarchy , 1997 .

[2]  Arthur Charguéraud,et al.  A trusted mechanised JavaScript specification , 2014, POPL.

[3]  Flemming Nielson,et al.  Principles of Program Analysis , 1999, Springer Berlin Heidelberg.

[4]  David A. Schmidt Natural-Semantics-Based Abstract Interpretation (Preliminary Version) , 1995, SAS.

[5]  Thomas P. Jensen,et al.  A Calculational Approach to Control-Flow Analysis by Abstract Interpretation , 2008, SAS.

[6]  David A. Schmidt Abstract Interpretation of Small-Step Semantics , 1996, LOMAPS.

[7]  Ramana Kumar,et al.  CakeML: a verified implementation of ML , 2014, POPL.

[8]  Kim G. Larsen,et al.  On-the-Fly Computation of Bisimilarity Distances , 2017, Log. Methods Comput. Sci..

[9]  Michael Norrish C formalised in HOL , 1998 .

[10]  Tom Ridge,et al.  Lem: reusable engineering of real-world semantics , 2014, ICFP.

[11]  Xavier Leroy,et al.  Mechanized Semantics for the Clight Subset of the C Language , 2009, Journal of Automated Reasoning.

[12]  Scott Owens,et al.  A Sound Semantics for OCamllight , 2008, ESOP.

[13]  Xavier Leroy,et al.  A Formally-Verified C Static Analyzer , 2015, POPL.

[14]  Philippa Gardner,et al.  Towards a program logic for JavaScript , 2012, POPL '12.

[15]  Grigore Rosu,et al.  Matching μ-Logic , 2017, 2019 34th Annual ACM/IEEE Symposium on Logic in Computer Science (LICS).

[16]  Lars Birkedal,et al.  Iris from the ground up: A modular foundation for higher-order concurrent separation logic , 2018, Journal of Functional Programming.

[17]  Gilles Kahn,et al.  Natural Semantics , 1987, STACS.

[18]  Arthur Charguéraud,et al.  Pretty-Big-Step Semantics , 2013, ESOP.

[19]  Tobias Nipkow Verified Bytecode Verifiers , 2001, FoSSaCS.

[20]  Furio Honsell,et al.  A framework for defining logics , 1993, JACM.

[21]  Hongseok Yang,et al.  Views: compositional reasoning for concurrent programs , 2013, POPL.

[22]  Gordon D. Plotkin,et al.  Towards a mathematical operational semantics , 1997, Proceedings of Twelfth Annual IEEE Symposium on Logic in Computer Science.

[23]  Tom Ridge,et al.  Ott: effective tool support for the working semanticist , 2007, ICFP '07.

[24]  Frank Pfenning,et al.  System Description: Twelf - A Meta-Logical Framework for Deductive Systems , 1999, CADE.

[25]  David Cachera,et al.  Extracting a Data Flow Analyser in Constructive Logic , 2004, ESOP.

[26]  Matthew Might,et al.  Abstracting abstract machines: a systematic approach to higher-order program analysis , 2011, CACM.

[27]  Patrick Cousot,et al.  Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints , 1977, POPL.

[28]  Mads Dam,et al.  Analysis and Verification of Multiple-Agent Languages , 1996, Lecture Notes in Computer Science.

[29]  Peter D. Mosses,et al.  Reusable components of semantic specifications , 2014, LNCS Trans. Aspect Oriented Softw. Dev..

[30]  Patrick Cousot,et al.  The calculational design of a generic abstract interpreter , 1999 .

[31]  Grigore Rosu,et al.  An overview of the K semantic framework , 2010, J. Log. Algebraic Methods Program..

[32]  Xavier Leroy,et al.  Formal certification of a compiler back-end or: programming a compiler with a proof assistant , 2006, POPL '06.

[33]  Grigore Rosu,et al.  Semantics-based program verifiers for all languages , 2016, OOPSLA.

[34]  Tarmo Uustalu Coinductive Big-Step Semantics for Concurrency , 2013, PLACES.

[35]  Elsa L. Gunter,et al.  IsaK: A Complete Semantics of K , 2018 .

[36]  Sebastian Erdweg,et al.  Compositional soundness proofs of abstract interpreters , 2018, Proc. ACM Program. Lang..

[37]  Gordon D. Plotkin,et al.  A structural approach to operational semantics , 2004, J. Log. Algebraic Methods Program..

[38]  Tom Ridge,et al.  Ott: Effective tool support for the working semanticist , 2010, J. Funct. Program..

[39]  Matthew Might,et al.  Abstracting abstract machines , 2010, ICFP '10.

[40]  Ankur Taly,et al.  An Operational Semantics for JavaScript , 2008, APLAS.

[41]  Peter D. Mosses Action Semantics , 1986, ADT.

[42]  Martin Bodin,et al.  Certified Abstract Interpretation with Pretty-Big-Step Semantics , 2015, CPP.

[43]  Jens Palsberg,et al.  Closure analysis in constraint form , 1995, TOPL.