UnCoVer (Using Coverability for Verification)
|
The uqinst_iterator generates UQRuleInstances for backward application. More...
#include <PreparedGTS.h>
Public Member Functions | |
uqinst_iterator (PreparedGTS::uqinst_iterator &&old) | |
Move constructor. More... | |
~uqinst_iterator () | |
Destroys this iterator. | |
PreparedGTS::uqinst_iterator & | operator++ () |
Computes the next UQRuleInstance of the UQRule corresponding to this iterator. More... | |
graphs::UQRuleInstance_sp | operator* () |
Returns the last UQRuleInstance computed by this iterator (i.e. More... | |
bool | hasEnded () |
Returns true, if this iterator has ended, i.e. More... | |
Private Member Functions | |
uqinst_iterator (graphs::UQRule_sp rule, RulePreparer_sp rulepreparer, unsigned int bound) | |
Generates a new iterator for the given rule. More... | |
void | loadNextRule (bool firstTime=false) |
Drops the current UQRuleInstance and computes the next one if possible. More... | |
unsigned int | sumCurrentQuant () |
Sums up how much instantiations will be performed when using the current value of currentQuant. More... | |
Private Attributes | |
graphs::UQRule_sp | rule |
Stores the UQRule used by this iterator. | |
RulePreparer_sp | rulePreparer |
Stores the RulePreparer used by this iterator. | |
vector< unsigned int > * | currentQuant |
Stores a count for each Quantification of the UQRule storing how often each Quantification will be used when generating the next UQRuleInstance. | |
vector < graphs::UQRuleInstance_sp > * | currentInstances |
Stores the UQRuleInstances generated by preparing a last computed UQRuleInstance. More... | |
unsigned int | bound |
Stores the bound to which UQRuleInstances are generated. | |
Friends | |
class | PreparedGTS |
The uqinst_iterator generates UQRuleInstances for backward application.
It is generated by the beginUQInstances() and endUQInstances() methods of PreparedGTS. The number of UQInstances generated depends on the number of universal quantifications of the corresponding UQRule and on the graph to which the rule should be applied backwards.
uqinst_iterator | ( | PreparedGTS::uqinst_iterator && | old | ) |
Move constructor.
Generates a new iterator using the data of the given iterator. The given iterator is invalidated by this constructor and may not be used any further (except for deletion).
old | the old iterator for which the data will be copied |
|
private |
Generates a new iterator for the given rule.
This iterator will use the given RulePreparer on every generated UQRuleInstance and will generate instances up to the given bound.
rule | the rule to be used |
rulepreparer | the RulePreparer to be used |
bound | the bound up to which UQRuleInstances will be generated |
bool hasEnded | ( | ) |
Returns true, if this iterator has ended, i.e.
the last UQRuleInstance was already computed and returned.
|
private |
Drops the current UQRuleInstance and computes the next one if possible.
If there is no UQRuleInstance to compute, this iterator ends.
firstTime | if this parameter is true, the internal iterator will no be incremented by this call; this is necessary in the first call of this function after initializing the iterator |
UQRuleInstance_sp operator* | ( | ) |
Returns the last UQRuleInstance computed by this iterator (i.e.
by the last ++ call). The returned UQRuleInstance can be used and modified freely, without affecting the this iterator. However, this iterator keeps a pointer to the UQRuleInstance and will return this pointer in any subsequent * call, as long as the iterator was not incremented again. If the iterator ended, this operator will return a null pointer.
PreparedGTS::uqinst_iterator & operator++ | ( | ) |
Computes the next UQRuleInstance of the UQRule corresponding to this iterator.
|
private |
Sums up how much instantiations will be performed when using the current value of currentQuant.
The sum computed by this function may not exceed the defined bound.
|
private |
Stores the UQRuleInstances generated by preparing a last computed UQRuleInstance.
These instances will be returned one after the other before computing the next UQRuleInstance.