Skip to main content
×
Home
    • Aa
    • Aa

Ott: Effective tool support for the working semanticist

  • PETER SEWELL (a1), FRANCESCO ZAPPA NARDELLI (a2), SCOTT OWENS (a1), GILLES PESKINE (a1), THOMAS RIDGE (a1), SUSMIT SARKAR (a1) and ROK STRNIŠA (a1)...
Abstract
Abstract

Semantic definitions of full-scale programming languages are rarely given, despite the many potential benefits. Partly this is because the available metalanguages for expressing semantics – usually either for informal mathematics or the formal mathematics of a proof assistant – make it much harder than necessary to work with large definitions. We present a metalanguage specifically designed for this problem, and a tool, Ott, that sanity-checks such definitions and compiles them into proof assistant code for Coq, HOL, and Isabelle/HOL, together with code for production-quality typesetting, and OCaml boilerplate. The main innovations are (1) metalanguage design to make definitions concise, and easy to read and edit; (2) an expressive but intuitive metalanguage for specifying binding structures; and (3) compilation to proof assistant code. This has been tested in substantial case studies, including modular specifications of calculi from the TAPL text, a Lightweight Java with Java JSR 277/294 module system proposals, and a large fragment of OCaml (OCamllight, 310 rules), with mechanised proofs of various soundness results. Our aim with this work is to enable a phase change: making it feasible to work routinely, without heroic effort, with rigorous semantic definitions of realistic languages.

Copyright
Linked references
Hide All

This list contains references from the content that can be linked to their source. For a full set of references and notes please see the PDF or HTML where available.

B. E. Aydemir , A. Bohannon , M. Fairbairn , J. N. Foster , B. C. Pierce , P. Sewell , D. Vytiniotis , G. Washburn , S. Weirich & S. Zdancewic (2005) Mechanized metatheory for the masses: The POPLmark challenge. In Theorem Proving in Higher Order Logics, 18th International Conference, TPHOLs 2005, Proceedings, J. Hurd & T. F. Melham (eds), Lecture Notes in Computer Science, vol. 3603, Springer, Oxford, pp. 5065.

S. Berghofer & C. Urban (2006) A head-to-head comparison of de Bruijn indices and names. In Proceedings of International Workshop on Logical Frameworks and Meta-Languages: Theory and Practice (LFMTP), ENTCS 174(5), pp. 53–67.

S. Blazy & X. Leroy (2009) Mechanized semantics for the Clight subset of the C language, J. Autom. Reasoning, 43 (3): 263288.

S. Blazy , Z. Dargaye & X. Leroy (2006) Formal Verification of a C compiler front-end. In FM 2006: Formal Methods, 14th International Symposium on Formal Methods, J. Misra , T. Nipkow & E. Sekerinski (eds), Lecture Notes in Computer Science, vol. 4085. Springer-Verlag, Hamilton, Canada, pp. 460475.

P. Borras , D. Clément , T. Despeyroux , J. Incerpi , G. Kahn , B. Lang & V. Pascual (1988) CENTAUR: The system. In Proceedings of the third ACM SIGSOFT/SIGPLAN Software Engineering Symposium on Practical Software Development Environments (SDE 3). ACM, pp. 14–24.

R. J. Boulton (1997) A tool to support formal reasoning about computer languages. In Tools and Algorithms for the Construction and Analysis of Systems, Third International Workshop, TACAS '97, Proceedings, E. Brinksma (ed), Lecture Notes in Computer Science, vol. 1217. Springer, Enschede, The Netherlands, pp. 8195.

L. Cardelli , S. Martini , J. C. Mitchell & A. Scedrov (1994) An extension of system F with subtyping, Inf. Comput., 109 (1/2): 456.

P.-L. Curien & G. Ghelli (1991) Subtyping + Extensionality: Confluence of beta-eta-top reduction in F<=. In Theoretical Aspects of Computer Software, International Conference, TACS '91, Proceedings, T. Ito & A. R. Meyer (eds), Lecture Notes in Computer Science, vol. 526. Springer, Sendai, Japan, pp. 731749.

C. Fournet , G. Gonthier , J.-J. Lévy , L. Maranget & D. Rémy (1996) A calculus of mobile agents. In CONCUR '96, Concurrency Theory, 7th International Conference, Proceedings, U. Montanari & V. Sassone (eds), Lecture Notes in Computer Science, vol. 1119. Springer, Pisa, pp. 406421.

C. Fournet , N. Guts & F. Zappa Nardelli (2008) A formal implementation of value commitment. In Programming Languages and Systems, 17th European Symposium on Programming, ESOP 2008, Proceedings, S. Drossopoulou (ed.), Lecture Notes in Computer Science, vol. 4960. Springer, Budapest, pp. 383397.

K. E. Gray (2008) Safe cross-language inheritance. In ECOOP 2008 – Object-Oriented Programming, 22nd European Conference, Proceedings, J. Vitek (ed.), Lecture Notes in Computer Science, vol. 5142. Springer, Paphos, Cyprus, pp. 5275.

M. Greenberg , B. Pierce & S. Weirich Contracts made manifest. In Proceedings of the 37th ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages (POPL). ACM, Madrid. 2009.

E. Gunter & S. Maharaj (1995) Studying the ML module system in HOL. The Computer Journal: Special Issue on Theorem Proving in Higher Order Logics, 38 (2): 142151.

L. Jia , J. Zhao , V. Sjöberg & S. Weirich Dependent types and program equivalence. In Proceedings of the 37th ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages (POPL). ACM, Madrid. 2009.

S. Kahrs (1993) Mistakes and Ambiguities in the Definition of Standard ML. Tech. Rep., ECS-LFCS-93-257. University of Edinburgh.

G. Klein & T. Nipkow (2006) A machine-checked model for a Java-like language, virtual machine, and compiler, ACM Trans. Program. Lang. Syst., 28 (4): 619695.

P. Klint (1993) A meta-environment for generating programming environments, ACM Trans. Softw. Eng. Method., 2 (2): 176201.

X. Leroy , D. Doligez , J. Garrigue , D. Rémy & J. Vouillon (2005) The Objective Caml System Release 3.09 Documentation and User's Manual. URL http://caml.inria.fr/pub/docs/manual-ocaml/(3.11 from 2008) Accessed 8 January 2010.



J. Matthews , R. B. Findler , M. Flatt & M. Felleisen (2004) A visual environment for developing Context-sensitive term rewriting systems. In Rewriting Techniques and Applications, 15th International Conference, RTA 2004, Proceedings, V. van Oostrom (ed.), Lecture Notes in Computer Science, vol. 3091. Springer, Aachen, Germany, pp. 301311.

S. McPeak & G. C. Necula (2004) Elkhound: A fast, practical GLR parser generator. In Compiler Construction, 13th International Conference, CC 2004, Proceedings, E. Duesterwald (ed.), Lecture Notes in Computer Science, vol. 2985. Springer, Barcelona, pp. 7388.

R. Milner (1972) Implementation and applications of Scott's logic for computable functions. In Proceedings ACM Conference on Proving Assertions About Programs, ACM, Las Cruces, New Mexico, pp. 1–6.

M. Norrish (1999) Deterministic expressions in C. In Programming Languages and Systems, 8th European Symposium on Programming, ESOP'99, Proceedings, S. D. Swierstra (ed.), Lecture Notes in Computer Science, vol. 1576. Springer, Amsterdam, pp. 147161.

S. Owens (2008) A sound semantics for OCamllight. In Programming Languages and Systems, 17th European Symposium on Programming, ESOP 2008, Proceedings, S. Drossopoulou (ed.), Lecture Notes in Computer Science, vol. 4960. Springer, Budapest, pp. 115.

S. Owens & M. Flatt (2006) From structures and functors to modules and units. In Proceedings of 11th ACM SIGPLAN International Conference on Functional Programming (ICFP 2006). ACM, Portland, Oregon, pp. 87–98.

G. Peskine , S. Sarkar , P. Sewell & F. Zappa Nardelli (2007) Binding and substitution (note). Available at: http://www.cl.cam.ac.uk/users/pes20/ott/ Accessed 8 January 2010.

B. C. Pierce (2002) Types and Programming Languages. MIT Press.

F. Pottier (2006) An overview of Cαml. In ACM Workshop on ML, ENTCS, vol. 148, no. 2, pp. 27–52.

A. Rossberg (2001) Defects in the Revised Definition of Standard ML. Tech. Rep., Saarland University. Updated 2007/01/22.

P. Sewell , J. J. Leifer , K. Wansbrough , M. Allen-Williams , F. Zappa Nardelli , P. Habouzit & V. Vafeiadis (2004) Acute: High-Level Programming Language Design for Distributed Computation. Design Rationale and Language Definition. Tech. Rep., UCAM-CL-TR-605. University of Cambridge Computer Laboratory.


M. Sperber , R. K. Dybvig , M. Flatt , K. Anton Van Straaten , C. Richard , J. R. William (eds), Revised5 Report on the Algorithmic Language Scheme, Findler, R. B. & Jacob M. (Authors, formal semantics). (2007) Revised6 report on the algorithmic language Scheme. Available at: http://www.r6rs.org/ Accessed 8 January 2010.

D. Syme (1993) Reasoning with the formal definition of standard ML in HOL. In Higher Order Logic Theorem Proving and its Applications, 6th International Workshop, HUG '93, Proceedings, J. J. Joyce & C.-J. H. Seger (eds), Lecture Notes in Computer Science, vol. 780. Springer-Verlag, Vancouver, pp. 4359.

D. Terrasse (1995) Encoding natural semantics in Coq. In Algebraic Methodology and Software Technology, 4th International Conference, AMAST '95, Proceedings, V. S. Alagar & M. Nivat (eds), Lecture Notes in Computer Science, vol. 936. Springer, Montreal, pp. 230244.

C. Urban (2008) Nominal techniques in Isabelle/HOL, J. Autom. Reasoning, 40 (4): 327356.

V. Vafeiadis & M. Parkinson (2007) A marriage of rely/guarantee and separation logic. In CONCUR 2007 - Concurrency Theory, 18th International Conference, Proceedings, L. Caires & V. T. Vasconcelos (eds), Lecture Notes in Computer Science, vol. 4703. Springer, Lisbon, pp. 256271.

Y. Xiao , A. Sabry & Z. M. Ariola (2001) From syntactic theories to interpreters: Automating the proof of unique decomposition, Higher Order Symbol. Comput., 14 (4): 387409.

M. Zalewski (2008) A Semantic Definition of Separate Type Checking in C++ with Concepts—Abstract Syntax and Complete Semantic Definition. Tech. Rep., 2008:12. Department of Computer Science and Engineering, Chalmers University.

M. Zalewski & S. Schupp (2009) A semantic definition of Separate type checking in C++ with concepts. J. Object Technol. 8 (5): 105132.

Recommend this journal

Email your librarian or administrator to recommend adding this journal to your organisation's collection.

Journal of Functional Programming
  • ISSN: 0956-7968
  • EISSN: 1469-7653
  • URL: /core/journals/journal-of-functional-programming
Please enter your name
Please enter a valid email address
Who would you like to send this to? *
×