spot
1.2.6
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
ta
ta.hh
1
// -*- coding: utf-8 -*-
2
// Copyright (C) 2010, 2012, 2013 Laboratoire de Recherche et
3
// Developpement 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_TA_TA_HH
21
# define SPOT_TA_TA_HH
22
23
#include <set>
24
25
#include <cassert>
26
#include "misc/bddlt.hh"
27
#include "tgba/state.hh"
28
#include "tgba/succiter.hh"
29
#include "tgba/bdddict.hh"
30
31
namespace
spot
32
{
33
34
// Forward declarations. See below.
35
class
ta_succ_iterator;
36
44
47
77
78
class
SPOT_API
ta
79
{
80
81
public
:
82
virtual
83
~
ta
()
84
{
85
}
86
87
typedef
std::set<state*, state_ptr_less_than> states_set_t;
88
90
virtual
const
states_set_t
91
get_initial_states_set()
const
= 0;
92
100
virtual
spot::state
*
101
get_artificial_initial_state
()
const
102
{
103
return
0;
104
}
105
112
virtual
ta_succ_iterator
*
113
succ_iter(
const
spot::state
*
state
)
const
= 0;
114
122
virtual
ta_succ_iterator
*
123
succ_iter(
const
spot::state
*
state
, bdd changeset)
const
= 0;
124
132
virtual
bdd_dict
*
133
get_dict()
const
= 0;
134
139
virtual
std::string
140
format_state(
const
spot::state
* s)
const
= 0;
141
143
virtual
bool
144
is_accepting_state(
const
spot::state
* s)
const
= 0;
145
148
virtual
bool
149
is_livelock_accepting_state(
const
spot::state
* s)
const
= 0;
150
152
virtual
bool
153
is_initial_state(
const
spot::state
* s)
const
= 0;
154
157
virtual
bdd
158
get_state_condition(
const
spot::state
* s)
const
= 0;
159
161
virtual
void
162
free_state(
const
spot::state
* s)
const
= 0;
163
173
virtual
bdd
174
all_acceptance_conditions()
const
= 0;
175
176
};
177
186
class
ta_succ_iterator
:
public
tgba_succ_iterator
187
{
188
public
:
189
virtual
190
~
ta_succ_iterator
()
191
{
192
}
193
194
virtual
void
195
first
() = 0;
196
virtual
void
197
next
() = 0;
198
virtual
bool
199
done
()
const
= 0;
200
201
virtual
state
*
202
current_state
()
const
= 0;
203
207
virtual
bdd
208
current_condition
()
const
= 0;
209
210
bdd
211
current_acceptance_conditions
()
const
= 0;
212
213
};
214
215
#ifndef SWIG
216
// A stack of Strongly-Connected Components
217
class
scc_stack_ta
218
{
219
public
:
220
struct
connected_component
221
{
222
public
:
223
connected_component
(
int
index
= -1);
224
226
int
index
;
227
228
bool
is_accepting;
229
232
bdd
condition
;
233
234
std::list<state*> rem;
235
};
236
238
void
239
push
(
int
index);
240
242
connected_component
&
243
top
();
244
246
const
connected_component
&
247
top
()
const
;
248
250
void
251
pop
();
252
254
size_t
255
size
()
const
;
256
258
std::list<state*>&
259
rem
();
260
262
bool
263
empty
()
const
;
264
265
typedef
std::list<connected_component> stack_type;
266
stack_type s;
267
};
268
#endif // !SWIG
269
272
275
278
281
282
285
288
291
292
293
}
294
295
#endif // SPOT_TA_TA_HH
Please direct any
question
,
comment
, or
bug report
to the Spot mailing list at
spot@lrde.epita.fr
.
Generated on Sat Dec 6 2014 12:28:44 for spot by
1.8.4