Constraint programming is a programming paradigm where relations between variables can be stated in the form of constraints. Constraints differ from the common primitives of other programming languages in that they do not specify a step or sequence of steps to execute but rather the properties of a solution to be found. The constraints used in constraint programming are of various kinds: those used in constraint satisfaction problems, those solved by the simplex algorithm, and others. Constraints are usually embedded within a programming language or provided via separate software libraries.

Constraint programming began with constraint logic programming, which embeds constraints into a logic program. This variant of logic programming is due to Jaffar and Lassez, who extended in 1987 a specific class of constraints that were introduced in Prolog II. The first implementations of constraint logic programming were Prolog III, CLP(R), and CHIP. Several constraint logic programming interpreters exist today, for example GNU Prolog.

Other than logic programming, constraints can be mixed with functional programming, term rewriting, and imperative languages. Constraints in functional programming are implemented in the multi-paradigm programming language Oz. Constraints are embedded in an imperative language in Kaleidoscope. However, constraints are implemented in imperative languages mostly via constraint solving toolkits, which are separate libraries for an existing imperative language. ILOG CP Optimizer is an example of such a constraint programming library for C++, Java and .NET.

Reference:
http://en.wikipedia.org/wiki/Constraint_programming

Posted by 알 수 없는 사용자
,