Automatically improving constraint models in Savile Row

Abstract When solving a combinatorial problem using Constraint Programming (CP) or Satisfiability (SAT), modelling and formulation are vital and difficult tasks. Even an expert human may explore many alternatives in modelling a single problem. We make a number of contributions in the automated modelling and reformulation of constraint models. We study a range of automated reformulation techniques, finding combinations of techniques which perform particularly well together. We introduce and describe in detail a new algorithm, X-CSE, to perform Associative–Commutative Common Subexpression Elimination (AC-CSE) in constraint problems, significantly improving existing CSE techniques for associative and commutative operators such as +. We demonstrate that these reformulation techniques can be integrated in a single automated constraint modelling tool, called Savile Row, whose architecture we describe. We use Savile Row as an experimental testbed to evaluate each reformulation on a set of 50 problem classes, with 596 instances in total. Our recommended reformulations are well worthwhile even including overheads, especially on harder instances where solver time dominates. With a SAT solver we observed a geometric mean of 2.15 times speedup compared to a straightforward tailored model without recommended reformulations. Using a CP solver, we obtained a geometric mean of 5.96 times speedup for instances taking over 10 seconds to solve.

[1]  Christopher Mears,et al.  Globalizing Constraint Models , 2013, CP.

[2]  Toby Walsh,et al.  Handbook of satisfiability , 2009 .

[3]  Ian P. Gent,et al.  Automatically Improving Constraint Models in Savile Row through Associative-Commutative Common Subexpression Elimination , 2014, CP.

[4]  Thom W. Frühwirth,et al.  Constraint Handling Rules , 2009, Constraint Programming.

[5]  Ian Miguel,et al.  Automatically Improving SAT Encoding of Constraint Problems Through Common Subexpression Elimination in Savile Row , 2015, CP.

[6]  Joao Marques-Silva Practical applications of Boolean Satisfiability , 2008, 2008 9th International Workshop on Discrete Event Systems.

[7]  Andrea Rendl,et al.  Effective compilation of constraint models , 2010 .

[8]  Toby Walsh,et al.  CGRASS: A System for Transforming Constraint Satisfaction Problems , 2002, International Workshop on Constraint Solving and Constraint Logic Programming.

[9]  Jimmy Ho-Man Lee,et al.  Solving the Salinity Control Problem in a Potable Water System , 2007, CP.

[10]  Barbara M. Smith Symmetry and Search in a Network Design Problem , 2005, CPAIOR.

[11]  Christopher Mears,et al.  Towards Automatic Dominance Breaking for Constraint Optimization Problems , 2015, IJCAI.

[13]  Benjamin W. Wah,et al.  A discrete Lagrangian-based global-search method for solving satisfiability problems , 1996, Satisfiability Problem: Theory and Applications.

[14]  David Bergman,et al.  Graph coloring inequalities from all-different systems , 2014, Constraints.

[15]  Yuanlin Zhang,et al.  Accelerating SAT Solving by Common Subclause Elimination , 2015, AAAI.

[16]  Christian Bessiere,et al.  Efficient algorithms for singleton arc consistency , 2009, Constraints.

[17]  Jean-Charles Régin,et al.  Generalized Arc Consistency for Global Cardinality Constraint , 1996, AAAI/IAAI, Vol. 1.

[18]  Bertrand Estellon,et al.  Car sequencing is NP-hard: a short proof , 2013, J. Oper. Res. Soc..

[19]  Peter J. Stuckey,et al.  Cadmium: An Implementation of ACD Term Rewriting , 2008, ICLP.

[20]  Christian Bessiere,et al.  Learning Implied Global Constraints , 2007, IJCAI.

[21]  Pierre Flener,et al.  Design of Financial CDO Squared Transactions Using Constraint Programming , 2007, Constraints.

[22]  Kim Marriott,et al.  The Modelling Language Zinc , 2006, CP.

[23]  Thom W. Frühwirth Constraint Handling Rules - What Else? , 2015, RuleML.

[24]  Christopher Mears,et al.  Proving Symmetries by Model Transformation , 2011, CP.

[25]  Jean-François Puget,et al.  Constraint Programming Next Challenge: Simplicity of Use , 2004, CP.

[26]  Christian Bessiere,et al.  Strong Bounds Consistencies and Their Application to Linear Constraints , 2015, AAAI.

[27]  Peter J. Stuckey,et al.  The Proper Treatment of Undefinedness in Constraint Languages , 2009, CP.

[28]  Peter Nightingale,et al.  Implementing logical connectives in constraint programming , 2010, Artif. Intell..

[29]  Frederick S. Hillier,et al.  Introduction of Operations Research , 1967 .

[30]  Sharad Malik,et al.  Chaff: engineering an efficient SAT solver , 2001, Proceedings of the 38th Design Automation Conference (IEEE Cat. No.01CH37232).

[31]  Jean-François Puget Symmetry Breaking Using Stabilizers , 2003, CP.

[32]  Ian P. Gent Arc Consistency in SAT , 2002, ECAI.

[33]  Ian P. Gent,et al.  Tailoring Solver-Independent Constraint Models: A Case Study with Essence' and Minion , 2007, SARA.

[34]  Guido Tack,et al.  Multi-Pass High-Level Presolving , 2015, IJCAI.

[35]  Inês Lynce,et al.  Towards Robust CNF Encodings of Cardinality Constraints , 2007, CP.

[36]  Waldo C. Kabat,et al.  Job-shop scheduling using automated reasoning: A case study of the car-sequencing problem , 2004, Journal of Automated Reasoning.

[37]  Toby Walsh,et al.  SAT v CSP , 2000, CP.

[38]  Dhiraj K. Pradhan,et al.  NiVER: Non Increasing Variable Elimination Resolution for Preprocessing SAT instances , 2004, SAT.

[39]  Jean-Charles Régin,et al.  A Filtering Algorithm for Global Sequencing Constraints , 1997, CP.

[40]  Armin Biere,et al.  Effective Preprocessing in SAT Through Variable and Clause Elimination , 2005, SAT.

[41]  Peter Nightingale,et al.  Essence' Description , 2016, ArXiv.

[42]  Mutsunori Banbara,et al.  Compiling Finite Linear CSP into SAT , 2006, CP.

[43]  Peter J. Stuckey,et al.  Finite Domain Bounds Consistency Revisited , 2004, Australian Conference on Artificial Intelligence.

[44]  Jean-Charles Régin,et al.  Cost-Based Arc Consistency for Global Cardinality Constraints , 2002, Constraints.

[45]  Gilles Pesant,et al.  Revisiting the Sequence Constraint , 2006, CP.

[46]  Armin Biere,et al.  Inprocessing Rules , 2012, IJCAR.

[47]  Simon Colton,et al.  Automatic Generation of Implied Constraints , 2006, ECAI.

[48]  Ian Miguel,et al.  Constraints for Breaking More Row and Column Symmetries , 2003, CP.

[49]  Toby Walsh,et al.  Breaking Row and Column Symmetries in Matrix Models , 2002, CP.

[50]  Gilles Trombettoni,et al.  Exploiting Common Subexpressions in Numerical CSPs , 2008, CP.

[51]  Ian P. Gent,et al.  Minion: A Fast Scalable Constraint Solver , 2006, ECAI.

[52]  Ian P. Gent,et al.  Automatically Enhancing Constraint Model Instances during Tailoring , 2009, SARA.

[53]  Peter J. Stuckey,et al.  MiniZinc with Functions , 2013, CPAIOR.

[54]  Peter Nightingale,et al.  The extended global cardinality constraint: An empirical survey , 2011, Artif. Intell..

[55]  Christophe Lecoutre,et al.  Second-Order Consistencies , 2011, J. Artif. Intell. Res..

[56]  Helmut Simonis,et al.  A Constraint Seeker: Finding and Ranking Global Constraints from Examples , 2011, CP.

[57]  J. Cocke Global common subexpression elimination , 1970, Symposium on Compiler Optimization.

[58]  Toby Walsh,et al.  Encodings of the Sequence Constraint , 2007, CP.

[59]  Ian Miguel,et al.  Symmetry Breaking as a Prelude to Implied Constraints: A Constraint Modelling Pattern , 2004, ECAI.

[60]  Carme Torras,et al.  Exploiting symmetries within constraint satisfaction search , 2001, Artif. Intell..

[61]  Pascal Van Hentenryck The OPL optimization programming language , 1999 .