Procedural Code Generation vs Static Expansion in Modelling Languages for Constraint Programming

To make constraint programming easier to use by the nonprogrammers, a lot of work has been devoted to the design of frontend modelling languages using logical and algebraic notations instead of programming constructs. The transformation to an executable constraint program can be performed by fundamentally two compilation schemas: either by a static expansion of the model in a flat constraint satisfaction problem (e.g. Zinc, Rules2CP, Essence) or by generation of procedural code (e.g. OPL, Comet). In this paper, we compare both compilation schemas. For this, we consider the rule-based modelling language Rules2CP with its static exansion mechanism and describe with a formal system a new compilation schema which proceeds by generation of procedural code. We analyze the complexity of both compilation schemas, and present some performance figures of both the compilation process and the generated code on a benchmark of scheduling and bin packing problems.

[1]  Didier Rémy,et al.  Type checking records and variants in a natural extension of ML , 1989, POPL '89.

[2]  Pascal Van Hentenryck,et al.  Search and strategies in OPL , 2000, TOCL.

[3]  Laurence A. Wolsey,et al.  Integration of AI and OR Techniques in Constraint Programming for Combinatorial Optimization Problems, 4th International Conference, CPAIOR 2007, Brussels, Belgium, May 23-26, 2007, Proceedings , 2007, CPAIOR.

[4]  Simon L. Peyton Jones,et al.  Imperative functional programming , 1993, POPL '93.

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

[6]  François Fages,et al.  From Rules to Constraint Programs with the Rules2CP Modelling Language , 2009, CSCLP.

[7]  Frédéric Benhamou Principles and Practice of Constraint Programming - CP 2006, 12th International Conference, CP 2006, Nantes, France, September 25-29, 2006, Proceedings , 2006, CP.

[8]  Roberto Rossi,et al.  Cost-Based Filtering for Stochastic Inventory Control , 2006, CSCLP.

[9]  Richard E. Korf Optimal Rectangle Packing: New Results , 2004, ICAPS.

[10]  Mats Carlsson,et al.  A Geometric Constraint over k-Dimensional Objects and Shapes Subject to Business Rules , 2008, CP.

[11]  François Fages,et al.  Modelling Search Strategies in Rules2CP , 2009, CPAIOR.

[12]  John C. Mitchell,et al.  Polymorphic unification and ML typing , 1989, POPL '89.

[13]  Kim Marriott,et al.  From Zinc to Design Model , 2007, PADL.

[14]  Helmut Simonis,et al.  Using Global Constraints for Rectangle Packing , 2008 .

[15]  Pascal Van Hentenryck,et al.  The Comet Programming Language and System , 2005, CP.

[16]  Peter van Beek,et al.  Principles and Practice of Constraint Programming - CP 2005, 11th International Conference, CP 2005, Sitges, Spain, October 1-5, 2005, Proceedings , 2005, CP.

[17]  Warwick Harvey,et al.  Essence: A constraint language for specifying combinatorial problems , 2007, Constraints.

[18]  Peter Brucker,et al.  A Branch & Bound Algorithm for the Open-shop Problem , 1997, Discret. Appl. Math..

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