10 research outputs found
Pure subtype systems: a type theory for extensible software
This thesis presents a novel approach to type theory called “pure subtype systems”,
and a core calculus called DEEP which is based on that approach. DEEP is capable
of modeling a number of interesting language techniques that have been proposed in
the literature, including mixin modules, virtual classes, feature-oriented programming,
and partial evaluation.
The design of DEEP was motivated by two well-known problems: “the expression
problem”, and “the tag elimination problem.” The expression problem is concerned
with the design of an interpreter that is extensible, and requires an advanced module
system. The tag elimination problem is concerned with the design of an interpreter that
is efficient, and requires an advanced partial evaluator. We present a solution in DEEP
that solves both problems simultaneously, which has never been done before.
These two problems serve as an “acid test” for advanced type theories, because they
make heavy demands on the static type system. Our solution in DEEP makes use of the
following capabilities. (1) Virtual types are type definitions within a module that can
be extended by clients of the module. (2) Type definitions may be mutually recursive.
(3) Higher-order subtyping and bounded quantification are used to represent partial
information about types. (4) Dependent types and singleton types provide increased
type precision.
The combination of recursive types, virtual types, dependent types, higher-order
subtyping, and bounded quantification is highly non-trivial. We introduce “pure subtype
systems” as a way of managing this complexity. Pure subtype systems eliminate
the distinction between types and objects; every term can behave as either a type or
an object depending on context. A subtype relation is defined over all terms, and subtyping,
rather than typing, forms the basis of the theory. We show that higher-order
subtyping is strong enough to completely subsume the traditional type relation, and
we provide practical algorithms for type checking and for finding minimal types.
The cost of using pure subtype systems lies in the complexity of the meta-theory.
Unfortunately, we are unable to establish some basic meta-theoretic properties, such as
type safety and transitivity elimination, although we have made some progress towards
these goals. We formulate the subtype relation as an abstract reduction system, and we
show that the type theory is sound if the reduction system is confluent. We can prove
that reductions are locally confluent, but a proof of global confluence remains elusive.
In summary, pure subtype systems represent a new and interesting approach to
type theory. This thesis describes the basic properties of pure subtype systems, and
provides concrete examples of how they can be applied. The Deep calculus demonstrates
that our approach has a number of real-world practical applications in areas that
have proved to be quite difficult for traditional type theories to handle. However, the
ultimate soundness of the technique remains an open question
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
Towards Strong Normalization for Dependent Object Types (DOT)
The Dependent Object Types (DOT) family of calculi has been proposed as a new theoretic foundation for Scala and similar languages, unifying functional programming, object oriented programming and ML-style module systems. Following the recent type soundness proof for
DOT, the present paper aims to establish stronger meta-theoretic properties. The main result is a fully mechanized proof of strong normalization for D_<:, a variant of DOT that excludes recursive functions and recursive types. We further discuss techniques and challenges for adding recursive types while maintaining strong normalization, and demonstrate that certain variants of recursive self types can be integrated successfully
Feature-Aware Verification
A software product line is a set of software products that are distinguished
in terms of features (i.e., end-user--visible units of behavior). Feature
interactions ---situations in which the combination of features leads to
emergent and possibly critical behavior--- are a major source of failures in
software product lines. We explore how feature-aware verification can improve
the automatic detection of feature interactions in software product lines.
Feature-aware verification uses product-line verification techniques and
supports the specification of feature properties along with the features in
separate and composable units. It integrates the technique of variability
encoding to verify a product line without generating and checking a possibly
exponential number of feature combinations. We developed the tool suite
SPLverifier for feature-aware verification, which is based on standard
model-checking technology. We applied it to an e-mail system that incorporates
domain knowledge of AT&T. We found that feature interactions can be detected
automatically based on specifications that have only feature-local knowledge,
and that variability encoding significantly improves the verification
performance when proving the absence of interactions.Comment: 12 pages, 9 figures, 1 tabl
A Metatheoretic Analysis of Subtype Universes
Subtype universes were initially introduced as an expressive mechanisation of bounded quantification extending a modern type theory. In this paper, we consider a dependent type theory equipped with coercive subtyping and a generalisation of subtype universes. We prove results regarding the metatheoretic properties of subtype universes, such as consistency and strong normalisation. We analyse the causes of undecidability in bounded quantification, and discuss how coherency impacts the metatheoretic properties of theories implementing bounded quantification. We describe the effects of certain choices of subtyping inference rules on the expressiveness of a type theory, and examine various applications in natural language semantics, programming languages, and mathematics formalisation
The Duality of Subtyping
Subtyping is a concept frequently encountered in many programming languages and calculi. Various forms of subtyping exist for different type system features, including intersection types, union types or bounded quantification. Normally these features are designed independently of each other, without exploiting obvious similarities (or dualities) between features.
This paper proposes a novel methodology for designing subtyping relations that exploits duality between features. At the core of our methodology is a generalization of subtyping relations, which we call Duotyping. Duotyping is parameterized by the mode of the relation. One of these modes is the usual subtyping, while another mode is supertyping (the dual of subtyping). Using the mode it is possible to generalize the usual rules of subtyping to account not only for the intended behaviour of one particular language construct, but also of its dual. Duotyping brings multiple benefits, including: shorter specifications and implementations, dual features that come essentially for free, as well as new proof techniques for various properties of subtyping. To evaluate a design based on Duotyping against traditional designs, we formalized various calculi with common OOP features (including union types, intersection types and bounded quantification) in Coq in both styles. Our results show that the metatheory when using Duotyping does not come at a significant cost: the metatheory with Duotyping has similar complexity and size compared to the metatheory for traditional designs. However, we discover new features as duals to well-known features. Furthermore, we also show that Duotyping can significantly simplify transitivity proofs for many of the calculi studied by us
Pure subtype systems : a type theory for extensible software
This thesis presents a novel approach to type theory called “pure subtype systems”, and a core calculus called DEEP which is based on that approach. DEEP is capable of modeling a number of interesting language techniques that have been proposed in the literature, including mixin modules, virtual classes, feature-oriented programming, and partial evaluation. The design of DEEP was motivated by two well-known problems: “the expression problem”, and “the tag elimination problem.” The expression problem is concerned with the design of an interpreter that is extensible, and requires an advanced module system. The tag elimination problem is concerned with the design of an interpreter that is efficient, and requires an advanced partial evaluator. We present a solution in DEEP that solves both problems simultaneously, which has never been done before. These two problems serve as an “acid test” for advanced type theories, because they make heavy demands on the static type system. Our solution in DEEP makes use of the following capabilities. (1) Virtual types are type definitions within a module that can be extended by clients of the module. (2) Type definitions may be mutually recursive. (3) Higher-order subtyping and bounded quantification are used to represent partial information about types. (4) Dependent types and singleton types provide increased type precision. The combination of recursive types, virtual types, dependent types, higher-order subtyping, and bounded quantification is highly non-trivial. We introduce “pure subtype systems” as a way of managing this complexity. Pure subtype systems eliminate the distinction between types and objects; every term can behave as either a type or an object depending on context. A subtype relation is defined over all terms, and subtyping, rather than typing, forms the basis of the theory. We show that higher-order subtyping is strong enough to completely subsume the traditional type relation, and we provide practical algorithms for type checking and for finding minimal types. The cost of using pure subtype systems lies in the complexity of the meta-theory. Unfortunately, we are unable to establish some basic meta-theoretic properties, such as type safety and transitivity elimination, although we have made some progress towards these goals. We formulate the subtype relation as an abstract reduction system, and we show that the type theory is sound if the reduction system is confluent. We can prove that reductions are locally confluent, but a proof of global confluence remains elusive. In summary, pure subtype systems represent a new and interesting approach to type theory. This thesis describes the basic properties of pure subtype systems, and provides concrete examples of how they can be applied. The Deep calculus demonstrates that our approach has a number of real-world practical applications in areas that have proved to be quite difficult for traditional type theories to handle. However, the ultimate soundness of the technique remains an open question.EThOS - Electronic Theses Online ServiceGBUnited Kingdo