What Is Constraint Programming?
Constraint programming is a programming paradigm in which the 'relationships' between variables are stated (organized) in the form of constraints.
- Constraint programming is a programming paradigm. In this programming paradigm,
- Programming paradigm , programming paradigm, or programming (English: Programming paradigm) ( paradigm is the model, the meaning of the paradigm, paradigm is the mode, the method), is a type of typical programming style, refers to a type of software engineering Style (can be compared to methodology). Such as: functional programming, program programming, object-oriented programming, imperative programming, etc. are different programming paradigms.
- The programming paradigm provides (and determines) the programmer's view of program execution. For example, in object-oriented programming, a programmer considers a program to be a series of interacting objects, while in functional programming a program is viewed as a sequence of stateless functional calculations.
- Just as different groups in software engineering promote different "methodologies", different programming languages also promote different "programming paradigms". Some languages are designed for a specific paradigm (for example, Smalltalk and Java support object-oriented programming, while Haskell and Scheme support functional programming), while other languages support multiple paradigms (such as Ruby, Common Lisp, Python, and Oz).
- Many programming paradigms are already known which technologies they prohibit and which ones they allow. For example, pure functional programming does not allow side effects; structured programming does not allow use of goto. Perhaps for this reason, the new paradigm is often considered dogmatic or overly restrictive by those accustomed to earlier styles. However, avoiding certain techniques in this way proves more to the rules of program correctnessor just to understand its behaviorwithout limiting the generality of the programming language.
- The relationship between a programming paradigm and a programming language can be complex, because a programming language can support multiple paradigms. For example, C ++ design time supports procedural programming, object-oriented programming, and generic programming. However, designers and programmers need to consider how to use these paradigm elements to build a program. One can write a fully procedural program in C ++, another can write a pure object-oriented program in C ++, and even someone can write a program that mixes two paradigms. [1]
Constrained Programming Example
- Structured programming versus unstructured programming
- Imperative programming vs. declarative programming
- Messaging programming vs imperative programming
- Programming vs. Functional Programming
- Value-level programming vs. Function-level programming
- Process-driven programming vs. event-driven programming
- Scalar programming versus array programming
- Class-based programming versus prototype-based programming (in the context of object-oriented programming)
- Rule-based programming vs. Constraint programming (in the context of logic programming)
- Component-based programming (such as OLE)
- Aspect-oriented programming (such as AspectJ)
- Symbolic programming (like Mathematica)
- Form-oriented programming (such as Microsoft FoxPro)
- Pipe programming (like pipes in Unix commands)
- Post-object programming
- Topic-oriented programming
- Introspective programming or reflection programming [1]