Commit 37917bde authored by Thierry Martinez's avatar Thierry Martinez
Browse files
parents 996d01cb e10d1d12
:- use_module(library(clpfd)). :- use_module(library(clpfd)).
:- use_module(library(lists)). :- use_module(library(lists)).
fd_max_integer(268435455).
cpu_time(T) :- cpu_time(T) :-
statistics(walltime, [T, _]). statistics(walltime, [T, _]).
...@@ -25,8 +23,7 @@ cpu_time(T) :- ...@@ -25,8 +23,7 @@ cpu_time(T) :-
% find the complete set of minimal P-invariants % find the complete set of minimal P-invariants
find_all_pinvar :- find_all_pinvar :-
fd_max_integer(MaxInt), find_pinvar(sup).
find_pinvar(MaxInt).
find_pinvar :- find_pinvar :-
...@@ -117,7 +114,13 @@ find_invar(IOList, ForcedMax, Operator) :- ...@@ -117,7 +114,13 @@ find_invar(IOList, ForcedMax, Operator) :-
get_constraints(UIOList, [], [], Vars, VarList, 1, MaxDomain1, Operator), get_constraints(UIOList, [], [], Vars, VarList, 1, MaxDomain1, Operator),
retractall(vars(_)), retractall(vars(_)),
assertz(vars(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 % add a large upper bound for minimal invariants
VarList ins 0..MaxDomain, VarList ins 0..MaxDomain,
format_debug(4, "~w~n", [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