ESBMC
Efficient SMT-based Context-Bounded Model Checker
Loading...
Searching...
No Matches
symbol_generator.h
Go to the documentation of this file.
1#ifndef ESBMC_UTIL_SYMBOL_GENERATOR_H
2#define ESBMC_UTIL_SYMBOL_GENERATOR_H
3
5
7{
8public:
9 std::string prefix;
10 unsigned counter;
11
22 symbol_generator(std::string prefix, unsigned counter = 0)
23 : prefix(std::move(prefix)), counter(counter)
24 {
25 }
26
45 contextt &context,
46 const typet &type,
47 const std::string &name_prefix = "");
48
49 // irep2 overload mirroring the above. Stores the type via
50 // symbolt::set_type(type2tc) so the IREP2 form is the authoritative one.
52 contextt &context,
53 const type2tc &type,
54 const std::string &name_prefix = "");
55};
56
57#endif
Definition context.h:57
unsigned counter
Definition symbol_generator.h:10
std::string prefix
Definition symbol_generator.h:9
symbol_generator(std::string prefix, unsigned counter=0)
Construct a new symbol generator where the id of every symbol obtained has the given prefix.
Definition symbol_generator.h:22
symbolt & new_symbol(contextt &context, const typet &type, const std::string &name_prefix="")
Creates a new symbol with name, id derived from the name and this->prefix, lvalue=true and the given ...
Definition symbol_generator.cpp:4
Definition symbol.h:12
Definition type.h:9
irep_container< type2t > type2tc
Definition irep2.h:430
Definition exception.cpp:51