Skip to content

Remove deprecated exprt::make_false #3487

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 2, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/goto-instrument/code_contracts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ static void check_apply_invariants(
loop_end->targets.clear();
loop_end->type=ASSUME;
if(loop_head->is_goto())
loop_end->guard.make_false();
loop_end->guard = false_exprt();
else
loop_end->guard.make_not();
}
Expand Down
3 changes: 1 addition & 2 deletions src/goto-instrument/unwind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,7 @@ void goto_unwindt::unwind(
t--;
assert(t->is_backwards_goto());

exprt exit_cond;
exit_cond.make_false(); // default is false
exprt exit_cond = false_exprt(); // default is false

if(!t->guard.is_true()) // cond in backedge
{
Expand Down
5 changes: 2 additions & 3 deletions src/goto-symex/memory_model_tso.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,8 @@ void memory_model_tsot::program_order(
event_listt::const_iterator next=e_it;
++next;

exprt mb_guard_r, mb_guard_w;
mb_guard_r.make_false();
mb_guard_w.make_false();
exprt mb_guard_r = false_exprt();
exprt mb_guard_w = false_exprt();

for(event_listt::const_iterator
e_it2=next;
Expand Down
2 changes: 1 addition & 1 deletion src/goto-symex/symex_goto.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ void goto_symext::symex_goto(statet &state)
// adjust guards
if(new_guard.is_true())
{
state.guard.make_false();
state.guard = false_exprt();
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion src/jsil/parser.y
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ literal: TOK_IDENTIFIER
}
| TOK_FALSE
{
newstack($$).make_false();
newstack($$) = false_exprt();
}
| TOK_FLOATING
| TOK_STRING
Expand Down
6 changes: 2 additions & 4 deletions src/solvers/flattening/boolbv_quantifier.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ exprt get_quantifier_var_min(
{
PRECONDITION(quantifier_expr.id() == ID_or || quantifier_expr.id() == ID_and);

exprt res;
res.make_false();
exprt res = false_exprt();
if(quantifier_expr.id()==ID_or)
{
/**
Expand Down Expand Up @@ -81,8 +80,7 @@ exprt get_quantifier_var_max(
const exprt &quantifier_expr)
{
PRECONDITION(quantifier_expr.id() == ID_or || quantifier_expr.id() == ID_and);
exprt res;
res.make_false();
exprt res = false_exprt();
if(quantifier_expr.id()==ID_or)
{
/**
Expand Down
8 changes: 0 additions & 8 deletions src/util/expr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,14 +152,6 @@ void exprt::make_true()
set(ID_value, ID_true);
}

/// Replace the expression by a Boolean expression representing false.
/// \deprecated use constructors instead
void exprt::make_false()
{
*this=exprt(ID_constant, typet(ID_bool));
set(ID_value, ID_false);
}

/// Return whether the expression represents a Boolean.
/// \return True if is a Boolean, false otherwise.
bool exprt::is_boolean() const
Expand Down
1 change: 0 additions & 1 deletion src/util/expr.h
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,6 @@ class exprt:public irept
void make_not();

void make_true();
void make_false();
void make_bool(bool value);

bool is_constant() const;
Expand Down