Ignore sub-"SERE" that have been proved useless already.

* src/tgbaalgos/ltl2tgba_fm.cc (ratexp_to_dfa::translate): Do not
translate a subformula if we have already proved it useless in
a previous rational expression.
* src/tgbatest/ltl2tgba.test: Add an example, although that
test does not ensure the subformula is ignored early in the
translation.  I.e., it would still work without the patch.
This commit is contained in:
Alexandre Duret-Lutz 2011-11-12 23:10:40 +01:00
parent b6702fc23a
commit 098e121a36
2 changed files with 12 additions and 0 deletions

View file

@ -103,6 +103,10 @@ check_psl '{[*]; start && comp_data_en; !comp_data_en && good_comp;
# before it is used in the translation.
check_psl '{{b[*];c} | {{a && !a}}[=2]}'
check_psl '{((a&!b);((!a&!b)*))&&(!b*;(!a&b))}'
# When translating this formula, we expect the translator to ignore
# `a;(f&!f)[=2];c' on one side because it as already seen it on the
# other side.
check_psl '{c;a;(f&!f)[=2];c}|{b;a;(!f&f)[=2];c}'
# Make sure 'a U (b U c)' has 3 states and 6 transitions,
# before and after degeneralization.