Logic puzzles such as Sudoku are described by a set of properties that a valid solution must have. Constraints are a useful technique to describe and solve for such properties. However, constraints are less suited to express imperative interactions in a user interface for logic puzzles, a domain that is more readily expressed in the objectoriented paradigm. Object constraint programming provides a design to integrate constraints with dynamic, objectoriented programming languages. It allows developers to encode multi-way constraints over objects using existing, object-oriented abstractions. These constraints are automatically maintained at run-time. In this paper we present an application of this design to logic puzzles in the Squeak/Smalltalk programming environment, as well as an extension of the design and the formal semantics of Babelsberg to allow declaring constraints using the imperative collection API provided in Squeak. We argue that our implementation facilitates creating applications that use imperative construction of user interfaces and mutable program state as well as constraint satisfaction techniques for different parts of the system. The main advantage of our approach is that it moves the burden to maintain constraints from the developer to the runtime environment, while keeping the development experience close to the purely object-oriented approach.
CITATION STYLE
Felgentreff, T., Hirschfeld, R., Graber, M., Borning, A., & Masuhara, H. (2016). Declaring constraints on object-oriented collections. Journal of Information Processing, 24(6), 917–927. https://doi.org/10.2197/ipsjjip.24.917
Mendeley helps you to discover research relevant for your work.