×

Mechanizing metatheory without typing contexts. (English) Zbl 1332.68203

Summary: 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 A. Church [J. Symb. Log. 5, 56–68 (1940; Zbl 0023.28901)], 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 {PoplMark} challenge [B. E. Aydemir et al., Lect. Notes Comput. Sci. 3603, 50–65 (2005; Zbl 1152.68516)] and experimentally evaluate its efficiency by formalizing System \({\mathsf {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 \({\mathsf {F}}_{<:}\) suggests three guidelines to follow when applying the technique of eliminating typing contexts.

MSC:

68T15 Theorem proving (deduction, resolution, etc.) (MSC2010)
68Q42 Grammars and rewriting systems
PDFBibTeX XMLCite
Full Text: DOI

References:

[1] 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) · Zbl 1152.68516
[2] 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) · Zbl 1295.68052
[3] Charguéraud, A.: http://www.chargueraud.org/research/2006/poplmark/ (2006) · Zbl 1056.03014
[4] Church, A.: A formulation of the simple theory of types. J. Symbolic Logic 5(2), 56-68 (1940) · JFM 66.1192.06 · doi:10.2307/2266170
[5] Curry, H.B., Feys, R.: Combinatory Logic. North-Holland (1958) · Zbl 0940.03019
[6] 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) · Zbl 0253.68007 · doi:10.1016/1385-7258(72)90034-0
[7] 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) · JFM 66.1192.06
[8] 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) · Zbl 1056.03014
[9] 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)
[10] Harper, R., Honsell, F., Plotkin G.: A framework for defining logics. J. ACM 40, 143-184 (1993) · Zbl 0778.03004 · doi:10.1145/138027.138060
[11] Krebbers, R.: A formalization of Γ ∞ in Coq. http://robbertkrebbers.nl/research/gammainf (2010)
[12] Leroy, X.: A locally nameless solution to the POPLmark challenge. Research report 6098, INRIA (2007)
[13] 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)
[14] 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) · Zbl 0835.68068
[15] McKinna, J., Pollack, R.: Some lambda calculus and type theory formalized. J. Autom. Reasoning 23, 373-409 (1999) · Zbl 0940.03019 · doi:10.1023/A:1006294005493
[16] Montagu, B.: Experience report: mechanizing core F-zip using the locally nameless approach (extended abstract). In: 5th ACM SIGPLAN Workshop on Mechanizing Metatheory (2010) · Zbl 1270.68073
[17] 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)
[18] 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) · Zbl 1140.68061
[19] Pitts, A.M.: Nominal logic, a first order theory of names and binding. Inf. Comput. 186(2), 165-193 (2003) · Zbl 1056.03014 · doi:10.1016/S0890-5401(03)00138-X
[20] Pollack R., Sato M., Ricciotti, W.: A canonical locally named representation of binding. J. Autom. Reasoning 49(2), 185-207 (2012) · Zbl 1270.68073 · doi:10.1007/s10817-011-9229-y
[21] 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) · Zbl 1322.68048
[22] Urban, C.: Nominal techniques in Isabelle/HOL. J. Autom. Reasoning 40, 327-356 (2008) · Zbl 1140.68061 · doi:10.1007/s10817-008-9097-2
This reference list is based on information provided by the publisher or from digital mathematics libraries. Its items are heuristically matched to zbMATH identifiers and may contain data conversion errors. In some cases that data have been complemented/enhanced by data from zbMATH Open. This attempts to reflect the references listed in the original paper as accurately as possible without claiming completeness or a perfect matching.