FIXED: module qualification for between/3 in goal expansion (#941)

Many thanks to @dcnorris for reporting this issue!
This commit is contained in:
Markus Triska
2021-05-09 23:54:37 +02:00
parent 9b483d381f
commit 38db8d4e1a

View File

@@ -2968,7 +2968,7 @@ clpz_expansion(Var in Dom, In) :-
( ground(Dom), Dom = L..U, integer(L), integer(U) -> ( ground(Dom), Dom = L..U, integer(L), integer(U) ->
expansion_simpler( expansion_simpler(
( integer(Var) -> ( integer(Var) ->
between(L, U, Var) between:between(L, U, Var)
; clpz:clpz_in(Var, Dom) ; clpz:clpz_in(Var, Dom)
), In) ), In)
; In = clpz:clpz_in(Var, Dom) ; In = clpz:clpz_in(Var, Dom)
@@ -3045,7 +3045,9 @@ expansion_simpler(Var =:= Expr0, Goal) :-
( maplist(call, Gs) -> Value is Expr, Goal = (Var =:= Value) ( maplist(call, Gs) -> Value is Expr, Goal = (Var =:= Value)
; Goal = false ; Goal = false
). ).
expansion_simpler(between(L,U,V), Goal) :- maplist(integer, [L,U,V]), !, expansion_simpler(between:between(L,U,V), Goal) :-
maplist(integer, [L,U,V]),
!,
( between(L,U,V) -> Goal = true ( between(L,U,V) -> Goal = true
; Goal = false ; Goal = false
). ).