23,314 research outputs found
Semantic subtyping for objects and classes
In this paper we propose an integration of structural subtyping with boolean
connectives and semantic subtyping to define a Java-like programming language
that exploits the benefits of both techniques. Semantic subtyping is an approach
for defining subtyping relation based on set-theoretic models, rather than syntactic
rules. On the one hand, this approach involves some non trivial mathematical
machinery in the background. On the other hand, final users of the language need
not know this machinery and the resulting subtyping relation is very powerful and
intuitive. While semantic subtyping is naturally linked to the structural one, we
show how our framework can also accommodate the nominal subtyping. Several
examples show the expressivity and the practical advantages of our proposal
Relational parametricity for higher kinds
Reynolds’ notion of relational parametricity has been extremely influential and well studied for polymorphic programming languages and type theories based on System F. The extension of relational parametricity to higher kinded polymorphism, which allows quantification over type operators as well as types, has not received as much attention. We present a model of relational parametricity for System Fω, within the impredicative Calculus of Inductive Constructions, and show how it forms an instance of a general class of models defined by Hasegawa. We investigate some of the consequences of our model and show that it supports the definition of inductive types, indexed by an arbitrary kind, and with reasoning principles provided by initiality
Are subsets necessary in Martin-Lof type theory?
After introducing Martin-Lof's type theory, the paper introduces the rules proposed by various authors for adding subset types to the system, and the justification given for their addition. These justifications are examined, and it is argued that by a combination of lazy evaluation and transformation using the Axiom of Choice that subsets need not be added to the system to make it usable
- …