Hostname: page-component-74656f9884-npj9w Total loading time: 0 Render date: 2026-11-08T13:30:35.958Z Has data issue: false hasContentIssue false

Typing constraint logic programs

Published online by Cambridge University Press:  09 June 2004

FRANÇOIS FAGES
Affiliation:
Projet Contraintes, INRIA-Rocquencourt, BP105, 78153 Le Chesnay Cedex, France, (e-mail: francois.fages@inria.fr, emmanuel.coquery@inria.fr)
EMMANUEL COQUERY
Affiliation:
Projet Contraintes, INRIA-Rocquencourt, BP105, 78153 Le Chesnay Cedex, France, (e-mail: francois.fages@inria.fr, emmanuel.coquery@inria.fr)
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the 'Save PDF' action button.

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.

Information

Type
Research Article
Copyright
© 2001 Cambridge University Press