Примери коришћења Constraint store на Енглеском и њихови преводи на Српски
{-}
-
Colloquial
-
Ecclesiastic
-
Computer
-
Latin
-
Cyrillic
The second element is called constraint store.
The constraint store extends the concept of current substitution in two ways.
Initially, the current goal is the goal and the constraint store is empty.
The constraint store of this second pair is considered the result of the evaluation.
The evaluation of the second clause adds X=1 and Y>0 to the constraint store.
In principle, whenever the constraint store is unsatisfiable the algorithm could backtrack.
This operation may not detect inconsistency even if the constraint store is unsatisfiable.
The constraint store contains the constraints that are currently assumed satisfiable.
This evaluation adds X>0 to the constraint store and requires the goal B(X, 1) to be proved.
The first element of this pair is called current goal;the second element is called constraint store.
More efficient methods for allowing the constraint store to return to a previous state exist.
The constraint store contains all constraints the interpreter has assumed satisfiable so far.
The constraint handling rules are used for rewriting the constraint store during execution.
This is because the constraint store contains all constraints assumed satisfiable to prove the goal.
The literal labeling(X') is then evaluated,forcing a search for a solution of the constraint store.
If the domain of a variable becomes empty, the constraint store is inconsistent, and the algorithm backtracks.
However, the constraint store may also contain constraints in the form t1!=t2, if the difference!
The specific methods used in practice replace the constraint store with one that is simpler to solve.
In particular, the constraint store is checked for consistency every time a new constraint is added to it.
On the other hand, in the second formulation the search is performed only when the constraint is already in the constraint store.
When only tree terms are allowed, the constraint store contains constraints in the form t1=t2;
However, the constraint store may also contain constraints in the form t1!=t2, if the difference!= between terms is allowed.
When the interpreter adds a constraint to the constraint store, it only enforces a form of local consistency on it.
Since the constraint store is satisfiable and no other literal is left to prove, the interpreter stops with the solution X=1, Y=1.
As a result,the other term can replace the variable in the current goal and constraint store, thus practically removing the variable from consideration.
Since the constraint store after the addition of X>0 turns out to be inconsistent, the recursive evaluation of B(X) is not performed at all.
Different clauses are used to implement the different choices of the method;the constraint handling rules are used for rewriting the constraint store during execution.
The constraint store is unsatisfiable if a variable is bound to take both a value of the specific domain and a functor applied to terms.
The semantics of constraint logic programming is parametric not only to the kind of constraints used butalso to the method for rewriting the constraint store.
As a result, if A(X)is in the constraint store and B(X) is entailed by the constraint store, then C(X) can be added to the store. .