Mixing Constraints and Objects: a Case Study in Automatic Harmonization

We propose an extension of Smalltalk with f ini te-domain constraint sat isfact ion mechanisms. Our system, called BackTalk, allows the definition of constraints over arbitrary Smalltalk objects, and implements efficient algorithms for constraints satisfaction. We exemplify the use of BackTalk on a problem known to be complex, automatic harmonization. We outline several previous attempts to solve the problem with similar mechanisms, and stress on their inefficiencies, mainly the lack of structure of domain objects. We propose to solve the problem by a combination of constraints and objects that fully benefits from object structures. This is achieved in practice by separating the constraint satisfaction process in two steps. By comparison, our system yields excellent results, both in term of efficiency and readability. We discuss the generality of our approach to problems involving numerous and heterogeneous object structures. Key-words: constraints, finite-domain constraint satisfaction, embedded constraint systems, automatic harmonization. 1. Yet an other object + constraint

[1]  Pascal Van Hentenryck Programmation par contraintes , 2000 .

[2]  Pascal Van Hentenryck,et al.  An Efficient Arc Consistency Algorithm for a Class of CSP Problems , 1991, IJCAI.

[3]  Wilf R. LaLonde,et al.  Building a backtracking facility in smalltalk without kernel support , 1988, OOPSLA '88.

[4]  Joxan Jaffar,et al.  Constraint logic programming , 1987, POPL '87.

[5]  Terry Winograd,et al.  Linguistics and the computer analysis of tonal harmony , 1968 .

[6]  François Pachet A Meta-level Architecture for the Analysis of Jazz Chord Sequences , 1991, ICMC.

[7]  Rod Davisonz An Interactive Constraint-based Expert Assistant for Music Composition , 1992 .

[8]  Pierre Berlandier Etude de mecanismes d'interpretation de contraintes et de leur integration dans un systeme a base de connaissances , 1992 .

[9]  Mira Balaban,et al.  Understanding music with AI: perspectives on music cognition , 1992 .

[10]  Alan K. Mackworth Consistency in Networks of Relations , 1977, Artif. Intell..

[11]  David L. Waltz,et al.  Generating Semantic Descriptions From Drawings of Scenes With Shadows , 1972 .

[12]  Jean-Gabriel Ganascia,et al.  Simulating Creativity in Jazz Performance , 1994, AAAI.

[13]  Bjørn N. Freeman-Benson,et al.  Constraints and Object Identity , 1994, ECOOP.

[14]  François Pachet,et al.  On the Embeddability of Production Rules in Object-Oriented Languages , 1995, J. Object Oriented Program..

[15]  Kemal Ebcioglu,et al.  An Expert System for Harmonizing Chorales in the Style of J. S. Bach , 1990, J. Log. Program..

[16]  Bernard Nudel,et al.  Consistent-Labeling Problems and Their Algorithms: Expected-Complexities and Theory-Based Heuristics , 1983, Artif. Intell..

[17]  Edward P. K. Tsang,et al.  Foundations of constraint satisfaction , 1993, Computation in cognitive science.

[18]  Nicolas Beldiceanu,et al.  Constraint Logic Programming , 1997 .

[19]  Bjørn N. Freeman-Benson,et al.  Integrating Constraints with an Object-Oriented Language , 1992, ECOOP.

[20]  Yves Caseau,et al.  Constraint satisfaction with an object-oriented knowledge representation language , 1994, Applied Intelligence.

[21]  Bjørn N. Freeman-Benson,et al.  Constraint Hierarchies , 1992, LISP Symb. Comput..

[22]  Bjørn N. Freeman-Benson,et al.  Kaleidoscope: mixing objects, constraints, and imperative programming , 1990, OOPSLA/ECOOP '90.

[23]  Chi Ping Tsang,et al.  Harmonizing Music as a Discipline in Constraint Logic Programming , 1991, ICMC.

[24]  Thomas C. Henderson,et al.  Arc and Path Consistency Revisited , 1986, Artif. Intell..

[25]  Bernard A. Nadel,et al.  Tree search and ARC consistency in constraint satisfaction algorithms , 1988 .

[26]  François Pachet An Object-Oriented Representation of Pitch-Classes , Intervals , Scales and Chords , 1993 .

[27]  Alan Borning,et al.  The Programming Language Aspects of ThingLab, a Constraint-Oriented Simulation Laboratory , 1981, TOPL.

[28]  Xavier Rodet,et al.  FORMES: Composition and Scheduling of Processes , 1984 .

[29]  Ralph E. Johnson,et al.  An interactive environment for object-oriented music composition and sound synthesis , 1988, OOPSLA '88.