Jump to content

CLP(R)

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Coder0xff2 (talk | contribs) at 15:32, 29 June 2016 (External links: Remove dead link). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

CLP(R) is a declarative programming language. It stands for Constraint logic programming (Real) where real refers to the real numbers. It can be considered and is generally implemented as a superset or add-on package for a Prolog 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

References

  • Joxan Jaffar, Spiro Michaylov, Peter J. Stuckey, Roland H. C. Yap: The CLP(R) Language and System. ACM Transactions on Programming Languages and Systems 14(3): 339-395 (1992)