ESBMC
Efficient SMT-based Context-Bounded Model Checker
Loading...
Searching...
No Matches
unsound_loop_unroller Class Referenceabstract

This is the base class that unroll a loop (in an unsound way), the idea is to copy-paste the contents of the loop N times and ignore its conditions. More...

#include <loop_unroll.h>

Inheritance diagram for unsound_loop_unroller:
[legend]

Public Member Functions

 unsound_loop_unroller ()
Public Member Functions inherited from goto_functions_algorithm
 goto_functions_algorithm (bool sideffect)
unsigned get_number_of_functions ()
unsigned get_number_of_loops ()
bool run (goto_functionst &) override
 Executes the algorithm over a T object.
void setTarget (const std::string &_tgt)
Public Member Functions inherited from algorithm< goto_functionst >
 algorithm (bool sideeffect)
virtual ~algorithm ()=default
bool has_sideeffect ()
 Says wether the algorithm is a plain analysis or if it also changes the structure.

Protected Member Functions

bool runOnLoop (loopst &loop, goto_programt &goto_program) override
virtual int get_loop_bounds (loopst &loop)=0
 Get the number of iteractions to unroll the loop.
Protected Member Functions inherited from goto_functions_algorithm
virtual bool runOnFunction (std::pair< const irep_idt, goto_functiont > &F)
virtual bool runOnProgram (goto_functionst &)

Additional Inherited Members

Protected Attributes inherited from goto_functions_algorithm
std::string target_function = ""
Protected Attributes inherited from algorithm< goto_functionst >
const bool sideeffect

Detailed Description

This is the base class that unroll a loop (in an unsound way), the idea is to copy-paste the contents of the loop N times and ignore its conditions.

If you need a sound approach for this unrolling you can try commit: d4a196881af560568960d8eb48b5b22ef4bddf5e

Constructor & Destructor Documentation

◆ unsound_loop_unroller()

unsound_loop_unroller::unsound_loop_unroller ( )
inline

Member Function Documentation

◆ get_loop_bounds()

virtual int unsound_loop_unroller::get_loop_bounds ( loopst & loop)
protectedpure virtual

Get the number of iteractions to unroll the loop.

Parameters
loop
Returns
int negative means error, positive is the quantity to unroll

Implemented in bounded_loop_unroller.

◆ runOnLoop()

bool unsound_loop_unroller::runOnLoop ( loopst & loop,
goto_programt & goto_program )
overrideprotectedvirtual

Reimplemented from goto_functions_algorithm.


The documentation for this class was generated from the following files: