An Encoding for CLP Problems in SMT-LIB
Daneshvar Amrollahi, Hossein Hojjat, Philipp Rümmer
TL;DR
The paper addresses bridging Prolog/CLP with CHC solving by introducing a Prolog front-end for the Eldarica CHC solver and a formal translation of Prolog fragments into SMT-LIB. It develops a universal algebraic data-type $U$ and accompanying data-types (e.g., $L$ for lists) to encode Prolog terms, facts, and rules, including CLP($\mathbb{Z}$) arithmetic, as CHC-friendly SMT-LIB constructs. Translation rules are provided for facts, rules, lists, and integers, with typing side-conditions to preserve Prolog semantics. A concrete SMT-LIB encoding of a motivating routing example demonstrates how CHC solvers can derive satisfiability/unsatisfiability and potentially reveal paths under constraints, signaling a foundation for integrated CLP-CHC tooling and potential performance benefits.
Abstract
The input language for today's CHC solvers are commonly the standard SMT-LIB format, borrowed from SMT solvers, and the Prolog format that stems from Constraint-Logic Programming (CLP). This paper presents a new front-end of the Eldarica CHC solver that allows inputs in the Prolog language. We give a formal translation of a subset of Prolog into the SMT-LIB commands. Our initial experiments show the effectiveness of the approach and the potential benefits to both the CHC solving and CLP communities.
