Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
research-article

Contextual modal type theory

Published: 12 June 2008 Publication History

Abstract

The intuitionistic modal logic of necessity is based on the judgmental notion of categorical truth. In this article we investigate the consequences of relativizing these concepts to explicitly specified contexts. We obtain contextual modal logic and its type-theoretic analogue. Contextual modal type theory provides an elegant, uniform foundation for understanding metavariables and explicit substitutions. We sketch some applications in functional programming and logical frameworks.

Supplementary Material

Nanevski Appendix (a23-nanevski-apndx.pdf)
Online appendix to Contextual modal type theory. The appendix supports the information on article 23.

References

[1]
Abadi, M., Cardelli, L., Curien, P.-L., and Lèvy, J.-J. 1990. Explicit substitutions. In Proceedings of the Symposium on Principles of Programming Languages (POPL'90, San Francisco, CA). 31--46.]]
[2]
Alechina, N., Mendler, M., de Paiva, V., and Ritter, E. 2001. Categorical and Kripke semantics for Constructive S4 modal logic. In International Workshop on Computer Science Logic, CSL'01, L. Fribourg, Ed. Lecture Notes in Computer Science, vol. 2142. Springer, Berlin, Germany, France, 292--307.]]
[3]
Attardi, G. and Simi, M. 1994. Proofs in context. In Principles of Knowledge Representation and Reasoning, J. Doyle, E. Sandewall, and P. Torasso, Eds. Morgan Kaufman, San Francisco, CA, 16--26.]]
[4]
Attardi, G. and Simi, M. 1995. A formalization of viewpoints. Fundamenta Informaticae 23, 3, 149--173.]]
[5]
Bjørner, N. and Muñoz, C. 2000. Absolute explicit unification. In International Conference on Rewriting Techniques and Applications, RTA'00. Lecture Notes in Computer Science, vol. 1833. Springer, Berlin, Germany, 31--46.]]
[6]
Bognar, M. and de Vrijer, R. 2001. A calculus of lambda calculus context. J. Automat. Reason. 27, 1, 29--59.]]
[7]
Buvač, S. 1996. Quantificational logic of context. In Proceedings of the Thirteenth National Conference on Artificial Intelligence. 600--606.]]
[8]
Buvač, S., Buvač, V., and Mason, I. 1995. Metamathematics of contexts. Fundamenta Informaticae 23, 3, 412--419.]]
[9]
Calcagno, C., Moggi, E., and Taha, W. 2004. ML-like inference for classifiers. In European Symposium on Programming, ESOP'04, D. Schmidt, Ed. Lecture Notes in Computer Science, 2986. Springer-Verlag, Berlin, Germany, 79--93.]]
[10]
Cartmell, J. 1986. Generalized algebraic theories and contextual categories. Ann. Pure Appl. Log. 32, 209--243.]]
[11]
Cervesato, I. and Pfenning, F. 2002. A linear logical framework. Inform. Computat. 179, 1 (Nov.), 19--75.]]
[12]
Dami, L. 1998. A lambda-calculus for dynamic binding. Theoret. Comput. Sci. 192, 2, 201--231.]]
[13]
Davies, R. 1996. A temporal logic approach to binding-time analysis. In Symposium on Logic in Computer Science (LICS'96), E. Clarke, Ed. IEEE Computer Society Press, Los Alamitos, CA, NJ, 184--195.]]
[14]
Davies, R. and Pfenning, F. 2001. A modal analysis of staged computation. J. ACM 48, 3 (May), 555--604.]]
[15]
de Groote, P. 2002. On the strong normalisation of intuitionistic natural deduction with permutation-conversions. Inform. Computat. 178, 2 (Nov.), 441--464.]]
[16]
de Paiva, V. 2003. Natural deduction and context as (constructive) modality. In Modelling and Using Context, P. Blackburn, C. Ghidini, R. M. Turner, and F. Giunchiglia, Eds. Lecture Notes in Artificial Inteligence, vol. 2680. Springer, Berlin, Germany, 116--129.]]
[17]
Dowek, G., Hardin, T., and Kirchner, C. 1995. Higher-order unification via explicit substitutions. In Symposium on Logic in Computer Science (LICS'95). D. Kozen, Ed. IEEE Computer Society Press, Los Alamitos, CA, 366--374.]]
[18]
Dowek, G., Hardin, T., Kirchner, C., and Pfenning, F. 1996. Unification via explicit substitutions: The case of higher-order patterns. In Proceedings of the Joint International Conference and Symposium on Logic Programming, M. Maher, Ed. MIT Press, Cambridge, MA, 259--273.]]
[19]
Geuvers, H. and Jojgov, G. I. 2002. Open proofs and open terms: a basis for interactive logic. In International Workshop on Computer Science Logic, CSL'02, J. C. Bradfield, Ed. Lecture Notes in Computer Science, vol. 2471. Springer, Berlin, Germany, 537--552.]]
[20]
Giunchiglia, F. 1993. Contextual reasoning. Epistemologica 16, 345--364.]]
[21]
Giunchiglia, F. and Serafini, L. 1994. Multilanguage hierarchical logics, or: How to do without modal logics. Artific. Intell. 65, 1, 29--70.]]
[22]
Harper, R., Honsell, F., and Plotkin, G. 1993. A framework for defining logics. JACM. 40, 1 (Jan.), 143--184.]]
[23]
Hashimoto, M. and Ohori, A. 2001. A typed context calculus. Theoret. Comput. Sci. 266, 1--2, 249--272.]]
[24]
Hodas, J. and Miller, D. 1994. Logic programming in a fragment of intuitionistic linear logic. Inform. Computat. 110, 2, 327--365.]]
[25]
Jojgov, G. I. 2003. Holes with binding power. In Types for Proofs and Programs, Second International Workshop, TYPES 2002, Berg en Dal, The Netherlands, April 24-28, 2002, Selected Papers, H. Geuvers and F. Wiedijk, Eds. Lecture Notes in Computer Science, vol. 2646. Springer, Berlin, Germany, 162--181.]]
[26]
Kripke, S. 1959. A completeness theorem in modal logic. J. Symbol. Log. 24, 1--14.]]
[27]
Lee, S.-D. and Friedman, D. P. 1996. Enriching the lambda calculus with contexts: Toward a theory of incremental program construction. In Proceedings of the International Conference on Functional Programming (ICFP'96). 239--250.]]
[28]
Liang, C. and Nadathur, G. 2002. Tradeoffs in the intensional representation of lambda terms. In International Conference on Rewriting Techniques and Applications, RTA'02, S. Tison, Ed. Lecture Notes in Computer Science, vol. 2378. Springer-Verlag, Berlin, Germany, 192--206.]]
[29]
Magnusson, L. 1995. The implementation of ALF—a proof editor based on Martin-Löf's monomorphic type theory with explicit substitutions. Ph.D. dissertation. Chalmers University of Technology and Göteborg University, Göteborg, Sweden.]]
[30]
Martin-Löf, P. 1996. On the meanings of the logical constants and the justifications of the logical laws. Nordic J. Philosoph. Log. 1, 1, 11--60.]]
[31]
Mason, I. A. 1999. Computing with contexts. Higher-Order Symbol. Computat. 12, 2, 171--201.]]
[32]
McCarthy, J. 1987. Generality in artificial intelligence. Commun. ACM 30, 12, 1030--1035.]]
[33]
McCarthy, J. 1993. Notes on formalizing contexts. In Proceedings of the International Joint Conference on Artificial Intelligence (Chambery, France). 555--560.]]
[34]
Miller, D. 1991. A logic programming language with lambda-abstraction, function variables, and simple unification. J. Log. Computat. 1, 4, 497--536.]]
[35]
Montague, R. 1963. Syntactical treatment of modalities, with corollaries on reflexion principles and finite axiomatizability. Acta Philosophica Fennica 16, 153--167.]]
[36]
Moody, J. 2003. Modal logic as a basis for distributed computation. Tech. rep. CMU-CS-03-194. Carnegie Mellon University, Pittsburgh, PA.]]
[37]
Muñoz, C. 2001. Dependent types and explicit substitutions. Math. Struct. Comput. Sci. 11, 1 (Feb.), 91--129.]]
[38]
Murphy VII, T., Crary, K., Harper, R., and Pfenning, F. 2004. A symmetric modal lambda calculus for distributed computing. In Symposium on Logic in Computer Science, H. Ganzinger, Ed. (LICS 04, Turku, Finland). 286--295.]]
[39]
Nanevski, A. 2003. From dynamic binding to state via modal possibility. In Proceedings of the International Conference on Principles and Practice of Declarative Programming (PPDP'03. Uppsala, Sweden). 207--218.]]
[40]
Nanevski, A. 2004. Functional programming with names and necessity. Ph.D. dissertation. Computer Science Department, Carnegie Mellon University, Pittsburgh, PA.]]
[41]
Nanevski, A. and Pfenning, F. 2005. Staged computation with names and necessity. J. Funct. Programm. 15, 6 (Nov.), 837--891.]]
[42]
Nanevski, A., Pientka, B., and Pfenning, F. 2003. A modal foundation for meta variables. In Proceedings of MERλIN 2003 (Uppsala, Sweden).]]
[43]
Pfenning, F. 2000. Structural cut elimination I. Intuitionistic and classical logic. Inform. Computat. 157, 1/2 (Mar.), 84--141.]]
[44]
Pfenning, F. 2001. Intensionality, extensionality, and proof irrelevance in modal type theory. In Symposium on Logic in Computer Science (LICS'01), J. Halpern, Ed. IEEE Computer Society Press, Los Alamitos, CA, 221--230.]]
[45]
Pfenning, F. and Davies, R. 2001. A judgmental reconstruction of modal logic. Math. Struct. Comput. Sci. 11, 4, 511--540.]]
[46]
Pfenning, F. and Schürmann, C. 1999. System description: Twelf—a meta-logical framework for deductive systems. In International Conference on Automated Deduction, CADE'99, H. Ganzinger, Ed. Lecture Notes in Artificial Inteligence, vol. 1632. Springer-Verlag, Berlin, Germany, 202--206.]]
[47]
Pientka, B. 2003. Tabled higher-order logic programming. Ph.D. dissertation. Computer Science Department, Carnegie Mellon University, Pittsburgh, PA.]]
[48]
Pientka, B. and Pfennning, F. 2003. Optimizing higher-order pattern unification. In International Conference on Automated Deduction, CADE'03, F. Baader, Ed. Lecture Notes in Computer Science, vol. 2741. Springer, Berlin, Germany, 473--487.]]
[49]
Sato, M., Sakurai, T., and Burstall, R. 2001. Explicit environments. Fundamenta Informaticae 45, 1-2, 79--115.]]
[50]
Sato, M., Sakurai, T., and Kameyama, Y. 2002. A simply typed context calculus with first-class environments. J. Funct. Log. Programm. 2002, 4 (Mar.).]]
[51]
Sato, M., Sakurai, T., Kameyama, Y., and Igarashi, A. 2003. Calculi of meta-variables. In International Workshop on Computer Science Logic, CSL'03, M. Baaz and J. A. Makowsky, Eds. Lecture Notes in Computer Science, vol. 2803. Springer, Berlin, Germany, 484--497.]]
[52]
Schürmann, C., Poswolsky, A., and Sarnat, J. 2005. The ∇-calculus: Functional programming with higher-order encodings. In International Conference on Typed Lambda Calculus and Applications, TLCA'05, P. Urzyczyn, Ed. Lecture Notes in Computer Science, vol. 3461. Springer, Berlin, Germany, 339--353.]]
[53]
Serafini, L. and Bouquet, P. 2004. Comparing formal theories of context in AI. Artific. Intell. 155, 1--2, 41--67.]]
[54]
Serafini, L. and Giunchiglia, F. 2002. ML system: A proof theory for contexts. J. Log. Lang. Inform. 11, 4, 471--518.]]
[55]
Simpson, A. K. 1994. The proof theory and semantics of intuitionistic modal logic. Ph.D. thesis, University of Edinburgh.]]
[56]
Strecker, M. 1999. Construction and deduction in type theories. Ph.D. dissertation. Universität Ulm, Ulm, Germany.]]
[57]
Taha, W. and Nielsen, M. F. 2003. Environment classifiers. In Proceedings of the Symposium on Principles of Programming Languages (POPL'03, New Orleans, LA). G. Morrisett, Ed. ACM Press, New York, NY, 26--37.]]
[58]
Taha, W. and Sheard, T. 1997. Multi-stage programming with explicit annotations. In Proceedings of the Workshop on Partial Evaluation and Semantics-Based Program Manipulation (PEPM'97. Amsterdam, The Netherland). 203--217.]]
[59]
Thomason, R. H. 1999. Type theoretic foundations for context, part 1: Contexts as complex type-theoretic objects. In Proceedings of the Second International and Interdisciplinary Conference on Modeling and Using Contexts (CONTEXT'99, Trento, Italy), P. Bouquet, L. Serafini, P. Brézillon, M. Benerecetti, and F. Castellani, Eds. 352--374.]]
[60]
Thomason, R. H. 2003. Dynamic contextual intensional logic: Logical foundations and an application. In Modeling and Using Context, P. Blackburn, C. Ghidini, R. M. Turner, and F. Giunchiglia, Eds. Lecture Notes in Artificial Inteligence, vol. 2680. Springer, Berlin, Germany, 328--341.]]
[61]
Watkins, K., Cervesato, I., Pfenning, F., and Walker, D. 2002. A concurrent logical framework I: Judgments and properties. Tech. rep. CMU-CS-02-101, Department of Computer Science, Carnegie Mellon University, Pittsburgh, PA. Revised May 2003.]]
[62]
Weyhrauch, R. W. 1979. Prolegomena to a theory of mechanized formal reasoning. Artific. Intell. 13, 1--2, 133--170.]]
[63]
Wickline, P., Lee, P., and Pfenning, F. 1998a. Run-time code generation and Modal-ML. In Proceedings of the Conference on Programming Language Design and Implementation (PLDI'98, Montreal, P. Q., Canada), K. D. Cooper, Ed. ACM Press, 224--235.]]
[64]
Wickline, P., Lee, P., Pfenning, F., and Davies, R. 1998b. Modal types as staging specifications for run-time code generation. ACM Comput. Surv. 30, 3es.]]

Cited By

View all
  • (2025)A Dependent Type Theory for Meta-programming with Intensional AnalysisProceedings of the ACM on Programming Languages10.1145/37048519:POPL(416-445)Online publication date: 9-Jan-2025
  • (2025)A Type-Theoretic Framework for Certified Meta-programming (Invited Talk Extended Abstract)Proceedings of the 2025 ACM SIGPLAN International Workshop on Partial Evaluation and Program Manipulation10.1145/3704253.3706136(10-11)Online publication date: 10-Jan-2025
  • (2025)Split Decisions: Explicit Contexts for Substructural LanguagesProceedings of the 14th ACM SIGPLAN International Conference on Certified Programs and Proofs10.1145/3703595.3705888(257-271)Online publication date: 10-Jan-2025
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Transactions on Computational Logic
ACM Transactions on Computational Logic  Volume 9, Issue 3
June 2008
289 pages
ISSN:1529-3785
EISSN:1557-945X
DOI:10.1145/1352582
Issue’s Table of Contents
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 12 June 2008
Accepted: 01 February 2007
Revised: 01 February 2007
Received: 01 September 2005
Published in TOCL Volume 9, Issue 3

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Type theory
  2. intuitionistic modal logic
  3. logical frameworks

Qualifiers

  • Research-article
  • Research
  • Refereed

Funding Sources

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)74
  • Downloads (Last 6 weeks)7
Reflects downloads up to 24 Jan 2025

Other Metrics

Citations

Cited By

View all
  • (2025)A Dependent Type Theory for Meta-programming with Intensional AnalysisProceedings of the ACM on Programming Languages10.1145/37048519:POPL(416-445)Online publication date: 9-Jan-2025
  • (2025)A Type-Theoretic Framework for Certified Meta-programming (Invited Talk Extended Abstract)Proceedings of the 2025 ACM SIGPLAN International Workshop on Partial Evaluation and Program Manipulation10.1145/3704253.3706136(10-11)Online publication date: 10-Jan-2025
  • (2025)Split Decisions: Explicit Contexts for Substructural LanguagesProceedings of the 14th ACM SIGPLAN International Conference on Certified Programs and Proofs10.1145/3703595.3705888(257-271)Online publication date: 10-Jan-2025
  • (2025)Polymorphism with Typed HolesTrends in Functional Programming10.1007/978-3-031-74558-4_7(134-159)Online publication date: 10-Jan-2025
  • (2024)Linear Contextual Metaprogramming and Session TypesElectronic Proceedings in Theoretical Computer Science10.4204/EPTCS.401.1401(1-10)Online publication date: 6-Apr-2024
  • (2024)A Layered Approach to Intensional Analysis in Type TheoryACM Transactions on Programming Languages and Systems10.1145/370720346:4(1-43)Online publication date: 5-Dec-2024
  • (2024)Type Inference LogicsProceedings of the ACM on Programming Languages10.1145/36897868:OOPSLA2(2125-2155)Online publication date: 8-Oct-2024
  • (2024)Statically Contextualizing Large Language Models with Typed HolesProceedings of the ACM on Programming Languages10.1145/36897288:OOPSLA2(468-498)Online publication date: 8-Oct-2024
  • (2024)Intensional FunctionsProceedings of the ACM on Programming Languages10.1145/36897148:OOPSLA2(87-112)Online publication date: 8-Oct-2024
  • (2024)Seamless Scope-Safe Metaprogramming through Polymorphic Subtype Inference (Short Paper)Proceedings of the 23rd ACM SIGPLAN International Conference on Generative Programming: Concepts and Experiences10.1145/3689484.3690733(121-127)Online publication date: 21-Oct-2024
  • Show More Cited By

View Options

Login options

Full Access

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media