Commit 4aa7a45f authored by Etienne Renault's avatar Etienne Renault

modelcheck: more relevant information for --csv

* tests/ltsmin/check.test,
tests/ltsmin/modelcheck.cc: Here.
parent 31efc7ab
...@@ -90,6 +90,11 @@ run 0 ../modelcheck --model $srcdir/beem-peterson.4.dve \ ...@@ -90,6 +90,11 @@ run 0 ../modelcheck --model $srcdir/beem-peterson.4.dve \
--csv --bloemen -p 1 >stdout --csv --bloemen -p 1 >stdout
test `grep "#" stdout | awk -F',' '{print $8}'` -eq 29115 test `grep "#" stdout | awk -F',' '{print $8}'` -eq 29115
# Test Bloemen
run 0 ../modelcheck --model $srcdir/beem-peterson.4.dve \
--csv --bloemen -p 3 >stdout
test `grep "#" stdout | awk -F',' '{print $8}'` -eq 29115
run 0 ../modelcheck --model $srcdir/beem-peterson.4.dve \ run 0 ../modelcheck --model $srcdir/beem-peterson.4.dve \
--formula '!GF(P_0.CS|P_1.CS|P_2.CS|P_3.CS)' --csv --bloemen-ec -p 3 >stdout --formula '!GF(P_0.CS|P_1.CS|P_2.CS|P_3.CS)' --csv --bloemen-ec -p 3 >stdout
......
...@@ -556,29 +556,31 @@ static int checked_main() ...@@ -556,29 +556,31 @@ static int checked_main()
// Grab The informations to display into the CSV // Grab The informations to display into the CSV
// FIXME: The CSV can be inconsistent since it may return unsigned c_states = 0;
// time of one thread and SCC of another. unsigned c_trans = 0;
auto walltime = std::min_element(result.walltime.rbegin(), int c_sccs = 0; // not unsigned since it can be negative
result.walltime.rend()); unsigned walltime = 0;
auto states = std::min_element(result.states.rbegin(), for (unsigned i = 0; i < result.finisher.size(); ++i)
result.states.rend()); {
auto trans = std::min_element(result.transitions.rbegin(), if (result.finisher[i])
result.transitions.rend()); walltime = result.walltime[i];
auto sccs = std::max_element(result.sccs.rbegin(), c_states += result.states[i];
result.sccs.rend()); c_trans += result.transitions[i];
c_sccs += result.sccs[i];
}
std::cout << "Find following the csv: " std::cout << "Find following the csv: "
<< "model,formula,walltimems,memused,type," << "model,formula,walltimems,memused,type,"
<< "states,transitions,sccs\n"; << "cumul_states,cumul_transitions,cumul_sccs\n";
std::cout << '#' std::cout << '#'
<< split_filename(mc_options.model) << ','; << split_filename(mc_options.model) << ',';
if (mc_options.formula != nullptr) if (mc_options.formula != nullptr)
std::cout << mc_options.formula; std::cout << mc_options.formula;
std::cout << ',' << *walltime << ',' << memused << ',' std::cout << ',' << walltime << ',' << memused << ','
<< rval << ',' << *states << ',' << *trans << ',' << rval << ',' << c_states << ',' << c_trans << ','
<< *sccs << '\n'; << (c_sccs < 0 ? -1 : c_sccs) << '\n';
} }
} }
......
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