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

This Scenario allows to check whether graphs of a given set are represented by another given, upward-closed set. More...

#include <LEQCheckScenario.h>

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

Public Member Functions

 LEQCheckScenario ()
 Creates a new LEQCheckScenario without initializing it.
 
virtual ~LEQCheckScenario ()
 Destroys this instance of LEQCheckScenario.
 
virtual void run () override
 Executes the scenario. More...
 
virtual void initialize (unordered_map< string, string > &parameters) override
 Initializes the scenario with the given mapping, where the keys are parameter names. More...
 
void initialize (vector< string > &params)
 Initializes the current Scenario with the given vector of parameters. More...
 
string getName () const
 Returns the name of this Scenario, which is a string beginning with 'scn_'. More...
 
bool isInitialized () const
 Check whether the Scenario was already initialized or not. More...
 
string getScenarioDesciption () const
 Returns a full description of the given Scenario. More...
 

Protected Member Functions

void addParameter (string paramName, string description, bool mandatory=true)
 Defined a new input parameter with the name 'paramName' the description 'description'. More...
 
void addSynonymFor (string original, string synonym)
 Stores that the parameter 'original' is also meant if 'synonym' was given as parameter. More...
 
void checkInitializationAndThrow () const
 Check if the Scenario was initialized and throws a RunException if it was not. More...
 

Protected Attributes

const string scenarioName
 A unique name of this scenario starting with "scn_".
 
const vector< string > alternateNames
 A vector containing all names for this Scenario, beyond scenarioName.
 
const string scenarioDescriptor
 Contains a description of how a call of this scenario may look like. More...
 

Private Attributes

bool faststop
 Stores whether this Scenario should terminate after the first related pair of graphs was found.
 
basic_types::Orderorder
 Stores the Order used by this Scenario.
 
shared_ptr< vector
< graphs::Hypergraph_sp > > 
minimalGraphs
 Stores the set of minimal graphs of an upward closed set.
 
shared_ptr< vector
< graphs::Hypergraph_sp > > 
checkGraphs
 Stores the set of graphs for which it will be checked if they are represented by a graph of minimalGraphs.
 

Detailed Description

This Scenario allows to check whether graphs of a given set are represented by another given, upward-closed set.

The caller needs to fix the order, give the upward-closed set of graphs as its minimal elements and another (finite) set of graphs to be checked. The scenario will then print all found relations, i.e. whenever a minimal graph is smaller than a graph to be checked, and a total of graphs represented. If desired, the scenario can terminate after the first found relation.

Note: For a meaningful output, the graphs need to have names. Otherwise this Scenario can only output the IDs automatically generated when reading the graphs!

Author
Jan Stückrath

Member Function Documentation

void addParameter ( string  paramName,
string  description,
bool  mandatory = true 
)
protectedinherited

Defined a new input parameter with the name 'paramName' the description 'description'.

The boolean specifies whether the parameter is mandatory or not. The order in which the parameters are defined using this method also specifies the order in which the parameters are expected if this scenario is called without parameter names, i.e. if the i-th input has only a value and no name, the name given at the i-th call of this method is used.

Parameters
paramNamea unique name for this parameter
descriptiona description of the defines parameter (for documentary purposes)
mandatorytrue if and only if the parameter should be mandatory
void addSynonymFor ( string  original,
string  synonym 
)
protectedinherited

Stores that the parameter 'original' is also meant if 'synonym' was given as parameter.

Using a defined parameter as 'synonym' will lead to undefined behavior.

Parameters
originalan already defined parameter name
synonyma name which will from now on be handled as if 'original' was given
void checkInitializationAndThrow ( ) const
protectedinherited

Check if the Scenario was initialized and throws a RunException if it was not.

See Also
exceptions::RunException
string getName ( ) const
inherited

Returns the name of this Scenario, which is a string beginning with 'scn_'.

Returns
the name of this Scenario
string getScenarioDesciption ( ) const
inherited

Returns a full description of the given Scenario.

The description thereby contains an abstract description of the Scenarios functionality and a detailed description of all its parameters.

Returns
a full descrription ot the given Scenario
void initialize ( vector< string > &  params)
inherited

Initializes the current Scenario with the given vector of parameters.

Each element of 'params' must be of the form 'key=value' and 'key' has to be a defined parameter of the scenario.

Parameters
paramsa key-value vector of the scenario parameters
void initialize ( unordered_map< string, string > &  parameters)
overridevirtual

Initializes the scenario with the given mapping, where the keys are parameter names.

May throw a uncover::basic_types::InitialisationException if parameters are invalid.

Parameters
parametersa mapping containing parameter names as keys and their values

Implements Scenario.

bool isInitialized ( ) const
inherited

Check whether the Scenario was already initialized or not.

Returns
true iff the Scenario was initialized
void run ( )
overridevirtual

Executes the scenario.

The scenario has to be fully initialized before calling this function.

Implements Scenario.

Member Data Documentation

const string scenarioDescriptor
protectedinherited

Contains a description of how a call of this scenario may look like.

This does not include detailed description of the parameters.


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