Cassowary (software)

Cassowary is an incremental constraint solving toolkit that efficiently solves systems of linear equalities and inequalities. Constraints may be either requirements or preferences. Client code specifies the constraints to be maintained, and the solver updates the constrained variables to have values that satisfy the constraints.

Cassowary was developed by Greg J. Badros, Alan Borning and Peter J. Stuckey, and was optimized for user interface applications.[1] Badros used Cassowary amongst others for implementing Constraint Cascading Style Sheets (CCSS), an extension to Cascading Style Sheets (CSS). CCSS adds support for layout constraints. These allow designers to describe the layout of a web page in a more flexible manner. Cassowary is used to solve these constraints and calculate the final layout.

The original distribution,[2] unmaintained since 2000, included Smalltalk, C++ and Java implementations, along with bindings for GNU Guile, Python, and STk. Third-party implementations exist for JavaScript,[3] Dart,[4] Squeak,[5] Python,[6][7] the .NET Framework,[8] and Rust.[9]

  1. ^ Cite error: The named reference cassowary was invoked but never defined (see the help page).
  2. ^ Cite error: The named reference cassowary-uw was invoked but never defined (see the help page).
  3. ^ cassowary.js on GitHub
  4. ^ Cite error: The named reference dart was invoked but never defined (see the help page).
  5. ^ Cite error: The named reference squeak was invoked but never defined (see the help page).
  6. ^ cassowary on GitHub
  7. ^ kiwi on GitHub
  8. ^ Cite error: The named reference .net was invoked but never defined (see the help page).
  9. ^ cassowary-rs on GitHub