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

The InstantWriterResultHandler implements the BackwardResultHandler by writing the given information as soon as possible to the filesystem. More...

#include <InstantWriterResultHandler.h>

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

Public Types

enum  Extent { FULL = 0, ID_FILES_AND_RULES = 10, ID_FILES = 20 }
 Describes the extent to which the information should be stored. More...
 

Public Member Functions

 InstantWriterResultHandler (boost::filesystem::path &foldername)
 Creates a new InstantWriterResultHandler storing all information to the given folder. More...
 
virtual ~InstantWriterResultHandler ()
 Destroys this instance of InstantWriterResultHandler.
 
virtual void setOldGTS (graphs::GTS_csp gts) override
 Sets the old unprepared GTS. More...
 
virtual void setPreparedGTS (PreparedGTS_csp gts) override
 Sets the new prepared GTS. More...
 
virtual void setFirstGraphs (shared_ptr< const vector< graphs::Hypergraph_sp >> graphs) override
 Sets the initial set of graphs from which the backward search is started. More...
 
virtual void wasDeletedBecauseOf (IDType deletedGraph, IDType reasonGraph) override
 Stores that the graph with the first ID was deleted because it was subsumed by the graph with the second ID. More...
 
virtual void wasNoValidGraph (IDType deletedGraph) override
 Stores that the graph with the given ID did not belong to the restricted set of graphs and was therefore dropped. More...
 
virtual void wasGeneratedByFrom (graphs::Hypergraph_sp genGraph, IDType rule, IDType srcGraph) override
 Stores that the given graph was generated from the second graph by the given rule. More...
 
virtual void startingNewBackwardStep () override
 Informs that the next backward step has begun.
 
virtual void finishedBackwardStep () override
 Informs that the current backward step has ended.
 

Private Member Functions

 InstantWriterResultHandler ()
 This constructor cannot/should not be called.
 

Private Attributes

boost::filesystem::path foldername
 Stores the path to the storage folder.
 
unique_ptr< io::GTXLWritergtxlWriter
 A GTXLWriter used to write the information to the file system.
 
boost::filesystem::ofstream graphGenerationFile
 The file stream where information about the generation of new graphs are stored.
 
boost::filesystem::ofstream graphDeletionFile
 The file stream where information about the deletion of old graphs are stored.
 
vector< graphs::Hypergraph_spcurrentStepGraphs
 A collection temporary storing all graphs generated in the current backward step.
 
unsigned int stepnr
 A counter storing the index of the current backward step.
 
InstantWriterResultHandler::Extent extent
 Stores the extent to which information is stored.
 

Detailed Description

The InstantWriterResultHandler implements the BackwardResultHandler by writing the given information as soon as possible to the filesystem.

For this only a storage folder has to be given.

Author
Jan Stückrath
See Also
BackwardResultHandler

Member Enumeration Documentation

enum Extent

Describes the extent to which the information should be stored.

Enumerator
FULL 

Stores all given information.

ID_FILES_AND_RULES 

Stores only the GTSs and the IDs of graph, but not the graphs themselves.

ID_FILES 

Stores only the IDs of graph, but not the graphs or GTSs.

Constructor & Destructor Documentation

InstantWriterResultHandler ( boost::filesystem::path &  foldername)

Creates a new InstantWriterResultHandler storing all information to the given folder.

Parameters
foldernamea path to the storage folder

Member Function Documentation

void setFirstGraphs ( shared_ptr< const vector< graphs::Hypergraph_sp >>  graphs)
overridevirtual

Sets the initial set of graphs from which the backward search is started.

Parameters
graphsthe initial set of graphs for the backward search

Implements BackwardResultHandler.

void setOldGTS ( graphs::GTS_csp  gts)
overridevirtual

Sets the old unprepared GTS.

Parameters
gtsthe old unprepared GTS

Implements BackwardResultHandler.

void setPreparedGTS ( PreparedGTS_csp  gts)
overridevirtual

Sets the new prepared GTS.

Parameters
gtsthe new prepared GTS

Implements BackwardResultHandler.

void wasDeletedBecauseOf ( IDType  deletedGraph,
IDType  reasonGraph 
)
overridevirtual

Stores that the graph with the first ID was deleted because it was subsumed by the graph with the second ID.

Parameters
deletedGraphthe subsumed graph
reasonGraphthe graph subsuming the first graph

Implements BackwardResultHandler.

void wasGeneratedByFrom ( graphs::Hypergraph_sp  genGraph,
IDType  rule,
IDType  srcGraph 
)
overridevirtual

Stores that the given graph was generated from the second graph by the given rule.

Parameters
genGraphthe graph generated
rulethe ID of the rule used to generate the first graph
srcGraphthe ID of the graph used to generate the first graph

Implements BackwardResultHandler.

void wasNoValidGraph ( IDType  deletedGraph)
overridevirtual

Stores that the graph with the given ID did not belong to the restricted set of graphs and was therefore dropped.

Parameters
deletedGraphthe graph violating the restriction proposed by the backward search

Implements BackwardResultHandler.


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