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
59dc4a98
Commit
59dc4a98
authored
Jun 14, 2012
by
Alexandre Duret-Lutz
Browse files
* src/tgbaalgos/degen.cc: Use a small map instead of merge_transitions.
parent
509fb7e2
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/tgbaalgos/degen.cc
View file @
59dc4a98
...
...
@@ -191,6 +191,14 @@ namespace spot
// and vice-versa.
ds2num_map
ds2num
;
// This map is used to find transitions that go to the same
// destination with the same acceptance. The integer key is
// (dest*2+acc) where dest is the destination state number, and
// acc is 1 iff the transition is accepting. The source
// is always that of the current iteration.
typedef
std
::
map
<
int
,
state_explicit_number
::
transition
*>
tr_cache_t
;
tr_cache_t
tr_cache
;
queue_t
todo
;
const
state
*
s0
=
uniq
(
a
->
get_init_state
());
...
...
@@ -333,20 +341,28 @@ namespace spot
todo
.
push_back
(
d
);
}
// Actually create the transition.
state_explicit_number
::
transition
*
t
=
res
->
create_transition
(
src
,
dest
);
t
->
condition
=
i
->
current_condition
();
// If the source state is accepting, we have to put
// degen_acc on all outgoing transitions. (We are still
// building a TGBA; we only assure that it can be used as
// an SBA.)
t
->
acceptance_conditions
=
is_acc
?
degen_acc
:
bddfalse
;
state_explicit_number
::
transition
*&
t
=
tr_cache
[
dest
*
2
+
is_acc
];
if
(
t
==
0
)
{
// Actually create the transition.
t
=
res
->
create_transition
(
src
,
dest
);
t
->
condition
=
i
->
current_condition
();
// If the source state is accepting, we have to put
// degen_acc on all outgoing transitions. (We are still
// building a TGBA; we only assure that it can be used as
// an SBA.)
t
->
acceptance_conditions
=
is_acc
?
degen_acc
:
bddfalse
;
}
else
{
t
->
condition
|=
i
->
current_condition
();
}
}
delete
i
;
tr_cache
.
clear
();
}
res
->
merge_transitions
();
return
res
;
}
}
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