Typing constraint logic programs
Francois Fages, Emmanuel Coquery

TL;DR
This paper introduces a prescriptive type system with parametric polymorphism and subtyping for constraint logic programs, enabling static error detection while supporting constraint domain coercions and meta-programming.
Contribution
It presents a novel type discipline for constraint logic programs that ensures type safety and supports complex features like subtyping and meta-programming predicates.
Findings
Type system effectively detects programming errors statically.
Implementation successfully type checks ISO-Prolog and Sicstus Prolog libraries.
Experimental results demonstrate practical applicability and soundness.
Abstract
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 flexibility 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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsLogic, programming, and type systems · Formal Methods in Verification · Logic, Reasoning, and Knowledge
