Skip to content

Commit

Permalink
[WIP] Variables Dump
Browse files Browse the repository at this point in the history
  • Loading branch information
lahiri-phdworks committed Jan 8, 2024
1 parent 4692015 commit 2b3df2b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 15 deletions.
6 changes: 0 additions & 6 deletions src/c2goto/c2goto.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,6 @@ const struct group_opt_templ c2goto_options[] = {
{"targetfile",
boost::program_options::value<std::string>()->value_name("<filename>"),
"output interesting variables to a file"},
{"countersfile",
boost::program_options::value<std::string>()->value_name("<filename>"),
"output interesting variables to a file"},
{"totalprob",
boost::program_options::value<std::string>()->value_name("<filename>"),
"output interesting variables to a file"},

{"output",
boost::program_options::value<std::string>()->value_name("<filename>"),
Expand Down
6 changes: 0 additions & 6 deletions src/esbmc/options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@ const struct group_opt_templ all_cmd_options[] = {
{"targetfile",
boost::program_options::value<std::string>()->value_name("<filename>"),
"output interesting variables to a file"},
{"countersfile",
boost::program_options::value<std::string>()->value_name("<filename>"),
"output interesting variables to a file"},
{"totalprob",
boost::program_options::value<std::string>()->value_name("<filename>"),
"output interesting variables to a file"},

{"smt-formula-only",
NULL,
Expand Down
5 changes: 2 additions & 3 deletions src/solvers/z3/z3_conv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -930,16 +930,15 @@ smt_astt z3_convt::mk_smt_symbol(const std::string &name, const smt_sort *s)
(name.find("sum_global") != std::string::npos) ||
(name.find("cut_count") != std::string::npos) ||
(name.find("_path_exp") != std::string::npos) ||
(name.find("input_") != std::string::npos))
(name.find("param_") != std::string::npos))
{
const std::string &filename = options.get_option("targetfile");
if (!filename.empty())
{
// print to output file
std::ofstream out;
out.open(filename.c_str(), std::fstream::app);
out << "(get-value (|" << name << "|))"
<< "\n";
out << name << "\n";
out.close();
}
}
Expand Down

0 comments on commit 2b3df2b

Please sign in to comment.