acc: make &= and |= symmetrical
Operator &= used to always move Fin to the front, it does not anymore.
The only thing it does now is to merge Inf(x)&Inf(y) as Inf({x,y}).
Operator |= is now symmetrical and merges Fin()s.
Fixes #253.
* spot/twa/acc.cc, spot/twa/acc.hh: Simplify &= and make |= symmetrical.
* spot/twaalgos/cleanacc.cc: Fix conjunction order.
* tests/core/acc.test, tests/core/acc2.test, tests/core/parseaut.test,
tests/core/readsave.test, tests/core/satmin2.test,
tests/core/sccdot.test, tests/python/acc_cond.ipynb,
tests/python/accparse.ipynb, tests/python/automata.ipynb,
tests/python/product.ipynb, tests/python/randaut.ipynb: Adjust test
cases.
This commit is contained in:
parent
8e685e00c9
commit
abe2c08b78
15 changed files with 254 additions and 295 deletions
|
|
@ -193,8 +193,7 @@ namespace spot
|
|||
for (auto m: seen_fin.sets())
|
||||
inf.front().mark -= complement[m];
|
||||
|
||||
res &= inf;
|
||||
return res;
|
||||
return inf & res;
|
||||
}
|
||||
case acc_cond::acc_op::Or:
|
||||
{
|
||||
|
|
@ -225,8 +224,7 @@ namespace spot
|
|||
for (auto m: seen_inf.sets())
|
||||
fin.front().mark -= complement[m];
|
||||
|
||||
res |= fin;
|
||||
return res;
|
||||
return res | fin;
|
||||
}
|
||||
case acc_cond::acc_op::Fin:
|
||||
return acc_cond::acc_code::fin(pos[-1].mark);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue