Skip to content

Remove deprecated exprt::make_true #3490

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 4, 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/analyses/goto_rw.h
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ class rw_guarded_range_set_value_sett:public rw_range_set_value_sett
get_modet mode,
const exprt &expr)
{
guard.make_true();
guard = true_exprt();

rw_range_set_value_sett::get_objects_rec(_target, mode, expr);
}
Expand Down
4 changes: 2 additions & 2 deletions src/analyses/interval_domain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ bool interval_domaint::ai_simplify(
if(!a.join(d)) // If d (this) is included in a...
{ // Then the condition is always true
unchanged=condition.is_true();
condition.make_true();
condition = true_exprt();
}
}
else if(condition.id()==ID_symbol)
Expand All @@ -487,7 +487,7 @@ bool interval_domaint::ai_simplify(
if(d.is_bottom()) // If there there are none...
{ // Then the condition is always true
unchanged=condition.is_true();
condition.make_true();
condition = true_exprt();
}
}

Expand Down
2 changes: 0 additions & 2 deletions src/goto-symex/slice_by_trace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ void symex_slice_by_tracet::slice_by_trace(
slice_SSA_steps(equation, implications); // Slice based on implications

guardt t_guard;
t_guard.make_true();
symex_targett::sourcet empty_source;
equation.SSA_steps.push_front(symex_target_equationt::SSA_stept());
symex_target_equationt::SSA_stept &SSA_step=equation.SSA_steps.front();
Expand Down Expand Up @@ -505,7 +504,6 @@ void symex_slice_by_tracet::assign_merges(
merge_sym.set_level_2(merge_count);
merge_count--;
guardt t_guard;
t_guard.make_true();
symex_targett::sourcet empty_source;

exprt merge_copy(*i);
Expand Down
2 changes: 1 addition & 1 deletion src/jsil/parser.y
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ literal: TOK_IDENTIFIER
}
| TOK_TRUE
{
newstack($$).make_true();
newstack($$) = true_exprt();
}
| TOK_FALSE
{
Expand Down
8 changes: 0 additions & 8 deletions src/util/expr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,6 @@ void exprt::make_bool(bool value)
set(ID_value, value?ID_true:ID_false);
}

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

/// 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 @@ -214,7 +214,6 @@ class exprt:public irept

void make_typecast(const typet &_type);

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

bool is_constant() const;
Expand Down
2 changes: 1 addition & 1 deletion src/util/guard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ guardt &operator |= (guardt &g1, const guardt &g2)
exprt tmp(boolean_negate(g2));

if(tmp==g1)
g1.make_true();
g1 = true_exprt();
else
g1=or_exprt(g1, g2);

Expand Down
4 changes: 2 additions & 2 deletions src/util/guard.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ Author: Daniel Kroening, [email protected]

#include <iosfwd>

#include "expr.h"
#include "std_expr.h"

class guardt:public exprt
{
public:
guardt()
{
make_true();
*this = true_exprt();
}

guardt &operator=(const exprt &e)
Expand Down