Commit 78f4eb0d authored by SOLIMAN Sylvain's avatar SOLIMAN Sylvain
Browse files

Check all outputs for rate-indep

parent 79d553f6
......@@ -482,12 +482,9 @@ test_rate_independence_invariants :-
output(_)
->
(
forall(
output(Out),
test_rate_independence_invariants(Out, Id)
)
->
writeln('The model is rate independent.')
output(Out),
test_rate_independence_invariants(Out, Id),
fail
;
true
)
......@@ -511,7 +508,8 @@ test_rate_independence_invariants(Output, Id) :-
),
retractall(seen(_)),
retractall(visiting(_)),
iterate_on_parents(Output, Id).
iterate_on_parents(Output, Id),
format("The output ~w is rate independent.", [Output]).
%! is_covered_by_p_invariant_with_single_surinv(+Species, ?Output, -P) is det.
......
......@@ -29,27 +29,15 @@ test('Max', [setup(max_model), cleanup(clear_model)]) :-
with_output_to(atom(Result), test_rate_independence),
atom_concat('The model is rate independent', _, Result).
test('input_sinks', [
fixme('Work in progress'),
condition(flag(slow_test, true, true)),
forall((expand_file_name('./library/examples/tests/rate_independence_*.bc', FileList), member(File, FileList))),
setup((with_output_to(atom(ExpectedLong), command(load(File))), sub_string(ExpectedLong, 0, 9, _, Expected))),
true(File-Output == File-Expected)
]) :-
with_output_to(atom(OutputFull), command(test_rate_independence_inputs_sinks)),
split_string(OutputFull, "\n", "\r\t ", OutputLines),
reverse(OutputLines, [_, OutputLong | _]),
sub_string(OutputLong, 0, 9, _, Output).
test('invariants', [
condition(flag(slow_test, true, true)),
forall((expand_file_name('./library/examples/tests/rate_independence_*.bc', FileList), member(File, FileList))),
setup((with_output_to(atom(ExpectedLong), command(load(File))), sub_string(ExpectedLong, 0, 9, _, Expected))),
setup((with_output_to(atom(ExpectedLong), command(load(File))), sub_string(ExpectedLong, 0, 3, _, Expected))),
true(File-Output == File-Expected)
]) :-
with_output_to(atom(OutputFull), command(test_rate_independence_invariants)),
split_string(OutputFull, "\n", "\r\t ", [OutputLong | _]),
sub_string(OutputLong, 0, 9, _, Output).
sub_string(OutputLong, 0, 3, _, Output).
:- end_tests(rate_independence).
......
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