CLP(R)
   HOME





CLP(R)
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: :\begin 3x + 4y - 2z = 8\\ x - 5y + z = 10\\ 2x + 3y -z = 20 \end 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 Example program CLP(R) allows the definition of predicates using recursive definitions. For example a ''mortgage'' relation can be defined as relating the principal P, the number of time periods of the loan T, the repayment each period R, the interest rate per period I and the final balance owing at the end of the loan B. mg(P, T, R, I, B) :- T = 0, B = R. mg(P, T, R, I, B) :- T >= 1, P1 = P*(1+I) - R, mg(P1, T - 1, R, I, B). The first rule expresses ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]   [Amazon]


Constraint Logic Programming
Constraint logic programming is a form of constraint programming, in which logic programming is extended to include concepts from constraint satisfaction. A constraint logic program is a logic program that contains constraints in the body of clauses. An example of a clause including a constraint is . In this clause, is a constraint; A(X,Y), B(X), and C(Y) are Literal (mathematical logic), literals as in regular logic programming. This clause states one condition under which the statement A(X,Y) holds: X+Y is greater than zero and both B(X) and C(Y) are true. As in regular logic programming, programs are queried about the provability of a goal, which itself may contain constraints in addition to literals. A proof for a goal is composed of clauses whose bodies are satisfiable constraints and literals that can in turn be proved using other clauses. Execution is performed by an interpreter, which starts from the goal and Recursion, recursively scans the clauses trying to prove the goa ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]   [Amazon]


SICStus
SICStus Prolog is a Proprietary software, proprietary, ISO Prolog, ISO-conforming implementation of the logic programming language Prolog. It is developed by the Swedish Institute of Computer Science since 1985 and puts a strong focus on performance and scalability. History Around 1985, the Swedish Institute of Computer Science (SICS) was founded and Mats Carlsson joined SICS to develop a Prolog engine that would be a platform for research in Or-parallel, or-parallelisation of Prolog. This work was performed in the context of the informal Gigalips project, involving David H. D. Warren, David H.D. Warren at SRI International and researchers from Manchester and Argonne National Laboratory, as well as and-parallel efforts. This resulted in quite mature or-parallel Prologs, such as Aurora and MUSE. The objective of these Prologs was to achieve effective speedups through or-parallel execution transparently for the programmer while supporting full Prolog. This led to SICS distribut ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]   [Amazon]



MORE