CBMC
loop_templatet< T, C > Class Template Reference

A loop, specified as a set of instructions. More...

#include <loop_analysis.h>

+ Inheritance diagram for loop_templatet< T, C >:
+ Collaboration diagram for loop_templatet< T, C >:

Public Types

typedef loop_instructionst::const_iterator const_iterator
 

Public Member Functions

 loop_templatet ()=default
 
template<typename InstructionSet >
 loop_templatet (InstructionSet &&instructions)
 
virtual bool contains (const T instruction) const
 Returns true if instruction is in this loop. More...
 
const_iterator begin () const
 Iterator over this loop's instructions. More...
 
const_iterator end () const
 Iterator over this loop's instructions. More...
 
std::size_t size () const
 Number of instructions in this loop. More...
 
bool empty () const
 Returns true if this loop contains no instructions. More...
 
bool insert_instruction (const T instruction)
 Adds instruction to this loop. More...
 

Private Types

typedef std::set< T, C > loop_instructionst
 

Private Attributes

loop_instructionst loop_instructions
 
friend loop_analysist< T, C >
 

Detailed Description

template<class T, typename C>
class loop_templatet< T, C >

A loop, specified as a set of instructions.

Definition at line 23 of file loop_analysis.h.

Member Typedef Documentation

◆ const_iterator

template<class T , typename C >
typedef loop_instructionst::const_iterator loop_templatet< T, C >::const_iterator

Definition at line 46 of file loop_analysis.h.

◆ loop_instructionst

template<class T , typename C >
typedef std::set<T, C> loop_templatet< T, C >::loop_instructionst
private

Definition at line 25 of file loop_analysis.h.

Constructor & Destructor Documentation

◆ loop_templatet() [1/2]

template<class T , typename C >
loop_templatet< T, C >::loop_templatet ( )
default

◆ loop_templatet() [2/2]

template<class T , typename C >
template<typename InstructionSet >
loop_templatet< T, C >::loop_templatet ( InstructionSet &&  instructions)
inlineexplicit

Definition at line 34 of file loop_analysis.h.

Member Function Documentation

◆ begin()

template<class T , typename C >
const_iterator loop_templatet< T, C >::begin ( ) const
inline

Iterator over this loop's instructions.

Definition at line 49 of file loop_analysis.h.

◆ contains()

template<class T , typename C >
virtual bool loop_templatet< T, C >::contains ( const T  instruction) const
inlinevirtual

Returns true if instruction is in this loop.

Definition at line 40 of file loop_analysis.h.

◆ empty()

template<class T , typename C >
bool loop_templatet< T, C >::empty ( ) const
inline

Returns true if this loop contains no instructions.

Definition at line 67 of file loop_analysis.h.

◆ end()

template<class T , typename C >
const_iterator loop_templatet< T, C >::end ( ) const
inline

Iterator over this loop's instructions.

Definition at line 55 of file loop_analysis.h.

◆ insert_instruction()

template<class T , typename C >
bool loop_templatet< T, C >::insert_instruction ( const T  instruction)
inline

Adds instruction to this loop.

Returns
true if the instruction is new

Definition at line 74 of file loop_analysis.h.

◆ size()

template<class T , typename C >
std::size_t loop_templatet< T, C >::size ( ) const
inline

Number of instructions in this loop.

Definition at line 61 of file loop_analysis.h.

Member Data Documentation

◆ loop_analysist< T, C >

template<class T , typename C >
friend loop_templatet< T, C >::loop_analysist< T, C >
private

Definition at line 28 of file loop_analysis.h.

◆ loop_instructions

template<class T , typename C >
loop_instructionst loop_templatet< T, C >::loop_instructions
private

Definition at line 26 of file loop_analysis.h.


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