CBMC
substitute_symbols.cpp File Reference

Free Symbols. More...

#include "substitute_symbols.h"
#include "std_expr.h"
+ Include dependency graph for substitute_symbols.cpp:

Go to the source code of this file.

Functions

static std::optional< exprtsubstitute_symbols_rec (const std::map< irep_idt, exprt > &substitutions, exprt src)
 
std::optional< exprtsubstitute_symbols (const std::map< irep_idt, exprt > &substitutions, exprt src)
 Substitute free occurrences of the variables given by their identifiers in the keys of the map in the given expression. More...
 

Detailed Description

Free Symbols.

Symbol Substitution.

Definition in file substitute_symbols.cpp.

Function Documentation

◆ substitute_symbols()

std::optional<exprt> substitute_symbols ( const std::map< irep_idt, exprt > &  substitutions,
exprt  src 
)

Substitute free occurrences of the variables given by their identifiers in the keys of the map in the given expression.

Only symbol_exprt expressions are substituted.

Returns
expression after substitution, or {} when no substitution took place

Definition at line 111 of file substitute_symbols.cpp.

◆ substitute_symbols_rec()

static std::optional<exprt> substitute_symbols_rec ( const std::map< irep_idt, exprt > &  substitutions,
exprt  src 
)
static

Definition at line 16 of file substitute_symbols.cpp.