queue/2,
enabled/1.
-:- dynamic(clpz_monotonic/0).
+:- dynamic(monotonic/0).
:- dynamic(clpz_equal_/2).
:- dynamic(clpz_geq_/2).
:- dynamic(clpz_neq/2).
This behaviour is highly problematic from a logical point of view, and
it may render declarative debugging techniques inapplicable.
-Assert `clpz:clpz_monotonic` to make CLP(Z) **monotonic**: This means
+Assert `clpz:monotonic` to make CLP(Z) **monotonic**: This means
that _adding_ new constraints _cannot_ yield new solutions. When this
flag is `true`, we must wrap variables that occur in arithmetic
expressions with the functor `(?)/1` or `(#)/1`. For example:
==
-?- assertz(clpz:clpz_monotonic).
+?- assertz(clpz:monotonic).
true.
?- #(X) #= #(Y) + #(Z).
]).
non_monotonic(X) :-
- ( \+ fd_var(X), clpz_monotonic ->
+ ( \+ fd_var(X), monotonic ->
instantiation_error(X)
; true
).
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
expr_conds(E, E) --> [integer(E)],
- { var(E), !, \+ clpz_monotonic }.
+ { var(E), !, \+ monotonic }.
expr_conds(E, E) --> { integer(E) }.
expr_conds(?(E), E) --> [integer(E)].
expr_conds(#(E), E) --> [integer(E)].
automaton(Seqs, Template, Sigs, Ns, As0, Cs, Is, Fs) :-
must_be(list(list), [Sigs,Ns,As0,Cs,Is]),
( var(Seqs) ->
- ( clpz_monotonic ->
+ ( monotonic ->
instantiation_error(Seqs)
; Seqs = Sigs
)
( { ground(State) } -> []
; { phrase(attribute_goal_(P), Gs) } ->
{ % del_attr(State, clpz_aux), State = processed,
- ( clpz_monotonic ->
+ ( monotonic ->
maplist(unwrap_with(bare_integer), Gs, Gs1)
; maplist(unwrap_with(=), Gs, Gs1)
),