Hostname: page-component-77f85d65b8-6bnxx Total loading time: 0 Render date: 2026-04-18T10:16:11.240Z Has data issue: false hasContentIssue false

Pure iso-type systems

Published online by Cambridge University Press:  17 September 2019

YANPENG YANG
Affiliation:
The University of Hong Kong, Pokfulam, Hong Kong (e-mails: ypyang@cs.hku.hk, bruno@cs.hku.hk)
BRUNO C. D. S. OLIVEIRA
Affiliation:
The University of Hong Kong, Pokfulam, Hong Kong (e-mails: ypyang@cs.hku.hk, bruno@cs.hku.hk)
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the 'Save PDF' action button.

Traditional designs for functional languages (such as Haskell or ML) have separate sorts of syntax for terms and types. In contrast, many dependently typed languages use a unified syntax that accounts for both terms and types. Unified syntax has some interesting advantages over separate syntax, including less duplication of concepts, and added expressiveness. However, integrating unrestricted general recursion in calculi with unified syntax is challenging when some level of type-level computation is present, since properties such as decidable type-checking are easily lost. This paper presents a family of calculi called pure iso-type systems (PITSs), which employs unified syntax, supports general recursion and preserves decidable type-checking. PITS is comparable in simplicity to pure type systems (PTSs), and is useful to serve as a foundation for functional languages that stand in-between traditional ML-like languages and fully blown dependently typed languages. In PITS, recursion and recursive types are completely unrestricted and type equality is simply based on alpha-equality, just like traditional ML-style languages. However, like most dependently typed languages, PITS uses unified syntax, naturally supporting many advanced type system features. Instead of implicit type conversion, PITS provides a generalization of iso-recursive types called iso-types. Iso-types replace the conversion rule typically used in dependently typed calculus and make every type-level computation explicit via cast operators. Iso-types avoid the complexity of explicit equality proofs employed in other approaches with casts. We study three variants of PITS that differ on the reduction strategy employed by the cast operators: call-by-name, call-by-value and parallel reduction. One key finding is that while using call-by-value or call-by-name reduction in casts loses some expressive power, it allows those variants of PITS to have simple and direct operational semantics and proofs. In contrast, the variant of PITS with parallel reduction retains the expressive power of PTS conversion, at the cost of a more complex metatheory.

Information

Type
Regular Paper
Copyright
© Cambridge University Press 2019 
Submit a response

Discussions

No Discussions have been published for this article.