spot
1.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
ta
taproduct.hh
Go to the documentation of this file.
1
// Copyright (C) 2010 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_TAPRODUCT_HH
20
# define SPOT_TA_TAPRODUCT_HH
21
22
#include "
ta.hh
"
23
#include "
kripke/kripke.hh
"
24
25
namespace
spot
26
{
27
33
class
state_ta_product
:
public
state
34
{
35
public
:
39
state_ta_product
(
state
* ta_state,
state
* kripke_state) :
40
ta_state_
(ta_state),
kripke_state_
(kripke_state)
41
{
42
}
43
45
state_ta_product
(
const
state_ta_product
& o);
46
47
virtual
48
~state_ta_product
();
49
50
state
*
51
get_ta_state
()
const
52
{
53
return
ta_state_
;
54
}
55
56
state
*
57
get_kripke_state
()
const
58
{
59
return
kripke_state_
;
60
}
61
62
virtual
int
63
compare
(
const
state
* other)
const
;
64
virtual
size_t
65
hash
()
const
;
66
virtual
state_ta_product
*
67
clone
()
const
;
68
69
private
:
70
state
*
ta_state_
;
71
state
*
kripke_state_
;
72
};
73
75
class
ta_succ_iterator_product
:
public
ta_succ_iterator
76
{
77
public
:
78
ta_succ_iterator_product
(
const
state_ta_product
* s,
const
ta
* t,
79
const
kripke
* k);
80
81
virtual
82
~ta_succ_iterator_product
();
83
84
// iteration
85
void
86
first
();
87
void
88
next
();
89
bool
90
done
()
const
;
91
92
// inspection
93
state_ta_product
*
94
current_state
()
const
;
95
bdd
96
current_condition
()
const
;
97
98
bdd
99
current_acceptance_conditions
()
const
;
100
102
bool
103
is_stuttering_transition
()
const
;
104
105
protected
:
107
108
void
109
step_
();
110
void
111
next_non_stuttering_
();
112
114
void
115
next_kripke_dest
();
116
118
119
protected
:
120
const
state_ta_product
*
source_
;
121
const
ta
*
ta_
;
122
const
kripke
*
kripke_
;
123
ta_succ_iterator
*
ta_succ_it_
;
124
tgba_succ_iterator
*
kripke_succ_it_
;
125
state_ta_product
*
current_state_
;
126
bdd
current_condition_
;
127
bdd
current_acceptance_conditions_
;
128
bool
is_stuttering_transition_
;
129
bdd
kripke_source_condition
;
130
state
*
kripke_current_dest_state
;
131
132
};
133
137
class
ta_product
:
public
ta
138
{
139
public
:
143
ta_product
(
const
ta
* testing_automaton,
const
kripke
* kripke_structure);
144
145
virtual
146
~ta_product
();
147
148
virtual
const
std::set<state*, state_ptr_less_than>
149
get_initial_states_set
()
const
;
150
151
virtual
ta_succ_iterator_product
*
152
succ_iter
(
const
spot::state
* s)
const
;
153
154
virtual
ta_succ_iterator_product
*
155
succ_iter
(
const
spot::state
* s, bdd changeset)
const
;
156
157
virtual
bdd_dict
*
158
get_dict
()
const
;
159
160
virtual
std::string
161
format_state
(
const
spot::state
* s)
const
;
162
163
virtual
bool
164
is_accepting_state
(
const
spot::state
* s)
const
;
165
166
virtual
bool
167
is_livelock_accepting_state
(
const
spot::state
* s)
const
;
168
169
virtual
bool
170
is_initial_state
(
const
spot::state
* s)
const
;
171
174
virtual
bool
175
is_hole_state_in_ta_component
(
const
spot::state
* s)
const
;
176
177
virtual
bdd
178
get_state_condition
(
const
spot::state
* s)
const
;
179
180
virtual
bdd
181
all_acceptance_conditions
()
const
;
182
183
virtual
void
184
free_state
(
const
spot::state
* s)
const
;
185
186
const
ta
*
187
get_ta
()
const
188
{
189
return
ta_
;
190
}
191
192
const
kripke
*
193
get_kripke
()
const
194
{
195
return
kripke_
;
196
}
197
198
private
:
199
bdd_dict
*
dict_
;
200
const
ta
*
ta_
;
201
const
kripke
*
kripke_
;
202
203
// Disallow copy.
204
ta_product
(
const
ta_product
&);
205
ta_product
&
206
operator=
(
const
ta_product
&);
207
};
208
209
210
class
ta_succ_iterator_product_by_changeset
:
public
ta_succ_iterator_product
211
{
212
public
:
213
ta_succ_iterator_product_by_changeset
(
const
state_ta_product
* s,
214
const
ta
* t,
const
kripke
* k, bdd changeset);
215
216
217
219
void
220
next_kripke_dest
();
221
222
223
};
224
225
226
}
227
228
#endif // SPOT_TA_TAPRODUCT_HH
Please
comment
this page and
report errors
about it on
the RefDocComments page
.
Generated on Sat Oct 27 2012 09:34:32 for spot by
1.8.1.2