Topic: constraints

topics > computer science > data > Group: type checking

data type

abstract data type
consistency testing
database consistency and reliability
declarative vs. procedural representation
dependency analysis
error safe systems
implementation of user interfaces
range checking
run-time assertions
user interface tool kits


A constraint is a predicate on dynamic behavior. For example, setting the width of a column to 50% constrains the column to half the width of the table.

Constraints are a declarative description. They are useful for type declaration. A constraint solver takes a system of constraints and finds a satisfying assignment of
free variables. Constraint solvers may be difficult to use. (cbb 4/06)

Subtopic: constraints as types up

Quote: a robust library expresses constraints as types, reports errors relative to user, and does not cause application errors [»fricA4_2000]

Subtopic: constraints up

Quote: a one-way constraint determines the value of a variable from an expression; e.g., label.left = frame.left+10 [»zandBT11_2005]
Quote: constraints make applications more modular; define at point of use, automatically adjusting to other objects; avoids change/delete notification [»zandBT11_2005]
Quote: extend UML with stereotypes (new elements), tagged values (new attributes), and constraints (new semantics) [»boocG_1999]
Quote: constraints for which operations for an entity, static and dynamic invariants, and pre-/ post-conditions [»smitJM1_1981]
Quote: in paper solutions to programming problems, 18% used constraints, 16% used declarations; 12% used imperative programming; children without programming experience
Quote: spreadsheet formulas are like constraints; fits business mental model, but not programmer's mental model [»myerB3_2000]

Subtopic: constraints as satisfiability up

Quote: survey of propositional satisfiability (SAT) and constraint programming (CP); similarities and differences [»bordL12_2006]

Subtopic: constrained movement up

Quote: Fitts' law also applies to constrained movement: speed of movement is linearly related to the normal constraint [»accoJ3_1997]

Subtopic: incremental constraint solver up

Quote: efficient, incremental algorithm for solving user interface, constraint systems of linear equations and inequalities; based dual simplex method [»bardGJ12_2001]
Quote: DeltaBlue algorithm allows incremental updates to a constraint hierarchy; gives applications [»freeBN1_1990]

Subtopic: constraint solver up

Quote: straight-line code for repeated solutions of linear constraints; uses projection-based algorithm for constraint compilation [»bornA11_1997]
Quote: algorithm to compile straight-line code to solve a system constraints; convert constraints to hierarchical normal form; for equality, inequality, boolean, integer linear, and partial order constraints [»harvW10_1997]
Quote: one pass method for constraint satisfaction; recursively locate free variables that are easily satisfied; re-evaluate in reverse order [»suthIE5_1963]
Quote: analyze escape constraints with types and static single assignment (SSA); linear time and space
Quote: a constraint is a subroutine yielding a scalar that should be zero; use one pass method or relaxation; e.g., can analyze force distribution of a pin connected truss [»suthIE5_1963]
Quote: constraint enforcement may be too expensive; if so, associate with a block of operations; e.g., database transactions [»tarrP4_1998]

Subtopic: user interface constraints up

Quote: survey of one-way constraints in two user interface development tookkits, Garnet and Amulet [»zandBT11_2005]
Quote: efficient, incremental algorithms to solve constraints for user interfaces; e.g., to place a pane in the left third of a window [»bornA10_1997]
Quote: constraints useful for user interfaces; e.g., state consistency, view consistency, formatting requirements, animation [»freeBN1_1990]
Quote: with Gilt, specify filter expressions for user interface widgets by demonstration or icon selection; filters implemented by constraints [»myerBA11_1991]
Quote: Sketchpad maintains constraints for vertical lines, parallel/perpendicular lines, points on circle, upright symbols, equal size symbols; specialized constraints as needed [»suthIE5_1963]
Quote: Sketchpad stores how a drawing is tied together; a hexagon stays closed despite being moved [»suthIE5_1963]
Quote: Sketchpad stores the structure of subpictures
Quote: when merge objects of the same type, a single object results with dependencies updated recursively; e.g., merging lines merges their endpoints [»suthIE5_1963]

Subtopic: layout by constraint up

Quote: for graphical interfaces, one-way constraints will only be used for layout; students prefer a procedural approach [»zandBT11_2005]
Quote: primarily used constraints for graphical layout; preferred a layout manager for simple layouts [»zandBT11_2005]
Quote: document layout by negotiation between viewer constraints and designer constraints; about 110 constraints per style sheet [»bornA11_1997]
Quote: constraint solvers are useful for graphical layout with springs and struts
Quote: allow arbitrary code in constraints; constraints are difficult to debug; easily used for graphical layout; difficult to use for other purposes

Subtopic: alternatives to constraints up

Quote: can register an 'interest' in an object to be called on any update;e.g., to resize a button when its label changes; simpler than constraints [»pausR10_1992]

Subtopic: problems with constraints up

Quote: allow arbitrary code in constraints; constraints are difficult to debug; easily used for graphical layout; difficult to use for other purposes
Quote: constraints are hard to debug -- cyclical constraints, bugs appear far from source, spaghetti code, slot errors, evaluation misunderstood [»zandBT11_2005]
Quote: constraint solvers can be unpredictable, difficult to debug, and difficult to master [»myerB3_2000]
Quote: avoid using annotations to guide the constraint solver; error-prone

Related Topics up

Group: data type   (34 topics, 730 quotes)
Group: mathematics   (23 topics, 560 quotes)

Topic: abstract data type (64 items)
Topic: consistency testing (60 items)
Topic: database consistency and reliability (15 items)
Topic: declarative vs. procedural representation (54 items)
Topic: dependency analysis (34 items)
Topic: error safe systems (76 items)
Topic: implementation of user interfaces (18 items)
Topic: range checking (20 items)
Topic: run-time assertions (25 items)
Topic: simulation (35 items)
Topic: user interface tool kits
(31 items)

Updated barberCB 2/06
Copyright © 2002-2008 by C. Bradford Barber. All rights reserved.
Thesa is a trademark of C. Bradford Barber.