cprover
if_exprt Class Reference

The trinary if-then-else operator. More...

#include <std_expr.h>

Inheritance diagram for if_exprt:
[legend]
Collaboration diagram for if_exprt:
[legend]

Public Member Functions

 if_exprt (const exprt &cond, const exprt &t, const exprt &f)
 
 if_exprt (const exprt &cond, const exprt &t, const exprt &f, const typet &type)
 
 if_exprt ()
 
exprt & cond ()
 
const exprt & cond () const
 
exprt & true_case ()
 
const exprt & true_case () const
 
exprt & false_case ()
 
const exprt & false_case () const
 
- Public Member Functions inherited from exprt
 exprt ()
 
 exprt (const irep_idt &_id)
 
 exprt (const irep_idt &_id, const typet &_type)
 
typet & type ()
 
const typet & type () const
 
bool has_operands () const
 
operandst & operands ()
 
const operandst & operands () const
 
exprt & op0 ()
 
exprt & op1 ()
 
exprt & op2 ()
 
exprt & op3 ()
 
const exprt & op0 () const
 
const exprt & op1 () const
 
const exprt & op2 () const
 
const exprt & op3 () const
 
void reserve_operands (operandst::size_type n)
 
void move_to_operands (exprt &expr)
 
void move_to_operands (exprt &e1, exprt &e2)
 
void move_to_operands (exprt &e1, exprt &e2, exprt &e3)
 
void copy_to_operands (const exprt &expr)
 
void copy_to_operands (const exprt &e1, const exprt &e2)
 
void copy_to_operands (const exprt &e1, const exprt &e2, const exprt &e3)
 
void make_typecast (const typet &_type)
 
void make_not ()
 
void make_true ()
 
void make_false ()
 
void make_bool (bool value)
 
bool is_constant () const
 
bool is_true () const
 
bool is_false () const
 
bool is_zero () const
 
bool is_one () const
 
bool is_boolean () const
 
const source_locationt & find_source_location () const
 
const source_locationt & source_location () const
 
source_locationt & add_source_location ()
 
exprt & add_expr (const irep_idt &name)
 
const exprt & find_expr (const irep_idt &name) const
 
void visit (class expr_visitort &visitor)
 
void visit (class const_expr_visitort &visitor) const
 
depth_iteratort depth_begin ()
 
depth_iteratort depth_end ()
 
const_depth_iteratort depth_begin () const
 
const_depth_iteratort depth_end () const
 
const_depth_iteratort depth_cbegin () const
 
const_depth_iteratort depth_cend () const
 
depth_iteratort depth_begin (std::function< exprt &()> mutate_root) const
 
const_unique_depth_iteratort unique_depth_begin () const
 
const_unique_depth_iteratort unique_depth_end () const
 
const_unique_depth_iteratort unique_depth_cbegin () const
 
const_unique_depth_iteratort unique_depth_cend () const
 
- Public Member Functions inherited from irept
bool is_nil () const
 
bool is_not_nil () const
 
 irept (const irep_idt &_id)
 
 irept ()
 
 irept (const irept &irep)
 
 irept (irept &&irep)
 
irept & operator= (const irept &irep)
 
irept & operator= (irept &&irep)
 
 ~irept ()
 
const irep_idt & id () const
 
const std::string & id_string () const
 
void id (const irep_idt &_data)
 
const irept & find (const irep_namet &name) const
 
irept & add (const irep_namet &name)
 
irept & add (const irep_namet &name, const irept &irep)
 
const std::string & get_string (const irep_namet &name) const
 
const irep_idt & get (const irep_namet &name) const
 
bool get_bool (const irep_namet &name) const
 
signed int get_int (const irep_namet &name) const
 
unsigned int get_unsigned_int (const irep_namet &name) const
 
std::size_t get_size_t (const irep_namet &name) const
 
long long get_long_long (const irep_namet &name) const
 
void set (const irep_namet &name, const irep_idt &value)
 
void set (const irep_namet &name, const irept &irep)
 
void set (const irep_namet &name, const long long value)
 
void remove (const irep_namet &name)
 
void move_to_sub (irept &irep)
 
void move_to_named_sub (const irep_namet &name, irept &irep)
 
bool operator== (const irept &other) const
 
bool operator!= (const irept &other) const
 
void swap (irept &irep)
 
bool operator< (const irept &other) const
 defines ordering on the internal representation More...
 
bool ordering (const irept &other) const
 defines ordering on the internal representation More...
 
int compare (const irept &i) const
 defines ordering on the internal representation More...
 
void clear ()
 
void make_nil ()
 
subt & get_sub ()
 
const subt & get_sub () const
 
named_subt & get_named_sub ()
 
const named_subt & get_named_sub () const
 
named_subt & get_comments ()
 
const named_subt & get_comments () const
 
std::size_t hash () const
 
std::size_t full_hash () const
 
bool full_eq (const irept &other) const
 
std::string pretty (unsigned indent=0, unsigned max_indent=0) const
 
const dt & read () const
 
dt & write ()
 

Additional Inherited Members

- Public Types inherited from exprt
typedef std::vector< exprt > operandst
 
- Public Types inherited from irept
typedef std::vector< irept > subt
 
typedef std::map< irep_namet, irept > named_subt
 
- Protected Member Functions inherited from irept
void detach ()
 
- Static Protected Member Functions inherited from irept
static bool is_comment (const irep_namet &name)
 
static void remove_ref (dt *old_data)
 
static void nonrecursive_destructor (dt *old_data)
 Does the same as remove_ref, but using an explicit stack instead of recursion. More...
 
- Protected Attributes inherited from irept
dt * data
 
- Static Protected Attributes inherited from irept
static dt empty_d
 

Detailed Description

The trinary if-then-else operator.

Definition at line 3359 of file std_expr.h.

Constructor & Destructor Documentation

◆ if_exprt() [1/3]

if_exprt::if_exprt ( const exprt &  cond,
const exprt &  t,
const exprt &  f 
)
inline

Definition at line 3362 of file std_expr.h.

References cond(), and exprt::copy_to_operands().

◆ if_exprt() [2/3]

if_exprt::if_exprt ( const exprt &  cond,
const exprt &  t,
const exprt &  f,
const typet &  type 
)
inline

Definition at line 3368 of file std_expr.h.

References cond(), and exprt::copy_to_operands().

◆ if_exprt() [3/3]

if_exprt::if_exprt ( )
inline

Definition at line 3378 of file std_expr.h.

References exprt::operands().

Member Function Documentation

◆ cond() [1/2]

◆ cond() [2/2]

const exprt& if_exprt::cond ( ) const
inline

Definition at line 3388 of file std_expr.h.

References exprt::op0().

◆ false_case() [1/2]

exprt& if_exprt::false_case ( )
inline

Definition at line 3403 of file std_expr.h.

References exprt::op2().

Referenced by arrayst::add_array_constraints_if(), goto_symext::address_arithmetic(), build_full_lhs_rec(), string_abstractiont::build_if(), goto_convertt::clean_expr(), arrayst::collect_arrays(), bv_pointerst::convert_address_of_rec(), goto_convertt::convert_expression(), boolbvt::convert_if(), value_set_dereferencet::dereference(), dereferencet::dereference_if(), eval_string(), bdd_exprt::from_expr_rec(), string_refinementt::get(), get_modifies_lhs(), rw_range_sett::get_objects_address_of(), rw_range_sett::get_objects_if(), rw_guarded_range_set_value_sett::get_objects_if(), get_objects_rec(), goto_symext::havoc_rec(), goto_symex_statet::l2_thread_read_encoding(), lift_if(), array_poolt::make_char_array_for_char_pointer(), goto_symext::process_array_expr(), goto_symex_statet::rename_address(), simplify_exprt::simplify_byte_extract(), simplify_exprt::simplify_dereference(), simplify_exprt::simplify_dynamic_object(), simplify_exprt::simplify_if(), simplify_exprt::simplify_if_preorder(), simplify_exprt::simplify_index(), simplify_exprt::simplify_inequality(), simplify_exprt::simplify_inequality_constant(), simplify_exprt::simplify_member(), simplify_exprt::simplify_pointer_object(), simplify_exprt::simplify_pointer_offset(), substitute_array_access(), goto_symext::symex_assign_if(), goto_symext::symex_assign_symbol(), c_typecheck_baset::typecheck_side_effect_gcc_conditional_expression(), and string_abstractiont::value_assignments_if().

◆ false_case() [2/2]

const exprt& if_exprt::false_case ( ) const
inline

Definition at line 3408 of file std_expr.h.

References exprt::op2().

◆ true_case() [1/2]

exprt& if_exprt::true_case ( )
inline

Definition at line 3393 of file std_expr.h.

References exprt::op1().

Referenced by arrayst::add_array_constraints_if(), goto_symext::address_arithmetic(), build_full_lhs_rec(), string_abstractiont::build_if(), goto_convertt::clean_expr(), arrayst::collect_arrays(), bv_pointerst::convert_address_of_rec(), goto_convertt::convert_expression(), boolbvt::convert_if(), value_set_dereferencet::dereference(), dereferencet::dereference_if(), eval_string(), bdd_exprt::from_expr_rec(), string_refinementt::get(), get_modifies_lhs(), rw_range_sett::get_objects_address_of(), rw_range_sett::get_objects_if(), rw_guarded_range_set_value_sett::get_objects_if(), get_objects_rec(), goto_symext::havoc_rec(), goto_symex_statet::l2_thread_read_encoding(), lift_if(), array_poolt::make_char_array_for_char_pointer(), goto_symext::process_array_expr(), goto_symex_statet::rename(), goto_symex_statet::rename_address(), simplify_exprt::simplify_byte_extract(), simplify_exprt::simplify_dereference(), simplify_exprt::simplify_dynamic_object(), simplify_exprt::simplify_if(), simplify_exprt::simplify_if_preorder(), simplify_exprt::simplify_index(), simplify_exprt::simplify_inequality(), simplify_exprt::simplify_inequality_constant(), simplify_exprt::simplify_member(), simplify_exprt::simplify_pointer_object(), simplify_exprt::simplify_pointer_offset(), substitute_array_access(), goto_symext::symex_assign_if(), goto_symext::symex_assign_symbol(), c_typecheck_baset::typecheck_side_effect_gcc_conditional_expression(), and string_abstractiont::value_assignments_if().

◆ true_case() [2/2]

const exprt& if_exprt::true_case ( ) const
inline

Definition at line 3398 of file std_expr.h.

References exprt::op1().


The documentation for this class was generated from the following file: