3,691 research outputs found
Subtyping can have a simple semantics
Consider a first order typed language, with semantics for expressions and types. Adding subtyping means that a partial order ; on types is defined and that the typing rules are extended to the effect that expression has type whenever has type and We show how to adapt the semantics in a simple set theoretic way, obtaining a semantics that satisfies, in addition to some obvious requirements, also the property that: is included in , whenever
Logical relations for coherence of effect subtyping
A coercion semantics of a programming language with subtyping is typically
defined on typing derivations rather than on typing judgments. To avoid
semantic ambiguity, such a semantics is expected to be coherent, i.e.,
independent of the typing derivation for a given typing judgment. In this
article we present heterogeneous, biorthogonal, step-indexed logical relations
for establishing the coherence of coercion semantics of programming languages
with subtyping. To illustrate the effectiveness of the proof method, we develop
a proof of coherence of a type-directed, selective CPS translation from a typed
call-by-value lambda calculus with delimited continuations and control-effect
subtyping. The article is accompanied by a Coq formalization that relies on a
novel shallow embedding of a logic for reasoning about step-indexing
Towards a Java Subtyping Operad
The subtyping relation in Java exhibits self-similarity. The self-similarity
in Java subtyping is interesting and intricate due to the existence of wildcard
types and, accordingly, the existence of three subtyping rules for generic
types: covariant subtyping, contravariant subtyping and invariant subtyping.
Supporting bounded type variables also adds to the complexity of the subtyping
relation in Java and in other generic nominally-typed OO languages such as C#
and Scala. In this paper we explore defining an operad to model the
construction of the subtyping relation in Java and in similar generic
nominally-typed OO programming languages. Operads, from category theory, are
frequently used to model self-similar phenomena. The Java subtyping operad, we
hope, will shed more light on understanding the type systems of generic
nominally-typed OO languages.Comment: 13 page
Practical Subtyping for System F with Sized (Co-)Induction
We present a rich type system with subtyping for an extension of System F.
Our type constructors include sum and product types, universal and existential
quantifiers, inductive and coinductive types. The latter two size annotations
allowing the preservation of size invariants. For example it is possible to
derive the termination of the quicksort by showing that partitioning a list
does not increase its size. The system deals with complex programs involving
mixed induction and coinduction, or even mixed (co-)induction and polymorphism
(as for Scott-encoded datatypes). One of the key ideas is to completely
separate the induction on sizes from the notion of recursive programs. We use
the size change principle to check that the proof is well-founded, not that the
program terminates. Termination is obtained by a strong normalization proof.
Another key idea is the use symbolic witnesses to handle quantifiers of all
sorts. To demonstrate the practicality of our system, we provide an
implementation that accepts all the examples discussed in the paper and much
more
Really Natural Linear Indexed Type Checking
Recent works have shown the power of linear indexed type systems for
enforcing complex program properties. These systems combine linear types with a
language of type-level indices, allowing more fine-grained analyses. Such
systems have been fruitfully applied in diverse domains, including implicit
complexity and differential privacy. A natural way to enhance the
expressiveness of this approach is by allowing the indices to depend on runtime
information, in the spirit of dependent types. This approach is used in DFuzz,
a language for differential privacy. The DFuzz type system relies on an index
language supporting real and natural number arithmetic over constants and
variables. Moreover, DFuzz uses a subtyping mechanism to make types more
flexible. By themselves, linearity, dependency, and subtyping each require
delicate handling when performing type checking or type inference; their
combination increases this challenge substantially, as the features can
interact in non-trivial ways. In this paper, we study the type-checking problem
for DFuzz. We show how we can reduce type checking for (a simple extension of)
DFuzz to constraint solving over a first-order theory of naturals and real
numbers which, although undecidable, can often be handled in practice by
standard numeric solvers
Component Composition in Business and System Modelling
Bespoke development of large business systems can be couched in terms of the composition of components, which are, put simply, chunks of development work. Design, mapping a specification to an implementation, can also be expressed in terms of components: a refinement comprising an abstract component, a concrete component and a mapping between them. Similarly, system extension is the composition of an existing component, the legacy system, with a new component, the extension. This paper overviews work being done on a UK EPSRC funded research project formulating and formalizing techniques for describing, composing and performing integrity checks on components. Although the paper focuses on the specification and development of information systems, the techniques are equally applicable to the modeling and re-engineering of businesses, where no computer system may be involved
- …