Results 1  10
of
15
Type Checking HigherOrder Polymorphic MultiMethods
, 1997
"... We present a new predicative and decidable type system, called ML , suitable for languages that integrate functional programming and parametric polymorphism in the tradition of ML [21, 28], and classbased objectoriented programming and higherorder multimethods in the tradition of CLOS [12]. Inste ..."
Abstract

Cited by 51 (0 self)
 Add to MetaCart
We present a new predicative and decidable type system, called ML , suitable for languages that integrate functional programming and parametric polymorphism in the tradition of ML [21, 28], and classbased objectoriented programming and higherorder multimethods in the tradition of CLOS [12]. Instead of using extensible records as a foundation for objectoriented extensions of functional languages, we propose to reinterpret ML datatype declarations as abstract and concrete class declarations, and to replace pattern matching on runtime values by dynamic dispatch on runtime types. ML is based on universally quantified polymorphic constrained types. Constraints are conjunctions of inequalities between monotypes built from type constructors organized into extensible and partially ordered classes. We give type checking rules for a small, explicitly typed functional language `a la XML [20] with multimethods, show that the resulting system has decidable minimal types, and discuss subject ...
Principal Type Schemes for Functional Programs with Overloading and Subtyping
 Science of Computer Programming
, 1994
"... We show how the Hindley/Milner polymorphic type system can be extended to incorporate overloading and subtyping. Our approach is to attach constraints to quantified types in order to restrict the allowed instantiations of type variables. We present an algorithm for inferring principal types and ..."
Abstract

Cited by 44 (1 self)
 Add to MetaCart
We show how the Hindley/Milner polymorphic type system can be extended to incorporate overloading and subtyping. Our approach is to attach constraints to quantified types in order to restrict the allowed instantiations of type variables. We present an algorithm for inferring principal types and prove its soundness and completeness. We find that it is necessary in practice to simplify the inferred types, and we describe techniques for type simplification that involve shape unification, strongly connected components, transitive reduction, and the monotonicities of type formulas.
The Complexity of Subtype Entailment for Simple Types
 In Proceedings of the 12th Annual IEEE Symposium on Logic in Computer Science (LICS
, 1997
"... A subtyping 0 is entailed by a set of subtyping constraints C, written C j= 0 , if every valuation (mapping of type variables to ground types) that satisfies C also satisfies 0 . We study the complexity of subtype entailment for simple types over lattices of base types. We show that: ..."
Abstract

Cited by 29 (1 self)
 Add to MetaCart
A subtyping 0 is entailed by a set of subtyping constraints C, written C j= 0 , if every valuation (mapping of type variables to ground types) that satisfies C also satisfies 0 . We study the complexity of subtype entailment for simple types over lattices of base types. We show that: ffl deciding C j= 0 is coNPcomplete. ffl deciding C j= ff fi for consistent, atomic C and ff; fi atomic can be done in linear time. The structural lower (coNPhardness) and upper (membership in coNP) bounds as well as the optimal algorithm for atomic entailment are new. The coNPhardness result indicates that entailment is strictly harder than satisfiability, which is known to be in PTIME for lattices of base types. The proof of coNPcompleteness gives an improved algorithm for deciding entailment and puts a precise complexitytheoretic marker on the intuitive "exponential explosion" in the algorithm. Central to our results is a novel characterization of C j= ff fi for atomic, co...
Satisfiability of Inequalities in a Poset
 Fundamenta Informaticae
"... We consider tractable and intractable cases of the satisfiability problem for conjunctions of inequalities between variables and constants in a fixed finite poset. We show that crowns are intractable. ..."
Abstract

Cited by 17 (0 self)
 Add to MetaCart
We consider tractable and intractable cases of the satisfiability problem for conjunctions of inequalities between variables and constants in a fixed finite poset. We show that crowns are intractable.
Constraint Automata and the Complexity of Recursive Subtype Entailment
 In Proceedings of the 25th International Colloquium on Automata, Languages, and Programming (ICALP
, 1998
"... . We study entailment of structural and nonstructural recursive subtyping constraints. Constraints are formal inequalities between type expressions, interpreted over an ordered set of possibly infinite labeled trees. The nonstructural ordering on trees is the one introduced by Amadio and Cardelli fo ..."
Abstract

Cited by 15 (0 self)
 Add to MetaCart
. We study entailment of structural and nonstructural recursive subtyping constraints. Constraints are formal inequalities between type expressions, interpreted over an ordered set of possibly infinite labeled trees. The nonstructural ordering on trees is the one introduced by Amadio and Cardelli for subtyping with recursive types. The structural ordering compares only trees with common shape. A constraint set entails an inequality if every assignment of meanings (trees) to type expressions that satisfies all the constraints also satisfies the inequality. In this paper we prove that nonstructural subtype entailment is PSPACEhard, both for finite trees (simple types) and infinite trees (recursive types). For the structural ordering we prove that subtype entailment over infinite trees is PSPACEcomplete, when the order on trees is generated from a lattice of type constants. Since structural subtype entailment over finite trees has been shown to be coNPcomplete these are the first comple...
Equational Axiomatization of Bicoercibility for Polymorphic Types
 Proceedings of the 15th Conference on the Foundations of Software Technology and Theoretical Computer Science, P.S. Thiagarajan, ed., Lecture Notes in Computer Science 1026
, 1995
"... Two polymorphic types oe and ø are said to be bicoercible if there is a coercion from oe to ø and conversely. We give a complete equational axiomatization of bicoercible types and prove that the relation of bicoercibility is decidable. 1 Introduction The notion of a subtype of a type plays an import ..."
Abstract

Cited by 8 (1 self)
 Add to MetaCart
Two polymorphic types oe and ø are said to be bicoercible if there is a coercion from oe to ø and conversely. We give a complete equational axiomatization of bicoercible types and prove that the relation of bicoercibility is decidable. 1 Introduction The notion of a subtype of a type plays an important role in typed programming languages and it has been a subject of an intensive research recently [Ben93, BCGS91, CMSS94, CGL92, CP94, LMS94, Mit90, Tiu92, TW93]. There is a number of fundamental open problems which have to be solved in order to gain a better understanding of the notion of a subtype. One of such problems is the question of decidability of the relation of subtyping This work is partly supported by NSF Grant CCR9113196, KBN Grant 2 P301 031 06 and by ESPRIT BRA7232 GENTZEN. for secondorder polymorphic types. This relation has been axiomatized by John Mitchell [Mit90]. The fact that a type oe is a subtype of a type ø can be established by finding a coercion from oe to ...
From Typing Constraints to Typed Constraint Systems in CHR
, 2001
"... Typing constraint programs requires the exibility 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 ..."
Abstract

Cited by 6 (1 self)
 Add to MetaCart
Typing constraint programs requires the exibility 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.
Complexity of Subtype Satisfiability over Posets
 in "14th European Symposium on Programming", 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
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
"... 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 oating point arithmetic, makes it possible to avoid subtype relations like integer subtype of oat, that are not faithful to the behavior of some predicates, e.g. uni cation between an integer and its oat representation fails in ISO Prolog.