Cassowary is LP - it's just the Simplex method. Constraints become equalities and inequalities in the tableau, and the objective function is constructed from non-required ("best effort") constraints.
The novel contribution from Cassowary is its incrementalism technique. It can add, remove, and edit constraints without having to re-solve the whole LP problem over again. So it's well suited for interactive applications.
An example is dragging. You establish a constraint that sets the position of the dragged object, and then modify that constraint during the drag. Cassowary can re-use the old computation to solve the new one very efficiently.
|-----------------------------| | | | | 30 | | | | |-60-[subView(height:300)]-60-| | | | | 30 | | | | |-----------------------------| (maybe this case is not much suitable,because I should remove or change some constraints, I just want to use this case to explain the question)
Is there a reason why cassowary took the constraint solver approach other than the fact that it is called constraint-based layout?