1
/* PeTe - Petri Engine exTremE
2
* Copyright (C) 2011 Jonas Finnemann Jensen <jopsen@gmail.com>,
3
* Thomas Søndersø Nielsen <primogens@gmail.com>,
4
* Lars Kærlund Østergaard <larsko@gmail.com>,
6
* This program is free software: you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation, either version 3 of the License, or
9
* (at your option) any later version.
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License
17
* along with this program. If not, see <http://www.gnu.org/licenses/>.
19
#ifndef COVERABILITYTREENODE_H
20
#define COVERABILITYTREENODE_H
24
#include "../PetriNet.h"
25
namespace PetriEngine { namespace Reachability {
27
/** Represents a node in the coverability tree of a Petri-net */
28
class CoverabilityTreeNode
31
/** Constructs a new node with its parent and a heap-allocated marking and variable assignment.
32
* This class takes ownership of marking and variable assignment*/
33
CoverabilityTreeNode(CoverabilityTreeNode* parent, int transition, MarkVal* marking, VarVal* assignments);
34
/** Constructs a root node, and a heap-allocated marking and variable assignment.
35
* This class takes ownership of the marking and variable assignment. */
36
CoverabilityTreeNode(MarkVal* marking, VarVal* assignments);
38
/** Destroy the CoverabilityTreeNode */
39
~CoverabilityTreeNode(){
49
/** Checks if the node is new in the coverability tree */
50
bool findDuplicate(const PetriNet& net);
52
/** Getter for marking */
53
MarkVal* marking() const{
56
/** Getter for the transition */
57
int transition() const{
62
/** The parent node, which is null for the root node */
63
CoverabilityTreeNode* _parent;
64
/** The transition being fired */
66
/** The current marking */
68
/** The current variable assignments */
73
#endif // COVERABILITYTREENODE_H