A Transformation-based Implementation for CLP with Qualification and Proximity
Uncertainty in logic programming has been widely investigated in the last decades, leading to multiple extensions of the classical LP paradigm. However, few of these are designed as extensions of the well-established and powerful CLP scheme for Constraint Logic Programming. In a previous work we have proposed the SQCLP (proximity-based qualified constraint logic programming) scheme as a quite expressive extension of CLP with support for qualification values and proximity relations as generalizations of uncertainty values and similarity relations, respectively. In this paper we provide a transformation technique for transforming SQCLP programs and goals into semantically equivalent CLP programs and goals, and a practical Prolog-based implementation of some particularly useful instances of the SQCLP scheme. We also illustrate, by showing some simple-and working-examples, how the prototype can be effectively used as a tool for solving problems where qualification values and proximity relations play a key role. Intended use of SQCLP includes flexible information retrieval applications.
💡 Research Summary
This paper addresses the integration of uncertainty handling into the well‑established Constraint Logic Programming (CLP) paradigm by focusing on the SQCLP (Similarity‑based Qualified Constraint Logic Programming) scheme. SQCLP extends classical CLP with two orthogonal dimensions: a qualification domain D, which provides a lattice‑structured set of qualification values equipped with a partial order P and an attenuation operator ◦, and a proximity relation S, a mapping from pairs of symbols to elements of D that is reflexive and symmetric (and optionally transitive). A SQCLP program consists of qualified clauses of the form A α ← B₁]w₁,…,Bₘ]wₘ, where α is an attenuation factor, each Bⱼ]wⱼ is a body atom annotated with a threshold wⱼ, and the intended semantics is that if each body atom holds with a qualification eⱼ ≥ wⱼ, then the head atom holds with any qualification d such that d ≥ α ◦ (e₁ ⊓ … ⊓ eₘ).
The core contribution is a two‑step program transformation that maps any SQCLP program into an ordinary CLP program while preserving its declarative semantics. The first transformation, called elim S, eliminates the proximity relation by introducing an explicit constraint predicate prox/3. For each pair of symbols (x, y) with proximity value v = S(x, y), a constraint prox(x, y, v) is generated. This predicate is handled by the underlying CLP solver, allowing the system to reason about non‑transitive proximities without requiring any special unification algorithm.
The second transformation, elim D, removes the qualification domain by encoding its operations into the base constraint domain C (e.g., the real numbers R). Two existential constraints are defined: qVal(X) asserts that X represents a valid qualification value (i.e., belongs to the image of an injective embedding ι: D{b} → C), and qBound(X, Y, Z) encodes the relation X ≤ Y ◦ Z using the concrete operations of C. By expressing qVal and qBound as conjunctions of atomic constraints, the transformed program can be executed directly by any CLP system that supports real arithmetic constraints.
The authors prove that each transformation step is semantics‑preserving: the set of qualified answers (including qualification values) obtained from the original SQCLP program coincides with those obtained from the transformed CLP program. These results are formalized through a series of lemmas and theorems that rely on the declarative semantics of SQCLP, its intermediate QCLP (Qualified CLP) form, and classical CLP.
Implementation-wise, the paper presents a Prolog‑based prototype that automates the two‑step transformation. The system parses an input SQCLP program, applies elim S and elim D sequentially, and emits a standard CLP program. The generated program contains auxiliary predicates prox/3, qVal/1, and qBound/3, which are interpreted by the host Prolog engine’s constraint solver (SICStus Prolog or SWI‑Prolog). The prototype demonstrates that the transformation incurs modest overhead and that the resulting CLP program runs efficiently, leveraging the mature indexing, constraint propagation, and optimization mechanisms already present in these systems.
To illustrate practical usefulness, the authors present a small information‑retrieval example using the instance SQCLP(Sₛ, U, R), where Sₛ is a proximity relation over symbols, U is the classic uncertainty domain
Comments & Academic Discussion
Loading comments...
Leave a Comment