| | |
Summary: SEMICONTINUOUS SIZED TYPES AND TERMINATION
ANDREAS ABEL
Institut f˜ur Informatik, LudwigMaximiliansUniversit˜at M˜unchen
email address: abel@tcs.ifi.lmu.de
Abstract. A typebased approach to termination uses sized types: an ordinal bound for
the size of a data structure is stored in its type. A recursive function over a sized type
is accepted if it is visible in the type system that recursive calls occur just at a smaller
size. This approach is only sound if the type of the recursive function is admissible, i.e.,
depends on the size index in a certain way. To explore the space of admissible functions in
the presence of higherkinded data types and impredicative polymorphism, a semantics is
developed where sized types are interpreted as functions from ordinals into sets of strongly
normalizing terms. It is shown that upper semicontinuity of such functions is a su#cient
semantic criterion for admissibility. To provide a syntactical criterion, a calculus for semi
continuous functions is developed.
1. Introduction
Termination of computer programs has received continuous interest in the history of
computer science, and classical applications are total correctness and termination of par
tial evaluation. In languages with a notion of computation on the typelevel, such as
dependentlytyped languages or rich typed intermediate languages in compilers [CW99],
termination of expressions that compute a type is required for type checking and type sound
|