Abstract
It is rare to give a semantic definition of a full-scale programming language, despite the many potential benefits. Partly this is because the available metalanguages for expressing semantics - usually either L<scp>a</scp>TEX 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, Isabelle, and (in progress) Twelf, together with L<scp>a</scp>TEX 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 (around 306 rules), with machine 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.
- AFP. The archive of formal proofs. http://afp.sf.net.Google Scholar
- B. Aydemir, A. Charguéraud, B. C. Pierce, R. Pollack, and S. Weirich. Engineering formal metatheory, 2007. http://www.chargueraud.org/arthur/research/2007/binders/. Google Scholar
Digital Library
- B. E. Aydemir, A. Bohannon, M. Fairbairn, J. N. Foster, B. C. Pierce, P. Sewell, D. Vytiniotis, G. Washburn, S. Weirich, and S. Zdancewic. Mechanized metatheory for the masses: The POPLmark Challenge. In Proc. TPHOLs, LNCS 3603, 2005. Google Scholar
Digital Library
- S. Berghofer and C. Urban. A head-to-head comparison of de Bruijn indices and names. In Proc. Int. Workshop on Logical Frameworks and Meta-Languages: Theory and Practice, pages 46--59, 2006.Google Scholar
- S. Blazy, Z. Dargaye, and X. Leroy. Formal verification of a C compiler front-end. In Int. Symp. on Formal Methods, LNCS 2085, 2006. Google Scholar
Digital Library
- P. Borras, D. Clement, T. Despeyroux, J. Incerpi, G. Kahn, B. Lang, and V. Pascual. Centaur: the system. In Proc. SDE 3, pages 14--24, 1988. Google Scholar
Digital Library
- R. J. Boulton. A tool to support formal reasoning about computer languages. In Proc. TACAS, LNCS 1217, pages 81--95, 1997. Google Scholar
Digital Library
- A. Charguéraud. Annotated bibliography for formalization of lambda-calculus and type theory. http://fling-l.seas.upenn.edu/~plclub/cgi-bin/poplmark/index.php?title=Annotated_Bibliography, July 2006.Google Scholar
- J. Cheney and C. Urban. Alpha-Prolog: A logic programming language with names, binding and alpha-equivalence. In Proc. ICLP, LNCS 3132, pages 269--283, 2004.Google Scholar
- Coq. The Coq proof assistant, v.8.0. http://coq.inria.fr/.Google Scholar
- A. Dijkstra and S. D. Swierstra. Ruler: Programming type rules. In Proc. Functional and Logic Programming, LNCS 3945, 2006. Google Scholar
Digital Library
- R. B. Findler and J. Matthews. Revised 5:92 report on the algorithmic language Scheme, Chapter 10, Formal Semantics, Jan. 2007.Google Scholar
- C. Fournet, G. Gonthier, J.-J. Lévy, L. Maranget, and D. Rémy. A calculus of mobile agents. In Proc. CONCUR '96, LNCS 1119, 1996. Google Scholar
Digital Library
- E. Gunter and S. Maharaj. Studying the ML module system in HOL. The Computer Journal: Special Issue on Theorem Proving in Higher Order Logics, 1995. Google Scholar
Digital Library
- HOL. The HOL 4 system, Kananaskis-3 release. http://hol.sourceforge.net/.Google Scholar
- Isabelle. Isabelle 2005. http://isabelle.in.tum.de/.Google Scholar
- M. Johnson. Memoization in top-down parsing. Comput. Linguist., 21(3):405--417, 1995. Google Scholar
Digital Library
- S. Kahrs. Mistakes and ambiguities in the definition of Standard ML. Technical Report ECS-LFCS-93-257, University of Edinburgh, 1993.Google Scholar
- G. Klein and T. Nipkow. A machine-checked model for a Java-like language, virtual machine, and compiler. TOPLAS, 28(4):619--695, 2006. Google Scholar
Digital Library
- P. Klint. A meta-environment for generating programming environments. ACM Trans. on Soft. Eng. and Methodology, 2(2):176--201, April 1993. Google Scholar
Digital Library
- M. R. Lakin and A. M. Pitts. A metalanguage for structural operational semantics. In Symposium on Trends in Functional Programming, 2007.Google Scholar
- D. K. Lee, K. Crary, and R. Harper. Towards a mechanized metatheory of Standard ML. In Proc. POPL, January 2007. Google Scholar
Digital Library
- P. Lee, F. Pfenning, G. Rollins, and W. Scherlis. The Ergo Support System: An integrated set of tools for prototyping integrated environments. In Proc. SDE 3, 1988. Google Scholar
Digital Library
- X. Leroy. A syntactic theory of type generativity and sharing. Journal of Functional Programming, 6(5):667--698, 1996.Google Scholar
Cross Ref
- X. Leroy et al. The Objective Caml system release 3.09 documentation and user's manual, Oct. 2005.Google Scholar
- M. Y. Levin and B. C. Pierce. Tinkertype: A language for playing with formal systems. Journal of Functional Programming, 13(2), Mar. 2003. Google Scholar
Digital Library
- J. Matthews, R. B. Findler, M. Flatt, and M. Felleisen. A visual environment for developing context-sensitive term rewriting systems. In Proc. RTA, 2004.Google Scholar
Cross Ref
- R. Milner. Implementation and applications of Scott's logic for computable functions. In Proc. ACM conference on Proving assertions about programs, pages 1--6, 1972. Google Scholar
Digital Library
- R. Milner, M. Tofte, and R. Harper. The Definition of Standard ML. MIT Press, 1990. Google Scholar
Digital Library
- P. D. Mosses. Pragmatics of Modular SOS. In Proc. AMAST, LNCS 2442, pages 21--40, 2002. Google Scholar
Digital Library
- M. Norrish. Deterministic expressions in C. In Proc. 8th ESOP (ETAPS), LNCS 1576, pages 147--161, 1999. Google Scholar
Digital Library
- C. Owens. Coding binding and substitution explicitly in Isabelle. In Proceedings of the First Isabelle Users Workshop, pages 36--52, 1995.Google Scholar
- S. Owens and M. Flatt. From structures and functors to modules and units. In Proc. ICFP, 2006. Google Scholar
Digital Library
- S. Peyton Jones, editor. Haskell 98 Language and Libraries. The Revised Report. CUP, 2003.Google Scholar
- B. C. Pierce. Types and Programming Languages. MIT Press, 2002. Google Scholar
Digital Library
- F. Pottier. An overview of Cml. In ACM Workshop on ML, ENTCS 148(2), pages 27--52, Mar. 2006. Google Scholar
Digital Library
- T. Reps and T. Teitelbaum. The synthesizer generator. In Proc. SDE 1, pages 42--48, 1984. Google Scholar
Digital Library
- A. Rossberg. Defects in the revised definition of Standard ML. Technical report, Saarland University, 2001. Updated 2007/01/22.Google Scholar
- P. Sewell and F. Zappa Nardelli. Ott, 2007. http://www.cl.cam.ac.uk/users/pes20/ott/.Google Scholar
- P. Sewell, J. J. Leifer, K. Wansbrough, M. Allen-Williams, F. Zappa Nardelli, P. Habouzit, and V. Vafeiadis. Acute: High-level programming language design for distributed computation. design rationale and language definition. Technical Report UCAM-CL-TR-605, University of Cambridge Computer Laboratory, Oct. 2004. See also the ICFP'05 paper.Google Scholar
- M. R. Shinwell, A. M. Pitts, and M. J. Gabbay. FreshML: Programming with binders made simple. In Proc. ICFP, 2003. Google Scholar
Digital Library
- C. Strachey. Towards a formal semantics. In Formal Language Description Languages for Computer Programming. North Holland, 1966.Google Scholar
- R. Strniša, P. Sewell, and M. Parkinson. The Java Module System: core design and semantic definition. In Proc. OOPSLA, 2007. To appear. Google Scholar
Digital Library
- D. Syme. Reasoning with the formal definition of Standard ML in HOL. In TPHOLs, LNCS 780, pages 43--59, 1993. Google Scholar
- D. Terrasse. Encoding Natural Semantics in Coq. In Proc. AMAST, LNCS 936, pages 230--244, 1995. Google Scholar
Digital Library
- S. Tse and S. Zdancewic. Concise concrete syntax, 2006. Submitted. http://www.cis.upenn.edu/~stse/javac.Google Scholar
- Twelf. Twelf 1.5. http://www.cs.cmu.edu/~twelf/.Google Scholar
- V. Vafeiadis and M. Parkinson. A marriage of rely/guarantee and separation logic. In Proc. CONCUR, 2007. Google Scholar
Digital Library
- M. VanInwegen. The Machine-Assisted Proof of Programming Language Properties. PhD thesis, Univ. of Pennsylvania, 1996. Computer and Information Science Tech Report MS-CIS-96-31. Google Scholar
Digital Library
Index Terms
Ott: effective tool support for the working semanticist
Recommendations
Ott: Effective tool support for the working semanticist
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 <private-char><inline-graphic mime-subtype="gif" ...
Ott: effective tool support for the working semanticist
ICFP '07: Proceedings of the 12th ACM SIGPLAN international conference on Functional programmingIt is rare to give a semantic definition of a full-scale programming language, despite the many potential benefits. Partly this is because the available metalanguages for expressing semantics - usually either L<scp>a</scp>TEX for informal mathematics, ...
Intuitionistic Trilattice Logics
We take up a suggestion by Odintsov (2009, Studia Logica, 91, 407–428) and define intuitionistic variants of certain logics arising from the trilattice SIXTEEN3 introduced in Shramko and Wansing (2005, Journal of Philosophical Logic, 34, 121–153 and ...







Comments