spot
1.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
taalgos
reachiter.hh
Go to the documentation of this file.
1
// Copyright (C) 2010 Laboratoire de Recherche et Developpement
2
// de l Epita (LRDE).
3
//
4
//
5
// This file is part of Spot, a model checking library.
6
//
7
// Spot is free software; you can redistribute it and/or modify it
8
// under the terms of the GNU General Public License as published by
9
// the Free Software Foundation; either version 3 of the License, or
10
// (at your option) any later version.
11
//
12
// Spot is distributed in the hope that it will be useful, but WITHOUT
13
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14
// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
15
// License for more details.
16
//
17
// You should have received a copy of the GNU General Public License
18
// along with this program. If not, see <http://www.gnu.org/licenses/>.
19
20
#ifndef SPOT_TAALGOS_REACHITER_HH
21
# define SPOT_TAALGOS_REACHITER_HH
22
23
#include "
misc/hash.hh
"
24
#include "
ta/ta.hh
"
25
#include <stack>
26
#include <deque>
27
28
namespace
spot
29
{
32
class
ta_reachable_iterator
33
{
34
public
:
35
ta_reachable_iterator
(
const
ta
* a);
36
virtual
37
~ta_reachable_iterator
();
38
44
void
45
run
();
46
54
virtual
void
55
add_state
(
const
state
* s) = 0;
57
virtual
const
state
*
58
next_state
() = 0;
60
63
virtual
bool
64
want_state
(
const
state
* s)
const
;
65
67
virtual
void
68
start
();
70
virtual
void
71
end
();
72
78
virtual
void
79
process_state
(
const
state
* s,
int
n);
92
virtual
void
93
process_link
(
int
in,
int
out,
const
ta_succ_iterator
* si);
94
95
protected
:
96
97
const
ta
*
t_automata_
;
98
99
typedef
Sgi::hash_map<const state*, int, state_ptr_hash, state_ptr_equal>
100
seen_map
;
101
seen_map
seen
;
102
};
103
107
class
ta_reachable_iterator_depth_first
:
public
ta_reachable_iterator
108
{
109
public
:
110
ta_reachable_iterator_depth_first
(
const
ta
* a);
111
112
virtual
void
113
add_state
(
const
state
* s);
114
virtual
const
state
*
115
next_state
();
116
117
protected
:
118
std::stack<const state*>
todo
;
119
};
120
124
class
ta_reachable_iterator_breadth_first
:
public
ta_reachable_iterator
125
{
126
public
:
127
ta_reachable_iterator_breadth_first
(
const
ta
* a);
128
129
virtual
void
130
add_state
(
const
state
* s);
131
virtual
const
state
*
132
next_state
();
133
134
protected
:
135
std::deque<const state*>
todo
;
136
};
137
138
}
139
140
#endif // SPOT_TAALGOS_REACHITER_HH
Please
comment
this page and
report errors
about it on
the RefDocComments page
.
Generated on Sat Oct 27 2012 09:34:32 for spot by
1.8.1.2