Skip to content

Commit f56ea05

Browse files
committed
Remove deprecated exprt::make_true
All users should use true_exprt() instead.
1 parent 34df81a commit f56ea05

File tree

8 files changed

+7
-18
lines changed

8 files changed

+7
-18
lines changed

src/analyses/goto_rw.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ class rw_guarded_range_set_value_sett:public rw_range_set_value_sett
343343
get_modet mode,
344344
const exprt &expr)
345345
{
346-
guard.make_true();
346+
guard = true_exprt();
347347

348348
rw_range_set_value_sett::get_objects_rec(_target, mode, expr);
349349
}

src/analyses/interval_domain.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ bool interval_domaint::ai_simplify(
474474
if(!a.join(d)) // If d (this) is included in a...
475475
{ // Then the condition is always true
476476
unchanged=condition.is_true();
477-
condition.make_true();
477+
condition = true_exprt();
478478
}
479479
}
480480
else if(condition.id()==ID_symbol)
@@ -487,7 +487,7 @@ bool interval_domaint::ai_simplify(
487487
if(d.is_bottom()) // If there there are none...
488488
{ // Then the condition is always true
489489
unchanged=condition.is_true();
490-
condition.make_true();
490+
condition = true_exprt();
491491
}
492492
}
493493

src/goto-symex/slice_by_trace.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ void symex_slice_by_tracet::slice_by_trace(
104104
slice_SSA_steps(equation, implications); // Slice based on implications
105105

106106
guardt t_guard;
107-
t_guard.make_true();
108107
symex_targett::sourcet empty_source;
109108
equation.SSA_steps.push_front(symex_target_equationt::SSA_stept());
110109
symex_target_equationt::SSA_stept &SSA_step=equation.SSA_steps.front();
@@ -510,7 +509,6 @@ void symex_slice_by_tracet::assign_merges(
510509
merge_sym.set_level_2(merge_count);
511510
merge_count--;
512511
guardt t_guard;
513-
t_guard.make_true();
514512
symex_targett::sourcet empty_source;
515513

516514
exprt merge_copy(*i);

src/jsil/parser.y

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ literal: TOK_IDENTIFIER
414414
}
415415
| TOK_TRUE
416416
{
417-
newstack($$).make_true();
417+
newstack($$) = true_exprt();
418418
}
419419
| TOK_FALSE
420420
{

src/util/expr.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -144,14 +144,6 @@ void exprt::make_bool(bool value)
144144
set(ID_value, value?ID_true:ID_false);
145145
}
146146

147-
/// Replace the expression by a Boolean expression representing true.
148-
/// \deprecated use constructors instead
149-
void exprt::make_true()
150-
{
151-
*this=exprt(ID_constant, typet(ID_bool));
152-
set(ID_value, ID_true);
153-
}
154-
155147
/// Replace the expression by a Boolean expression representing false.
156148
/// \deprecated use constructors instead
157149
void exprt::make_false()

src/util/expr.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,6 @@ class exprt:public irept
215215
void make_typecast(const typet &_type);
216216
void make_not();
217217

218-
void make_true();
219218
void make_false();
220219
void make_bool(bool value);
221220

src/util/guard.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ guardt &operator |= (guardt &g1, const guardt &g2)
114114
tmp.make_not();
115115

116116
if(tmp==g1)
117-
g1.make_true();
117+
g1 = true_exprt();
118118
else
119119
g1=or_exprt(g1, g2);
120120

src/util/guard.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,14 @@ Author: Daniel Kroening, [email protected]
1414

1515
#include <iosfwd>
1616

17-
#include "expr.h"
17+
#include "std_expr.h"
1818

1919
class guardt:public exprt
2020
{
2121
public:
2222
guardt()
2323
{
24-
make_true();
24+
*this = true_exprt();
2525
}
2626

2727
guardt &operator=(const exprt &e)

0 commit comments

Comments
 (0)