Commit graph

380 commits

Author SHA1 Message Date
Alexandre Duret-Lutz
3c86f034fc Büchi translation should not go through fg_safety_to_dca_maybe()
Fixes #366, reported by Simon Jantsch.

* spot/twaalgos/translate.cc: type_&Generic will also match if
type_==BA... use type_==Generic instead.
* tests/core/unambig.test: Add a test corresponding to Simon's report.
* NEWS: Describe the bug.
2018-10-12 14:08:54 +02:00
Alexandre Duret-Lutz
82a152c38a unabbreviate: add new rules based on eventual/universal arguments
Based on a report by Simon Jantsch.  Fixes #362.

* NEWS, doc/tl/tl.tex: Mention the new rules.
* spot/tl/unabbrev.cc: Implement them.
* tests/core/unabbrevwm.test: Test them.
* tests/python/randltl.ipynb: Adjust.
2018-10-01 17:53:05 +02:00
Alexandre Duret-Lutz
eae05119e5 exclusive_ap::constrain does not improve determism
Fixes #363.

* spot/tl/exclusive.cc: Fix the prop_copy() call.
* tests/core/exclusive-tgba.test: Test it.
* NEWS: Mention the issue.
2018-09-26 11:35:19 +02:00
Alexandre Duret-Lutz
250e121a60 print_dot: add xlabel to colored states if too many colors in use
Based on a report from Andreas Tollkötter.

* spot/twaalgos/dot.cc (highlight_states_show_num_): New option,
turned on implicitly when more than 8 colors are used.
* tests/core/highlightstate.test: Test it.
* NEWS: Mention it.
* THANKS: Add Andreas.
2018-09-25 14:04:11 +02:00
Alexandre Duret-Lutz
389ef16b1b gcc-snapshot warnings
* spot/kripke/kripkegraph.hh, spot/priv/bddalloc.hh,
spot/priv/freelist.hh, spot/priv/satcommon.hh, spot/ta/taexplicit.cc
spot/twa/bdddict.cc, spot/twa/twagraph.hh,
spot/twaalgos/alternation.hh, spot/twaalgos/dtwasat.cc,
spot/twaalgos/ltl2taa.cc, spot/twaalgos/stutter.cc,
tests/core/ngraph.cc: Add default constructors, copy constructors, or
remove useless destructors.
2018-08-11 17:33:53 +02:00
Maximilien Colange
8d5d453efa ltlsynt: new algorithm, based on LAR
* bin/ltlsynt.cc: here
* tests/core/ltlsynt.test: test it
* NEWS: document it
2018-07-27 15:34:39 +02:00
Maximilien Colange
bd75ab5b39 ltlsynt: rework synthesis algorithms
ltlsynt now offers two algorithms: one where splitting occurs before
determinization (the historical one) and one where determinization
occurs before splitting.

* bin/ltlsynt.cc: here
* tests/core/ltlsynt.test: test it and refactor test file
* NEWS: document it
* spot/misc/game.hh, spot/misc/game.cc: remove Calude's algorithm
2018-07-27 14:22:11 +02:00
Alexandre Duret-Lutz
3303b86a89 ltl-split: translate any "safety" with "rest"
* tests/core/ltl2tgba2.test: Add a test-case reported by Maximilien.
* spot/twaalgos/translate.cc: Translate any "safety" formula with
"rest".
* tests/python/highlighting.ipynb: Adjust.
2018-07-26 18:17:13 +02:00
Alexandre Duret-Lutz
4b8910d3f9 ltlfilt: introduce --suspendable
* bin/ltlfilt.cc: Add the option.
* tests/core/ltlfilt.test: Use it.
* NEWS: Mention it.
2018-07-25 11:18:26 +02:00
Alexandre Duret-Lutz
e7aa334a71 tl: add support for X[n], F[n:m] and G[n:m]
* NEWS, doc/tl/tl.tex, doc/tl/tl.bib: Document these new operators.
* spot/parsetl/parsetl.yy, spot/parsetl/scantl.ll: Parse those.
* spot/tl/formula.cc, spot/tl/formula.hh: Add constructors.
* spot/gen/formulas.cc: Use it.
* tests/core/sugar.test: New file.
* tests/Makefile.am: Add it.
2018-07-06 21:53:10 +02:00
Alexandre Duret-Lutz
e48c6c40d0 ltl-split: deal with suspendable formulas that are false
Fixes #358.

* spot/twaalgos/translate.cc: Fix the assert().
* tests/core/ltl2tgba2.test: Add a test case.
2018-06-30 20:39:30 +02:00
Alexandre Duret-Lutz
c1b7497f84 gfguarantee: fix selection of moved init state
Fixes #357.

* spot/twaalgos/gfguarantee.cc: Decide that a moved init state is to
close from the terminal state *before* actually modifying the
automaton.
* tests/core/ltl2tgba2.test: Add a test.
2018-06-30 16:44:59 +02:00
Alexandre Duret-Lutz
f5f5daec9a translate: enable a restricted form of ltl-split for TGBA/BA
Fixes #267

* spot/twaalgos/gfguarantee.cc: Fix a typo when comparing automata
sizes.
* spot/twaalgos/translate.cc, spot/twaalgos/translate.hh: Use
ltl-split even for BA/TGBA, but only of conjunctions with GF(..)
in those cases.
* tests/core/ltl2tgba2.test: Adjust and add the example of #267.
* tests/core/degenid.test, tests/core/parity2.test,
tests/core/stutter-tgba.test, tests/python/automata.ipynb,
tests/python/highlighting.ipynb, tests/python/stutter-inv.ipynb,
bin/spot-x.cc: Adjust.
2018-06-28 23:02:26 +02:00
Alexandre Duret-Lutz
0a8c6479b7 translate: extract obligations terms when translating LTL to Parity
* spot/twaalgos/translate.cc: Here.
* NEWS: Mention the change.
* tests/core/genltl.test: Add parity automata sizes for a set of
formulas.
* tests/core/parity2.test: Add another formula to the tests.
2018-06-25 20:40:29 +02:00
Alexandre Duret-Lutz
a325de8678 postproc: simplify the acceptance condition
* spot/twaalgos/postproc.cc: Here.
* spot/twaalgos/cobuchi.cc, spot/twaalgos/totgba.cc: Fix some bug
uncovered by the new simplified automata.
* tests/core/satmin2.test, tests/core/sccdot.test,
tests/core/sim3.test, tests/python/decompose.ipynb,
tests/python/satmin.ipynb: Update expected results.
* NEWS: Mention the simplification and the bug.
2018-06-22 17:17:45 +02:00
Alexandre Duret-Lutz
621fb818e3 improve translation of ms-phi-h=2..3
* spot/twaalgos/gfguarantee.cc: Rework the history computation to keep
an overapproximation of the history, and a longer one.  Also replay
the history even if there is no initial trivial SCC.  This helps with
translating FG(!a|XXXb) where we need to keep the history of a, but we
were previously unable to do so because some state had both "a" and
"ab" as input.
* spot/twaalgos/translate.cc: Optimize the product of suspendable
automata by removing useless trivial SCCs.
* tests/core/genltl.test, tests/core/satmin.test, NEWS: Adjust
expected results.
2018-06-21 10:02:13 +02:00
Maximilien Colange
c9131aee72 add a pool allocator for STL containers
* spot/priv/allocator.hh, spot/priv/Makefile.am: add a STL-compliant
  allocator based on spot::fixed_size_pool
* spot/misc/fixpool.hh, spot/misc/fixpool.cc, spot/misc/Makefile.am:
  refactor the existing spot::fixed_size_pool
* spot/ltsmin/ltsmin.cc, spot/twa/twaproduct.cc: reflect changes in the
  interface of spot::fixed_size_pool
* tests/core/mempool.cc: test the new allocator
2018-06-20 14:26:45 +02:00
Maximilien Colange
3fe74f1cb9 make valgrind understand our memory pools
Annotate pools with valgrind macros so that it detects errors in pool
usage. Typically, we wish valgrind to detect a leak when the user fails
to call proper deallocation function.

* spot/misc/fixpool.hh, spot/misc/mspool.hh: here
* configure.ac: ensure that valgrind header exists
* tests/Makefile.am, tests/core/mempool.cc, tests/core/mempool.test,
  tests/core/.gitignore: add tests to ensure valgrind accurately detects
  leaks
2018-06-20 14:26:31 +02:00
Alexandre Duret-Lutz
4815a361de translate: add ltl-split option
* spot/twaalgos/translate.cc, spot/twaalgos/translate.hh: Build
automata with generic acceptance by doing product of automata for
smaller subformulas.
* bin/spot-x.cc: Mention ltl-split.
* NEWS: Mention the change, and show some results.
* tests/core/genltl.test, tests/python/_product_susp.ipynb,
tests/python/highlighting.ipynb: Adjust test cases.
* doc/org/ltl2tgba.org: Update.
* tests/core/gragsa.test: Add another formula to cover more
code.
2018-06-20 11:38:59 +02:00
Maximilien Colange
1183a935c7 fix a bug in aiger printer
* spot/twaalgos/aiger.cc: here
* tests/core/ltlsynt.test: add a non-regression test
2018-06-15 11:08:27 +02:00
Alexandre Duret-Lutz
fbc372e292 scc_filter: add quick test for very-weak
Related to issue #351.

* spot/twaalgos/sccfilter.cc: When handling weak automata, we know
they are very-weak if the SCC count is equal to the number of states.
* tests/core/dca2.test, tests/core/monitor.test,
tests/core/parity2.test, tests/core/randomize.test,
tests/core/readsave.test, tests/core/remfin.test,
tests/core/sccsimpl.test, tests/core/wdba2.test,
tests/python/dualize.py, tests/python/remfin.py: Adjust output.
2018-06-11 21:42:21 +02:00
Alexandre Duret-Lutz
95d732e331 specialize scc_filter for inherently_weak automata
Part of issue #351.

* spot/twaalgos/sccfilter.cc, spot/twaalgos/sccfilter.hh: Specialize
for inherently-weak automata.
* spot/twaalgos/postproc.cc: Simplify.
* tests/core/dca2.test, tests/core/parity2.test,
tests/core/prodor.test, tests/core/randomize.test,
tests/python/automata.ipynb, tests/python/highlighting.ipynb,
tests/python/product.ipynb, tests/python/remfin.py,
tests/python/stutter-inv.ipynb: Adjust.
* NEWS: Mention it.
2018-06-11 15:01:49 +02:00
Alexandre Duret-Lutz
1341c656be genltl: add --gf-equiv-xn, --gf-implies-xn
* spot/gen/formulas.cc, spot/gen/formulas.hh: Here.
* bin/genltl.cc: Add options.
* tests/core/genltl.test: Test them.
* NEWS: Mention them.
2018-06-08 15:51:11 +02:00
Alexandre Duret-Lutz
7e9325866f gf_guarantee_to_ba: save states using histories
This improves gf_guarantee_to_ba() on formulas GF(φ) where the
automaton for F(φ) as several leading transiant SCCs.  E.g.,
GF(a <-> XXXa) where we know get results that are as good as
those of delag without loosing on the cases where delag's technique
would actually produce two big automata.

* spot/twaalgos/gfguarantee.cc: Implement this.
* spot/twaalgos/gfguarantee.hh, NEWS: Document it.
* tests/core/ltl2tgba2.test, tests/core/ltl3ba.test: Add test cases.
2018-06-08 15:32:52 +02:00
Alexandre Duret-Lutz
ca1c67a73d simplifier: add two new rules
Fixes #354.

* spot/tl/simplify.cc: Implement the rules.
* doc/tl/tl.tex, NEWS: Document them.
* tests/core/reduccmp.test: Add tests.
* tests/core/det.test, tests/core/satmin.test: Adjust.
2018-06-05 08:48:40 +02:00
Alexandre Duret-Lutz
c535871ffd genltl: --ms-example now has two arguments
* bin/genltl.cc, spot/gen/formulas.cc, tests/core/genltl.test: Adjust.
* NEWS: Mention it.
2018-06-05 08:48:40 +02:00
Alexandre Duret-Lutz
2e50f9e986 autfilt: implement --has-univ-branching and --has-exist-branching
Fixes #352.

* bin/autfilt.cc: Add the options.
* tests/core/alternating.test: Test them.
* NEWS: Mention them.
2018-06-05 08:48:40 +02:00
Alexandre Duret-Lutz
939f63eec9 genltl: add support for --sejk-f=n,m
Together with the previous patch, this Fixes #353.

Implementing this required to extend our interface two support
two-parameter patterns.

* spot/gen/formulas.cc, spot/gen/formulas.hh: Implement it.
* bin/genltl.cc: Add --sejk-f.
* bin/common_output.cc, bin/common_output.hh: Adjust to handle
"line numbers" that are not integers (e.g., "3,2"), since those
are used to display pattern parameters.
* bin/ltlfilt.cc: Adjust.
* python/spot/gen.i: Add support for two-parameters patterns.
* tests/core/genltl.test, tests/python/gen.ipynb: Augment.
* NEWS: Mention it.
2018-06-05 08:48:40 +02:00
Alexandre Duret-Lutz
c76df95c69 genltl: three new families --sejk-{j,k,patterns}
These correspond to the first three blocks of table 1 in S. Sickert,
J. Esparza, S. Jaax, and J. Křetínský: Limit-Deterministic Büchi
Automata for Linear Temporal Logic.  CAV'16.  LNCS 9780.

For #353.

* spot/gen/formulas.cc, spot/gen/formulas.hh, bin/genltl.cc: Implement
the new families.
* tests/core/genltl.test: Test it.
* bin/man/genltl.x, NEWS: Document it.
2018-06-03 20:20:59 +02:00
Alexandre Duret-Lutz
e87d308eba improve alternation removal to match G&O construction
When dealternating the VWAA for GFa, our result had two states that
could not be fused by simulation because of unmatched acceptance mark.
With this change, the result can be simplified.

* spot/twaalgos/alternation.cc: Here.
* tests/core/alternating.test, tests/python/alternation.ipynb: Update
test case.
* NEWS: Mention it.
2018-06-01 10:59:37 +02:00
Alexandre Duret-Lutz
6d9d35c985 acc: turn some assertions into exceptions
* spot/misc/bitset.cc, spot/misc/bitset.hh (set, clear):
Turn asserts into exceptions.
* spot/twa/acc.hh (mark_t): As a consequence, the
constructor is not noexcept anymore.
* tests/core/acc.cc, tests/python/except.py: More tests.
2018-05-26 09:44:18 +02:00
Alexandre Duret-Lutz
b12eb0508f fix and check shifting issue
The exception raised by << and >> when shifting mark_t by too many
bits are only enabled in SPOT_DEBUG, as those operations are quite
low-level.  However we were always testing them, and although we
wanted them to be active in Python, it was not always the case.

* spot/twa/acc.hh: introduce max_accsets() as
a static constexpr method, so we can see it in Python.
* spot/misc/bitset.hh: Fix preprocessing directive
so the check is actually enabled when compiling the Python
bindings.
* bin/autcross.cc, bin/autfilt.cc, bin/ltlcross.cc: Use max_accsets().
* tests/core/acc.cc: Comment out the shifting exception when
SPOT_DEBUG is unset.
* tests/python/except.py: Make sure the exception is always raised in
Python.
2018-05-25 16:08:00 +02:00
Maximilien Colange
a9293f329e fix warnings when compiling without assertions
* spot/twa/acc.hh, spot/twaalgos/alternation.cc,
  spot/twaalgos/determinize.cc, spot/twaalgos/ndfs_result.hxx,
  spot/twaalgos/tau03.cc, spot/ltsmin/ltsmin.cc, tests/core/parity.cc:
  here
2018-05-25 14:41:18 +02:00
Maximilien Colange
5a819e0c93 twa_graph: add a method to merge states with same outgoing edges
* spot/twa/twagraph.hh, spot/twa/twagraph.cc: here
* NEWS: document it
* tests/core/twagraph.cc, tests/core/tgbagraph.test: test it
2018-05-25 12:09:04 +02:00
Alexandre Duret-Lutz
2e165f188d rename SPOT_NB_ACC to SPOT_MAX_ACCSETS
* NEWS, bin/autcross.cc, bin/autfilt.cc, bin/ltlcross.cc,
configure.ac, spot/parseaut/parseaut.yy, spot/twa/acc.cc,
spot/twa/acc.hh, tests/core/acc.cc, .gitlab-ci.yml: Here.
2018-05-24 22:18:42 +02:00
Alexandre Duret-Lutz
c87c13db67 autfilt: better handling of chain of products with -B
Fixes #348, reported by Jeroen Meijer.

* bin/autfilt.cc: If -B is used with many --product,
degeneralize intermediate products as needed.
* NEWS: Mention the change.
* tests/core/prodchain.test: New file.
* tests/Makefile.am: Add it.
* spot/twa/acc.cc, spot/twa/acc.hh: Fix reporting of
overflow.
* tests/core/acc.cc: Adjust.
2018-05-24 19:23:48 +02:00
Alexandre Duret-Lutz
a738801edf product: optimize product with weak automata
Fixes #350.

* spot/twaalgos/product.cc: Implement this change.
* NEWS, spot/twaalgos/product.hh: Mention it.
* spot/twa/acc.cc, spot/twa/acc.hh (acc_cond::sat_mark): New method.
* tests/python/_product_weak.ipynb: New file.
* tests/Makefile.am: Add it.
* tests/python/automata.ipynb, tests/python/highlighting.ipynb,
tests/python/product.ipynb, tests/core/prodor.test: Adjust test cases.
2018-05-23 22:07:50 +02:00
Maximilien Colange
b655038803 ltlsynt: improve coverage
* tests/core/ltlsynt.test: here
2018-05-23 18:40:15 +02:00
Maximilien Colange
61b2b9b140 genltl: improve coverage
* tests/core/genltl.test: here
* spot/gen/formulas.cc: typo
2018-05-23 17:32:54 +02:00
Maximilien Colange
321230f869 ltlfilt: improve coverage
* tests/core/ltlfilt.test: here
2018-05-23 12:01:43 +02:00
Maximilien Colange
1a4117a07f randltl: fix option --allow-dups
* bin/randltl.cc: here
* tests/core/rand.test: test it
* NEWS: document it
2018-05-23 12:01:43 +02:00
Maximilien Colange
c6c085ab22 various fixes to bitset
* spot/misc/bitset.hh: here
* tests/core/acc.cc: test it
2018-05-23 10:02:43 +02:00
Maximilien Colange
65a56f4cef improve coverage
* tests/core/acc.cc: here
* tests/core/acc.test: fix test invokation
2018-05-22 12:16:43 +02:00
Maximilien Colange
6f057941ce better coverage for ltlsynt
* tests/core/ltlsynt.test: here
2018-05-22 11:26:31 +02:00
Maximilien Colange
d7ee23ed2f acc_cond::mark_t now relies on bitset
This allows to represent more than 32 acceptance marks.

* configure.ac: add an option to specify the number of marks
* spot/twa/acc.hh: implement it
* tests/python/acc_cond.ipynb, tests/core/acc.cc,
  tests/core/ltlcross3.test: update tests
* NEWS: document it
* bin/randltl.cc: fix an include
2018-05-22 09:54:19 +02:00
Maximilien Colange
1aaeccf1d3 remove parity_product and parity_product_or
* NEWS: document it
* spot/twaalgos/parity.cc, spot/twaalgos/parity.hh,
  tests/core/parity.cc: here
2018-05-22 09:54:13 +02:00
Alexandre Duret-Lutz
924a642939 * tests/core/randtgba.cc: Remove code related to random formulas. 2018-05-21 17:39:38 +02:00
Alexandre Duret-Lutz
6e8af75ee9 autcross: exercise %S, %L, and {name{nest}}
* tests/core/autcross.test, tests/core/autcross2.test: More tests.
2018-05-21 17:39:38 +02:00
Alexandre Duret-Lutz
c369f899a3 bin: teach conversion options to report about the options
* bin/common_conv.cc, bin/common_conv.hh: Here.
* bin/autfilt.cc, bin/common_trans.cc, bin/ltlcross.cc, bin/ltldo.cc,
bin/ltlfilt.cc, bin/ltlgrind.cc, bin/randaut.cc, bin/randltl.cc: Pass
the name of the argumennt to the conversion function.
* tests/core/ltlcross3.test, tests/core/ltldo.test,
tests/core/randaut.test: Add test cases.
2018-05-21 17:39:38 +02:00
Alexandre Duret-Lutz
1f9f3c77ea bin: abort autcross on input parse error
* bin/common_hoaread.hh (hoa_processor): Add a abort_on_error
option.
* bin/autcross.cc: Use it.
* tests/core/autcross4.test: Add many more error cases to improve
coverage.
2018-05-21 17:39:38 +02:00