Sets and Constraint Logic Programming

Abstract

In this paper we present a study of the problem of handling constraints made by conjunctions of positive and negative literals based on the predicate symbols =, is an element of, boolean OR, and parallel to (i.e., disjointness of two sets) in a (hybrid) universe of finite sets. We also review and compare the main techniques considered to represent finite sets in the context of logic languages. The resulting constraint algorithms are embedded in a Constraint Logic Programming (CLP) language which provides finite sets-along with basic set-theoretic operations-as first-class objects of the language. The language-called CLP(SET)-is an instance of the general CLP framework, and as such it inherits all the general features and theoretical results of this scheme. We provide, through programming examples, a taste of the expressive power offered by programming in CLP(SET).