Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Spot
Spot
Commits
f06fc8ac
Commit
f06fc8ac
authored
Jan 05, 2011
by
Alexandre Duret-Lutz
Browse files
* src/tgbaalgos/minimize.cc (minimize): Use the Loeding algorithm
to label transient states.
parent
358d4bfd
Changes
2
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
f06fc8ac
2011-01-05 Alexandre Duret-Lutz <adl@lrde.epita.fr>
* src/tgbaalgos/minimize.cc (minimize): Use the Loeding algorithm
to label transient states.
2011-01-04 Alexandre Duret-Lutz <adl@lrde.epita.fr>
Rewrite the check of WDBA state acceptance in minimize().
...
...
src/tgbaalgos/minimize.cc
View file @
f06fc8ac
...
...
@@ -22,6 +22,7 @@
#include
<deque>
#include
<set>
#include
<list>
#include
<vector>
#include
"minimize.hh"
#include
"ltlast/allnodes.hh"
#include
"misc/hash.hh"
...
...
@@ -291,12 +292,44 @@ namespace spot
scc_map
sm
(
det_a
);
sm
.
build_map
();
unsigned
scc_count
=
sm
.
scc_count
();
std
::
vector
<
bool
>
accepting
(
scc_count
);
// SCC are numbered in topological order
for
(
unsigned
n
=
0
;
n
<
scc_count
;
++
n
)
{
// Trivial SCCs are not accepting.
bool
acc
=
true
;
if
(
sm
.
trivial
(
n
))
continue
;
if
(
wdba_scc_is_accepting
(
det_a
,
n
,
a
,
sm
,
pm
))
{
// Trivial SCCs are accepting if all their
// successors are accepting.
// This corresponds to the algorithm in Fig. 1 of
// "Efficient minimization of deterministic weak
// omega-automata" written by Christof Löding and
// published in Information Processing Letters 79
// (2001) pp 105--109. Except we do not keep track
// of the actual color associated to each SCC.
const
scc_map
::
succ_type
&
succ
=
sm
.
succ
(
n
);
for
(
scc_map
::
succ_type
::
const_iterator
i
=
succ
.
begin
();
i
!=
succ
.
end
();
++
i
)
{
if
(
!
accepting
[
i
->
first
])
{
acc
=
false
;
break
;
}
}
}
else
{
// Regular SCCs are accepting if any of their loop
// corresponds to an accepting
acc
=
wdba_scc_is_accepting
(
det_a
,
n
,
a
,
sm
,
pm
);
}
accepting
[
n
]
=
acc
;
if
(
acc
)
{
std
::
list
<
const
state
*>
l
=
sm
.
states_of
(
n
);
std
::
list
<
const
state
*>::
const_iterator
il
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment