twacube: fix erroneous translation

* spot/twacube_algos/convert.cc,
tests/core/twacube.test: Here.
This commit is contained in:
Etienne Renault 2020-05-07 14:07:27 +02:00
parent 89675a2762
commit 85ff53c45e
2 changed files with 10 additions and 18 deletions

View file

@ -98,23 +98,17 @@ namespace spot
// Special case for bddfalse // Special case for bddfalse
if (cond == bddfalse) if (cond == bddfalse)
continue;
// Split the bdd into multiple transitions
while (cond != bddfalse)
{ {
spot::cube cube = tg->get_cubeset().alloc(); bdd one = bdd_satone(cond);
for (unsigned int i = 0; i < cs.size(); ++i) cond -= one;
cs.set_false_var(cube, i); // FIXME ! use fill! spot::cube cube =spot::satone_to_cube(one, cs, ap_binder);
tg->create_transition(st_binder[n], cube, tg->create_transition(st_binder[n], cube, t.acc,
t.acc, st_binder[t.dst]); st_binder[t.dst]);
} }
else
// Split the bdd into multiple transitions
while (cond != bddfalse)
{
bdd one = bdd_satone(cond);
cond -= one;
spot::cube cube =spot::satone_to_cube(one, cs, ap_binder);
tg->create_transition(st_binder[n], cube, t.acc,
st_binder[t.dst]);
}
} }
// Must be contiguous to support swarming. // Must be contiguous to support swarming.
assert(tg->succ_contiguous()); assert(tg->succ_contiguous());

View file

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# Copyright (C) 2014, 2015, 2016, 2018 Laboratoire de Recherche et # Copyright (C) 2014, 2015, 2016, 2018, 2020 Laboratoire de Recherche et
# Développement de l'Epita (LRDE). # Développement de l'Epita (LRDE).
# #
# This file is part of Spot, a model checking library. # This file is part of Spot, a model checking library.
@ -51,7 +51,6 @@ digraph "" {
} }
----------- -----------
init : 0 init : 0
0->0 : !p1&!p2 {}
0->1 : p1 {} 0->1 : p1 {}
0->2 : p2 {1} 0->2 : p2 {1}
1->2 : p1&p2 {0} 1->2 : p1&p2 {0}
@ -72,7 +71,6 @@ digraph "" {
I [label="", style=invis, width=0] I [label="", style=invis, width=0]
I -> 0 I -> 0
0 [label="0"] 0 [label="0"]
0 -> 0 [label="!p1 & !p2"]
0 -> 1 [label="p1"] 0 -> 1 [label="p1"]
0 -> 2 [label="p2\n{1}"] 0 -> 2 [label="p2\n{1}"]
1 [label="1"] 1 [label="1"]