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
cbca22d1
Commit
cbca22d1
authored
Aug 10, 2014
by
Alexandre Duret-Lutz
Browse files
* src/taalgos/minimize.cc: Replace tgba_explicit_number by tgba_digraph.
parent
57e7bbb3
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/taalgos/minimize.cc
View file @
cbca22d1
...
...
@@ -35,7 +35,7 @@
#include
"misc/bddlt.hh"
#include
"ta/tgtaexplicit.hh"
#include
"taalgos/statessetbuilder.hh"
#include
"tgba/tgba
explicit
.hh"
#include
"tgba/tgba
graph
.hh"
#include
"tgba/bddprint.hh"
namespace
spot
...
...
@@ -74,7 +74,7 @@ namespace spot
// automaton
static
void
build_result
(
const
ta
*
a
,
std
::
list
<
hash_set
*>&
sets
,
tgba_
explicit_number
*
result_tgba
,
ta_explicit
*
result
)
tgba_
digraph
*
result_tgba
,
ta_explicit
*
result
)
{
// For each set, create a state in the tgbaulting automaton.
// For a state s, state_num[s] is the number of the state in the minimal
...
...
@@ -88,6 +88,7 @@ namespace spot
hash_set
*
h
=
*
sit
;
for
(
hit
=
h
->
begin
();
hit
!=
h
->
end
();
++
hit
)
state_num
[
*
hit
]
=
num
;
result_tgba
->
new_state
();
++
num
;
}
...
...
@@ -102,7 +103,6 @@ namespace spot
const
state
*
src
=
*
hit
;
unsigned
src_num
=
state_num
[
src
];
state
*
tgba_state
=
result_tgba
->
add_state
(
src_num
);
bdd
tgba_condition
=
bddtrue
;
bool
is_initial_state
=
a
->
is_initial_state
(
src
);
if
((
a
->
get_artificial_initial_state
()
==
0
)
&&
is_initial_state
)
...
...
@@ -112,7 +112,7 @@ namespace spot
a
->
is_livelock_accepting_state
(
src
);
state_ta_explicit
*
new_src
=
new
state_ta_explicit
(
tgba
_
state
,
new
state_ta_explicit
(
result_
tgba
->
state
_from_number
(
src_num
)
,
tgba_condition
,
is_initial_state
,
is_accepting_state
,
is_livelock_accepting_state
);
...
...
@@ -143,7 +143,6 @@ namespace spot
if
(
i
==
state_num
.
end
())
// Ignore useless destinations.
continue
;
state
*
tgba_state
=
result_tgba
->
add_state
(
i
->
second
);
bdd
tgba_condition
=
bddtrue
;
is_initial_state
=
a
->
is_initial_state
(
dst
);
if
((
a
->
get_artificial_initial_state
()
==
0
)
&&
is_initial_state
)
...
...
@@ -153,7 +152,7 @@ namespace spot
a
->
is_livelock_accepting_state
(
dst
);
state_ta_explicit
*
new_dst
=
new
state_ta_explicit
(
tgba
_
state
,
new
state_ta_explicit
(
result_
tgba
->
state
_from_number
(
i
->
second
)
,
tgba_condition
,
is_initial_state
,
is_accepting_state
,
is_livelock_accepting_state
);
...
...
@@ -487,10 +486,9 @@ namespace spot
minimize_ta
(
const
ta
*
ta_
)
{
tgba_explicit_number
*
tgba
=
new
tgba_explicit_number
(
ta_
->
get_dict
());
ta_explicit
*
res
=
new
ta_explicit
(
tgba
,
ta_
->
all_acceptance_conditions
(),
0
,
/* own_tgba = */
true
);
auto
tgba
=
new
tgba_digraph
(
ta_
->
get_dict
());
auto
res
=
new
ta_explicit
(
tgba
,
ta_
->
all_acceptance_conditions
(),
0
,
/* own_tgba = */
true
);
partition_t
partition
=
build_partition
(
ta_
);
...
...
@@ -509,11 +507,9 @@ namespace spot
minimize_tgta
(
const
tgta_explicit
*
tgta_
)
{
tgba_explicit_number
*
tgba
=
new
tgba_explicit_number
(
tgta_
->
get_dict
());
tgta_explicit
*
res
=
new
tgta_explicit
(
tgba
,
tgta_
->
all_acceptance_conditions
(),
0
,
/* own_tgba = */
true
);
auto
tgba
=
new
tgba_digraph
(
tgta_
->
get_dict
());
auto
res
=
new
tgta_explicit
(
tgba
,
tgta_
->
all_acceptance_conditions
(),
0
,
/* own_tgba = */
true
);
const
ta_explicit
*
ta
=
tgta_
->
get_ta
();
...
...
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