Procedural Code Generation vs Static Expansion in Modelling Languages for Constraint Programming
To make constraint programming easier to use by the non-programmers, a lot of work has been devoted to the design of front-end 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.
KeywordsModelling Language Free Variable Constraint Program Packing Problem Static Expansion
Unable to display preview. Download preview PDF.
- 1.Brucker, P., Hurink, J., Jurisch, B., Wöstmann, B.: A branch & bound algorithm for the open-shop problem. In: GO-II Meeting: Proceedings of the Second International Colloquium on Graphs and Optimization, pp. 43–59. Elsevier Science Publishers B. V., Amsterdam (1997)Google Scholar
- 8.Kanellakis, P.C., Mitchell, J.C.: Polymorphic unification and ml typing. In: Proceedings of the 16th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 1989, pp. 105–115. ACM, New York (1989)Google Scholar
- 9.Korf, R.E.: Optimal rectangle packing: New results. In: ICAPS, pp. 142–149 (2004)Google Scholar
- 12.Rémy, D.: Records and variants as a natural extension of ML. In: Sixteenth Annual Symposium on Principles of Programming Languages (1989)Google Scholar
- 13.Simonis, H., O’Sullivan, B.: Using global constraints for rectangle packing. In: Proceedings of the First Workshop on Bin Packing and Placement Constraints BPPC 2008, Associated to CPAIOR 2008 (May 2008)Google Scholar
- 14.Van Hentenryck, P.: The OPL Optimization programming Language. MIT Press, Cambridge (1999)Google Scholar