diff --git a/NEWS b/NEWS index da24bdc1b..ca895bdca 100644 --- a/NEWS +++ b/NEWS @@ -24,6 +24,9 @@ New in spot 2.2.1.dev (Not yet released) spot/misc/mspool.hh, spot/twaalgos/emptiness_stats.hh) were not self-contained. + * ltlfilt --from-ltlf should ensure that "alive" holds initially in + order to reject empty traces. + New in spot 2.2.1 (2016-11-21) Bug fix: diff --git a/THANKS b/THANKS index 99800934b..98d23b3d5 100644 --- a/THANKS +++ b/THANKS @@ -29,6 +29,7 @@ Nikos Gorogiannis Reuben Rowe Rüdiger Ehlers Silien Hong +Shufang Zhu Sonali Dutta Tomáš Babiak Valentin Iovene diff --git a/spot/tl/ltlf.cc b/spot/tl/ltlf.cc index dcdcc68bd..74532eabb 100644 --- a/spot/tl/ltlf.cc +++ b/spot/tl/ltlf.cc @@ -37,6 +37,10 @@ namespace spot // the IJCAI'13 paper by De Giacomo & Vardi has a typo. // t(a U b) should be equal to t(a) U t(b & alive). // This typo is fixed in the Memocode'14 paper by Dutta & Vardi. + // + // (However beware that the translation given in the + // Memocode'14 paper forgets to ensure that alive holds + // initially, as required in the IJCAI'13 paper.) case op::U: return formula::U(t(f[0]), formula::And({alive, t(f[1])})); case op::R: @@ -60,7 +64,7 @@ namespace spot auto al = ((*alive == '!') ? formula::Not(formula::ap(alive + 1)) : formula::ap(alive)); - return formula::And({from_ltlf_aux(f, al), + return formula::And({from_ltlf_aux(f, al), al, formula::U(al, formula::G(formula::Not(al)))}); } } diff --git a/spot/tl/ltlf.hh b/spot/tl/ltlf.hh index 385ed1c12..4235590c6 100644 --- a/spot/tl/ltlf.hh +++ b/spot/tl/ltlf.hh @@ -35,7 +35,7 @@ namespace spot /// finite word. The formula is rewritten to ensure that the /// eventualities occur during the "alive" portion. For instance /// a U b becomes - /// (a U (b & alive))&(alive U G!alive). + /// alive&(a U (b & alive))&(alive U G!alive). /// /// The \a alive argument can be used to change the name of the /// atomic property used to introduce. Additionally if \a alive is diff --git a/tests/core/ltlfilt.test b/tests/core/ltlfilt.test index 0ccaa3a36..5c24e866b 100755 --- a/tests/core/ltlfilt.test +++ b/tests/core/ltlfilt.test @@ -182,30 +182,30 @@ EOF run 0 ltlfilt --ltl formulas > formulas2 mv formulas2 formulas -checkopt --ltl --from-ltlf <in <