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