diff --git a/src/analyses/goto_rw.h b/src/analyses/goto_rw.h index d30d4cabc18..1d3264aa737 100644 --- a/src/analyses/goto_rw.h +++ b/src/analyses/goto_rw.h @@ -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); } diff --git a/src/analyses/interval_domain.cpp b/src/analyses/interval_domain.cpp index c1cea43a39e..af2a0f9ff1b 100644 --- a/src/analyses/interval_domain.cpp +++ b/src/analyses/interval_domain.cpp @@ -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) @@ -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(); } } diff --git a/src/goto-symex/slice_by_trace.cpp b/src/goto-symex/slice_by_trace.cpp index 716fb85b336..8e6b7dd387c 100644 --- a/src/goto-symex/slice_by_trace.cpp +++ b/src/goto-symex/slice_by_trace.cpp @@ -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(); @@ -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); diff --git a/src/jsil/parser.y b/src/jsil/parser.y index ac2643519bd..54c277d0a97 100644 --- a/src/jsil/parser.y +++ b/src/jsil/parser.y @@ -414,7 +414,7 @@ literal: TOK_IDENTIFIER } | TOK_TRUE { - newstack($$).make_true(); + newstack($$) = true_exprt(); } | TOK_FALSE { diff --git a/src/util/expr.cpp b/src/util/expr.cpp index 6c173297daf..4a44a3b453c 100644 --- a/src/util/expr.cpp +++ b/src/util/expr.cpp @@ -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 diff --git a/src/util/expr.h b/src/util/expr.h index 850ac52d86e..8ac9b9b9863 100644 --- a/src/util/expr.h +++ b/src/util/expr.h @@ -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; diff --git a/src/util/guard.cpp b/src/util/guard.cpp index 320d98031c8..1a5d7dbe490 100644 --- a/src/util/guard.cpp +++ b/src/util/guard.cpp @@ -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); diff --git a/src/util/guard.h b/src/util/guard.h index f402ad3acd0..ab3389b6f71 100644 --- a/src/util/guard.h +++ b/src/util/guard.h @@ -14,14 +14,14 @@ Author: Daniel Kroening, kroening@kroening.com #include -#include "expr.h" +#include "std_expr.h" class guardt:public exprt { public: guardt() { - make_true(); + *this = true_exprt(); } guardt &operator=(const exprt &e)