A constraint is a relation that we would like to maintain. Over the last thirty years, a number of problems have prevented constraints from being widely accepted for use in interactive graphical applications. The biggest difficulty of applying constraints has been finding the right tradeoff between performance and expressiveness. To be able to satisfy systems of constraints efficiently enough for real-time use, interactive applications have restricted the problem to solving less-expressive sets of constraints. One common such restriction is to require that the constraint relationships are acyclic, thus enabling simple techniques based on local propagation. Unfortunately, these limitations in expressiveness counteract the benefits that the declarative specification of relationships with constraints is intended to provide.
A sophisticated new constraint solving toolkit, Cassowary (based on the simplex algorithm), is presented. It is designed to support especially easy embedding of efficient constraint-solving capabilities in arbitrary interactive graphical applications. To prove its usefulness and refine its capabilities, the Cassowary toolkit was used in three such applications: the Scheme Constraints Window Manager (S CWM ) explores exposing the power of constraints to the end user via a graphical user interface; Constraint Cascading Style Sheets (CCSS) for the Amaya web browser illustrates how constraints can be a powerful means of understanding a complex procedural specification and can provide a unifying implementation mechanism; and Constraint Scalable Vector Graphics (CSVG) for the CSIRO SVG viewer demonstrates that constraints provide a powerful framework for delaying the final layout of diagrammatic illustrations to enable visualizations better adapted to the viewing environment. Each of these applications benefits from constraint features and maintains good performance by leveraging Cassowary.
Constraint solving, and in particular the Cassowary constraint solving toolkit, can provide useful capabilities that are easy to take advantage of. It, and similar technologies, are ready for more significant and ambitious use in the domain of interactive graphical applications.
Cited By
- Meyerovich L and Bodik R Fast and parallel webpage layout Proceedings of the 19th international conference on World wide web, (711-720)
- Murugappan S, Sellamani S and Ramani K Towards beautification of freehand sketches using suggestions Proceedings of the 6th Eurographics Symposium on Sketch-Based Interfaces and Modeling, (69-76)
- Wybrow M, Marriott K, Mciver L and Stuckey P (2008). Comparing usability of one-way and multi-way constraints for diagram editing, ACM Transactions on Computer-Human Interaction, 14:4, (1-38), Online publication date: 1-Jan-2008.
Recommendations
Constraints for Interactive Graphical Applications
CP '02: Proceedings of the 6th International Conference on Principles and Practice of Constraint ProgrammingConstraints have been used in interactive graphical applications since Sketchpad in the early 60's [8]. Constraints in this domain, as in others, provide a declarative way for the user to specify what is desired rather than how to achieve it. Two ...