CBMC
|
Maps equation to expressions contained in them and conversely expressions to equations that contain them. More...
#include <equation_symbol_mapping.h>
Public Member Functions | |
void | add (const std::size_t i, const exprt &expr) |
Record the fact that equation i contains expression expr More... | |
std::vector< exprt > | find_expressions (const std::size_t i) |
std::vector< std::size_t > | find_equations (const exprt &expr) |
Private Attributes | |
std::map< exprt, std::vector< std::size_t > > | equations_containing |
Record index of the equations that contain a given expression. More... | |
std::unordered_map< std::size_t, std::vector< exprt > > | strings_in_equation |
Record expressions that are contained in the equation with the given index. More... | |
Maps equation to expressions contained in them and conversely expressions to equations that contain them.
This can be used on a subset of expressions which interests us, in particular strings. Equations are identified by an index of type std::size_t
for more efficient insertion and lookup.
Definition at line 21 of file equation_symbol_mapping.h.
void equation_symbol_mappingt::add | ( | const std::size_t | i, |
const exprt & | expr | ||
) |
Record the fact that equation i
contains expression expr
Definition at line 11 of file equation_symbol_mapping.cpp.
std::vector< std::size_t > equation_symbol_mappingt::find_equations | ( | const exprt & | expr | ) |
expr | an expression |
expr
Definition at line 24 of file equation_symbol_mapping.cpp.
std::vector< exprt > equation_symbol_mappingt::find_expressions | ( | const std::size_t | i | ) |
i | index corresponding to an equation |
i
Definition at line 18 of file equation_symbol_mapping.cpp.
|
private |
Record index of the equations that contain a given expression.
Definition at line 38 of file equation_symbol_mapping.h.
|
private |
Record expressions that are contained in the equation with the given index.
Definition at line 40 of file equation_symbol_mapping.h.