-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cut
, If-Then
in CLP(Z)
#2708
Comments
Thank you a lot for looking at this! It would definitely be nice to use better constructs in the implementation. Regarding these concrete cases: Even though
|
It's no trouble. For intervals_to_domain([], empty).
intervals_to_domain([I|Is], D) :-
intervals_to_domain_(I, Is, D).
intervals_to_domain_(I0, [], from_to(M,N)) :-
I0 = M-N.
intervals_to_domain_(I0, [I1|Is0], D) :-
Is = [I0|[I1|Is0]],
length(Is, L),
FL is L // 2,
length(Front, FL),
append(Front, Tail, Is),
Tail = [n(Start)-_|_],
Hole is Start - 1,
intervals_to_domain(Front, Left),
intervals_to_domain(Tail, Right),
D = split(Hole, Left, Right). % can be moved to the head. But depending on the context there might be some choice points. I was hoping to change Could the monotonic mode be used here: Line 1188 in 7e22c12
Is it possible for the second factor to be the integer and not the first: Line 3171 in 7e22c12
|
The construct
(->)/2
is used infold_statement/3
:scryer-prolog/src/lib/clpz.pl
Line 3832 in 7e22c12
The construct
!/0
is usedintervals_to_domain/2
:scryer-prolog/src/lib/clpz.pl
Line 1715 in 7e22c12
Is it safe to
removerewrite it?The text was updated successfully, but these errors were encountered: