Integrating Constraints with an Object-Oriented Language

Constraints are declarative statements of relations among elements of the language's computational domain, e.g., integers, booleans, strings, and other objects. Orthogonally, the tools of object-oriented programming, including encapsulation, inheritance, and dynamic message binding, provide important mechanisms for extending a language's domain. Although the integration of constraints and objects seems obvious and natural, one basic obstacle stands in the way: objects provide a new, larger, computational domain, which the language's embedded constraint solver must accommodate. In this paper we list some goals and non-goals for an integration of constraints and object oriented language features, outline previous approaches to this integration, and describe the scheme we use in Kaleidoscope'91, our object-oriented constraint imperative programming language. Kaleidoscope'91 uses a class-based object model, multi-methods, and constraint constructors to integrate cleanly the encapsulation and abstraction of a state-of-the-art object-oriented language with the declarative aspects of constraints.

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

[2]  Michel Beaudouin-Lafon,et al.  ALIEN: A Prototype-Based Constraint System , 1991, Workshops on Object-Oriented Graphics.

[3]  Michael J. Maher,et al.  Constraint Hierarchies and Logic Programming , 1989, ICLP.

[4]  Roger B. Dannenberg,et al.  Garnet: comprehensive support for graphical, highly interactive user interfaces , 1990, Computer.

[5]  B. Freeman-Benson,et al.  DeltaStar: a general algorithm for incremental satisfaction of constraint hierarchies , 1992, Eleventh Annual International Phoenix Conference on Computers and Communication [1992 Conference Proceedings].

[6]  Timothy A. Budd Multiparadigm data structures in Leda , 1992, Proceedings of the 1992 International Conference on Computer Languages.

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

[8]  Bent Bruun Kristensen,et al.  Abstraction mechanisms in the BETA programming language , 1983, POPL '83.

[9]  Maureen C. Stone,et al.  Snap-dragging , 1986, SIGGRAPH.

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

[11]  Remco C. Veltkamp A Quantum Approach to Geometric Constraint Satisfaction , 1991, Workshops on Object-Oriented Graphics.

[12]  Bjørn N. Freeman-Benson,et al.  An incremental constraint solver , 1990, CACM.

[13]  Timothy A. Budd Blending imperative and relational programming , 1991, IEEE Software.

[14]  William W. Wadge,et al.  Lucid, the dataflow programming language , 1985 .

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

[16]  Alan Borning,et al.  Multiple Inheritance in Smalltalk-BO , 1982, AAAI.

[17]  Greg Nelson,et al.  Simplification by Cooperating Decision Procedures , 1979, TOPL.

[18]  Jacques Cohen,et al.  Constraint logic programming languages , 1990, CACM.

[19]  A Budd Timothy Data Structures in Leda , 1989 .

[20]  John H. Maloney Using constraints for user interface construction , 1992 .

[21]  James Arthur Gosling,et al.  Algebraic constraints , 1983 .

[22]  L. Peter Deutsch,et al.  Efficient implementation of the smalltalk-80 system , 1984, POPL.

[23]  Bruce L. Horn,et al.  Siri : a constrained-object language for reactive program implementation , 2004 .

[24]  Bjørn N. Freeman-Benson Constraint imperative programming , 1992 .

[25]  Wm Leler,et al.  Constraint programming languages , 1987 .

[26]  Brad A. Myers,et al.  The Garnet toolkit reference manuals : support for highly-interactive, graphical user interfaces in Lisp , 1989 .

[27]  Kenneth M. Kahn,et al.  Objects - A Fresh Look , 1989, European Conference on Object-Oriented Programming.

[28]  Daniel G. Bobrow,et al.  Objects in concurrent logic programming languages , 1986, OOPSLA 1986.

[29]  Craig Chambers,et al.  Making pure object-oriented languages practical , 1991, OOPSLA 1991.

[30]  Wilf R. LaLonde,et al.  Inside Smalltalk (Volume 1) , 1990 .

[31]  Craig Chambers,et al.  Object-Oriented Multi-Methods in Cecil , 1992, ECOOP.

[32]  Dana S. Scott,et al.  Concurrent constraint programming languages , 1989 .

[33]  Bent Bruun Kristensen,et al.  The BETA Programming Language , 1987, Research Directions in Object-Oriented Programming.

[34]  Brad A. Myers The garnet user interface development environment , 1994, CHI Conference Companion.

[35]  Michael R. Wilk Equate: an object-oriented constraint solver , 1991, OOPSLA 1991.

[36]  Paul S. Barth An object-oriented approach to graphical interfaces , 1986, TOGS.

[37]  Ole Lehrmann Madsen,et al.  Object-oriented programming in the BETA programming language , 1993 .

[38]  Roland H. C. Yap,et al.  The CLP( R ) language and system , 1992, TOPL.

[39]  A. Borning,et al.  Constraint technology for user-interface construction in ThingLab II , 1989, OOPSLA 1989.