Frontiers of Computer Science in China

, Volume 2, Issue 1, pp 12–21 | Cite as

Calculi of meta-variables

  • Masahiko SATOEmail author
  • Takafumi Sakurai
  • Yukiyoshi Kameyama
  • Atsushi Igarashi
Research Article


The notion of meta-variable plays a fundamental role when we define formal systems such as logical and computational calculi. Yet it has been usually understood only informally as is seen in most textbooks of logic. Based on our observations of the usages of metavariables in textbooks, we propose two formal systems that have the notion of meta-variable.

In both calculi, each variable is given a level (non-negative integer), which classifies variables into object variables (level 0), meta-variables (level 1), metameta-variables (level 2) and so on. Then, simple arity systems are used to exclude meaningless terms like a meta-level function operating on the metameta-level. A main difference of the two calculi lies in the definitions of substitution. The first calculus uses textual substitution, which can often be found in definitions of quantified formulae: when a term is substituted for a meta-variable, free object-level variables in the term may be captured. The second calculus is based on the observation that predicates can be regarded as meta-level functions on object-level terms, hence uses capture-avoiding substitution.

We show that both calculi enjoy a number of properties including Church-Rosser and Strong Normalization, which are indispensable when we use them as frameworks to define logical systems.


meta-variable logical framework context λ-calculus 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Kleene S C. Introduction to metamathematics. North-Holland, 1952Google Scholar
  2. 2.
    Shoenfield J R. Mathematical logic. Addison-Wesley, 1967Google Scholar
  3. 3.
    Harper R, Honsell F, Plotkin G. A framework for defining logics. Journal of the Association for Computing Machinery, 1993, 40(1):143–194zbMATHMathSciNetGoogle Scholar
  4. 4.
    Sato M. Theory of judgments and derivations. In: Discovery Science, LNAI 2281, 2001, 78–122Google Scholar
  5. 5.
    Sato M, Sakurai T, Kameyama Y, et al. Calculi of meta-variables. In: Proceedings of CSL 2003, LNCS 2803, 2003, 484–497Google Scholar
  6. 6.
    Mason I. Computing with contexts. Higher-Order and Symbolic Computation, 1999, 12:171–201zbMATHCrossRefGoogle Scholar
  7. 7.
    Hashimoto M, Ohori A. A typed context calculus. Theoretical Computer Science, 2001, 266(1–2):249–272zbMATHCrossRefMathSciNetGoogle Scholar
  8. 8.
    Sato M, Sakurai T, Kameyama Y. A simply typed context calculus with first-class environments. Journal of Functional and Logic Programming, 2002, 4:1–41MathSciNetGoogle Scholar
  9. 9.
    Takahashi M. Parallel reductions in l-calculus. Journal of Symbolic Computation, 1989, 7:113–123zbMATHMathSciNetCrossRefGoogle Scholar
  10. 10.
    Geuvers H, Jojgov G. Open proofs and open terms: a basis for interactive logic. In: Proceedings of CSL 2002, LNCS 2471, 2002, 537–552Google Scholar
  11. 11.
    Talcott C. A theory of binding structures and applications to rewriting. Theoretical Computer Science, 1993, 112(1):99–143zbMATHCrossRefMathSciNetGoogle Scholar
  12. 12.
    Dami L. A lambda-calculus for dynamic binding. Theoretical Computer Science, 1998, 192:201–231zbMATHCrossRefMathSciNetGoogle Scholar
  13. 13.
    Sands D. Computing with contexts — a simple approach. Electronic Notes in Theoretical Computer Science, 10, 1998Google Scholar
  14. 14.
    Glück R, Jørgensen J. Efficient multi-level generating extensions for program specialization. In: Proceedings of Programming Languages, Implementations, Logics and Programs (PLILP’95), LNCS 982, 1995, 259–278Google Scholar
  15. 15.
    Davies R. A temporal-logic approach to binding-time analysis. In: 11th Annual IEEE Symposium on Logic in Computer Science (LICS’96), 1996, 184–195Google Scholar
  16. 16.
    Yuse Y, Igarashi A. A modal type system for multi-level generating extensions with persistent code. In: Proceedings of PPDP, 2006, 201–212Google Scholar
  17. 17.
    Yamamoto K, Okamoto A, Sato M, et al. A typed lambda calculus with quasi-quotation (in Japanese). In: Informal Proceedings of the 4th JSSST Workshop on Programming and Programming Languages, 2003, 87–102Google Scholar
  18. 18.
    Nanevski A, Pfenning F, Pientka B. Contextual modal type theory. Transactions on Computational Logic, to appearGoogle Scholar
  19. 19.
    Pfenning F, Davies R. A judgmental reconstruction of modal logic. Mathematical Structure in Computer Science, 2001, 11(4):511–540zbMATHCrossRefMathSciNetGoogle Scholar
  20. 20.
    Gabbay MJ. A NEW calculus for contexts. In: Proceedings of 7th Int. ACM SIGPLAN Conf. on Principles and Practice of Declarative Programming, 2005, 94–105Google Scholar
  21. 21.
    Hamana M. Free Σ-Monoids: a higher-order syntax with metavariables. In: Proceedings of APLAS, 2004, 348–363Google Scholar

Copyright information

© Higher Education Press 2008

Authors and Affiliations

  • Masahiko SATO
    • 1
    Email author
  • Takafumi Sakurai
    • 2
  • Yukiyoshi Kameyama
    • 3
  • Atsushi Igarashi
    • 1
  1. 1.Graduate School of InformaticsKyoto UniversityKyotoJapan
  2. 2.Department of Mathematics and InformaticsChiba UniversityChibaJapan
  3. 3.Department of Computer ScienceUniversity of TsukubaTsukubaJapan

Personalised recommendations