UnCoVer (Using Coverability for Verification)
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Rule.h
1 /***************************************************************************
2  * Copyright (C) 2014 by Jan Stückrath <jan.stueckrath@uni-due.de> *
3  * *
4  * This program is free software; you can redistribute it and/or modify *
5  * it under the terms of the GNU General Public License as published by *
6  * the Free Software Foundation; either version 2 of the License, or *
7  * (at your option) any later version. *
8  * *
9  * This program is distributed in the hope that it will be useful, *
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12  * GNU General Public License for more details. *
13  * *
14  * You should have received a copy of the GNU General Public License *
15  * along with this program; if not, write to the *
16  * Free Software Foundation, Inc., *
17  * 51 Franklin St, Fifth Floor, Boston, MA 02110, USA *
18  ***************************************************************************/
19 
20 #ifndef DATA_STRUCTURESRULE_H
21 #define DATA_STRUCTURESRULE_H
22 
23 #include "AnonRule.h"
24 #include "Mapping.h"
25 
26 namespace uncover {
27  namespace graphs {
28 
38  class Rule : public AnonRule {
39 
40  public:
41 
53  Rule(string name = "",
54  AnonHypergraph_sp left = make_shared<AnonHypergraph>(),
55  AnonHypergraph_sp right = make_shared<AnonHypergraph>(),
56  Mapping const& match = Mapping());
57 
63  Rule(Rule const& oldRule);
64 
70  Rule(AnonRule const& oldRule);
71 
78  Rule(AnonHypergraph const& graph);
79 
83  virtual ~Rule();
84 
89  IDType getID() const;
90 
91  virtual void streamTo(std::ostream& ost) const override;
92 
93  protected:
94 
99 
100  };
101 
105  typedef shared_ptr<Rule> Rule_sp;
106 
110  typedef shared_ptr<Rule const> Rule_csp;
111 
112  }
113 }
114 
115 #endif
virtual void streamTo(std::ostream &ost) const override
Streams as string representation of this Streamable object to the given ostream.
Definition: Rule.cpp:51
shared_ptr< AnonHypergraph > AnonHypergraph_sp
Alias of a shared pointer to an AnonHypergraph.
Definition: AnonHypergraph.h:415
shared_ptr< Rule const > Rule_csp
Alias for a shared pointer to a constant Rule.
Definition: Rule.h:110
virtual ~Rule()
Destroys this Rule object.
Definition: Rule.cpp:44
Represents the data structure for a rule including a unique identifier.
Definition: Rule.h:38
This is the data structure representing a morphism mapping from a graph to another graph...
Definition: Mapping.h:36
shared_ptr< Rule > Rule_sp
Alias for a shared pointer to a Rule.
Definition: Rule.h:105
AnonHypergraph_sp right
Stores a pointer to the right graph of this rule.
Definition: AnonRule.h:212
IDType getID() const
Returns the unique identifier of this Rule object.
Definition: Rule.cpp:46
AnonRule serves as a data structure of a rule object.
Definition: AnonRule.h:39
Rule(string name="", AnonHypergraph_sp left=make_shared< AnonHypergraph >(), AnonHypergraph_sp right=make_shared< AnonHypergraph >(), Mapping const &match=Mapping())
Generates a new rule with the given name, left graph, right graph and mapping.
Definition: Rule.cpp:29
AnonHypergraph_sp left
Stores a pointer to the left graph of this rule.
Definition: AnonRule.h:207
IDType ID
Stores the ID of this Rule.
Definition: Rule.h:98
An AnonHypergraph is a data structure storing a hypergraph.
Definition: AnonHypergraph.h:43
string name
Stores the name of this rule.
Definition: AnonRule.h:202
unsigned int IDType
IDType is an (unsigned) integer specifically used as an Identifier of graphs, elements of graphs or a...
Definition: globals.h:53