* src/ltlvisit/simplify.cc: Remove two incorrect rules, and
partially disable another one.
* doc/tl/tl.tex: Reflect the change.
* src/ltltest/reduccmp.test: Likewise.
* src/ltltest/equals.cc: Add safety checks to catch such errors in the
future.
* NEWS: Mention the bug.
* src/ltlvisit/tostring.cc, src/ltlvisit/tostring.hh
(to_latex_string): New function.
* src/bin/common_output.cc, src/bin/common_output.hh:
Add a --latex option.
* doc/tl/spotltl.sty: New file.
* doc/tl/Makefile.am: Distribute it.
* src/ltltest/latex.test: New test.
* src/ltltest/Makefile.am: Add it.
* NEWS: Mention it.
This follows from a discussion with Ernesto Posse.
The semantics for the {...} operator we use in Spot comes from the
cl(...) operator defined by Dax et al. (ATVA'09). This is slightly
different from the the way the PSL spec interprets a SERE used in the
context of a temporal formula (appendix B.3.1.1.2, item 7).
cl({a;b}[*]) would match any infinite word that starts with a;b, while
in PSL {a;b}[*] would match any infinite word that alternates a and b.
Spot documents that {SERE} in a temporal formula is interpreted like
cl(SERE) however it failed to ignore the empty prefix of SERE. So
{{a;b}[*]} would match anything, because the empty word is a prefix of
any word, and is also accepted by {a;b}[*]. Some trivial identities
and basic rewritings were also wrongly considering these empty
prefixes as well.
This patch therefore fixes the translation and syntactic
simplification rules, to really ignore these empty prefixes.
In some future version it should probably be wise to rename this {...}
operator as cl(...), and use {...} for the semantics given in appendix
B.3.1.1.2 (item 7) of the PSL specs.
* src/ltlast/unop.cc: Fix trivial identities. We have
{[*0]} = 0 and !{[*0]} = 1.
* src/ltlvisit/simplify.cc: Fix basic rewriting rules.
{e[*]} = {e} and !{e[*]} = !{e}.
* doc/tl/tl.tex: Adjust documentation.
* doc/tl/tl.bib (dax.09.atva): New entry.
* src/tgbaalgos/ltl2tgba_fm.cc: Do not accept any
infinite word for {e[*]} just because the empty
prefix is matched by e[*].
* src/tgbatest/ltl2tgba.test: Add a test case.
* NEWS: Mention it.
* THANKS: Add Ernesto.
The set of rules enabled by favor_even_univ try to "lift" the
subformulae that are both eventual and universal, so they appear
higher in the AST. This is contrary to what we used to do (and still
do when the option is unset), were we try to postpone such subformulae
(by moving them down the AST). It is still a bit experimental.
* src/ltlvisit/simplify.hh: Add option favor_event_univ.
* src/ltlvisit/simplify.cc: Implement new rewriting rules.
* doc/tl/tl.tex: Document them.
* src/tgbatest/ltl2tgba.cc: Add option -ra to enable them.
* src/tgbatest/spotlbtt.test: Test the translation with this option.
* src/ltltest/reduc.cc, src/ltltest/equals.cc: Add option
to enable the new rules.
* src/ltltest/eventuniv.test: New file to test them.
* src/ltltest/Makefile.am: Add it.
* src/ltlast/formula.hh (has_lbt_atomic_props): New method.
* src/ltlast/formula.cc (printprops): Display it.
* src/ltlast/atomic_prop.cc: Update it.
* src/bin/ltlcheck.cc, src/bin/genltl.cc: Use it.
* doc/tl/tl.tex: Menton has_lbt_atomic_props().
This somehow revert changes from 2010-01-30 which killed this use of
star to make room for the Kleen star. Here we only allow '*' in the
temporal formula, so that it can still be the Kleen star in SERE. The
motivation for '*' available as And is better compatibility with Wring
and VIS.
* src/ltlparse/ltlscan.ll: Distinguish * from [*].
* src/ltlparse/ltlparse.yy: Allows * to be used as AND between
temporal formulae.
* src/ltltest/equals.test, src/ltltest/parse.test: Add a few
tests.
* doc/tl/tl.tex: Document it.
We need a marked version of !{r} to perform breakpoint unroling.
* src/ltlast/unop.cc, src/ltlast/unop.hh: Declare a NegClosureMarked
operator.
* src/ltlvisit/mark.hh, src/ltlvisit/mark.cc,
src/tgbaalgos/ltl2tgba_fm.cc: Adjust to deal with NegClosureMarked
and NegClosure as apropriate.
* src/ltlvisit/simplify.cc, src/ltlvisit/tostring.cc,
src/ltlvisit/tunabbrev.cc, src/tgbaalgos/eltl2tgba_lacim.cc,
src/tgbaalgos/ltl2taa.cc, src/tgbaalgos/ltl2tgba_lacim.cc,
src/tgba/formula2bdd.cc: Deal with NegClosureMarked in the same way as
we deal with NegClosure.
* src/tgbatest/ltl2tgba.test: More tests.
* src/ltltest/kind.test: Adjust.
* doc/tl/tl.tex: Mention the marked negated closure.
* src/ltlvisit/wmunabbrev.hh, src/ltlvisit/wmunabbrev.cc: New files.
* src/ltlvisit/Makefile.am: Add them.
* src/ltlvisit/tostring.cc (to_spin_string): Use the new rewriting.
* wrap/python/ajax/spot.in: Warn when a "Spin" still contain PSL
operators.
* wrap/python/ajax/ltl2tgba.html: Adjust help text.
* doc/tl/tl.tex, NEWS: Document the new rewriting.
* src/ltlparse/ltlscan.ll: Understand the combining overline, and
combining overbar as synonym for =0.
* src/ltlvisit/tostring.cc: Emit a combining overline for
single-letter atomic propositions.
* src/ltlast/atomic_prop.hh (is_atomic_prop): New function.
* doc/tl/tl.tex: Document these two characters.
* src/ltlparse/ltlparse.yy: Make all the above operators
right-associative. Also let `:' have precedence over `;'.
* src/ltltest/reduccmp.test: Adjust for the `:' precedence.
* doc/tl/tl.tex, NEWS: Document this.
* src/ltlvisit/simplify.cc (reduce_sere_ltl): New function,
to factor the code of the []-> and <>-> rewrittings.
* src/ltltest/reduccmp.test: Add more tests.
* doc/tl/tl.tex: Document these rewritings.
* src/ltlvisit/simplify.cc: Here.
* doc/tl/tl.tex: Document then.
* src/ltlast/bunop.hh (as_KleenStar): New helper function.
* src/ltltest/reduccmp.test: Add more tests.
* src/ltltest/reduc.cc: Also display the resulting formula
without reduce_size_stricly.
* src/ltlvisit/snf.cc, src/ltlvisit/snf.hh: New files.
* src/ltlvisit/Makefile.am: Distribute them.
* src/ltlvisit/simplify.cc, src/ltlvisit/simplify.hh: Call snf(f) for
all f[*].
* src/ltltest/reduccmp.test: Test it.
* doc/tl/tl.tex, doc/tl/tl.bib: Document it.
* src/ltlast/bunop.hh (one_star): New static method building 1[*].
* src/ltlast/bunop.cc (bunop::~bunop, bunop::instance_count): Adjust.
* src/ltlast/multop.cc: Implement the trivial rewriting.
* src/ltlast/multop.hh, doc/tl/tl.tex: Document it.
* src/ltltest/equals.test: Test it.
Especially, 1&f and 1:f were mistakenly always reduced to f, which is
incorrect when f accept the empty word.
* src/ltlast/multop.cc: Here.
* src/ltlast/multop.hh, doc/tl/tl.tex: Adjust documentation.
* src/ltltest/equals.test: Add more tests.
* src/ltlast/bunop.hh, src/ltlast/bunop.cc, src/ltlvisit/randomltl.cc,
src/ltlvisit/simplify.cc, src/ltlvisit/tostring.cc,
src/tgbaalgos/ltl2tgba_fm.cc: Remove all traces of these two
operators since they are not handled like sugar.
* doc/tl/tl.tex: Adjust documentation to reflect the fact that these
two operators are sugar.
* src/ltlast/multop.hh (is_multop): Take a constant formula as input.
* src/ltlvisit/tostring.cc (to_string_visitor::visit(multop*)):
Output []=> or <>=> when the left argument of a []-> or <>-> is
a concatenation that ends in 1.
* doc/tl/tl.tex: Document this desugaring.
* src/ltlast/multop.hh, src/ltlast/multop.cc (all_but): New method
used to simplify the removal of one element of a multop.
* src/ltlvisit/simplify.cc: Implement the new rewriting rules.
* doc/tl/tl.tex: Document them.
* src/ltltest/reduccmp.test: Test them.
* src/ltlvisit/simplify.hh (ltl_simplifier_options): New option
reduce_size_stricly.
* src/ltlvisit/simplify.cc (simplify_visitor): Implement these
rules.
* src/ltltest/reduc.cc: Check with reduce_size_strictly unset or
set, but only use the latter result to check sizes.
* src/ltltest/reduccmp.test: Test them.
* doc/tl/tl.tex: Document them.
The actual rules are a bit more complex:
a & X(G(a&b...)&c...) = Ga & X(G(b...)&c...)
a | X(Fa | c) = F(a) | c
with the second rule being applied only if all XF can
be removed. See the documentation for an example.
* src/ltlvisit/simplify.cc: Implement these new rules.
* doc/tl/tl.tex: Document them.
* src/ltltest/reduccmp.test: Add test cases.
* src/ltlvisit/simplify.cc: Implement them here, and augment them
to support M, and W operators.
* src/ltltest/reduccmp.test: Add some tests.
* doc/tl/tl.tex (Simplifications Based on Implications): Document
these rules.
* doc/tl/tl.bib (babiak.12.tacas): New entry.