ESBMC
Efficient SMT-based Context-Bounded Model Checker
Loading...
Searching...
No Matches
goto_functions_algorithm.h
Go to the documentation of this file.
1#pragma once
2
6
10class goto_functions_algorithm : public algorithm<goto_functionst>
11{
12public:
13 explicit goto_functions_algorithm(bool sideffect) : algorithm(sideffect)
14 {
15 }
16
18 {
19 return number_of_functions;
20 }
22 {
23 return number_of_loops;
24 }
25
26 bool run(goto_functionst &) override;
27 void setTarget(const std::string &_tgt)
28 {
29 target_function = _tgt;
30 }
31
32protected:
33 virtual bool runOnFunction(std::pair<const irep_idt, goto_functiont> &F);
34 virtual bool runOnLoop(loopst &loop, goto_programt &goto_program);
36 {
37 return false;
38 }
39 std::string target_function = "";
40
41private:
42 unsigned number_of_functions = 0;
43 unsigned number_of_loops = 0;
44};
algorithm(bool sideeffect)
Definition algorithm.h:10
virtual bool runOnLoop(loopst &loop, goto_programt &goto_program)
Definition goto_functions_algorithm.cpp:39
bool run(goto_functionst &) override
Executes the algorithm over a T object.
Definition goto_functions_algorithm.cpp:5
std::string target_function
Definition goto_functions_algorithm.h:39
unsigned get_number_of_functions()
Definition goto_functions_algorithm.h:17
unsigned get_number_of_loops()
Definition goto_functions_algorithm.h:21
goto_functions_algorithm(bool sideffect)
Definition goto_functions_algorithm.h:13
void setTarget(const std::string &_tgt)
Definition goto_functions_algorithm.h:27
virtual bool runOnProgram(goto_functionst &)
Definition goto_functions_algorithm.h:35
virtual bool runOnFunction(std::pair< const irep_idt, goto_functiont > &F)
Definition goto_functions_algorithm.cpp:44
Definition goto_functions.h:56
A generic container class for a control flow graph for one function, in the form of a goto-program.
Definition goto_program.h:63
Definition loopst.h:8