Results 1  10
of
17
On the theory of structural subtyping
, 2003
"... We show that the firstorder theory of structural subtyping of nonrecursive types is decidable. Let Σ be a language consisting of function symbols (representing type constructors) and C a decidable structure in the relational language L containing a binary relation ≤. C represents primitive types; ..."
Abstract

Cited by 18 (8 self)
 Add to MetaCart
(Show Context)
We show that the firstorder theory of structural subtyping of nonrecursive types is decidable. Let Σ be a language consisting of function symbols (representing type constructors) and C a decidable structure in the relational language L containing a binary relation ≤. C represents primitive types; ≤ represents a subtype ordering. We introduce the notion of Σtermpower of C, which generalizes the structure arising in structural subtyping. The domain of the Σtermpower of C is the set of Σterms over the set of elements of C. We show that the decidability of the firstorder theory of C implies the decidability of the firstorder theory of the Σtermpower of C. This result implies the decidability of the firstorder theory of structural subtyping of nonrecursive types.
From Typing Constraints to Typed Constraint Systems in CHR
, 2001
"... Typing constraint programs requires the flexibility of subtyping to properly express coercions between constraint domains. The typing of constraint logic programs as done in the TCLP system for example involves solving complex subtyping constraints. In this paper we present an implementation in CHR ..."
Abstract

Cited by 6 (2 self)
 Add to MetaCart
Typing constraint programs requires the flexibility of subtyping to properly express coercions between constraint domains. The typing of constraint logic programs as done in the TCLP system for example involves solving complex subtyping constraints. In this paper we present an implementation in CHR of Pottier's algorithm for checking the satisfiability of subtype inequalities. We show that when combined with a CHR implementation of an untyped constraint system, a simple merge of both CHR programs gives rise to a new typed constraint system which enjoys nice semantical properties. This is illustrated with examples of typed unification and TCLP programs.
Extending HindleyMilner type inference with coercive subtyping (long version)
, 2011
"... Abstract. We investigate how to add coercive structural subtyping to a type system for simplytyped lambda calculus with HindleyMilner polymorphism. Coercions allow to convert between different types, and their automatic insertion can greatly increase readability of terms. We present a type infere ..."
Abstract

Cited by 6 (2 self)
 Add to MetaCart
(Show Context)
Abstract. We investigate how to add coercive structural subtyping to a type system for simplytyped lambda calculus with HindleyMilner polymorphism. Coercions allow to convert between different types, and their automatic insertion can greatly increase readability of terms. We present a type inference algorithm that, given a term without type information, computes a type assignment and determines at which positions in the term coercions have to be inserted to make it typecorrect according to the standard HindleyMilner system (without any subtypes). The algorithm is sound and, if the subtype relation on base types is a disjoint union of lattices, also complete. The algorithm has been implemented in the proof assistant Isabelle.
Complexity of Subtype Satisfiability over Posets
 in &quot;14th European Symposium on Programming&quot;, LNCS
, 2005
"... Subtype satisfiability is an important problem for designing advanced subtype systems and subtypebased program analysis algorithms. The problem is well understood if the atomic types form a lattice. However, little is known about subtype satisfiability over posets. In this paper, we investigate alg ..."
Abstract

Cited by 5 (0 self)
 Add to MetaCart
(Show Context)
Subtype satisfiability is an important problem for designing advanced subtype systems and subtypebased program analysis algorithms. The problem is well understood if the atomic types form a lattice. However, little is known about subtype satisfiability over posets. In this paper, we investigate algorithms for and the complexity of subtype satisfiability over general posets. We present a uniform treatment of different flavors of subtyping: simple versus recursive types and structural versus nonstructural subtype orders. Our results are established through a new connection of subtype constraints and modal logic. As a consequence, we settle a problem left open by Tiuryn and Wand in 1993. 1
TCLP: overloading, subtyping and parametric polymorphism made practical for constraint logic programming
, 2002
"... This paper is a continuation of our previous work on the TCLP type system for constraint logic programming. Here we introduce overloading in TCLP and describe a new implementation of TCLP in the Constraint Handling Rules language CHR. Overloading, that is assigning several types to symbols, e.g. ..."
Abstract

Cited by 4 (2 self)
 Add to MetaCart
This paper is a continuation of our previous work on the TCLP type system for constraint logic programming. Here we introduce overloading in TCLP and describe a new implementation of TCLP in the Constraint Handling Rules language CHR. Overloading, that is assigning several types to symbols, e.g. for integer and floating point arithmetic, makes it possible to avoid subtype relations like integer subtype of float, that are not faithful to the behavior of some predicates, e.g. unification between an integer and its float representation fails in ISO Prolog. We describe
Typing Constraint Logic Programs
 THEORY AND PRACTICE OF LOGIC PROGRAMMING
, 2001
"... We present a prescriptive type system with parametric polymorphism and subtyping for constraint logic programs. The aim of this type system is to detect programming errors statically. It introduces a type discipline for constraint logic programs and modules, while maintaining the capabilities of per ..."
Abstract

Cited by 3 (2 self)
 Add to MetaCart
We present a prescriptive type system with parametric polymorphism and subtyping for constraint logic programs. The aim of this type system is to detect programming errors statically. It introduces a type discipline for constraint logic programs and modules, while maintaining the capabilities of performing the usual coercions between constraint domains, and of typing metaprogramming predicates, thanks to the exibility of subtyping. The property of subject reduction expresses the consistency of a prescriptive type system w.r.t. the execution model: if a program is ‘welltyped’, then all derivations starting from a ‘welltyped’ goal are again ‘welltyped’. That property is proved w.r.t. the abstract execution model of constraint programming which proceeds by accumulation of constraints only, and w.r.t. an enriched execution model with type constraints for substitutions. We describe our implementation of the system for type checking and type inference. We report our experimental results on type checking ISOProlog, the (constraint) libraries of Sicstus Prolog and other Prolog programs.
Subtyping Constraints in QuasiLattices
"... In this paper, we show the decidability and NPcompleteness of the satisfiability problem for nonstructural subtyping constraints in quasilattices. This problem, introduced by Smolka in 1988, is important for the typing of logic and functional languages. We generalize Trifonov and Smith's ..."
Abstract

Cited by 2 (1 self)
 Add to MetaCart
In this paper, we show the decidability and NPcompleteness of the satisfiability problem for nonstructural subtyping constraints in quasilattices. This problem, introduced by Smolka in 1988, is important for the typing of logic and functional languages. We generalize Trifonov and Smith's algorithm over lattices, to the case of quasilattices with a complexity in O(m ), where m (resp. M) stands for the number of minimal (resp. maximal) elements of the quasilattice, v is the number of unbounded variables and n is the number of constraints. Similarly, we extend Pottier's algorithm for computing explicit solutions to the case of quasilattices. Finally we evoke some applications of these results to type inference in constraint logic programming and functional programming languages.
IMPROVING EFFICIENCY AND SAFETY OF PROGRAM GENERATION
, 2009
"... Program Generation (PG) is about writing programs that write programs. A program generator composes various pieces of code to construct a new program. When employed at runtime, PG can produce an efficient version of a program by specializing it according to inputs that become available at runtime. P ..."
Abstract

Cited by 1 (1 self)
 Add to MetaCart
Program Generation (PG) is about writing programs that write programs. A program generator composes various pieces of code to construct a new program. When employed at runtime, PG can produce an efficient version of a program by specializing it according to inputs that become available at runtime. PG has been used in a wide range of applications to improve program efficiency and modularity as well as programmer productivity. There are two major problems associated with PG: (1) Program generation has its own cost, which may cause a performance loss even though PG is intended for performance gain. This is especially important for runtime program generation. (2) Compilability guarantees about the generated program are poor; the generator may produce a typeincorrect program. In this dissertation we focus on these two problems. We provide three techniques that address the first problem. First, we show that justintime generation can successfully reduce the cost of generation by avoiding unnecessary program generation. We do this by means of an experiment in the context of marshalling in Java, where we generate specialized object marshallers based on object types. Justintime generation improved the speedup from 1.22 to 3.16. Second, we apply sourcelevel transformations to optimize
unknown title
"... Type inference with structural subtyping: A faithful formalization of an efficient constraint solver ..."
Abstract
 Add to MetaCart
(Show Context)
Type inference with structural subtyping: A faithful formalization of an efficient constraint solver