Results 1 -
4 of
4
A Generic Type System for CLP(X)
- Ecole Normale Superieure LIENS
, 1997
"... We propose a generic static type system for Constraint Logic Programming including subtyping and parametric polymorphism. The first aim of this prescriptive type system is to detect type errors statically in CLP programs. The system introduces a type discipline on the way CLP programs and libraries ..."
Abstract
-
Cited by 3 (3 self)
- Add to MetaCart
We propose a generic static type system for Constraint Logic Programming including subtyping and parametric polymorphism. The first aim of this prescriptive type system is to detect type errors statically in CLP programs. The system introduces a type discipline on the way CLP programs and libraries can be composed, while still maintaining the ability to type meta-programming predicates, thanks to the flexibility of subtyping. We show that subject reduction holds under very general assumptions. We give a polynomial-time algorithm for type checking, and we indicate that type inference for variables and predicates is possible in the universe of infinite regular types, but is an open problem in the universe of finite types. 1 Introduction The class of Constraint Logic Programming languages, CLP(X ), as introduced by Jaffar and Lassez [18], is a class of programming languages based on the logic programming paradigm, parametrized by some mathematical structure X , the domain of discourse. C...
Typing Constraint Logic Programs
"... 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 2 (1 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 meta-programming 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 \well-typed", then all derivations starting from a \well-typed" goal are again \well-typed". 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 ISO-Prolog, the (constraint) libraries of Sicstus Prolog and other Prolog programs.
Une caractérisation des arbres SLD en programmation logique avec contraintes
, 1996
"... Introduction L'objectif de ce papier n'est pas de d'efinir une nouvelle s'emantique op'erationnelle pour les programmes logiques avec contraintes mais seulement de reformuler les s'emantiques classiques dans un cadre homog`ene et clair. Cette reformulation 'etend la vision grammaticale [5] aux prog ..."
Abstract
-
Cited by 1 (1 self)
- Add to MetaCart
Introduction L'objectif de ce papier n'est pas de d'efinir une nouvelle s'emantique op'erationnelle pour les programmes logiques avec contraintes mais seulement de reformuler les s'emantiques classiques dans un cadre homog`ene et clair. Cette reformulation 'etend la vision grammaticale [5] aux programmes logiques avec contraintes. Elle permet de rendre compte des s'emantiques classiques bas'ees sur une interpr'etation ou une th'eorie des contraintes [9, 13, 10, 15, 7, 6, 3] ou bas'ees sur des relations abstraites d'ecrivant les solveurs de contraintes [10, 8, 14, 2, 3]. Mais cette comparaison d'epasse la cadre de cet article. Nous mettons en avant les squelettes qui sont intrins`eques au programme. C'est la structure id'eale qui rassemblent toute l'information d'eclarative sur un calcul. L'effort fourni dans cet reformulation, s'av`ere rapidement payant pour ffl avoir des d'efinitions simples, par exemple, les r'eponses `a un but ou l'arbre SLD selon une r`egle

