CBMC
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
ssa_expr.cpp File Reference
#include "ssa_expr.h"
#include <sstream>
#include "pointer_expr.h"
+ Include dependency graph for ssa_expr.cpp:

Go to the source code of this file.

Functions

static std::ostream & initialize_ssa_identifier (std::ostream &os, const exprt &expr)
 If expr is:
 
static void build_ssa_identifier_rec (const exprt &expr, const irep_idt &l0, const irep_idt &l1, const irep_idt &l2, std::ostream &os, std::ostream &l1_object_os)
 If expr is a symbol "s" add to os "s!l0@l1#l2" and to l1_object_os "s!l0@l1".
 
static std::pair< irep_idt, irep_idtbuild_identifier (const exprt &expr, const irep_idt &l0, const irep_idt &l1, const irep_idt &l2)
 
static void update_identifier (ssa_exprt &ssa)
 
ssa_exprt remove_level_2 (ssa_exprt ssa)
 

Function Documentation

◆ build_identifier()

static std::pair< irep_idt, irep_idt > build_identifier ( const exprt expr,
const irep_idt l0,
const irep_idt l1,
const irep_idt l2 
)
static

Definition at line 113 of file ssa_expr.cpp.

◆ build_ssa_identifier_rec()

static void build_ssa_identifier_rec ( const exprt expr,
const irep_idt l0,
const irep_idt l1,
const irep_idt l2,
std::ostream &  os,
std::ostream &  l1_object_os 
)
static

If expr is a symbol "s" add to os "s!l0@l1#l2" and to l1_object_os "s!l0@l1".

If expr is a member or index expression, recursively apply the procedure and add "..component_name" or "[[index]]" to os.

Definition at line 56 of file ssa_expr.cpp.

◆ initialize_ssa_identifier()

static std::ostream & initialize_ssa_identifier ( std::ostream &  os,
const exprt expr 
)
static

If expr is:

  • a symbol_exprt "s" add "s" to the stream os
    • a member_exprt, apply recursively and add "..component_name"
    • an index_exprt where the index is a constant, apply recursively on the array and add "[[index]]"
      Returns
      the stream os

Definition at line 22 of file ssa_expr.cpp.

◆ remove_level_2()

ssa_exprt remove_level_2 ( ssa_exprt  ssa)
Returns
copy of ssa where level2 identifiers have been removed

Definition at line 219 of file ssa_expr.cpp.

◆ update_identifier()

static void update_identifier ( ssa_exprt ssa)
static

Definition at line 127 of file ssa_expr.cpp.