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
tgbaalgos
emptiness.hh
1
// -*- coding: utf-8 -*-
2
// Copyright (C) 2011, 2013 Laboratoire de Recherche et Developpement
3
// de l'Epita (LRDE).
4
// Copyright (C) 2004, 2005 Laboratoire d'Informatique de Paris 6 (LIP6),
5
// département Systèmes Répartis Coopératifs (SRC), Université Pierre
6
// et Marie Curie.
7
//
8
// This file is part of Spot, a model checking library.
9
//
10
// Spot is free software; you can redistribute it and/or modify it
11
// under the terms of the GNU General Public License as published by
12
// the Free Software Foundation; either version 3 of the License, or
13
// (at your option) any later version.
14
//
15
// Spot is distributed in the hope that it will be useful, but WITHOUT
16
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
17
// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
18
// License for more details.
19
//
20
// You should have received a copy of the GNU General Public License
21
// along with this program. If not, see <http://www.gnu.org/licenses/>.
22
23
#ifndef SPOT_TGBAALGOS_EMPTINESS_HH
24
# define SPOT_TGBAALGOS_EMPTINESS_HH
25
26
#include <map>
27
#include <list>
28
#include <iosfwd>
29
#include <bdd.h>
30
#include "misc/optionmap.hh"
31
#include "tgba/state.hh"
32
#include "emptiness_stats.hh"
33
34
namespace
spot
35
{
36
class
tgba;
37
struct
tgba_run;
38
71
77
class
SPOT_API
emptiness_check_result
78
{
79
public
:
80
emptiness_check_result
(
const
tgba
* a,
option_map
o =
option_map
())
81
: a_(a), o_(o)
82
{
83
}
84
85
virtual
86
~
emptiness_check_result
()
87
{
88
}
89
102
virtual
tgba_run
* accepting_run();
103
105
const
tgba
*
106
automaton
()
const
107
{
108
return
a_;
109
}
110
112
const
option_map
&
113
options
()
const
114
{
115
return
o_;
116
}
117
119
const
char
* parse_options(
char
* options);
120
122
virtual
const
unsigned_statistics
* statistics()
const
;
123
124
protected
:
126
virtual
void
options_updated(
const
option_map
& old);
127
128
const
tgba
*
a_
;
129
option_map
o_
;
130
};
131
133
class
SPOT_API
emptiness_check
134
{
135
public
:
136
emptiness_check
(
const
tgba
* a,
option_map
o =
option_map
())
137
: a_(a), o_(o)
138
{
139
}
140
virtual
~
emptiness_check
();
141
143
const
tgba
*
144
automaton
()
const
145
{
146
return
a_;
147
}
148
150
const
option_map
&
151
options
()
const
152
{
153
return
o_;
154
}
155
157
const
char
* parse_options(
char
* options);
158
160
virtual
bool
safe()
const
;
161
176
virtual
emptiness_check_result
* check() = 0;
177
179
virtual
const
unsigned_statistics
* statistics()
const
;
180
182
virtual
std::ostream& print_stats(std::ostream& os)
const
;
183
185
virtual
void
options_updated(
const
option_map
& old);
186
187
protected
:
188
const
tgba
*
a_
;
189
option_map
o_
;
190
};
191
192
193
// Dynamically create emptiness checks. Given their name and options.
194
class
SPOT_API
emptiness_check_instantiator
195
{
196
public
:
206
static
emptiness_check_instantiator
* construct(
const
char
* name,
207
const
char
** err);
208
210
emptiness_check
* instantiate(
const
tgba
* a)
const
;
211
214
const
option_map
&
215
options
()
const
216
{
217
return
o_;
218
}
219
220
option_map
&
221
options()
222
{
223
return
o_;
224
}
226
229
unsigned
int
min_acceptance_conditions()
const
;
230
235
unsigned
int
max_acceptance_conditions()
const
;
236
private
:
237
emptiness_check_instantiator(option_map o,
void
* i);
238
option_map o_;
239
void
*info_;
240
};
241
242
244
247
248
252
254
struct
SPOT_API
tgba_run
255
{
256
struct
step
{
257
const
state
* s;
258
bdd label;
259
bdd acc;
260
};
261
262
typedef
std::list<step> steps;
263
264
steps prefix;
265
steps cycle;
266
267
~
tgba_run
();
268
tgba_run
()
269
{
270
};
271
tgba_run
(
const
tgba_run
& run);
272
tgba_run
& operator=(
const
tgba_run
& run);
273
};
274
289
SPOT_API std::ostream&
290
print_tgba_run
(std::ostream& os,
const
tgba* a,
const
tgba_run* run);
291
296
SPOT_API tgba*
297
tgba_run_to_tgba
(
const
tgba* a,
const
tgba_run* run);
298
300
303
}
304
305
#endif // SPOT_TGBAALGOS_EMPTINESS_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