spot
1.1.4
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
sabaalgos
sabareachiter.hh
Go to the documentation of this file.
1
// Copyright (C) 2009, 2010 Laboratoire de Recherche et Développement
2
// de l'Epita (LRDE).
3
//
4
// This file is part of Spot, a model checking library.
5
//
6
// Spot is free software; you can redistribute it and/or modify it
7
// 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.
10
//
11
// Spot is distributed in the hope that it will be useful, but WITHOUT
12
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13
// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
14
// License for more details.
15
//
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/>.
18
19
#ifndef SPOT_SABAALGOS_SABAREACHITER_HH
20
# define SPOT_SABAALGOS_SABAREACHITER_HH
21
22
#include "
misc/hash.hh
"
23
#include "
saba/saba.hh
"
24
#include <stack>
25
#include <deque>
26
27
namespace
spot
28
{
31
class
saba_reachable_iterator
32
{
33
public
:
34
saba_reachable_iterator
(
const
saba
* a);
35
virtual
~saba_reachable_iterator
();
36
42
void
run
();
43
51
virtual
void
add_state
(
const
saba_state
* s) = 0;
53
virtual
const
saba_state
*
next_state
() = 0;
55
58
virtual
bool
want_state
(
const
saba_state
* s)
const
;
59
61
virtual
void
start
();
63
virtual
void
end
();
64
69
virtual
void
process_state
(
const
saba_state
* s,
int
n);
70
80
virtual
void
81
process_state_conjunction
(
const
saba_state
* in_s,
int
in,
82
const
saba_state_conjunction
* sc,
83
int
sc_id,
84
const
saba_succ_iterator
* si);
100
virtual
void
101
process_link
(
const
saba_state
* in_s,
int
in,
102
const
saba_state
* out_s,
int
out,
103
const
saba_state_conjunction
* sc,
104
int
sc_id,
105
const
saba_succ_iterator
* si);
106
107
protected
:
108
const
saba
*
automata_
;
109
110
typedef
Sgi::hash_map
<
const
saba_state
*, int,
111
saba_state_ptr_hash
,
saba_state_ptr_equal
>
seen_map
;
112
seen_map
seen
;
113
};
114
118
class
saba_reachable_iterator_depth_first
:
public
saba_reachable_iterator
119
{
120
public
:
121
saba_reachable_iterator_depth_first
(
const
saba
* a);
122
123
virtual
void
add_state
(
const
saba_state
* s);
124
virtual
const
saba_state
*
next_state
();
125
126
protected
:
127
std::stack<const saba_state*>
todo
;
128
};
129
133
class
saba_reachable_iterator_breadth_first
:
public
saba_reachable_iterator
134
{
135
public
:
136
saba_reachable_iterator_breadth_first
(
const
saba
* a);
137
138
virtual
void
add_state
(
const
saba_state
* s);
139
virtual
const
saba_state
*
next_state
();
140
141
protected
:
142
std::deque<const saba_state*>
todo
;
143
};
144
145
146
}
147
148
149
#endif // SPOT_SABAALGOS_SABAREACHITER_HH
Please direct any
question
,
comment
, or
bug report
to the Spot mailing list at
spot@lrde.epita.fr
.
Generated on Mon Jul 29 2013 00:27:24 for spot by
1.8.4