The Cassowary linear arithmetic constraint solving algorithm
- 1 December 2001
- journal article
- Published by Association for Computing Machinery (ACM) in ACM Transactions on Computer-Human Interaction
- Vol. 8 (4) , 267-306
- https://doi.org/10.1145/504704.504705
Abstract
Linear equality and inequality constraints arise naturally in specifying many aspects of user interfaces, such as requiring that one window be to the left of another, requiring that a pane occupy the leftmost third of a window, or preferring that an object be contained within a rectangle if possible. Previous constraint solvers designed for user interface applications cannot handle simultaneous linear equations and inequalities efficiently. This is a major limitation, as such systems of constraints arise often in natural declarative specifications. We describe Cassowary---an incremental algorithm based on the dual simplex method, which can solve such systems of constraints efficiently. We have implemented the algorithm as part of a constraint-solving toolkit. We discuss the implementation of the toolkit, its application programming interface, and its performance.Keywords
This publication has 8 references indexed in Scilit:
- Constraint-based document layout for the WebMultimedia Systems, 2000
- Programming with ConstraintsPublished by MIT Press ,1998
- Ultraviolet: A Constraint Satisfaction Algorithm for Interactive GraphicsConstraints, 1998
- An incremental algorithm for satisfying hierarchies of multiway dataflow constraintsACM Transactions on Programming Languages and Systems, 1996
- Incremental constraint deletion in systems of linear constraintsInformation Processing Letters, 1995
- Multi‐way versus one‐way constraints in user interfaces: Experience with the deltablue algorithmSoftware: Practice and Experience, 1993
- Constraint hierarchiesHigher-Order and Symbolic Computation, 1992
- The CLP( ℛ ) language and systemACM Transactions on Programming Languages and Systems, 1992