mirror of
https://github.com/Z3Prover/z3
synced 2025-04-06 01:24:08 +00:00
Fix bug in qprofdiff
This commit is contained in:
parent
e22f713b19
commit
1b1ff8dbab
|
@ -78,10 +78,13 @@ int parse(string const & filename, map<string, map_entry> & data) {
|
|||
entry.num_instances = entry.max_generation = entry.max_cost = 0;
|
||||
}
|
||||
|
||||
// Existing entries represent previous occurrences of quantifiers
|
||||
// that, at some point, were removed (e.g. backtracked). We sum
|
||||
// up instances from all occurrences of the same qid.
|
||||
map_entry & entry = data[qid];
|
||||
entry.num_instances = atoi(tokens[1].c_str());
|
||||
entry.max_generation = (unsigned)atoi(tokens[2].c_str());
|
||||
entry.max_cost = (unsigned)atoi(tokens[3].c_str());
|
||||
entry.num_instances += atoi(tokens[1].c_str());
|
||||
entry.max_generation = max(entry.max_generation, (unsigned)atoi(tokens[2].c_str()));
|
||||
entry.max_cost = max(entry.max_cost, (unsigned)atoi(tokens[3].c_str()));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -205,7 +208,7 @@ void diff(map<string, map_entry> & left, map<string, map_entry> & right) {
|
|||
}
|
||||
|
||||
stable_sort(flat_data.begin(), flat_data.end(),
|
||||
options.find("-si") != options.end() ? diff_item_lt_num_instances:
|
||||
options.find("-si") != options.end() ? diff_item_lt_num_instances :
|
||||
options.find("-sg") != options.end() ? diff_item_lt_max_generation :
|
||||
options.find("-sc") != options.end() ? diff_item_lt_max_cost :
|
||||
diff_item_lt_num_instances);
|
||||
|
|
Loading…
Reference in a new issue