spot
1.2.4
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
taalgos
reachiter.hh
1
// -*- coding: utf-8 -*-
2
// Copyright (C) 2010, 2011, 2012, 2013 Laboratoire de Recherche et
3
// Développement de l'Epita (LRDE).
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
SPOT_API
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
77
virtual
void
78
process_state(
const
state
* s,
int
n);
85
virtual
void
86
process_link(
int
in,
int
out,
const
ta_succ_iterator
* si);
87
88
protected
:
89
90
const
ta
*
t_automata_
;
91
92
typedef
Sgi::hash_map<const state*, int, state_ptr_hash, state_ptr_equal>
93
seen_map;
94
seen_map
seen
;
95
};
96
100
class
SPOT_API
ta_reachable_iterator_depth_first
101
:
public
ta_reachable_iterator
102
{
103
public
:
104
ta_reachable_iterator_depth_first
(
const
ta
* a);
105
106
virtual
void
107
add_state(
const
state
* s);
108
virtual
const
state
*
109
next_state();
110
111
protected
:
112
std::stack<const state*>
todo
;
113
};
114
118
class
SPOT_API
ta_reachable_iterator_breadth_first
119
:
public
ta_reachable_iterator
120
{
121
public
:
122
ta_reachable_iterator_breadth_first
(
const
ta
* a);
123
124
virtual
void
125
add_state(
const
state
* s);
126
virtual
const
state
*
127
next_state();
128
129
protected
:
130
std::deque<const state*>
todo
;
131
};
132
133
}
134
135
#endif // SPOT_TAALGOS_REACHITER_HH
Please direct any
question
,
comment
, or
bug report
to the Spot mailing list at
spot@lrde.epita.fr
.
Generated on Thu May 15 2014 11:04:11 for spot by
1.8.4