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
b318b151
Commit
b318b151
authored
Sep 11, 2013
by
Alexandre Duret-Lutz
Browse files
satmin: ignore (s,l,d2) if (s,l,d1) is already in result
* src/tgbaalgos/dtbasat.cc, src/tgbaalgos/dtgbasat.cc: Here.
parent
90a466d6
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/tgbaalgos/dtbasat.cc
View file @
b318b151
...
...
@@ -95,6 +95,32 @@ namespace spot
}
};
struct
src_cond
{
int
src
;
bdd
cond
;
src_cond
(
int
src
,
bdd
cond
)
:
src
(
src
),
cond
(
cond
)
{
}
bool
operator
<
(
const
src_cond
&
other
)
const
{
if
(
this
->
src
<
other
.
src
)
return
true
;
if
(
this
->
src
>
other
.
src
)
return
false
;
return
this
->
cond
.
id
()
<
other
.
cond
.
id
();
}
bool
operator
==
(
const
src_cond
&
other
)
const
{
return
(
this
->
src
==
other
.
src
&&
this
->
cond
.
id
()
==
other
.
cond
.
id
());
}
};
struct
state_pair
{
int
a
;
...
...
@@ -678,6 +704,7 @@ namespace spot
dout
<<
"--- transition variables ---
\n
"
;
std
::
set
<
int
>
acc_states
;
std
::
set
<
src_cond
>
seen_trans
;
for
(
sat_solution
::
const_iterator
i
=
solution
.
begin
();
i
!=
solution
.
end
();
++
i
)
{
...
...
@@ -694,17 +721,22 @@ namespace spot
if
(
t
!=
satdict
.
revtransid
.
end
())
{
last_aut_trans
=
a
->
create_transition
(
t
->
second
.
src
,
t
->
second
.
dst
);
last_aut_trans
->
condition
=
t
->
second
.
cond
;
last_sat_trans
=
&
t
->
second
;
// Skip (s,l,d2) if we have already seen some (s,l,d1).
if
(
seen_trans
.
insert
(
src_cond
(
t
->
second
.
src
,
t
->
second
.
cond
)).
second
)
{
last_aut_trans
=
a
->
create_transition
(
t
->
second
.
src
,
t
->
second
.
dst
);
last_aut_trans
->
condition
=
t
->
second
.
cond
;
last_sat_trans
=
&
t
->
second
;
dout
<<
v
<<
"
\t
"
<<
t
->
second
<<
"δ
\n
"
;
dout
<<
v
<<
"
\t
"
<<
t
->
second
<<
"δ
\n
"
;
// Mark the transition as accepting if the source is.
if
(
state_based
&&
acc_states
.
find
(
t
->
second
.
src
)
!=
acc_states
.
end
())
last_aut_trans
->
acceptance_conditions
=
acc
;
// Mark the transition as accepting if the source is.
if
(
state_based
&&
acc_states
.
find
(
t
->
second
.
src
)
!=
acc_states
.
end
())
last_aut_trans
->
acceptance_conditions
=
acc
;
}
}
else
{
...
...
src/tgbaalgos/dtgbasat.cc
View file @
b318b151
...
...
@@ -96,6 +96,32 @@ namespace spot
}
};
struct
src_cond
{
int
src
;
bdd
cond
;
src_cond
(
int
src
,
bdd
cond
)
:
src
(
src
),
cond
(
cond
)
{
}
bool
operator
<
(
const
src_cond
&
other
)
const
{
if
(
this
->
src
<
other
.
src
)
return
true
;
if
(
this
->
src
>
other
.
src
)
return
false
;
return
this
->
cond
.
id
()
<
other
.
cond
.
id
();
}
bool
operator
==
(
const
src_cond
&
other
)
const
{
return
(
this
->
src
==
other
.
src
&&
this
->
cond
.
id
()
==
other
.
cond
.
id
());
}
};
struct
transition_acc
{
int
src
;
...
...
@@ -875,6 +901,7 @@ namespace spot
dout
<<
"--- transition variables ---
\n
"
;
std
::
map
<
int
,
bdd
>
state_acc
;
std
::
set
<
src_cond
>
seen_trans
;
for
(
sat_solution
::
const_iterator
i
=
solution
.
begin
();
i
!=
solution
.
end
();
++
i
)
{
...
...
@@ -891,19 +918,24 @@ namespace spot
if
(
t
!=
satdict
.
revtransid
.
end
())
{
last_aut_trans
=
a
->
create_transition
(
t
->
second
.
src
,
t
->
second
.
dst
);
last_aut_trans
->
condition
=
t
->
second
.
cond
;
last_sat_trans
=
&
t
->
second
;
// Skip (s,l,d2) if we have already seen some (s,l,d1).
if
(
seen_trans
.
insert
(
src_cond
(
t
->
second
.
src
,
t
->
second
.
cond
)).
second
)
{
last_aut_trans
=
a
->
create_transition
(
t
->
second
.
src
,
t
->
second
.
dst
);
last_aut_trans
->
condition
=
t
->
second
.
cond
;
last_sat_trans
=
&
t
->
second
;
dout
<<
v
<<
"
\t
"
<<
t
->
second
<<
"δ
\n
"
;
dout
<<
v
<<
"
\t
"
<<
t
->
second
<<
"δ
\n
"
;
if
(
state_based
)
{
std
::
map
<
int
,
bdd
>::
const_iterator
i
=
state_acc
.
find
(
t
->
second
.
src
);
if
(
i
!=
state_acc
.
end
())
last_aut_trans
->
acceptance_conditions
=
i
->
second
;
if
(
state_based
)
{
std
::
map
<
int
,
bdd
>::
const_iterator
i
=
state_acc
.
find
(
t
->
second
.
src
);
if
(
i
!=
state_acc
.
end
())
last_aut_trans
->
acceptance_conditions
=
i
->
second
;
}
}
}
else
...
...
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