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 \
--csv --bloemen -p 1 >stdout
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 \
--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()
// Grab The informations to display into the CSV
// FIXME: The CSV can be inconsistent since it may return
// time of one thread and SCC of another.
auto walltime = std::min_element(result.walltime.rbegin(),
result.walltime.rend());
auto states = std::min_element(result.states.rbegin(),
result.states.rend());
auto trans = std::min_element(result.transitions.rbegin(),
result.transitions.rend());
auto sccs = std::max_element(result.sccs.rbegin(),
result.sccs.rend());
unsigned c_states = 0;
unsigned c_trans = 0;
int c_sccs = 0; // not unsigned since it can be negative
unsigned walltime = 0;
for (unsigned i = 0; i < result.finisher.size(); ++i)
{
if (result.finisher[i])
walltime = result.walltime[i];
c_states += result.states[i];
c_trans += result.transitions[i];
c_sccs += result.sccs[i];
}
std::cout << "Find following the csv: "
<< "model,formula,walltimems,memused,type,"
<< "states,transitions,sccs\n";
<< "cumul_states,cumul_transitions,cumul_sccs\n";
std::cout << '#'
<< split_filename(mc_options.model) << ',';
if (mc_options.formula != nullptr)
std::cout << mc_options.formula;
std::cout << ',' << *walltime << ',' << memused << ','
<< rval << ',' << *states << ',' << *trans << ','
<< *sccs << '\n';
std::cout << ',' << walltime << ',' << memused << ','
<< rval << ',' << c_states << ',' << c_trans << ','
<< (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