Commit 37917bde authored by Thierry Martinez's avatar Thierry Martinez
parents 996d01cb e10d1d12
:- use_module(library(clpfd)).
:- use_module(library(lists)).
fd_max_integer(268435455).
cpu_time(T) :-
statistics(walltime, [T, _]).
......@@ -25,8 +23,7 @@ cpu_time(T) :-
% find the complete set of minimal P-invariants
find_all_pinvar :-
fd_max_integer(MaxInt),
find_pinvar(MaxInt).
find_pinvar(sup).
find_pinvar :-
......@@ -117,7 +114,13 @@ find_invar(IOList, ForcedMax, Operator) :-
get_constraints(UIOList, [], [], Vars, VarList, 1, MaxDomain1, Operator),
retractall(vars(_)),
assertz(vars(Vars)),
MaxDomain is min(MaxDomain1, ForcedMax),
(
ForcedMax == sup
->
MaxDomain = MaxDomain1
;
MaxDomain is min(MaxDomain1, ForcedMax)
),
% add a large upper bound for minimal invariants
VarList ins 0..MaxDomain,
format_debug(4, "~w~n", [MaxDomain]),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment