Constraint Programming
Total Page:16
File Type:pdf, Size:1020Kb
Constraint Programming The Constraint Programming Working Group ACMMIT SDCR Workshop Version George Oct Introduction A constraint can intuitively b e thought of as a restriction on a space of p ossibil ities Mathematical constraints are precisely sp eciable relations among several unknowns or variables each taking a value in a given domain Constraints restrict the p ossible values that variables can take representing some partial information ab out the variables of interest For instance The second side of a sheet of a pap er must b e imaged milliseconds after the time at which the rst side is imaged relates two variables without precisely sp ecifying the values they must take One can think of such a constraint as standing for a p ossibly innite set of values in this case the set fh i h i g Constraints arise naturally in most areas of human endeavor They are the natural medium of expression for formalizing regularities that underlie the com putational and natural or designed physical worlds and their mathematical abstractions with a rich tradition going back to the days of Euclidean geom etry if not earlier For instance the three angles of a triangle sum to degrees the four bases that make up DNA strands can only combine in partic ular orders the sum of the currents owing into a no de must equal zero the trusses supp orting a bridge can only carry a certain static and dynamic load the pressure volume and temp erature of an enclosed gas must ob ey the gas law Mary John and Susan must have dierent oces the relative p osition of the scroller in the window scrollbar must reect the p osition of the current text in the underlying do cument the derivative of a function is p ositive at zero the function is monotone in its rst argument etc Indeed whole subelds of Editors Pascal Van Hentenryck and Vijay Saraswat Contributing Authors Alan Born ing Alex Bro dsky Philipp e Co dognet Rina Dechter Mehmet Dincbas Eugene Freuder Manuel Hermenegildo Joxan Jaar Simon Kasif JeanLouis Lassez David McAllester Ken McAlo on Alan Mackworth Ugo Montanari William Older JeanFrancois Puget Raghu Ra makrishnan Francesca Rossi Gert Smolka Ralph Wachter mathematics eg theory of Diophantine equations group theory and many celebrated conjectures of mathematics eg Fermats Last Theorem deal with whether certain constraints are satisable Constraints naturally enjoy several interesting prop erties First as remarked ab ove constraints may sp ecify partial information a constraint need not uniquely sp ecify the value of its variables Second they are additive given a constraint c say X Y Z another constraint c can b e added say 1 2 X Y Z The order of imp osition of constraints do es not matter all that matters at the end is that the conjunction of constraints is in eect Third constraints are rarely indep endent for instance once c and c are imp osed it 1 2 is the case that the constraint X Y Z is entailed Fourth they are non directional typically a constraint on say three variables X Y Z can b e used to infer a constraint on X given constraints on Y and Z or a constraint on Y given constraints on X and Z and so on Fifth they are declarative typically they sp ecify what relationship must hold without sp ecifying a computational pro cedure to enforce that relationship Any computational system dealing with constraints must fundamentally take these prop erties into account Constraint programming CP is the study of computational systems based on constraints It represents a harnessing of the centuries old notions of anal ysis and inference in mathematical structures with several mo dern concerns general languages for computational representation eciency of analysis and implementation tolerance for useful alb eit incomplete algorithms tied p er haps to weak metho ds such as search all in the service of design and implementation of systems for programming mo deling and problemsolving in dierent domains As discussed in the next section work in this area can b e traced back to research in Articial Intelligence and Computer Graphics in the sixties and seventies which fo cused on explicitly representing and manipulat ing constraints in computational systems Only in the last decade however has there emerged a growing realization that these ideas provide the basis for a p owerful approach to programming mo deling and problem solving and that dierent eorts to exploit these ideas can b e unied under a common conceptual and practical framework The basic essence of this framework is the separation of concerns into two levels The rst level is that of very generally dened constraint systems systems of inference with pieces of partial information based on such fundamen tal op erations as constraint propagation entailment satisfaction normalization and optimization In addition to the traditional constraint systems that have already b een investigated over centuries such as over the real numbers inte gers mo dulo p CP brings a fo cus on a wide variety of systems arising often from application concerns ranging from unstructured nite domains to equa tions over trees termunication to temp oral intervals Increasing attention is b eing paid to discovering ecient techniques for p erforming these constraint op erations across wide classes of such constraint system to discovering common exploitable structure across constraint systems Op erating around this level is the second level of programming language which allows the user to sp ecify more information ab out which constraints should b e generated how they should b e combined and pro cessed etc Perhaps unique to CP are modeling languages that exploit logic based control constructs eg constraint logic programming CLP or concurrent constraint program ming CCP These languages interact with the rst level purely via the basic constraint op erations This provides the user with a very expressive framework parametric in the underlying constraint system for generating manipulating and testing constraints while in the case of the logicbased languages pre serving their declarative character This realization of unied frameworks has simultaneously b een accompanied by the implementation of several general sys tems which are nding widespread use in applications as diverse as mo deling physical systems and controlling rob ots to scheduling container ships in harb ors This central organizational idea has many ramications What emerges is a general declarative framework p otentially more promising than either full rst order logic which is expressive but undecidable in theory and usually inecient in practice or restricted versions such as the Horn clause subset that underly logic programming which are usually ecient in practice but not expressive enough for many applications For what is fundamentally acknowledged is that dierent computational techniques constraintsolving algorithms will b e use ful in dierent computational contexts and a uniform scheme is provided for integrating these techniques into a p owerful computational framework For the theoretician metatheorems can b e proved and analysis techniques invented once and for all that apply to an innite family of systems for the imple menter dierent constructs backward chaining backtracking susp ension can b e implemented once and for all for the user only one set of ideas needs to b e understo o d though with rich alb eit disciplined variation via constraint 1 systems Today CP is contributing exciting new research directions in a number of distinct areas such as articial intelligence natural language understanding scheduling planning conguration concurrent computing database sys tems graphical interfaces hardware verication op erations research and com binatorial optimization programming language design and implementation re active systems symbolic computing algorithms and systems The eld is b eing driven b oth by a need for internal organization and structure and by the de mands of increasingly sophisticated realworld applications to which it is b eing applied 1 From a metho dological p oint of view it is imp ortant to realize that not all researchers in CP work across b oth of these levels Some prefer to exploit the unifying framework of con straints while working purely within the rst level of constraint systems considering issues around programming to b e orthogonal to their concerns Others exploit the unifying frame work of constraints to develop programming language notions while not paying attention to the prop erties of particular constraint systems Some fo cus on fruitfully exploiting the synergy across the b oundary b etween the two levels The state of the art in CP is rep orted in international conference on Prin ciples and Practice of Constraint Programming PPCP and Practical Applications of Constraint Technology PACT and in the recently established constraints journal Work continues to b e rep orted in the conferences and journals of related areas such as Articial Intelligence Logic Programming Databases and Op erations Research Interested readers may nd related sur veys in The rest of this pap er is organized as follows First we develop some back ground on the origin of constraint programming The state of the art in the application of constraint ideas in various elds is then discussed Finally we identify some key strategic directions for further development The Origins of Constraint Programming Some of the earliest ideas leading to CP may b e found in the Articial In telligence AI area of constraint satisfaction dating back to the sixties and seventies