CBMC
fresh_symbol.cpp File Reference

Fresh auxiliary symbol creation. More...

#include "fresh_symbol.h"
#include "invariant.h"
#include "namespace.h"
#include "rename.h"
#include "symbol.h"
#include "symbol_table_base.h"
+ Include dependency graph for fresh_symbol.cpp:

Go to the source code of this file.

Functions

symboltget_fresh_aux_symbol (const typet &type, const std::string &name_prefix, const std::string &basename_prefix, const source_locationt &source_location, const irep_idt &symbol_mode, const namespacet &ns, symbol_table_baset &symbol_table)
 Installs a fresh-named symbol with respect to the given namespace ns with the requested name pattern in the given symbol table. More...
 
symboltget_fresh_aux_symbol (const typet &type, const std::string &name_prefix, const std::string &basename_prefix, const source_locationt &source_location, const irep_idt &symbol_mode, symbol_table_baset &symbol_table)
 Installs a fresh-named symbol with the requested name pattern in the given symbol table. More...
 

Detailed Description

Fresh auxiliary symbol creation.

Definition in file fresh_symbol.cpp.

Function Documentation

◆ get_fresh_aux_symbol() [1/2]

symbolt& get_fresh_aux_symbol ( const typet type,
const std::string &  name_prefix,
const std::string &  basename_prefix,
const source_locationt source_location,
const irep_idt symbol_mode,
const namespacet ns,
symbol_table_baset symbol_table 
)

Installs a fresh-named symbol with respect to the given namespace ns with the requested name pattern in the given symbol table.

Parameters
typeThe type of the new symbol.
name_prefixThe new symbol will be named name_prefix::basename_prefix$num unless name_prefix is empty, in which case the :: prefix is omitted.
basename_prefixSee name_prefix.
source_locationThe source location for the new symbol.
symbol_modeThe mode for the new symbol, e.g. ID_C, ID_java.
nsthe new symbol has a different name than any symbols in ns
symbol_tableThe symbol table to add the new symbol to.
Returns
The new symbol.

Definition at line 32 of file fresh_symbol.cpp.

◆ get_fresh_aux_symbol() [2/2]

symbolt& get_fresh_aux_symbol ( const typet type,
const std::string &  name_prefix,
const std::string &  basename_prefix,
const source_locationt source_location,
const irep_idt symbol_mode,
symbol_table_baset symbol_table 
)

Installs a fresh-named symbol with the requested name pattern in the given symbol table.

Parameters
typeThe type of the new symbol.
name_prefixThe new symbol will be named name_prefix::basename_prefix$num unless name_prefix is empty, in which case the :: prefix is omitted.
basename_prefixSee name_prefix.
source_locationThe source location for the new symbol.
symbol_modeThe mode for the new symbol, e.g. ID_C, ID_java.
symbol_tableThe symbol table to add the new symbol to.
Returns
The new symbol.

Definition at line 71 of file fresh_symbol.cpp.