Skip to content

Commit 10f1823

Browse files
committed
Only look at x_* variables in the models, not other potential things found by z3
1 parent 83f113a commit 10f1823

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

platforms/CLI-Emulator/main.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -653,6 +653,9 @@ void run_concolic(const std::vector<std::string>& snapshot_messages, int max_ins
653653
z3::model model = s.get_model();
654654
for (int i = 0; i < (int)model.size(); i++) {
655655
z3::func_decl func = model[i];
656+
if (func.name().str().find("x_") == std::string::npos) {
657+
continue;
658+
}
656659
dbg_trace("- %s = %s\n", func.name().str().c_str(), model.get_const_interp(func).to_string().c_str());
657660
m->symbolic_concrete_values[func.name().str()]
658661
.concrete_value.value.uint64 =
@@ -707,6 +710,10 @@ void run_concolic(const std::vector<std::string>& snapshot_messages, int max_ins
707710
z3::func_decl func = model[i];
708711
/*std::cout << func.name() << " = "
709712
<< model.get_const_interp(func) << std::endl;*/
713+
if (func.name().str().find("x_") == std::string::npos) {
714+
continue;
715+
}
716+
std::cout << model.get_const_interp(func).get_numeral_uint64() << std::endl;
710717
m->symbolic_concrete_values[func.name().str()].concrete_value.value.uint64 =
711718
model.get_const_interp(func).get_numeral_uint64();
712719

0 commit comments

Comments
 (0)