Integrating Constraints with an Object-Oriented Language

Authors: Bjorn Freeman-Benson and Alan Borning

Published in Proceedings of the 1992 European Conference on Object-Oriented Programming, June 1992, pages 268-286.


Abstract

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.


full paper (pdf)

Constraints home page