Constraint Propagation

Constraint Propagation

Constraint Propagation Models, Techniques, Implementation Guido Tack Dissertation zur Erlangung des Grades des Doktors der Ingenieurwissenschaften der Naturwissenschaftlich-Technischen Fakultäten der Universität des Saarlandes Saarbrücken, 2009 Dissertation zur Erlangung des Grades des Doktors der Ingenieurwissenschaften der Naturwissenschaftlich-Technischen Fakultäten der Universität des Saarlandes, eingereicht am 5. Dezember 2008 von Dipl.-Inform. Guido Tack, geboren am 6. Oktober 1978 in Lippstadt. Berichterstatter: Prof. Dr. Gert Smolka Prof. Dr. Christian Schulte Prof. Dr. Frédéric Benhamou Dekan: Prof. Dr. Joachim Weickert Prüfungsausschuss: Prof. Dr. Holger Hermanns Prof. Dr. Gert Smolka Prof. Dr. Christian Schulte Dr. Alexander Koller Tag des Kolloquiums: 29. Januar 2009 Textfassung vom 29. Januar 2009 Copyright c 2008, 2009 Guido Tack Abstract This dissertation presents the design of a propagation-based constraint solver. The design is based on models that span several levels of abstraction, ranging from a mathematical foundation, to a high-level implementation architecture, to concrete data structures and algorithms. This principled design approach results in a well- understood, correct, modular, and efficient implementation. The core of the developed architecture is the propagation kernel. It provides the propagation infrastructure and is thus crucial for correctness and efficiency of the solver. Based on a mathematical model as well as a careful design of the employed algorithms and data structures, the presented architecture results in an efficient and domain-independent kernel. Constraints are realized by propagators, and im- plementing a propagator is a challenging, error-prone, and time-consuming task. A practically useful solver must however provide a comprehensive propagator library. This dissertation introduces two techniques for automatically deriving correct and efficient propagators. Views generalize variables and are used to derive propaga- tors from existing propagators. For constraints over set variables, propagators are derived from formal constraint specifications. The presented techniques are the basis of Gecode, a production-quality, highly effi- cient, and widely deployed constraint solver. Gecode is the empirical evidence for success and relevance of the principled design approach of this dissertation. iii Kurzzusammenfassung Diese Dissertation entwirft einen propagierungsbasierten Constraintlöser auf unter- schiedlichen Abstraktionsebenen, von einem mathematischen Fundament über eine Implementierungsarchitektur bis hin zu konkreten Datenstrukturen und Algorith- men. Dieser Ansatz führt zu einer gut verstandenen, korrekten, modularen und effi- zienten Implementierung. Das Kernstück der vorgestellten Architektur ist der Propagierungskernel. Er stellt die Infrastruktur für Constraintpropagierung zur Verfügung und ist daher von großer Bedeutung für Korrektheit und Effizienz. Diese Dissertation entwickelt die Architek- tur für einen effizienten, domänenunabhängigen Kernel, basierend auf einem ma- thematischen Modell und einem sorgfältigen Entwurf der verwendeten Algorithmen und Datenstrukturen. Constraints werden durch Propagierer realisiert, und das Im- plementieren eines Propagierers ist fehleranfällig und zeitaufwändig. Andererseits muss eine ausreichend große Propagiererbibliothek bereitstehen. Diese Dissertati- on untersucht zwei Techniken, um korrekte und effiziente Propagierer automatisch abzuleiten. Views verallgemeinern Variablen und dienen dazu, Propagierer von vor- handenen Propagierern abzuleiten. Für Mengenconstraints werden Propagierer von formalen Spezifikationen der Constraints abgeleitet. Die vorgestellten Techniken bilden die Grundlage für Gecode, einen umfangreichen, hocheffizienten und weit verbreiteten Constraintlöser. Gecode liefert den empiri- schen Nachweis dafür, dass die in dieser Dissertation gewählte Vorgehensweise rele- vant und in der Praxis erfolgreich ist. v Acknowledgements The research that I report on in this dissertation is the result of several years of work—but not only my own. I take this opportunity to express my deep gratitude towards my advisors, colleagues, friends, and family. I consider myself extraordinarily fortunate, being able to work with my two advi- sors, Gert Smolka and Christian Schulte. Gert let me choose my topic freely, and then supported me in numberless discussions with a fresh, outside look on my re- search and his enthusiasm for the perfect, elegant formalism. Christian offered me to join the Gecode project, and I quickly found out that that offer included the best supervision one can hope for as a doctoral student. To him I owe nearly everything I know about software design and implementation, about writing papers and writing reviews, about organizing my work and my thoughts. Mikael Z. Lagerkvist was my fellow doctoral student on the Gecode project, and I very much enjoyed working with him, sharing thoughts and discussing ideas. Furthermore, I thank Frédéric Ben- hamou for giving his expert opinion on this dissertation, and Holger Hermanns and Alexander Koller for serving on my examination committee. The Programming Systems Lab at Saarland University has been an inspiring and gratifying working environment for the past seven years. I especially want to thank Marco Kuhlmann, my long-term office-mate, for his great friendship and his trust in me. For interesting discussions, their willingness to share their knowledge, and help whenever needed, I thank all my current and previous colleagues: Gert, Marco, Chad E. Brown, Mark Kaminski, Mathias Möhl, Sandra Neumann, and Jan Schwinghammer; Christian, Ondˇrej Bojar, Thorsten Brunklaus, Ralph Debusmann, Denys Duchier, Leif Kornstaedt, Didier Le Botlan, Joachim Niehren, Tim Priesnitz, Andreas Rossberg, Lutz Straßburger, Gábor Szokoli, and Ann van de Veire. Thanks to our student assistants Christophe Boutter, Robert Künnemann, and Hannes von Haugwitz, who made system administration much less of a hassle. Being employed by the university of course involved teaching duties. However, the kind of teaching I was allowed to do made this an opportunity rather than a burden. I thank all my students, and I want to mention in particular those who worked with me on Gecode, Niko Paltzer, Patrick Pekczynski, and Raphael Reischuk. I hope they learned as much from me as I learned from them. For the last year, I have had the freedom to work exclusively on my dissertation, which was partly made possible by the support from the Saarbrücken Graduate School of Computer Science. Scientific work requires meeting people in person from time to time. Both my doctoral project as well as Gecode have benefited from the DAAD travel grant that allowed me to visit Christian and Mikael in Stockholm twice a year. Peter J. Stuckey invited me to visit the G12 project at Melbourne University vii and NICTA for six weeks in 2007. I am grateful for having had this opportunity, and I thank the whole G12 crew for the great time. For further cooperations and discussions, I thank Martin Mann and Sebastian Will; Mats Carlsson, Pierre Flener, and Magnus Ågren; Yves Deville, Grégoire Dooms, and Stéphane Zampelli; as well as Claude-Guy Quimper, Andrea Rendl, and Peter Tiedemann. My friends and my family have been a constant source of support. Thank you, Paul, Achim, and especially Monika. Finally, I want to dedicate this dissertation to my mother, Ulla, whom we all sorely miss. Saarbrücken, January 2009 Guido Tack viii My freedom will be so much the greater and more meaningful the more narrowly I limit my field of action and the more I surround myself with obstacles. Whatever diminishes constraint diminishes strength. The more constraints one imposes, the more one frees one’s self of the chains that shackle the spirit. Igor Stravinsky, Poetics of Music Contents 1 Introduction 1 1.1 ConstraintProgramming . 1 1.2 TheThesis..................................... 2 1.3 Overview...................................... 4 2 Constraint Programming 7 2.1 Modeling Constraint Problems: Sudoku . 7 2.2 Constraint Propagation and Search . 9 2.3 SetConstraints .................................. 10 I A Propagation Kernel 13 3 A Model of Constraint Propagation 15 3.1 A Denotational Model of Constraint Problems . 15 3.2 An Operational Model of Constraint Propagation . ... 18 3.3 Propagation as a Transition System . 23 3.4 Idempotency, Monotonicity, and Confluence . 27 3.5 AMany-SortedModel .............................. 32 4 Propagation Strength 33 4.1 Weakest and Strongest Propagators . 34 4.2 DomainApproximations . 35 4.3 Strength with Respect to a Domain System . 38 4.4 TheIntegerIntervalApproximation . 41 4.5 The Interval Approximation for Set Variables . ... 44 4.6 RelatedWork ................................... 45 5 Efficient Propagator Scheduling 47 5.1 Propagator-Centered Propagation . 48 5.2 Event-DirectedScheduling . 51 5.3 Dynamic Dependencies and Propagator Sets . 55 5.4 Self-ReschedulingPropagators . 59 5.5 Propagation Conditions and Modification Events . ... 62 5.6 RelatedWork ................................... 65 xi 6 Implementing a Propagation Kernel 67 6.1 CopyingVersusTrailing . 68 6.2 AnObject-OrientedDesign. 71 6.3 DomainModules ................................. 74 6.4 DependencyManagement . 81 6.5 ThePriorityQueue................................ 85 6.6 Control....................................... 88 6.7 Copying and Memory Management . 88 6.8 Gecode....................................... 92 6.9 PerformanceAnalysis . 93 Contributions of Part I 101 II Techniques for Deriving

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    209 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us