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
71b08b03
Commit
71b08b03
authored
Jul 13, 2017
by
Henrich Lauko
Committed by
Alexandre Duret-Lutz
Jul 17, 2017
Browse files
tra2tba: Make result state-based if possible
* spot/twaalgos/remfin.cc: Create state-based result.
parent
d45b60a4
Changes
1
Hide whitespace changes
Inline
Side-by-side
spot/twaalgos/remfin.cc
View file @
71b08b03
...
...
@@ -84,6 +84,23 @@ namespace spot
return
scc_mark
;
}
// Transforms automaton from transition based acceptance to state based
// acceptance.
void
make_state_acc
(
twa_graph_ptr
&
aut
)
{
unsigned
nst
=
aut
->
num_states
();
for
(
unsigned
s
=
0
;
s
<
nst
;
++
s
)
{
acc_cond
::
mark_t
acc
=
0U
;
for
(
auto
&
t
:
aut
->
out
(
s
))
acc
|=
t
.
acc
;
for
(
auto
&
t
:
aut
->
out
(
s
))
t
.
acc
=
acc
;
}
aut
->
prop_state_acc
(
true
);
}
// Check whether the SCC contains non-accepting cycles.
//
// A cycle is accepting (in a Rabin automaton) if there exists an
...
...
@@ -341,26 +358,11 @@ namespace spot
res
->
prop_universal
(
deterministic
);
res
->
purge_dead_states
();
res
->
merge_edges
();
if
(
!
aut_pairs
.
infs
())
make_state_acc
(
res
);
return
res
;
}
// Transforms automaton from transition based acceptance to state based
// acceptance.
void
make_state_acc
(
twa_graph_ptr
&
aut
)
{
unsigned
nst
=
aut
->
num_states
();
for
(
unsigned
s
=
0
;
s
<
nst
;
++
s
)
{
acc_cond
::
mark_t
acc
=
0U
;
for
(
auto
&
t
:
aut
->
out
(
s
))
acc
|=
t
.
acc
;
for
(
auto
&
t
:
aut
->
out
(
s
))
t
.
acc
=
acc
;
}
aut
->
prop_state_acc
(
true
);
}
// If the DNF is
// Fin(1)&Inf(2)&Inf(4) | Fin(2)&Fin(3)&Inf(1) |
// Inf(1)&Inf(3) | Inf(1)&Inf(2) | Fin(4)
...
...
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