Modern Techniques for Constraint Solving the Casper Experience

Modern Techniques for Constraint Solving the Casper Experience

View metadata, citation and similar papers at core.ac.uk brought to you by CORE provided by New University of Lisbon's Repository MARCO VARGAS CORREIA MODERN TECHNIQUES FOR CONSTRAINT SOLVING THE CASPER EXPERIENCE Dissertação apresentada para obtenção do Grau de Doutor em Engenharia Informática, pela Universidade Nova de Lisboa, Faculdade de Ciências e Tecnologia. UNIÃO EUROPEIA Fundo Social Europeu LISBOA 2010 ii Acknowledgments First I would like to thank Pedro Barahona, the supervisor of this work. Besides his valuable scientific advice, his general optimism kept me motivated throughout the long, and some- times convoluted, years of my PhD. Additionally, he managed to find financial support for my participation on international conferences, workshops, and summer schools, and even for the extension of my grant for an extra year and an half. This was essential to keep me focused on the scientific work, and ultimately responsible for the existence of this dissertation. Designing, developing, and maintaining a constraint solver requires a lot of effort. I have been lucky to count on the help and advice of colleagues contributing directly or indirectly to the design and implementation of CASPER, to whom I am truly indebted: Francisco Azevedo introduced me to constraint solving over set variables, and was the first to point out the potential of incremental propagation. The set constraint solver integrating the work presented in this dissertation is based on his own solver CARDINAL, which he has thoroughly explained to me. Jorge Cruz was very helpful for clarifying many issues about real valued arithmetic, and propagation of constraints over real valued variables in general. The adoption of CaSPER as an optional development platform for his lectures boosted the development of the module for real valued constraint solving. Olivier Perriquet was directly involved in porting the PSICO library to CASPER, an applica- tion of constraint programming to solve protein folding problems. Ruben Viegas developed a module for constraint programming over graph variables, which eventually led to a joint research on new representations for the domains of set domain vari- ables. Working with Ruben was a pleasure and very rewarding. His work marks an important milestone in the development of CaSPER - the first contributed domain reasoning module. Sérgio Silva has contributed a parser for the MINIZINC language that motivated an improved design of the general solver interface to other programming languages. Several people have used the presented work for their own research or education. Many times they had to cope with bugs, lack of documentation, and an ever evolving architecture. Although this was naturally not easy for them, they were always very patient and helped im- proving my work in many ways. I’m very grateful to João Borges, Everardo Barcenas, Jean Christoph Jung, David Buezas, and the students of the “Search and Optimization” and “Con- straints on Continuous Domains” courses. I would like to thank to my colleagues at CENTRIA for all the informal discussions and iii mostly for being a constant source of encouragement and motivation. I specially thank Ar- mando Fernandes and Cecilia Gomes for their concern and advice on the time schedule and contents of this dissertation. A significant part of the material presented in this dissertation is based on the formalism developed by Guido Tack. I am very grateful to him for his willingness to answer my questions on some aspects of his approach, and for his valuable comments on the work presented in chapters 6 and 7. Finally I thank my family and friends for all the emotional support and for being a motiva- tion in the quest for success. This dissertation is dedicated to them. iv No idea is so antiquated that it was not once modern; no idea is so modern that it will not someday be antiquated. Ellen Glasgow v vi Sumário A programação por restrições é um modelo adequado à resolução de problemas combinato- riais com aplicação a problemas industriais e académicos importantes. Ela é realizada com recurso a um resolvedor de restrições, um programa de computador que tenta encontrar uma solução para o problema, i.e. uma atribuição de valores a todas as variáveis que satisfaça todas as restrições. Esta dissertação descreve um conjunto de técnicas utilizadas na implementação de um re- solvedor de restrições. Estas técnicas tornam um resolvedor de restrições mais extensível e eficiente, duas propriedades que dificilmente são integradas em geral, e em particular em re- solvedores de restrições. Mais especificamente, esta dissertação debruça-se sobre dois proble- mas principais: propagação incremental genérica, e propagação de restrições decomponíveis arbitrárias. Para ambos os problemas apresentamos um conjunto de técnicas que são origi- nais, correctas, e que se orientam no sentido de tornar a plataforma mais eficiente, extensível, ou ambos. A matéria apresentada nesta dissertação surgiu da resolução dos problemas encontrados no desenho e implementação de um resolvedor de restrições genérico. O resolvedor CASPER (Constraint Solving Platform for Engineering and Research) não serve apenas de protótipo in- tegrando todas as técnicas apresentadas, mas é também a plataforma experimental comum aos vários modelos teóricos discutidos. Para além do trabalho relacionado com o desenho e implementação de um resolvedor de restrições, esta dissertação apresenta também a primeira aplicação bem sucedida da plataforma na abordagem de um problema importante em aberto, nomeadamente a caracterização de heurísticas que direccionem a pesquisa rapidamente para uma solução. vii viii Abstract Constraint programming is a well known paradigm for addressing combinatorial problems which has enjoyed considerable success for solving many relevant industrial and academic problems. At the heart of constraint programming lies the constraint solver, a computer pro- gram which attempts to find a solution to the problem, i.e. an assignment of all the variables in the problem such that all the constraints are satisfied. This dissertation describes a set of techniques to be used in the implementation of a con- straint solver. These techniques aim at making a constraint solver more extensible and effi- cient, two properties which are hard to integrate in general, and in particular within a con- straint solver. Specifically, this dissertation addresses two major problems: generic incremen- tal propagation and propagation of arbitrary decomposable constraints. For both problems we present a set of techniques which are novel, correct, and directly concerned with extensibility and efficiency. All the material in this dissertation emerged from our work in designing and implementing a generic constraint solver. The CASPER (Constraint Solving Platform for Engineering and Re- search) solver does not only act as a proof-of-concept for the presented techniques, but also served as the common test platform for the many discussed theoretical models. Besides the work related to the design and implementation of a constraint solver, this dissertation also presents the first successful application of the resulting platform for addressing an open re- search problem, namely finding good heuristics for efficiently directing search towards a solu- tion. ix x Contents 1. Introduction 1 1.1. Constraint reasoning . .1 1.2. This dissertation . .3 1.2.1. Motivation . .3 1.2.2. Contributions . .4 1.2.3. Overview . .6 2. Constraint Programming 9 2.1. Concepts and notation . .9 2.1.1. Constraint Satisfaction Problems . .9 2.1.2. Tuples and tuple sets . 10 2.1.3. Domain approximations . 11 2.1.4. Domains . 12 2.2. Operational model . 14 2.2.1. Propagation . 14 2.2.2. Search . 19 2.3.Summary........................................... 22 I. Incremental Propagation 23 3. Architecture of a Constraint Solver 25 3.1. Propagation kernel . 25 3.1.1. Propagation loop . 25 3.1.2. Subscribing propagators . 26 3.1.3. Event driven propagation . 27 3.1.4. Signaling fixpoint . 28 3.1.5. Subsumption . 30 3.1.6. Scheduling . 30 3.2. State manager . 31 3.2.1. Algorithms for maintaining state . 32 3.2.2. Reversible data structures . 34 3.2.3. Memory pools . 36 xi Contents 3.3. Other components . 37 3.3.1. Constraint library . 37 3.3.2. Domain modules . 38 3.3.3. Interfaces . 38 3.4.Summary........................................... 39 4. A Propagation Kernel for Incremental Propagation 41 4.1. Propagator and variable centered propagation . 41 4.1.1. Incremental propagation . 44 4.1.2. Improving propagation with events . 46 4.1.3. Improving propagation with priorities . 47 4.2. The NOTIFY-EXECUTE algorithm . 48 4.3. An object-oriented implementation . 51 4.3.1. Dependency lists . 53 4.3.2. Performance . 53 4.4. Experiments......................................... 54 4.4.1. Models . 54 4.4.2. Benchmarks . 55 4.4.3. Setup . 55 4.5. Discussion . 56 4.6.Summary........................................... 56 5. Incremental Propagation of Set Constraints 59 5.1. Set constraint solving . 59 5.1.1. Set domain variables . 60 5.1.2. Set constraints . 60 5.2. Domain primitives . 61 5.3. Incremental propagation . 63 5.4. Implementation . 65 5.4.1. Propagator-based deltas . 65 5.4.2. Variable-based deltas . 67 5.4.3. Optimizations . 68 5.5. Experiments......................................... 71 5.5.1. Models . 71 5.5.2. Problems . 71 5.5.3. Setup . 73 5.6. Discussion . 73 5.7.Summary........................................... 74 xii Contents II. Efficient Propagation of Arbitrary Decomposable Constraints 77 6. Propagation of Decomposable Constraints 79 6.1. Decomposable constraints . 79 6.1.1. Functional composition . 80 6.2.Views............................................. 81 6.3. View-based propagation . 83 6.3.1. Constraint checkers . 83 6.3.2. Propagators . 84 6.4. Views over decomposable constraints . 84 6.4.1. Composition of views . 85 6.4.2. Checking and propagating decomposable constraints . 86 6.5. Conclusion . 87 7. Incomplete View-Based Propagation 91 7.1. ©ª-complete propagators . 91 7.2. View models . ..

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    241 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