13 research outputs found
Type-Based Termination, Inflationary Fixed-Points, and Mixed Inductive-Coinductive Types
Type systems certify program properties in a compositional way. From a bigger
program one can abstract out a part and certify the properties of the resulting
abstract program by just using the type of the part that was abstracted away.
Termination and productivity are non-trivial yet desired program properties,
and several type systems have been put forward that guarantee termination,
compositionally. These type systems are intimately connected to the definition
of least and greatest fixed-points by ordinal iteration. While most type
systems use conventional iteration, we consider inflationary iteration in this
article. We demonstrate how this leads to a more principled type system, with
recursion based on well-founded induction. The type system has a prototypical
implementation, MiniAgda, and we show in particular how it certifies
productivity of corecursive and mixed recursive-corecursive functions.Comment: In Proceedings FICS 2012, arXiv:1202.317
Relating Church-Style and Curry-Style Subtyping
Type theories with higher-order subtyping or singleton types are examples of
systems where computation rules for variables are affected by type information
in the context. A complication for these systems is that bounds declared in the
context do not interact well with the logical relation proof of completeness or
termination. This paper proposes a natural modification to the type syntax for
F-Omega-Sub, adding variable's bound to the variable type constructor, thereby
separating the computational behavior of the variable from the context. The
algorithm for subtyping in F-Omega-Sub can then be given on types without
context or kind information. As a consequence, the metatheory follows the
general approach for type systems without computational information in the
context, including a simple logical relation definition without Kripke-style
indexing by context. This new presentation of the system is shown to be
equivalent to the traditional presentation without bounds on the variable type
constructor.Comment: In Proceedings ITRS 2010, arXiv:1101.410
Semi-continuous Sized Types and Termination
Some type-based approaches to termination use 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 higher-kinded 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
semi-continuity of such functions is a sufficient semantic criterion for
admissibility. To provide a syntactical criterion, a calculus for
semi-continuous functions is developed.Comment: 33 pages, extended version of CSL'0
A Theory of Higher-Order Subtyping with Type Intervals (Extended Version)
The calculus of Dependent Object Types (DOT) has enabled a more principled
and robust implementation of Scala, but its support for type-level computation
has proven insufficient. As a remedy, we propose , a rigorous
theoretical foundation for Scala's higher-kinded types. extends
with interval kinds, which afford a unified treatment of
important type- and kind-level abstraction mechanisms found in Scala, such as
bounded quantification, bounded operator abstractions, translucent type
definitions and first-class subtyping constraints. The result is a flexible and
general theory of higher-order subtyping. We prove type and kind safety of
, as well as weak normalization of types and undecidability of
subtyping. All our proofs are mechanized in Agda using a fully syntactic
approach based on hereditary substitution.Comment: 73 pages; to be presented at the 26th ACM SIGPLAN International
Conference on Functional Programming (ICFP 2021), 22-27 August 202
Higher-Order Subtyping with Type Intervals
Modern, statically typed programming languages provide various abstraction facilities at both the term- and type-level. Common abstraction mechanisms for types include parametric polymorphism -- a hallmark of functional languages -- and subtyping -- which is pervasive in object-oriented languages. Additionally, both kinds of languages may allow parametrized (or generic) datatype definitions in modules or classes. When several of these features are present in the same language, new and more expressive combinations arise, such as (1) bounded quantification, (2) bounded operator abstractions and (3) translucent type definitions. An example of such a language is Scala, which features all three of the aforementioned type-level constructs. This increases the expressivity of the language, but also the complexity of its type system. From a theoretical point of view, the various abstraction mechanisms have been studied through different extensions of Girard's higher-order polymorphic lambda-calculus F-omega. Higher-order subtyping and bounded polymorphism (1 and 2) have been formalized in F-omega-sub and its many variants; type definitions of various degrees of opacity (3) have been formalized through extensions of F-omega with singleton types. In this dissertation, I propose type intervals as a unifying concept for expressing (1--3) and other related constructs. In particular, I develop an extension of F-omega with interval kinds as a formal theory of higher-order subtyping with type intervals, and show how the familiar concepts of higher-order bounded quantification, bounded operator abstraction and singleton kinds can all be encoded in a semantics-preserving way using interval kinds. Going beyond the status quo, the theory is expressive enough to also cover less familiar constructs, such as lower-bounded operator abstractions and first-class, higher-order inequality constraints. I establish basic metatheoretic properties of the theory: I prove that subject reduction holds for well-kinded types w.r.t. full beta-reduction, that types and kinds are weakly normalizing, and that the theory is type safe w.r.t. its call-by-value operational reduction semantics. Key to this metatheoretic development is the use of hereditary substitution and the definition of an equivalent, canonical presentation of subtyping, which involves only normal types and kinds. The resulting metatheory is entirely syntactic, i.e. does not involve any model constructions, and has been fully mechanized in Agda. The extension of F-omega with interval kinds constitutes a stepping stone to the development of a higher-order version of the calculus of Dependent Object Types (DOT) -- the theoretical foundation of Scala's type system. In the last part of this dissertation, I briefly sketch a possible extension of the theory toward this goal and discuss some of the challenges involved in adapting the existing metatheory to that extension
Programming Languages and Systems
This open access book constitutes the proceedings of the 31st European Symposium on Programming, ESOP 2022, which was held during April 5-7, 2022, in Munich, Germany, as part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2022. The 21 regular papers presented in this volume were carefully reviewed and selected from 64 submissions. They deal with fundamental issues in the specification, design, analysis, and implementation of programming languages and systems
Programming Languages and Systems
This open access book constitutes the proceedings of the 31st European Symposium on Programming, ESOP 2022, which was held during April 5-7, 2022, in Munich, Germany, as part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2022. The 21 regular papers presented in this volume were carefully reviewed and selected from 64 submissions. They deal with fundamental issues in the specification, design, analysis, and implementation of programming languages and systems
Polarized Subtyping for Sized Types
We present an algorithm for deciding polarized higher-order subtyping without bounded quantification. Constructors are identified not only modulo β, but also η. We give a direct proof of completeness, without constructing a model or establishing a strong normalization theorem. Inductive and coinductive types are enriched with a notion of size and the subtyping calculus is extended to account for the arising inclusions between the sized types. 1