Abstract
When mechanizing the metatheory of a programming language, one usually needs many lemmas proving structural properties of typing judgments, such as permutation and weakening. Such structural lemmas are sometimes unnecessary if we eliminate typing contexts by expanding typing judgments into their original hypothetical proofs. This technique of eliminating typing contexts, which has been around since Church (J Symb Log 5(2):56–68, 1940), is based on the view that entailment relations, such as typing judgments, are just syntactic tools for displaying only the hypotheses and conclusion of a hypothetical proof while hiding its internal structure. In this paper, we apply this technique to parts 1A/2A of the textscPoplMark challenge (Aydemir et al. 2005) and experimentally evaluate its efficiency by formalizing System F < : in the Coq proof assistant in a number of different ways. An analysis of our Coq developments shows that eliminating typing contexts produces a more significant reduction in both the number of lemmas and the count of tactics than the cofinite quantification, one of the most effective ways of simplifying the mechanization involving binders. Our experiment with System F < : suggests three guidelines to follow when applying the technique of eliminating typing contexts.
Similar content being viewed by others
Explore related subjects
Discover the latest articles, news and stories from top researchers in related subjects.References
Aydemir, B., Bohannon, A., Fairbairn, M., Foster, J.N., Pierce, B.C., Sewell, P., Vytiniotis, D., Washburn, G., Weirich, S., Zdancewic, S.: Mechanized metatheory for the masses: the PoplMark challenge. In: Hurd, J., Melham, T.F. (eds.) Proceedings of the Eighteenth International Conference on Theorem Proving in Higher Order Logics (TPHOLs 2005), pp. 50–65. Springer (2005)
Aydemir, B., Charguéraud, A., Pierce, B.C., Pollack, R., Weirich, S.: Engineering formal metatheory. In: Proceedings of the 35th annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL ’08, pp. 3–15. ACM (2008)
Charguéraud, A.: http://www.chargueraud.org/research/2006/poplmark/ (2006)
Church, A.: A formulation of the simple theory of types. J. Symbolic Logic 5(2), 56–68 (1940)
Curry, H.B., Feys, R.: Combinatory Logic. North-Holland (1958)
de Bruijn. N.G.: Lambda calculus notation with nameless dummies. A tool for automatic formula manipulation with application to the church-rosser theorem. Indagat. Math. 34, 381–392 (1972)
Garrigue, J.: A certified implementation of ML with structural polymorphism. In: Proceedings of the 8th Asian conference on Programming Languages and Systems, APLAS’10, pp. 360–375. Springer-Verlag (2010)
Geuvers, H., Krebbers, R., McKinna, J., Wiedijk, F.: Pure type systems without explicit contexts. In: Proceedings of the 5th International Workshop on Logical Frameworks and Meta-languages (LFMTP), pp. 53–67 (2010)
Gordon, A.D.: A mechanisation of name-carrying syntax up to alpha-conversion. In: Proceedings of the 6th International Workshop on Higher Order Logic Theorem Proving and its Applications, pp. 413–425. Springer-Verlag (1994)
Harper, R., Honsell, F., Plotkin G.: A framework for defining logics. J. ACM 40, 143–184 (1993)
Krebbers, R.: A formalization of Γ ∞ in Coq. http://robbertkrebbers.nl/research/gammainf (2010)
Leroy, X.: A locally nameless solution to the POPLmark challenge. Research report 6098, INRIA (2007)
Mazurak, K., Zhao, J., Zdancewic, S.: Lightweight linear types in System F°. In: Proceedings of the 5th ACM SIGPLAN Workshop on Types in Language Design and Implementation, TLDI ’10, pp. 77–88. ACM (2010)
McKinna, J., Pollack, R.: Pure type systems formalized. In: Proceedings of the International Conference on Typed Lambda Calculi and Applications, pp. 289–305. Springer-Verlag (1993)
McKinna, J., Pollack, R.: Some lambda calculus and type theory formalized. J. Autom. Reasoning 23, 373–409 (1999)
Montagu, B.: Experience report: mechanizing core F-zip using the locally nameless approach (extended abstract). In: 5th ACM SIGPLAN Workshop on Mechanizing Metatheory (2010)
Pfenning, F., Elliott, C.: Higher-order abstract syntax. In: Proceedings of the ACM SIGPLAN 1988 Conference on Programming Language Design and Implementation, PLDI ’88, pp. 199–208. ACM (1988)
Pfenning, F., Schürmann, C.: System description: Twelf - a meta-logical framework for deductive systems. In: Proceedings of the 16th International Conference on Automated Deduction (CADE-16), pp. 202–206. Springer-Verlag LNAI (1999)
Pitts, A.M.: Nominal logic, a first order theory of names and binding. Inf. Comput. 186(2), 165–193 (2003)
Pollack R., Sato M., Ricciotti, W.: A canonical locally named representation of binding. J. Autom. Reasoning 49(2), 185–207 (2012)
Rossberg A., Russo C.V., Dreyer, D.: F-ing modules. In: Proceedings of the 5th ACM SIGPLAN Workshop on Types in Language Design and Implementation, TLDI ’10, pp. 89–102. ACM (2010)
Urban, C.: Nominal techniques in Isabelle/HOL. J. Autom. Reasoning 40, 327–356 (2008)
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Park, J., Seo, J., Park, S. et al. Mechanizing Metatheory Without Typing Contexts. J Autom Reasoning 52, 215–239 (2014). https://doi.org/10.1007/s10817-013-9287-4
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10817-013-9287-4