spot
0.9.2
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
kripke
kripkeexplicit.hh
Go to the documentation of this file.
1
// -*- coding: utf-8 -*-
2
// Copyright (C) 2011, 2012 Laboratoire de Recherche et Développement
3
// 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 2 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 Spot; see the file COPYING. If not, write to the Free
19
// Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
20
// 02111-1307, USA.
21
22
23
#ifndef SPOT_KRIPKE_KRIPKEEXPLICIT_HH
24
# define SPOT_KRIPKE_KRIPKEEXPLICIT_HH
25
26
# include <iosfwd>
27
# include "
kripke.hh
"
28
# include "
ltlast/formula.hh
"
29
# include "
kripkeprint.hh
"
30
31
namespace
spot
32
{
34
class
state_kripke
:
public
state
35
{
36
friend
class
kripke_explicit
;
37
friend
class
kripke_explicit_succ_iterator
;
38
private
:
39
state_kripke
();
40
49
virtual
int
compare
(
const
state
* other)
const
;
50
52
virtual
size_t
hash
()
const
;
53
55
virtual
state_kripke
*
clone
()
const
;
56
59
void
add_conditions
(bdd f);
60
63
void
add_succ
(
state_kripke
* succ);
64
65
virtual
bdd
66
as_bdd
()
const
67
{
68
return
bdd_
;
69
}
70
73
virtual
void
74
destroy
()
const
75
{
76
}
77
78
virtual
79
~state_kripke
()
80
{
81
}
82
84
// Management for succ_iterator
85
86
const
std::list<state_kripke*>&
get_succ
()
const
;
87
88
bdd
bdd_
;
89
std::list<state_kripke*>
succ_
;
90
};
91
92
95
class
kripke_explicit_succ_iterator
:
public
kripke_succ_iterator
96
{
97
public
:
98
kripke_explicit_succ_iterator
(
const
state_kripke
*, bdd);
99
100
~kripke_explicit_succ_iterator
();
101
102
virtual
void
first
();
103
virtual
void
next
();
104
virtual
bool
done
()
const
;
105
106
virtual
state_kripke
*
current_state
()
const
;
107
108
private
:
109
const
state_kripke
*
s_
;
110
std::list<state_kripke*>::const_iterator
it_
;
111
};
112
113
116
class
kripke_explicit
:
public
kripke
117
{
118
public
:
119
kripke_explicit
(
bdd_dict
*);
120
kripke_explicit
(
bdd_dict
*,
state_kripke
*);
121
~kripke_explicit
();
122
123
bdd_dict
*
get_dict
()
const
;
124
state_kripke
*
get_init_state
()
const
;
125
128
kripke_explicit_succ_iterator
*
129
succ_iter
(
const
spot::state
* local_state,
130
const
spot::state
* global_state = 0,
131
const
tgba
* global_automaton = 0)
const
;
132
134
bdd
state_condition
(
const
state
* s)
const
;
136
bdd
state_condition
(
const
std::string)
const
;
137
139
std::string
format_state
(
const
state
*)
const
;
140
141
145
void
add_state
(std::string);
146
148
void
add_transition
(std::string source,
149
std::string dest);
150
155
void
add_conditions
(bdd add,
156
std::string on_me);
157
162
void
add_condition
(
const
ltl::formula
* f,
163
std::string on_me);
164
166
const
std::map<const state_kripke*, std::string>&
167
sn_get
()
const
;
168
169
private
:
171
void
add_state
(std::string,
state_kripke
*);
172
173
void
add_conditions
(bdd add,
174
state_kripke
* on_me);
175
176
void
add_transition
(std::string source,
177
const
state_kripke
* dest);
178
179
void
add_transition
(
state_kripke
* source,
180
const
state_kripke
* dest);
181
182
bdd_dict
*
dict_
;
183
state_kripke
*
init_
;
184
std::map<const std::string, state_kripke*>
ns_nodes_
;
185
std::map<const state_kripke*, std::string>
sn_nodes_
;
186
};
187
}
188
#endif
/* !SPOT_KRIPKEEXPLICIT_HH_ */
Please
comment
this page and
report errors
about it on
the RefDocComments page
.
Generated on Mon Jul 2 2012 17:35:47 for spot by
1.8.1.1