Advertisement

Integrating constraints with an object-oriented language

  • Bjorn N. Freeman-Benson
  • Alan Borning
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 615)

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.

Keywords

Logic Programming Constraint Satisfaction Constraint Solver Constraint Graph Instance Variable 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    P. Avesani, A. Perini, and F. Ricci. COOL: An Object System with Constraints. In TOOLS 2, June 1990.Google Scholar
  2. 2.
    Paul Barth. An Object-Oriented Approach to Graphical Interfaces. ACM Transactions on Graphics, 5(2):142–172, April 1986.MathSciNetCrossRefGoogle Scholar
  3. 3.
    Eric A. Bier and Maureen C. Stone. Snap-Dragging. In Proceedings of SIGGRAPH'86, Dallas, Texas, August 1986. Also in Computer Graphics 20(4), August 1986.Google Scholar
  4. 4.
    Alan Borning, Michael Maher, Amy Martindale, and Molly Wilson. Constraint Hierarchies and Logic Programming. In Proceedings of the Sixth International Conference on Logic Programming, pages 149–164, Lisbon, June 1989.Google Scholar
  5. 5.
    Alan H. Borning. The Programming Language Aspects of ThingLab, A Constraint-Oriented Simulation Laboratory. ACM Transactions on Programming Languages and Systems, 3(4):353–387, October 1981.CrossRefGoogle Scholar
  6. 6.
    Alan H. Borning and Danial H. H. Ingalls. Multiple Inheritance in Smalltalk-80. In Proceedings of the National Conference on Artificial Intelligence, pages 234–237, Pittsburgh, Pennsylvania, August 1982. American Association for Artificial Intelligence.Google Scholar
  7. 7.
    Timothy A. Budd. Blending Imperative and Relational Programming. IEEE Software, 8(1), January 1991.Google Scholar
  8. 8.
    Timothy A. Budd. Multiparadigm Data Structures in Leda. In Proceedings of the IEEE Computer Society 1992 International Conference on Computer Languages, April 1992.Google Scholar
  9. 9.
    Craig Chambers. Object-Oriented Multi-Methods in Cecil. In Proceedings of the European Conference on Object-Oriented Programming, July 1992.Google Scholar
  10. 10.
    Craig Chambers and David Ungar. Making Pure Object-Oriented Languages Practical. In Proceedings of the 1991 ACM Conference on Object-Oriented Programming Systems, Languages, and Applications, pages 1–15, Phoenix, October 1991.Google Scholar
  11. 11.
    Jacques Cohen. Constraint Logic Programming Languages. Communications of the ACM, 33(7):52–68, July 1990.CrossRefGoogle Scholar
  12. 12.
    Eric Cournarie and Michel Beaudouin-Lafon. ALIEN: A Prototype-based Constraint System. In Preprints of the Second Eurographics Workshop on Object Oriented Graphics, pages 93–114, Texel, The Netherlands, June 1991. To be published in revised form by Springer-Verlag.Google Scholar
  13. 13.
    L. Peter Deutsch and Allan M. Schiffman. Efficient Implementation of the Smalltalk-80 System. In Proceedings of the Eleventh Annual Principles of Programming Languages Symposium, pages 297–302, Salt Lake City, Utah, January 1984. ACM.Google Scholar
  14. 14.
    Bjorn Freeman-Benson. A Module Compiler for ThingLab II. In Proceedings of the 1989 ACM Conference on Object-Oriented Programming Systems, Languages and Applications, New Orleans, October 1989. ACM.Google Scholar
  15. 15.
    Bjorn Freeman-Benson. Kaleidoscope: Mixing Objects, Constraints, and Imperative Programming. In Proceedings of the 1990 Conference on Object-Oriented Programming Systems, Languages, and Applications, and European Conference on Object-Oriented Programming, pages 77–88, Ottawa, Canada, October 1990. ACM.Google Scholar
  16. 16.
    Bjorn Freeman-Benson, John Maloney, and Alan Borning. An Incremental Constraint Solver. Communications of the ACM, 33(1):54–63, January 1990.CrossRefGoogle Scholar
  17. 17.
    Bjorn Freeman-Benson, Molly Wilson, and Alan Borning. DeltaStar: A General Algorithm for Incremental Satisfaction of Constraint Hierarchies. In Proceedings of the Eleventh Annual IEEE Phoenix Conference on Computers and Communications, Scottsdale, Arizona, March 1992. IEEE. To appear.Google Scholar
  18. 18.
    Bjorn N. Freeman-Benson. Constraint Imperative Programming. PhD thesis, University of Washington, Department of Computer Science and Engineering, July 1991. Published as Department of Computer Science and Engineering technical report 91-07-02.Google Scholar
  19. 19.
    James A. Gosling. Algebraic Constraints. PhD thesis, Carnegie-Mellon University, May 1983. Published as CMU Computer Science Department tech report CMU-CS-83-132.Google Scholar
  20. 20.
    Bruce Horn. A Constrained-Object Language for Reactive Program Implementation. Technical Report CMU-CS-91-152, School of Computer Science, Carnegie-Mellon University, June 1991.Google Scholar
  21. 21.
    Joxan Jaffar and Jean-Louis Lassez. Constraint Logic Programming. In Proceedings of the 14th ACM Principles of Programming Languages Conference, Munich, January 1987.Google Scholar
  22. 22.
    Joxan Jaffar, Spiro Michaylov, Peter Stuckey, and Roland Yap. The CLP(R) Language and System. Technical Report CMU-CS-90-181, School of Computer Science, Carnegie Mellon University, October 1990. To appear in ACM Transactions on Programming Languages and Systems.Google Scholar
  23. 23.
    Kenneth Kahn, Eric Tribble, Mark Miller, and Daniel Bobrow. Objects in Concurrent Logic Programming Languages. In Proceedings of the 1986 ACM Conference on Object-Oriented Programming Systems, Languages and Applications, pages 242–257, Portland, Oregon, September 1986. ACM.Google Scholar
  24. 24.
    Kenneth M. Kahn. Objects—A Fresh Look. In Proceedings of the European Conference on Object-Oriented Programming, July 1990.Google Scholar
  25. 25.
    Glenn Kramer, Jahir Pabon, Walid Keirouz, and Robert Young. Geometric Constraint Satisfaction Problems. In Working Notes of the AAAI Spring Symposium on Constraint-Based Reasoning, pages 242–251, Stanford, March 1991.Google Scholar
  26. 26.
    Bent Bruun Kristensen, Ole Lehrmann Madsen, Birger MØller Pedersen, and Kristen Nygaard. Object Oriented Programming in the Beta Programming Language. Draft of unpublished book, 1991.Google Scholar
  27. 27.
    Bent Bruun Kristensen, Ole Lehrmann Madsen, Birger MØller Pederson, and Kirsten Nygaard. Abstraction Mechanisms in the BETA Programming Language. In Proceedings of the Tenth Annual Principles of Programming Languages Symposium, Austin, Texas, January 1983. ACM.Google Scholar
  28. 28.
    Wilf R. LaLonde and John R. Pugh. Inside Smalltalk, volume II. Prentice Hall, Englewood Cliffs, NJ, 1991.Google Scholar
  29. 29.
    William Leler. Constraint Programming Languages. Addison-Wesley, 1987.Google Scholar
  30. 30.
    Alan K. Mackworth. Consistency in Networks of Relations. Artificial Intelligence, 8(1):99–118, 1977.zbMATHMathSciNetCrossRefGoogle Scholar
  31. 31.
    John Maloney. Using Constraints for User Interface Construction. PhD thesis, Department of Computer Science and Engineering, University of Washington, August 1991. Published as Department of Computer Science and Engineering technical report 91-08-12.Google Scholar
  32. 32.
    Brad A. Myers, Dario Guise, Roger B. Dannenberg, Brad Vander Zanden, David Kosbie, Philippe Marchal, and Ed Pervin. Comprehensive Support for Graphical, Highly-Interactive User Interfaces: The Garnet User Interface Development Environment. IEEE Computer, 23(11):71–85, November 1990.Google Scholar
  33. 33.
    Brad A. Myers, Dario Guise, Roger B. Dannenberg, Brad Vander Zanden, David Kosbie, Philippe Marchai, Ed Pervin, Andrew Mickish, and John A. Kolojejchick. The Garnet Toolkit Reference Manuals: Support for Highly-Interactive Graphical User Interfaces in Lisp. Technical Report CMU-CS-90-117, Computer Science Dept, Carnegie Mellon University, March 1990.Google Scholar
  34. 34.
    Greg Nelson and Derek C. Oppen. Simplification by Cooperating Decision Procedures. In Proceedings of the Fifth ACM Symposium on Principles of Programming Languages. ACM SIGPLAN, 1978.Google Scholar
  35. 35.
    Vijay Anand Saraswat. Concurrent Constraint Programming Languages. PhD thesis, Carnegie-Mellon University, Computer Science Department, January 1989.Google Scholar
  36. 36.
    E. Shapiro and A. Takeuchi. Object-Oriented Programming in Concurrent Prolog. In Ehud Shapiro, editor, Concurrent Prolog: Collected Papers, volume 2, chapter 21. MIT Press, 1987.Google Scholar
  37. 37.
    Remco C. Veltkamp. A Quantum Approach to Geometric Constraint Satisfaction. In Preprints of the Second Eurographics Workshop on Object Oriented Graphics, pages 53–67, Texel, The Netherlands, June 1991. To be published in revised form by Springer-Verlag.Google Scholar
  38. 38.
    William W. Wadge and Edward A. Ashcroft. Lucid, the Dataflow Programming Language. Academic Press, London, 1985.Google Scholar
  39. 39.
    Michael Wilk. Equate: An Object-Oriented Constraint Solver. In Proceedings of the 1991 ACM Conference on Object-Oriented Programming Systems, Languages, and Applications, pages 286–298, Phoenix, October 1991.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1992

Authors and Affiliations

  • Bjorn N. Freeman-Benson
    • 1
  • Alan Borning
    • 2
  1. 1.Department of Computer ScienceUniversity of VictoriaVictoriaCanada
  2. 2.Department of Computer Science and Engineering, FR-35University of WashingtonSeattleUSA

Personalised recommendations