CLP(R)
Encyclopedia
CLP is a declarative programming language. It stands for Constraint logic programming (Real) where real refers to the real number
Real number
In mathematics, a real number is a value that represents a quantity along a continuum, such as -5 , 4/3 , 8.6 , √2 and π...

s. It can be considered and is generally implemented as a superset or add-on package for a Prolog
Prolog
Prolog is a general purpose logic programming language associated with artificial intelligence and computational linguistics.Prolog has its roots in first-order logic, a formal logic, and unlike many other programming languages, Prolog is declarative: the program logic is expressed in terms of...

 implementation.

Example Rule

The simultaneous linear equations:


3x + 4y - 2z = 8

x - 5y + z = 10

2x + 3y -z = 20




are expressed in CLP(R) as:



3*X + 4*Y - 2*Z = 8,

X - 5*Y + Z = 10,

2*X + 3*Y -Z = 20.



and a typical implementation's response would be:




Z = 35.75

Y = 8.25

X = 15.5



Yes


External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK