Merge pull request #2070 from triska/expansion_simpler
FIXED: corrections to expansion_simpler/2
This commit is contained in:
@@ -3099,13 +3099,13 @@ expansion_simpler(Var is Expr0, Goal) :-
|
|||||||
ground(Expr0), !,
|
ground(Expr0), !,
|
||||||
phrase(expr_conds(Expr0, Expr), Gs),
|
phrase(expr_conds(Expr0, Expr), Gs),
|
||||||
( maplist(call, Gs) -> Value is Expr, Goal = (Var = Value)
|
( maplist(call, Gs) -> Value is Expr, Goal = (Var = Value)
|
||||||
; Goal = false
|
; Goal = (Var is Expr0)
|
||||||
).
|
).
|
||||||
expansion_simpler(Var =:= Expr0, Goal) :-
|
expansion_simpler(Var =:= Expr0, Goal) :-
|
||||||
ground(Expr0), !,
|
ground(Expr0), !,
|
||||||
phrase(expr_conds(Expr0, Expr), Gs),
|
phrase(expr_conds(Expr0, Expr), Gs),
|
||||||
( maplist(call, Gs) -> Value is Expr, Goal = (Var =:= Value)
|
( maplist(call, Gs) -> Value is Expr, Goal = (Var =:= Value)
|
||||||
; Goal = false
|
; Goal = (Var =:= Expr0)
|
||||||
).
|
).
|
||||||
expansion_simpler(between:between(L,U,V), Goal) :-
|
expansion_simpler(between:between(L,U,V), Goal) :-
|
||||||
maplist(integer, [L,U,V]),
|
maplist(integer, [L,U,V]),
|
||||||
|
|||||||
Reference in New Issue
Block a user