Skip to content

Commit

Permalink
Under option
Browse files Browse the repository at this point in the history
  • Loading branch information
ajreynol committed Jan 29, 2024
1 parent e58abe9 commit 8a3bff5
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/expr_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,10 @@ Expr ExprParser::parseExpr()
// construct fresh variables.
// If d_isReference is false, we lookup the variables in the
// specified list.
// This is overriden if the option d_binderFresh is true.
bool isLookup = !d_state.getOptions().d_binderFresh && !d_isReference;
d_state.pushScope();
std::vector<Expr> vs = parseAndBindSortedVarList(!d_isReference);
std::vector<Expr> vs = parseAndBindSortedVarList(isLookup);
if (vs.empty())
{
d_lex.parseError("Expected non-empty sorted variable list");
Expand Down
7 changes: 6 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ int main( int argc, char* argv[] )
{
std::string arg(argv[i]);
i++;
if (arg=="--gen-compile")
if (arg=="--binder-fresh")
{
opts.d_binderFresh = true;
}
else if (arg=="--gen-compile")
{
opts.d_compile = true;
}
Expand Down Expand Up @@ -56,6 +60,7 @@ int main( int argc, char* argv[] )
else if (arg=="--help")
{
std::stringstream out;
out << " --binder-fresh: binders generate fresh variables when parsed in proof files." << std::endl;
out << " --gen-compile: output the C++ code for all included signatures from the input file." << std::endl;
out << " --help: displays this message." << std::endl;
out << " --no-normalize-dec: do not treat decimal literals as syntax sugar for rational literals." << std::endl;
Expand Down
1 change: 1 addition & 0 deletions src/state.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Options::Options()
d_ruleSymTable = true;
d_normalizeDecimal = true;
d_normalizeHexadecimal = true;
d_binderFresh = false;
}

State::State(Options& opts, Stats& stats)
Expand Down
2 changes: 2 additions & 0 deletions src/state.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ class Options
bool d_ruleSymTable;
bool d_normalizeDecimal;
bool d_normalizeHexadecimal;
/** Binders generate fresh variables in proof files */
bool d_binderFresh;
};

/**
Expand Down

0 comments on commit 8a3bff5

Please sign in to comment.