A typed context calculus

  • Authors:
  • Masatomo Hashimoto;Atsushi Ohori

  • Affiliations:
  • Kyoto Univ., Sakyo-ku, Kyoto, Japan;Kyoto Univ., Sakyo-ku, Kyoto, Japan

  • Venue:
  • Theoretical Computer Science
  • Year:
  • 2001

Quantified Score

Hi-index 5.23

Visualization

Abstract

This paper develops a typed calculus for contexts i.e., lambda terms with "holes". In addition to ordinary lambda terms, the calculus contains labeled holes, hole abstraction and context application for manipulating first-class contexts. The primary operation for contexts is hole-filling, which captures free variables. This operation conflicts with substitution of the lambda calculus, and a straightforward mixture of the two results in an inconsistent system. We solve this problem by defining a type system that precisely specifies the variable-capturing nature of contexts and that keeps track of bound variable renaming. These mechanisms enable us to define a reduction system that properly integrates&brg;-reduction and hole-filling. The resulting calculus is Church-Rosser and the type system has the subject reduction property. We believe that the context calculus will serve as a basis for developing a programming language with advanced features that call for manipulation of open terms. Copyright 2001 Elsevier Science B.V.