Skip to content

Commit 8c16edb

Browse files
authored
Merge pull request #3490 from tautschnig/no-make_true
Remove deprecated exprt::make_true
2 parents 333e4b4 + d33be42 commit 8c16edb

File tree

8 files changed

+7
-18
lines changed

8 files changed

+7
-18
lines changed

src/analyses/goto_rw.h

+1-1
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

+2-2
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

-2
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ void symex_slice_by_tracet::slice_by_trace(
102102
slice_SSA_steps(equation, implications); // Slice based on implications
103103

104104
guardt t_guard;
105-
t_guard.make_true();
106105
symex_targett::sourcet empty_source;
107106
equation.SSA_steps.push_front(symex_target_equationt::SSA_stept());
108107
symex_target_equationt::SSA_stept &SSA_step=equation.SSA_steps.front();
@@ -505,7 +504,6 @@ void symex_slice_by_tracet::assign_merges(
505504
merge_sym.set_level_2(merge_count);
506505
merge_count--;
507506
guardt t_guard;
508-
t_guard.make_true();
509507
symex_targett::sourcet empty_source;
510508

511509
exprt merge_copy(*i);

src/jsil/parser.y

+1-1
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

-8
Original file line numberDiff line numberDiff line change
@@ -112,14 +112,6 @@ void exprt::make_bool(bool value)
112112
set(ID_value, value?ID_true:ID_false);
113113
}
114114

115-
/// Replace the expression by a Boolean expression representing true.
116-
/// \deprecated use constructors instead
117-
void exprt::make_true()
118-
{
119-
*this=exprt(ID_constant, typet(ID_bool));
120-
set(ID_value, ID_true);
121-
}
122-
123115
/// Return whether the expression represents a Boolean.
124116
/// \return True if is a Boolean, false otherwise.
125117
bool exprt::is_boolean() const

src/util/expr.h

-1
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,6 @@ class exprt:public irept
214214

215215
void make_typecast(const typet &_type);
216216

217-
void make_true();
218217
void make_bool(bool value);
219218

220219
bool is_constant() const;

src/util/guard.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ guardt &operator |= (guardt &g1, const guardt &g2)
113113
exprt tmp(boolean_negate(g2));
114114

115115
if(tmp==g1)
116-
g1.make_true();
116+
g1 = true_exprt();
117117
else
118118
g1=or_exprt(g1, g2);
119119

src/util/guard.h

+2-2
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)