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

This class prepares given rules to be used together with the subgraph order in the backward search. More...

#include <SubgraphRulePreparer.h>

Inheritance diagram for SubgraphRulePreparer:
Inheritance graph
[legend]
Collaboration diagram for SubgraphRulePreparer:
Collaboration graph
[legend]

Public Member Functions

 SubgraphRulePreparer ()
 Creates a new instance of this rule preparer.
 
virtual ~SubgraphRulePreparer ()
 Destroys the current instance of this preparer.
 
virtual void prepareRule (graphs::Rule const &rule, basic_types::CollectionCallback< graphs::Rule_sp > &callback) const override
 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 override
 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 override
 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 Attributes

bool optimize
 Stores whether the rule preparation will be optimized.
 

Detailed Description

This class prepares given rules to be used together with the subgraph order in the backward search.

For each given rule L->R the rule L->R->S is added instead for every subgraph morphism R->S.

Author
Jan Stückrath
See Also
SubgraphOrder

Member Function Documentation

bool isNoOpRule ( graphs::AnonRule const &  rule) const
overridevirtual

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

Implements RulePreparer.

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

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

Implements RulePreparer.

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

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

Implements RulePreparer.

void setOptimization ( bool  opt)
inlineinherited

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
inlineinherited

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 files: