Building a constraint programming solver in Julia

#artificialintelligence

This is an ongoing series about: How to build a constraint solver? If you haven't read this post: Perfect as it is part 1;) More than 2 years ago I wrote a Sudoku solver in Python. I really enjoyed it and therefore I've spend some time to do the same in Julia just faster;) Then I wanted to build a whole constraint-programming solver in Julia. Well I actually still want to do it. It will be hard but fun.


Applying Constraint Logic Programming to SQL Semantic Analysis

arXiv.org Artificial Intelligence

This paper proposes the use of Constraint Logic Programming (CLP) to model SQL queries in a data-independent abstract layer by focusing on some semantic properties for signalling possible errors in such queries. First, we define a translation from SQL to Datalog, and from Datalog to CLP, so that solving this CLP program will give information about inconsistency, tautology, and possible simplifications. We use different constraint domains which are mapped to SQL types, and propose them to cooperate for improving accuracy. Our approach leverages a deductive system that includes SQL and Datalog, and we present an implementation in this system which is currently being tested in classroom, showing its advantages and differences with respect to other approaches, as well as some performance data. This paper is under consideration for acceptance in TPLP .


Translation-Based Constraint Answer Set Solving

AAAI Conferences

We solve constraint satisfaction problems through translation to answer set programming (ASP). Our reformulations have the property that unit-propagation in the ASP solver achieves well defined local consistency properties like arc, bound and range consistency. Experiments demonstrate the computational value of this approach.


Translation-based Constraint Answer Set Solving

arXiv.org Artificial Intelligence

We solve constraint satisfaction problems through translation to answer set programming (ASP). Our reformulations have the property that unit-propagation in the ASP solver achieves well defined local consistency properties like arc, bound and range consistency. Experiments demonstrate the computational value of this approach.


Satisfiability Modulo Constraint Handling Rules (Extended Abstract)

AAAI Conferences

Satisfiability Modulo Constraint Handling Rules (SMCHR) is the integration of the Constraint Handling Rules (CHRs) solver programming language into a Satisfiability Modulo Theories (SMT) solver framework.  Constraint solvers are implemented in CHR as a set of high-level rules that specify the simplification (rewriting) and constraint propagation behavior.  The traditional CHR execution algorithm manipulates a global store representing a flat conjunction of constraints.  This paper introduces SMCHR: a tight integration of CHR with a modern Boolean Satisfiability (SAT) solver.  Unlike CHR, SMCHR can handle (quantifier-free) formulae with an arbitrary propositional structure.  SMCHR is essentially a Satisfiability Modulo Theories (SMT) solver where the theory T is implemented in CHR.