spot
1.0.2
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
ta
ta.hh
Go to the documentation of this file.
1
// Copyright (C) 2010, 2012 Laboratoire de Recherche et Developpement
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_TA_TA_HH
20
# define SPOT_TA_TA_HH
21
22
#include <set>
23
24
#include <cassert>
25
#include "
misc/bddlt.hh
"
26
#include "
tgba/state.hh
"
27
#include "
tgba/succiter.hh
"
28
#include "
tgba/bdddict.hh
"
29
30
namespace
spot
31
{
32
33
// Forward declarations. See below.
34
class
ta_succ_iterator;
35
43
46
76
77
class
ta
78
{
79
80
public
:
81
virtual
82
~ta
()
83
{
84
}
85
86
typedef
std::set<state*, state_ptr_less_than>
states_set_t
;
87
89
virtual
const
states_set_t
90
get_initial_states_set
()
const
= 0;
91
99
virtual
spot::state
*
100
get_artificial_initial_state
()
const
101
{
102
return
0;
103
}
104
111
virtual
ta_succ_iterator
*
112
succ_iter
(
const
spot::state
*
state
)
const
= 0;
113
121
virtual
ta_succ_iterator
*
122
succ_iter
(
const
spot::state
*
state
, bdd changeset)
const
= 0;
123
131
virtual
bdd_dict
*
132
get_dict
()
const
= 0;
133
138
virtual
std::string
139
format_state
(
const
spot::state
* s)
const
= 0;
140
142
virtual
bool
143
is_accepting_state
(
const
spot::state
* s)
const
= 0;
144
147
virtual
bool
148
is_livelock_accepting_state
(
const
spot::state
* s)
const
= 0;
149
151
virtual
bool
152
is_initial_state
(
const
spot::state
* s)
const
= 0;
153
156
virtual
bdd
157
get_state_condition
(
const
spot::state
* s)
const
= 0;
158
160
virtual
void
161
free_state
(
const
spot::state
* s)
const
= 0;
162
172
virtual
bdd
173
all_acceptance_conditions
()
const
= 0;
174
175
};
176
185
class
ta_succ_iterator
:
public
tgba_succ_iterator
186
{
187
public
:
188
virtual
189
~ta_succ_iterator
()
190
{
191
}
192
193
virtual
void
194
first
() = 0;
195
virtual
void
196
next
() = 0;
197
virtual
bool
198
done
()
const
= 0;
199
200
virtual
state
*
201
current_state
()
const
= 0;
202
206
virtual
bdd
207
current_condition
()
const
= 0;
208
209
bdd
210
current_acceptance_conditions
()
const
= 0;
211
212
};
213
214
#ifndef SWIG
215
// A stack of Strongly-Connected Components
216
class
scc_stack_ta
217
{
218
public
:
219
struct
connected_component
220
{
221
public
:
222
connected_component
(
int
index
= -1);
223
225
int
index
;
226
227
bool
is_accepting
;
228
231
bdd
condition
;
232
233
std::list<state*>
rem
;
234
};
235
237
void
238
push
(
int
index);
239
241
connected_component
&
242
top
();
243
245
const
connected_component
&
246
top
()
const
;
247
249
void
250
pop
();
251
253
size_t
254
size
()
const
;
255
257
std::list<state*>&
258
rem
();
259
261
bool
262
empty
()
const
;
263
264
typedef
std::list<connected_component>
stack_type
;
265
stack_type
s
;
266
};
267
#endif // !SWIG
268
271
274
277
280
281
284
287
290
291
292
}
293
294
#endif // SPOT_TA_TA_HH
Please
comment
this page and
report errors
about it on
the RefDocComments page
.
Generated on Wed Mar 6 2013 09:25:14 for spot by
1.8.1.2