CBMC
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
member_exprt Class Reference

Extract member of struct or union. More...

#include <std_expr.h>

+ Inheritance diagram for member_exprt:
+ Collaboration diagram for member_exprt:

Public Member Functions

  member_exprt (exprt op, const irep_idt &component_name, typet _type)
 
 
 
void  set_component_name (const irep_idt &component_name)
 
std::size_t  get_component_number () const
 
 
 
 
exprtcompound ()
 
- Public Member Functions inherited from unary_exprt
 
 
const exprtop () const
 
exprtop ()
 
 
exprtop1 ()=delete
 
 
exprtop2 ()=delete
 
 
exprtop3 ()=delete
 
- Public Member Functions inherited from exprt
  exprt ()
 
 
  exprt (irep_idt _id, typet _type)
 
 
 
typettype ()
  Return the type of the expression.
 
 
  Return true if there is at least one operand.
 
 
 
  Add the source location from location, if it is non-nil.
 
  Add the source location from location, if it is non-nil.
 
  Add the source location from other, if it has any.
 
  Add the source location from other, if it has any.
 
void  reserve_operands (operandst::size_type n)
 
  Copy the given argument to the end of exprt's operands.
 
  Add the given argument to the end of exprt's operands.
 
  Add the given argument to the end of exprt's operands.
 
  Add the given arguments to the end of exprt's operands.
 
  Add the given arguments to the end of exprt's operands.
 
  Return whether the expression is a constant.
 
  Return whether the expression is a constant representing true.
 
  Return whether the expression is a constant representing false.
 
  Return whether the expression is a constant representing 0.
 
  Return whether the expression is a constant representing 1.
 
  Return whether the expression represents a Boolean.
 
  Get a source_locationt from the expression or from its operands (non-recursively).
 
 
 
 
  These are pre-order traversal visitors, i.e., the visitor is executed on a node before its children have been visited.
 
 
void  visit_pre (std::function< void(exprt &)>)
 
void  visit_pre (std::function< void(const exprt &)>) const
 
void  visit_post (std::function< void(exprt &)>)
  These are post-order traversal visitors, i.e., the visitor is executed on a node after its children have been visited.
 
void  visit_post (std::function< void(const exprt &)>) const
 
 
 
 
 
 
 
depth_iteratort  depth_begin (std::function< exprt &()> mutate_root) const
 
 
 
 
 
- Public Member Functions inherited from irept
 
 
 
 
  irept ()=default
 
 
const std::string &  id_string () const
 
void  id (const irep_idt &_data)
 
 
ireptadd (const irep_idt &name)
 
ireptadd (const irep_idt &name, irept irep)
 
const std::string &  get_string (const irep_idt &name) const
 
 
 
 
std::size_t  get_size_t (const irep_idt &name) const
 
 
void  set (const irep_idt &name, const irep_idt &value)
 
void  set (const irep_idt &name, irept irep)
 
void  set (const irep_idt &name, const long long value)
 
void  set_size_t (const irep_idt &name, const std::size_t value)
 
 
 
 
 
 
void  swap (irept &irep)
 
  defines ordering on the internal representation
 
  defines ordering on the internal representation
 
  defines ordering on the internal representation comments are ignored
 
void  clear ()
 
 
subtget_sub ()
 
 
 
 
std::size_t  hash () const
 
std::size_t  full_hash () const
 
 
std::string  pretty (unsigned indent=0, unsigned max_indent=0) const
 
- Public Member Functions inherited from sharing_treet< irept, forward_list_as_mapt< irep_idt, irept > >
 
 
 
 
 
 
 
 
const dtread () const
 
dtwrite ()
 

Static Public Member Functions

 
  Check that the member expression has the right number of operands, refers to a component that exists on its underlying compound type, and uses the same type as is declared on that compound type.
 
- Static Public Member Functions inherited from unary_exprt
 
 
- Static Public Member Functions inherited from exprt
  Check that the expression is well-formed (shallow checks only, i.e., subexpressions and its type are not checked).
 
  Check that the expression is well-formed, assuming that its subexpressions and type have all ready been checked for well-formedness.
 
  Check that the expression is well-formed (full check, including checks of all subexpressions and the type)
 
- Static Public Member Functions inherited from irept
 
  count the number of named_sub elements that are not comments
 

Additional Inherited Members

- Public Types inherited from exprt
typedef std::vector< exprtoperandst
 
- Public Types inherited from irept
 
 
 
 
  Used to refer to this class from derived classes.
 
- Protected Member Functions inherited from expr_protectedt
 
 
exprtop0 ()
 
const exprtop0 () const
 
exprtop1 ()
 
const exprtop1 () const
 
exprtop2 ()
 
const exprtop2 () const
 
exprtop3 ()
 
const exprtop3 () const
 
- Protected Member Functions inherited from exprt
exprtop0 ()
 
exprtop1 ()
 
exprtop2 ()
 
exprtop3 ()
 
const exprtop0 () const
 
const exprtop1 () const
 
const exprtop2 () const
 
const exprtop3 () const
 
 
 
- Protected Member Functions inherited from sharing_treet< irept, forward_list_as_mapt< irep_idt, irept > >
void  detach ()
 
- Static Protected Member Functions inherited from sharing_treet< irept, forward_list_as_mapt< irep_idt, irept > >
 
  Does the same as remove_ref, but using an explicit stack instead of recursion.
 
dtdata
 
- Static Protected Attributes inherited from sharing_treet< irept, forward_list_as_mapt< irep_idt, irept > >
 

Detailed Description

Extract member of struct or union.

Definition at line 2865 of file std_expr.h.

Constructor & Destructor Documentation

◆  member_exprt() [1/2]

member_exprt::member_exprt ( exprt  op,
const irep_idtcomponent_name,
typet  _type 
)
inline

Definition at line 2868 of file std_expr.h.

◆  member_exprt() [2/2]

member_exprt::member_exprt ( exprt  op,
)
inline

Definition at line 2878 of file std_expr.h.

Member Function Documentation

◆  check()

static void member_exprt::check ( const exprtexpr,
)
inlinestatic

Definition at line 2925 of file std_expr.h.

◆  compound() [1/2]

exprt & member_exprt::compound ( )
inline

Definition at line 2920 of file std_expr.h.

◆  compound() [2/2]

const exprt & member_exprt::compound ( ) const
inline

Definition at line 2915 of file std_expr.h.

◆  get_component_name()

irep_idt member_exprt::get_component_name ( ) const
inline

Definition at line 2888 of file std_expr.h.

◆  get_component_number()

std::size_t member_exprt::get_component_number ( ) const
inline

Definition at line 2898 of file std_expr.h.

◆  set_component_name()

void member_exprt::set_component_name ( const irep_idtcomponent_name )
inline

Definition at line 2893 of file std_expr.h.

◆  struct_op() [1/2]

exprt & member_exprt::struct_op ( )
inline

Definition at line 2910 of file std_expr.h.

◆  struct_op() [2/2]

const exprt & member_exprt::struct_op ( ) const
inline

Definition at line 2904 of file std_expr.h.

◆  validate()

void member_exprt::validate ( const exprtexpr,
const namespacetns,
)
static

Check that the member expression has the right number of operands, refers to a component that exists on its underlying compound type, and uses the same type as is declared on that compound type.

Throws or raises an invariant if not, according to validation mode.

Parameters
expr expression to validate
ns global namespace
vm validation mode (see exprt::validate)

Definition at line 327 of file std_expr.cpp.


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

AltStyle によって変換されたページ (->オリジナル) /