CBMC
Loading...
Searching...
No Matches
Functions
add_failed_symbols.cpp File Reference

Pointer Dereferencing. More...

#include "add_failed_symbols.h"
#include <util/namespace.h>
#include <util/pointer_expr.h>
#include <util/std_expr.h>
#include <util/symbol.h>
#include <util/symbol_table_base.h>
#include <list>
+ Include dependency graph for add_failed_symbols.cpp:

Go to the source code of this file.

Functions

  Get the name of the special symbol used to denote an unknown referee pointed to by a given pointer-typed symbol.
 
void  add_failed_symbol (symbolt &symbol, symbol_table_baset &symbol_table)
  Create a failed-dereference symbol for the given base symbol if it is pointer-typed; if not, do nothing.
 
  Create a failed-dereference symbol for the given base symbol if it is pointer-typed, an lvalue, and doesn't already have one.
 
  Create a failed-dereference symbol for all symbols in the given table that need one (i.e.
 
  Get the failed-dereference symbol for the given symbol.
 

Detailed Description

Pointer Dereferencing.

Definition in file add_failed_symbols.cpp.

Function Documentation

◆  add_failed_symbol()

void add_failed_symbol ( symboltsymbol,
symbol_table_basetsymbol_table 
)

Create a failed-dereference symbol for the given base symbol if it is pointer-typed; if not, do nothing.

Parameters
symbol symbol to created a failed symbol for
symbol_table global symbol table

Definition at line 35 of file add_failed_symbols.cpp.

◆  add_failed_symbol_if_needed()

void add_failed_symbol_if_needed ( const symboltsymbol,
symbol_table_basetsymbol_table 
)

Create a failed-dereference symbol for the given base symbol if it is pointer-typed, an lvalue, and doesn't already have one.

If any of these conditions are not met, do nothing.

Parameters
symbol symbol to created a failed symbol for
symbol_table global symbol table

Definition at line 62 of file add_failed_symbols.cpp.

◆  add_failed_symbols()

void add_failed_symbols ( symbol_table_basetsymbol_table )

Create a failed-dereference symbol for all symbols in the given table that need one (i.e.

pointer-typed lvalues).

Parameters
symbol_table global symbol table

Definition at line 77 of file add_failed_symbols.cpp.

◆  failed_symbol_id()

irep_idt failed_symbol_id ( const irep_idtid )

Get the name of the special symbol used to denote an unknown referee pointed to by a given pointer-typed symbol.

Parameters
id base symbol id
Returns
id of the corresponding unknown-object ("failed") symbol.

Definition at line 26 of file add_failed_symbols.cpp.

◆  get_failed_symbol()

std::optional< symbol_exprt > get_failed_symbol ( const symbol_exprtexpr,
const namespacetns 
)

Get the failed-dereference symbol for the given symbol.

Parameters
expr symbol expression to get a failed symbol for
ns global namespace
Returns
symbol expression for the failed-dereference symbol, or an empty optional if none exists.

Definition at line 91 of file add_failed_symbols.cpp.

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