Machine Tongues X: Constraint Languages
David A. Levitt · Computer Music Journal · 1984
Before long, programming as we now know it will be a rare activity. Even for builders of complex software systems, manually constructing an algorithm-describing a sequence of steps for a computer to perform in achieving a single result-will be uncommon. Current methods of programming, in which programmers spend their time writing algorithms and debugging flawed realizations of them, will give way to more powerful tools that foster system design and perform most coding tasks automatically. Constraint languages and programming environments will help the designer produce a lucid description of a problem domain, and then of particular situations and problems in it. Early versions of these languages were given descriptions of real world domain constraints, like the operation of electrical and mechanical parts. More recently, I have automated a vocabulary for describing musical jazz phrases, using constraint language as a jazz improviser. General constraint languages will handle all of these domains. Once the model is in place, the system will connect built-in code fragments and algorithms to answer questions about situations; that is, to help solve problems. Bugs will surface not in code, but in designs themselves. Debugging systems will explain why a situation is impossible or underconstrained; and, as always, designers will decide that their ideas were flawed and change them. Not every programmer shares this vision or sees it as a realistic goal. But since the early 1960s, computer scientists have demonstrated increasingly powerful and flexible versions: constraint languages for assistance in describing and solving problems, rather than programming. From Ivan Sutherland's original SketchPad system to Software Arts's recently introduced TK!Solver, constraint languages have presented a seductive alternative to the conventional, algorithmic style. This article describes the principles behind constraint languages; their applications, especially to musical problems; and research that will some day make constraint languages more general-purpose and efficient.