partial_degeneralization: generalize to terms that contain todegen
* spot/twaalgos/degen.cc: Implement this. * tests/python/pdegen.py: Add tests.
This commit is contained in:
parent
b733d486be
commit
8df616ee0d
2 changed files with 91 additions and 15 deletions
|
|
@ -767,10 +767,14 @@ namespace spot
|
|||
SPOT_FALLTHROUGH;
|
||||
case acc_cond::acc_op::Inf:
|
||||
case acc_cond::acc_op::InfNeg:
|
||||
pos -= 2;
|
||||
if (code[pos].mark != todegen)
|
||||
tostrip -= code[pos].mark;
|
||||
break;
|
||||
{
|
||||
pos -= 2;
|
||||
acc_cond::mark_t m = code[pos].mark;
|
||||
if (todegen.subset(m))
|
||||
m -= todegen;
|
||||
tostrip -= m;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
while (pos > 0);
|
||||
|
|
@ -812,17 +816,21 @@ namespace spot
|
|||
SPOT_FALLTHROUGH;
|
||||
case acc_cond::acc_op::Inf:
|
||||
case acc_cond::acc_op::InfNeg:
|
||||
pos -= 2;
|
||||
if (code[pos].mark == todegen)
|
||||
{
|
||||
code[pos].mark = accmark;
|
||||
updated = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
code[pos].mark = code[pos].mark.strip(tostrip);
|
||||
}
|
||||
break;
|
||||
{
|
||||
pos -= 2;
|
||||
acc_cond::mark_t m = code[pos].mark;
|
||||
if (todegen.subset(m))
|
||||
{
|
||||
m -= todegen;
|
||||
code[pos].mark = m.strip(tostrip) | accmark;
|
||||
updated = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
code[pos].mark = m.strip(tostrip);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
while (pos > 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue