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
sabaalgos
sabareachiter.hh
1
// -*- coding: utf-8 -*-
2
// Copyright (C) 2009, 2010, 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_SABAALGOS_SABAREACHITER_HH
21
# define SPOT_SABAALGOS_SABAREACHITER_HH
22
23
#include "misc/hash.hh"
24
#include "saba/saba.hh"
25
#include <stack>
26
#include <deque>
27
28
namespace
spot
29
{
32
class
SPOT_API
saba_reachable_iterator
33
{
34
public
:
35
saba_reachable_iterator
(
const
saba
* a);
36
virtual
~
saba_reachable_iterator
();
37
43
void
run();
44
52
virtual
void
add_state(
const
saba_state
* s) = 0;
54
virtual
const
saba_state
* next_state() = 0;
56
59
virtual
bool
want_state(
const
saba_state
* s)
const
;
60
62
virtual
void
start();
64
virtual
void
end();
65
70
virtual
void
process_state(
const
saba_state
* s,
int
n);
71
81
virtual
void
82
process_state_conjunction(
const
saba_state
* in_s,
int
in,
83
const
saba_state_conjunction
* sc,
84
int
sc_id,
85
const
saba_succ_iterator
* si);
101
virtual
void
102
process_link(
const
saba_state
* in_s,
int
in,
103
const
saba_state
* out_s,
int
out,
104
const
saba_state_conjunction
* sc,
105
int
sc_id,
106
const
saba_succ_iterator
* si);
107
108
protected
:
109
const
saba
*
automata_
;
110
111
typedef
Sgi::hash_map<
const
saba_state
*, int,
112
saba_state_ptr_hash
,
saba_state_ptr_equal
> seen_map;
113
seen_map
seen
;
114
};
115
119
class
SPOT_API
saba_reachable_iterator_depth_first
:
120
public
saba_reachable_iterator
121
{
122
public
:
123
saba_reachable_iterator_depth_first
(
const
saba
* a);
124
125
virtual
void
add_state(
const
saba_state
* s);
126
virtual
const
saba_state
* next_state();
127
128
protected
:
129
std::stack<const saba_state*>
todo
;
130
};
131
135
class
SPOT_API
saba_reachable_iterator_breadth_first
:
136
public
saba_reachable_iterator
137
{
138
public
:
139
saba_reachable_iterator_breadth_first
(
const
saba
* a);
140
141
virtual
void
add_state(
const
saba_state
* s);
142
virtual
const
saba_state
* next_state();
143
144
protected
:
145
std::deque<const saba_state*>
todo
;
146
};
147
148
149
}
150
151
152
#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 Thu May 15 2014 11:04:11 for spot by
1.8.4