384 research outputs found
Coherence and transitivity in coercive subtyping
The aim of this thesis is to study coherence and transitivity in coercive subtyping. Among other things, coherence and transitivity are key aspects for a coercive subtyping system to be consistent and for it to be implemented in a correct way. The thesis consists of three major parts. First, I prove that, for the subtyping rules of some parameterised inductive data types, coherence holds and the normal transitivity rule is admissible. Second, the notion of weak transitivity is introduced. The subtyping rules of a large class of parameterised inductive data types are suitable for weak transitivity, but not compatible with the normal transitivity rule. Third, I present a new formulation of coercive subtyping in order to combine incoherent coercions for the type of dependent pairs. There are two subtyping relations in the system and hence a further understanding of coherence and transitivity is needed. This thesis has the first case study of combining incoherent coercions in a single system. The thesis provides a clearer understanding of the subtyping rules for parameterised inductive data types and explains why the normal transitivity rule is not admissible for some natural subtyping rules. It also demonstrates that coherence and transitivity at type level can sometimes be very difficult issues in coercive subtyping. Besides providing theoretical understanding, the thesis also gives algorithms for implementing the subtyping rules for parameterised inductive data types
Type soundness for dependent object types (DOT)
Scala's type system unifies aspects of ML modules, object-oriented, and functional programming. The Dependent Object Types (DOT) family of calculi has been proposed as a new theoretic foundation for Scala and similar expressive languages. Unfortunately, type soundness has only been established for restricted subsets of DOT. In fact, it has been shown that important Scala features such as type refinement or a subtyping relation with lattice structure break at least one key metatheoretic property such as environment narrowing or invertible subtyping transitivity, which are usually required for a type soundness proof. The main contribution of this paper is to demonstrate how, perhaps surprisingly, even though these properties are lost in their full generality, a rich DOT calculus that includes recursive type refinement and a subtyping lattice with intersection types can still be proved sound. The key insight is that subtyping transitivity only needs to be invertible in code paths executed at run time, with contexts consisting entirely of valid runtime objects, whereas inconsistent subtyping contexts can be permitted for code that is never executed
Coercive subtyping: Theory and implementation
International audienceCoercive subtyping is a useful and powerful framework of subtyping for type theories. The key idea of coercive subtyping is subtyping as abbreviation. In this paper, we give a new and adequate formulation of T[C], the system that extends a type theory T with coercive subtyping based on a set C of basic subtyping judgements, and show that coercive subtyping is a conservative extension and, in a more general sense, a definitional extension. We introduce an intermediate system, the star-calculus T[C]^@?, in which the positions that require coercion insertions are marked, and show that T[C]^@? is a conservative extension of T and that T[C]^@? is equivalent to T[C]. This makes clear what we mean by coercive subtyping being a conservative extension, on the one hand, and amends a technical problem that has led to a gap in the earlier conservativity proof, on the other. We also compare coercive subtyping with the 'ordinary' notion of subtyping - subsumptive subtyping, and show that the former is adequate for type theories with canonical objects while the latter is not. An improved implementation of coercive subtyping is done in the proof assistant Plastic
A Type Language for Calendars
Time and calendars play an important role in databases,
on the Semantic Web, as well as in mobile computing. Temporal data
and calendars require (specific) modeling and processing tools. CaTTS
is a type language for calendar definitions using which one can model
and process temporal and calendric data. CaTTS is based on a "theory
reasoning" approach for efficiency reasons. This article addresses type
checking temporal and calendric data and constraints. A thesis underlying
CaTTS is that types and type checking are as useful and desirable
with calendric data types as with other data types. Types enable
(meaningful) annotation of data. Type checking enhances efficiency and
consistency of programming and modeling languages like database and
Web query languages
A Step-indexed Semantics of Imperative Objects
Step-indexed semantic interpretations of types were proposed as an
alternative to purely syntactic proofs of type safety using subject reduction.
The types are interpreted as sets of values indexed by the number of
computation steps for which these values are guaranteed to behave like proper
elements of the type. Building on work by Ahmed, Appel and others, we introduce
a step-indexed semantics for the imperative object calculus of Abadi and
Cardelli. Providing a semantic account of this calculus using more
`traditional', domain-theoretic approaches has proved challenging due to the
combination of dynamically allocated objects, higher-order store, and an
expressive type system. Here we show that, using step-indexing, one can
interpret a rich type discipline with object types, subtyping, recursive and
bounded quantified types in the presence of state
Bidirectional Type Checking for Relational Properties
Relational type systems have been designed for several applications including
information flow, differential privacy, and cost analysis. In order to achieve
the best results, these systems often use relational refinements and relational
effects to maximally exploit the similarity in the structure of the two
programs being compared. Relational type systems are appealing for relational
properties because they deliver simpler and more precise verification than what
could be derived from typing the two programs separately. However, relational
type systems do not yet achieve the practical appeal of their non-relational
counterpart, in part because of the lack of a general foundations for
implementing them.
In this paper, we take a step in this direction by developing bidirectional
relational type checking for systems with relational refinements and effects.
Our approach achieves the benefits of bidirectional type checking, in a
relational setting. In particular, it significantly reduces the need for typing
annotations through the combination of type checking and type inference. In
order to highlight the foundational nature of our approach, we develop
bidirectional versions of several relational type systems which incrementally
combine many different components needed for expressive relational analysis.Comment: 14 page
Refinement Types for Logical Frameworks and Their Interpretation as Proof Irrelevance
Refinement types sharpen systems of simple and dependent types by offering
expressive means to more precisely classify well-typed terms. We present a
system of refinement types for LF in the style of recent formulations where
only canonical forms are well-typed. Both the usual LF rules and the rules for
type refinements are bidirectional, leading to a straightforward proof of
decidability of typechecking even in the presence of intersection types.
Because we insist on canonical forms, structural rules for subtyping can now be
derived rather than being assumed as primitive. We illustrate the expressive
power of our system with examples and validate its design by demonstrating a
precise correspondence with traditional presentations of subtyping. Proof
irrelevance provides a mechanism for selectively hiding the identities of terms
in type theories. We show that LF refinement types can be interpreted as
predicates using proof irrelevance, establishing a uniform relationship between
two previously studied concepts in type theory. The interpretation and its
correctness proof are surprisingly complex, lending support to the claim that
refinement types are a fundamental construct rather than just a convenient
surface syntax for certain uses of proof irrelevance
- …