UnCoVer (Using Coverability for Verification)
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
RulePreparer Class Referenceabstract

This class takes a rule and prepares it such that no special case handling is necessary while performing the analysis. More...

#include <RulePreparer.h>

Inheritance diagram for RulePreparer:
Inheritance graph
[legend]

Public Member Functions

virtual ~RulePreparer ()
 Destroys the current RulePreparer instance.
 
virtual void prepareRule (graphs::Rule const &rule, basic_types::CollectionCallback< graphs::Rule_sp > &callback) const =0
 Takes a single rule and creates the prepared set of rules for this rule. More...
 
virtual void prepareRule (graphs::UQRuleInstance const &rule, basic_types::CollectionCallback< graphs::UQRuleInstance_sp > &callback) const =0
 Takes a single instantiation of a universally quantified rule and creates the prepared set of rules for this instantiation. More...
 
virtual bool isNoOpRule (graphs::AnonRule const &rule) const =0
 Checks if the given rule will only produce graphs already represented when the backward analysis is applied, i.e. More...
 
void setOptimization (bool opt)
 Sets whether the rule preparation will be optimized, i.e. More...
 
bool willOptimize () const
 Returns whether the rule preparation will be optimized, i.e. More...
 

Protected Member Functions

 RulePreparer ()
 A RulePreparer can only be instantiated by a derived class.
 

Protected Attributes

bool optimize
 Stores whether the rule preparation will be optimized.
 

Detailed Description

This class takes a rule and prepares it such that no special case handling is necessary while performing the analysis.

This is done by concatenating all possible order morphisms to the right of this rule, effectively generating a set of new rules. The prepared rules can be applied backwards straightforwardly for the backward search to be sound and complete.

Author
Jan Stückrath

Member Function Documentation

virtual bool isNoOpRule ( graphs::AnonRule const &  rule) const
pure virtual

Checks if the given rule will only produce graphs already represented when the backward analysis is applied, i.e.

its application is not necessary in the first place. Does not (necessarily) check if the rule is a valid morphism! This function is only used for optimization. A special treatment of instantiations of universally quantified rules in not necessary for this check.

Parameters
rulethe rule to be checked
Returns
true iff the given rule can be ignored by the backward analysis without loss of correctness

Implemented in NoRulePreparer, MinorRulePreparer, and SubgraphRulePreparer.

virtual void prepareRule ( graphs::Rule const &  rule,
basic_types::CollectionCallback< graphs::Rule_sp > &  callback 
) const
pure virtual

Takes a single rule and creates the prepared set of rules for this rule.

Each newly generated rule is added via the given callback function.

Parameters
rulethe rule which should be prepared
callbackthe callback defining where the newly generated rules will be added

Implemented in NoRulePreparer, MinorRulePreparer, and SubgraphRulePreparer.

virtual void prepareRule ( graphs::UQRuleInstance const &  rule,
basic_types::CollectionCallback< graphs::UQRuleInstance_sp > &  callback 
) const
pure virtual

Takes a single instantiation of a universally quantified rule and creates the prepared set of rules for this instantiation.

Each newly generated rule is added via the given callback function. Takes the special properties of universally quantified rules into account.

Parameters
rulean instantiation of a universally quantified rule which should be prepared
callbackthe callback defining where the newly generated rules will be added

Implemented in NoRulePreparer, MinorRulePreparer, and SubgraphRulePreparer.

void setOptimization ( bool  opt)
inline

Sets whether the rule preparation will be optimized, i.e.

the number of produced rules will be minimized.

Parameters
opttrue, iff the rule preparation should be optimized
bool willOptimize ( ) const
inline

Returns whether the rule preparation will be optimized, i.e.

the number if produced ruless will be minimized.

Returns
true, iff the rule preparation will be optimized

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