Commit graph

912 commits

Author SHA1 Message Date
Maximilien Colange
eb91ecf66f Typos
* NEWS, doc/org/concepts.org, doc/org/hierarchy.org,
  spot/misc/optionmap.hh, spot/twa/acc.hh, spot/twaalgos/ltl2tgba_fm.hh,
  spot/twaalgos/sccinfo.hh, spot/twaalgos/translate.cc: fix typos
2017-08-28 17:54:21 +02:00
Alexandre Duret-Lutz
f5dce597c6 switch to C++14 compilation
* configure.ac: Compile in C++14 by default and rename
--enable-c++14 as c++17.
* doc/org/compile.org, doc/org/concepts.org, doc/org/index.org,
doc/org/install.org, doc/org/tut.org, doc/org/upgrade2.org, HACKING,
NEWS, README: Adjust all mentions of C++11.
* spot/twaalgos/stats.hh: Use std::make_unique.
2017-08-22 18:21:49 +02:00
Alexandre Duret-Lutz
1cc45b2413 dot: display acceptance names
* spot/twaalgos/dot.cc: Display common acceptance names.
* NEWS: Mention the change.
* doc/org/oaut.org: Adjust text.
* tests/core/alternating.test, tests/core/readsave.test,
tests/python/_altscc.ipynb, tests/python/alternation.ipynb,
tests/python/atva16-fig2a.ipynb, tests/python/atva16-fig2b.ipynb,
tests/python/automata.ipynb, tests/python/decompose.ipynb,
tests/python/gen.ipynb, tests/python/highlighting.ipynb,
tests/python/product.ipynb, tests/python/randaut.ipynb: Adjust test
cases.
2017-08-17 15:21:59 +02:00
Alexandre Duret-Lutz
df04c715cf remove_fin: fix incorrect state-based output
* spot/twaalgos/remfin.cc: If no Inf set is used, set sbacc early so
that it is used in the algorithm.
* tests/core/remfin.test: Add more tests.
* NEWS: Mention the bug.
2017-08-09 18:25:36 +02:00
Thomas Medioni
30a68d288b Fix typo automatons -> automata
* NEWS, spot/twaalgos/dualize.cc, spot/twaalgos/dualize.hh,
  spot/twaalgos/langmap.cc, spot/twaalgos/sum.hh,
  tests/python/streett_totgba.py: Fixes typo.
2017-08-09 15:51:23 +02:00
Alexandre Duret-Lutz
aa8cf6ac92 typos in NEWS
* NEWS: Fix them.
2017-08-04 17:01:03 +02:00
Alexandre Duret-Lutz
1cf5778faa stats: allow counting complete SCCs
* bin/common_aoutput.cc, NEWS: Update documentation.
* spot/twaalgos/stats.cc: Honor c and C.
* tests/core/alternating.test: Test it.
2017-08-04 17:01:03 +02:00
Alexandre Duret-Lutz
e041db6101 dot: extend the palette from 9 to 16 colors
Let's close #212 even if this does not cover the 32 sets.

* spot/twaalgos/dot.cc: Change the palette.
* doc/org/autfilt.org, NEWS: Adjust documentation.
* tests/core/alternating.test, tests/core/readsave.test,
tests/core/tgbagraph.test, tests/python/_altscc.ipynb,
tests/python/alternation.ipynb, tests/python/atva16-fig2a.ipynb,
tests/python/automata-io.ipynb, tests/python/automata.ipynb,
tests/python/decompose.ipynb, tests/python/gen.ipynb,
tests/python/highlighting.ipynb, tests/python/ltsmin-dve.ipynb,
tests/python/piperead.ipynb, tests/python/product.ipynb,
tests/python/randaut.ipynb, tests/python/word.ipynb: Adjust
test cases.
2017-08-03 14:32:11 +02:00
Alexandre Duret-Lutz
eb8df6d72c parseaut: allow the univ-branch diagnostics to be ignored
* spot/parseaut/parseaut.yy: Check the SPOT_HOA_TOLERANT variable.
* tests/core/ltl3ba.test, tests/core/parseaut.test: Adjust test cases.
* NEWS, bin/man/spot-x.x: Mention SPOT_HOA_TOLERANT.
2017-08-01 18:03:06 +02:00
Alexandre Duret-Lutz
d3607a7ce3 hoa: fix I/O of determinism
Fixes #212.

* spot/parseaut/parseaut.yy, spot/twaalgos/hoa.cc: Recognize
exist-branch, and adjust printer to the 1.1 semantics.
* tests/core/alternating.test, tests/core/complete.test,
tests/core/det.test, tests/core/explsum.test,
tests/core/parseaut.test, tests/core/readsave.test,
tests/core/sbacc.test, tests/core/tgbagraph.test,
tests/python/alternating.py, tests/python/dualize.py: Adjust test
cases.
* NEWS: Mention the change.
2017-07-31 22:33:56 +02:00
Alexandre Duret-Lutz
0cf250d839 bin: introduce autcross
Fixes #252.

* NEWS: Mention it.
* bin/autcross.cc, bin/man/autcross.x, doc/org/autcross.org: New
files.
* bin/Makefile.am, bin/man/Makefile.am, doc/org/tools.org,
doc/Makefile.am: Add them.
* bin/autfilt.cc: Use is_universal() instead of is_deterministic().
* bin/common_hoaread.hh, bin/common_trans.cc, bin/common_trans.hh,
bin/ltlcross.cc, bin/ltldo.cc: Factor some bits common between
ltlcross, ltldo and autcross.
* tests/core/autcross.test, tests/core/autcross2.test: New files.
* tests/Makefile.am: Add them.
* tests/core/dra2dba.test, tests/core/sbacc.test,
tests/core/streett.test: Use autcross.
2017-07-28 10:33:14 +02:00
Alexandre Duret-Lutz
b9fff6a4b1 parseaut: make the scanner reentrant
* spot/parseaut/parseaut.yy, spot/parseaut/parsedecl.hh,
spot/parseaut/public.hh, spot/parseaut/scanaut.ll: Use a reentrant
scanner, so that we can now parse multiple automaton streams at the
same time.  This is needed for the future autcross, which is going to
read several individual automata produced by different tools, while
reading the stream of automata to process.
2017-07-27 17:33:53 +02:00
Alexandre Duret-Lutz
abe2c08b78 acc: make &= and |= symmetrical
Operator &= used to always move Fin to the front, it does not anymore.
The only thing it does now is to merge Inf(x)&Inf(y) as Inf({x,y}).
Operator |= is now symmetrical and merges Fin()s.

Fixes #253.

* spot/twa/acc.cc, spot/twa/acc.hh: Simplify &= and make |= symmetrical.
* spot/twaalgos/cleanacc.cc: Fix conjunction order.
* tests/core/acc.test, tests/core/acc2.test, tests/core/parseaut.test,
tests/core/readsave.test, tests/core/satmin2.test,
tests/core/sccdot.test, tests/python/acc_cond.ipynb,
tests/python/accparse.ipynb, tests/python/automata.ipynb,
tests/python/product.ipynb, tests/python/randaut.ipynb: Adjust test
cases.
2017-07-25 17:47:57 +02:00
Alexandre Duret-Lutz
8e685e00c9 deprecate copy() in favor of make_twa_graph()
Fixes #258.

* spot/twaalgos/copy.cc: Delete, and move the code...
* spot/twa/twagraph.cc: ... in some anonymous namespace here.
* spot/twa/twagraph.hh: Adjust the make_twa_graph() overload.
* spot/twaalgos/copy.hh, NEWS: Mark copy() as deprecated and redirect
to make_twa_graph().
* doc/org/upgrade2.org, doc/org/tut51.org, python/spot/impl.i,
spot/twaalgos/dot.cc, spot/twaalgos/langmap.cc, tests/core/ikwiad.cc:
Adjust callers.
* spot/twaalgos/Makefile.am: Remove copy.cc.
2017-07-25 11:35:37 +02:00
Alexandre Duret-Lutz
37f3154f1d degen, sbacc: merge accepting sinks
Fixes #276.

* spot/twaalgos/sbacc.cc, spot/twaalgos/degen.cc: Detect accepting
sinks, and merge them.
* tests/python/dualize.py: Adjust.
* tests/python/sbacc.py: More test cases.
2017-07-24 16:13:56 +02:00
Alexandre Duret-Lutz
d12b2cd5b0 honor SPOT_BDD_TRACE
* spot/priv/bddalloc.cc: Add hooks on request.
* bin/man/spot-x.x, NEWS: Document the envvar.
2017-07-24 13:42:21 +02:00
Thomas Medioni
7e7c257597 spot::sbacc() works on alternating automata, fix dualize
Fixes #273.

* NEWS: Mention this.
* spot/twaalgos/dualize.cc, tests/python/dualize.py: Adapt dualize.
* spot/twaalgos/sbacc.cc, tests/core/sbacc.test: sbacc support
  alternating automata
2017-07-20 18:10:40 +02:00
Thomas Medioni
c8889e65f0 Implement to_weak_alternating() which weakifies tgbas
* NEWS: mention the modification.
* python/spot/impl.i: makes to_weak_alternating visible from python
* spot/twaalgos/Makefile.am, spot/twaalgos/toweak.cc,
  spot/twaalgos/toweak.hh: Implements to_weak_alternating.
* tests/Makefile.am, tests/python/toweak.py: Test the results of
  to_weak_alternating.
2017-07-19 16:54:09 +02:00
Alexandre Duret-Lutz
09e47d648a decompose: merge decompose_strength() and decompose_scc()
These two functions were doing almost identical work, the only
difference was the way to select the SCC to keep.  Now we have a more
uniform way to do that.  Closes #172.

* bin/autfilt.cc: Offer a unique --decompose-scc option, but keep
--decompose-strength as an alias for backward compatibility.
* spot/twaalgos/strength.cc, spot/twaalgos/strength.hh: Rename
decompose_strength as decompose_scc, and handle a way to list
all SCC numers in the string specifier.  This gets rid
of the nearly identical
* tests/core/scc.test, tests/core/strength.test,
tests/python/decompose.ipynb, tests/python/decompose_scc.py: Adjust
test cases.
* NEWS: Adjust.
2017-06-30 23:09:31 +02:00
Alexandre Duret-Lutz
efbce454e2 Merge branch 'master' into next 2017-06-22 07:06:29 +02:00
Alexandre Duret-Lutz
6c3daf0cd4 bump version
* NEWS, configure.ac: Bump version to 2.3.5.dev.
2017-06-22 07:03:15 +02:00
Alexandre Duret-Lutz
af000edbf9 Release Spot 2.3.5
* NEWS, configure.ac, doc/org/setup.org: Update version.
2017-06-22 06:58:01 +02:00
Alexandre Duret-Lutz
05abed6d2f translate: use relabel_bse() to speed translations with a lot of APs
Fixes #268, reported by Yann Thierry-Mieg.

* spot/twaalgos/translate.cc, spot/twaalgos/translate.hh: Call
relabel_bse() + relabel_here().
* tests/core/format.test: Add a test case.
* bin/spot-x.cc, NEWS: Document the change.
2017-06-20 15:19:00 +02:00
Alexandre Duret-Lutz
0bc1dd4446 relabel_here: make it compatible with relabel_bse
* spot/twaalgos/relabel.cc: Deal with the cases where the substitution
value is a Boolean formula.
* spot/twaalgos/relabel.hh: Improve documentation.
* tests/python/relabel.py: Add more tests.
* python/spot/impl.i: Add bindings for are_isomorphic for the above
test.
* NEWS: Mention the news.
2017-06-20 15:19:00 +02:00
Alexandre Duret-Lutz
413d2d6a6c stats: fix slow %s and inappropriate %S output
Fixes #269.

* spot/twaalgos/stats.cc: Use twa_statistics instead of
twa_sub_statistics when %t is not used.
* bin/common_aoutput.cc: Likewise, also fix %S to use twa_statistics
instead of num_states(), and document that %s,%t,%e all return
statistics about the reachable part of the automaton.
* tests/core/format.test: Add more tests.
* NEWS: Document the issue.
2017-06-19 17:53:03 +02:00
Alexandre Duret-Lutz
20a4959ff6 stats: fix slow %s and inappropriate %S output
Fixes #269.

* spot/twaalgos/stats.cc: Use twa_statistics instead of
twa_sub_statistics when %t is not used.
* bin/common_aoutput.cc: Likewise, also fix %S to use twa_statistics
instead of num_states(), and document that %s,%t,%e all return
statistics about the reachable part of the automaton.
* tests/core/format.test: Add more tests.
* NEWS: Document the issue.
2017-06-19 17:52:41 +02:00
Thomas Medioni
7b5b8f34f0 streett_to_generalized_buchi() now works on Streett-like
* NEWS: Mention the modification.
* spot/twaalgos/remfin.cc: Adapt to avoid infinite recursion.
* spot/twaalgos/totgba.cc: Work on Streett-like.
* tests/Makefile.am, tests/python/streett_totgba.py: Tests the
  modification.
* tests/core/remfin.test: Fix one test case that is now handled by
  the modification.
2017-06-08 10:49:09 +02:00
Thomas Medioni
570c433122 autfilt: add option --simplify_acceptance
* NEWS: Mention this.
* bin/autfilt.cc: Add option --simplify-acceptance.
2017-06-08 10:46:29 +02:00
Thomas Medioni
a12d676bdc introduce spot::simplify_acceptance()
Simplify some automata where some marks are identical,
or complementary to another. Fixes #216.

* NEWS: mention the new function.
* spot/twaalgos/cleanacc.cc, spot/twaalgos/cleanacc.hh: Implement
  the function.
* tests/Makefile.am, tests/python/merge.py: Test this implementation.
2017-06-08 10:46:29 +02:00
Alexandre Duret-Lutz
d795955aaa cleanacc: add an option to not strip sets
also consider sets that appear everywhere

* spot/twaalgos/cleanacc.cc, spot/twaalgos/cleanacc.hh: Here.
2017-06-08 10:46:29 +02:00
Alexandre Duret-Lutz
24b5a350d4 Remove marks from acceptance condition without stripping
Author: Alexandre Duret-Lutz.

* NEWS: mention the modification.
* spot/twa/acc.cc, spot/twa/acc.hh: Implement the removal.
* spot/twa/twa.hh: Allow directly setting a new acceptance condition.
2017-06-08 10:46:29 +02:00
Alexandre Duret-Lutz
7b6cfd448c dot: fix printing of alternating automata
Related to #208.

* spot/twaalgos/dot.cc: Fix missing definitions of universal nodes,
and inclusion of universal nodes inside of SCC when none of the
destination comes back to the SCC.
* tests/python/_altscc.ipynb: Adjust and add more test cases.
* tests/core/alternating.test, tests/core/neverclaimread.test,
tests/core/readsave.test, tests/core/sccdot.test,
tests/python/decompose.ipynb: Adjust test cases.
* NEWS: Mention the bug.
2017-06-02 11:38:43 +02:00
Alexandre Duret-Lutz
97f3efabe3 dot: fix printing of alternating automata
Related to #208.

* spot/twaalgos/dot.cc: Fix missing definitions of universal nodes,
and inclusion of universal nodes inside of SCC when none of the
destination comes back to the SCC.
* tests/python/_altscc.ipynb: Adjust and add more test cases.
* tests/core/alternating.test, tests/core/neverclaimread.test,
tests/core/readsave.test, tests/core/sccdot.test,
tests/python/decompose.ipynb: Adjust test cases.
* NEWS: Mention the bug.
2017-05-31 17:55:15 +02:00
Alexandre Duret-Lutz
617a7187b3 scc_info: keep track of common acceptance sets
* spot/twaalgos/sccinfo.hh, spot/twaalgos/sccinfo.cc: Do it.
* tests/core/sccdot.test: Add a test case.
* NEWS: Mention it.
2017-05-31 17:18:03 +02:00
Maximilien Colange
f7d14ab526 Degeneralization keeps track of levels.
* NEWS: Document this.
* spot/twa/twagraph.cc: `copy_state_names_from` handles this new info.
* spot/twaalgos/degen.hh, spot/twaalgos/degen.cc: Implement it.
* tests/python/origstate.py, tests/python/simstate.py: Update tests to
  reflect the change.
2017-05-31 13:28:42 +02:00
Maximilien Colange
7b5ab54530 Simulation keeps track of simulated states in the input automaton.
* NEWS: Document the change.
* spot/twaalgos/simulation.cc: Implement the change.
* spot/twa/twagraph.cc: `copy_state_names_from` uses simulated states
  info if present.
* spot/twaalgos/determinize.cc: Pretty-print in determinization follows
  simulated states, avoiding possible confusion.
* tests/Makefile.am, tests/python/simstate.py: Add a test.
2017-05-31 13:28:41 +02:00
Alexandre Duret-Lutz
425620150a scc_info: make it possible to ignore or cut edges
* spot/twaalgos/sccinfo.hh, spot/twaalgos/sccinfo.cc: Take
a filter function as optional argument.
* tests/core/sccif.cc, tests/core/sccif.test: New files.
* tests/Makefile.am, tests/core/.gitignore: Adjust.
* NEWS: Mention the new feature.
2017-05-30 15:40:28 +02:00
Alexandre Duret-Lutz
f6607f1a2c bin: release all subformulas between runs
Fixes #262, reported by Maximilien Colange.

* bin/common_output.cc, bin/common_aoutput.cc, bin/common_aoutput.hh:
Clear the set of atomic propositions if --stats=%[...]x was used.
* spot/twa/bdddict.cc: Release any formula associated to a BDD when it
is unregistered, do not wait for the dictionary's destruction.  This
was the main culprit for #262.
* tests/core/ltl2tgba.test: Add test cases.
* NEWS: Mention the bug.
2017-05-18 18:25:55 +02:00
Alexandre Duret-Lutz
acdaaac4f0 bin: release all subformulas between runs
Fixes #262, reported by Maximilien Colange.

* bin/common_output.cc, bin/common_aoutput.cc, bin/common_aoutput.hh:
Clear the set of atomic propositions if --stats=%[...]x was used.
* spot/twa/bdddict.cc: Release any formula associated to a BDD when it
is unregistered, do not wait for the dictionary's destruction.  This
was the main culprit for #262.
* tests/core/ltl2tgba.test: Add test cases.
* NEWS: Mention the bug.
2017-05-18 18:24:49 +02:00
Alexandre Duret-Lutz
7dfa0ec15d Merge branch 'master' into next 2017-05-11 10:18:00 +02:00
Alexandre Duret-Lutz
b9c250894b * NEWS, configure.ac: Bump version number. 2017-05-11 10:16:03 +02:00
Alexandre Duret-Lutz
52b5491b8e Release Spot 2.3.4
* NEWS, configure.ac, doc/org/setup.org: Update version to 2.3.4.
2017-05-11 10:10:48 +02:00
Alexandre Duret-Lutz
aa40482352 ltl2tgba: clear simplification cache between translations
The cache used in formula simplification will keep atomic propositions
defined between several translations, and may impact variable order.
Reported by Maximilien Colange.

* spot/tl/simplify.hh, spot/tl/simplify.cc,
spot/twaalgos/translate.cc, spot/twaalgos/translate.hh (clear_cache):
New method.
* bin/ltl2tgba.cc, bin/ltl2tgta.cc: Call it.
* spot/twaalgos/stats.cc: Do not keep a point to the formula after
printing statistics.
* tests/core/ltl2tgba.test: Add a test case.
* tests/core/readsave.test: Adjust one formula.
* NEWS: Mention the issue.
2017-05-10 17:03:05 +02:00
Alexandre Duret-Lutz
f07fbbae79 ltl2tgba: clear simplification cache between translations
The cache used in formula simplification will keep atomic propositions
defined between several translations, and may impact variable order.
Reported by Maximilien Colange.

* spot/tl/simplify.hh, spot/tl/simplify.cc,
spot/twaalgos/translate.cc, spot/twaalgos/translate.hh (clear_cache):
New method.
* bin/ltl2tgba.cc, bin/ltl2tgta.cc: Call it.
* spot/twaalgos/stats.cc: Do not keep a point to the formula after
printing statistics.
* tests/core/ltl2tgba.test: Add a test case.
* tests/core/readsave.test: Adjust one formula.
* NEWS: Mention the issue.
2017-05-10 16:18:37 +02:00
Alexandre Duret-Lutz
8e19d3f47e scc_info: introduce edges_of() and inner_edges_of()
This is motivated by some upcoming patch by Heňo.

* spot/twaalgos/sccinfo.hh (edges_of, inner_edges_of): New methods.
* spot/twaalgos/sccinfo.cc, spot/twaalgos/strength.cc: Use them.
* spot/twa/twagraph.hh (edge_number): Add an overload.
* python/spot/impl.i: Bind the new methods.
* tests/python/sccinfo.py: Add tests.
* NEWS: Mention the changes.
2017-05-09 22:12:42 +02:00
Alexandre Duret-Lutz
8968bf6c4e simplify: fix related to event_univ handling
Fixes #260.  Reported by František Blahoudek.

The simplification F(f)|q = F(f|q), where q designates an event_univ
formula, was not always applied because of a couple of issue: (1) the
mospliter was ignoring event_univ unless favor_event_univ was set, (2)
when processing formulas from res_EventUniv they were not put back
into res_F or res_G to be subject to the F/G rules.

* spot/tl/simplify.cc: Improve handling of the above points.
* tests/core/reduccmp.test: Adjust and add test case.
* tests/core/ltl2tgba2.test, tests/python/atva16-fig2a.ipynb: Adjust.
2017-05-08 13:32:55 +02:00
Alexandre Duret-Lutz
845958834f simplify: fix related to event_univ handling
Fixes #260.  Reported by František Blahoudek.

The simplification F(f)|q = F(f|q), where q designates an event_univ
formula, was not always applied because of a couple of issue: (1) the
mospliter was ignoring event_univ unless favor_event_univ was set, (2)
when processing formulas from res_EventUniv they were not put back
into res_F or res_G to be subject to the F/G rules.

* spot/tl/simplify.cc: Improve handling of the above points.
* tests/core/reduccmp.test: Adjust and add test case.
* tests/core/ltl2tgba2.test, tests/python/atva16-fig2a.ipynb: Adjust.
2017-05-08 11:52:41 +02:00
Alexandre Duret-Lutz
19aae6f9cf introduce spot::split_edges()
Fixes #255.

* spot/twaalgos/split.cc, spot/twaalgos/split.hh,
tests/core/split.test: New files.
* spot/twaalgos/Makefile.am, tests/Makefile.am: Add them.
* bin/autfilt.cc (--split-edges): New option.
* python/spot/impl.i: Process split.hh.
* tests/python/alternating.py: Test split_edges() on
an alternating automaton.
2017-05-05 22:25:12 +02:00
Alexandre Duret-Lutz
679b6cff78 degen: consider incoming edges to select initial levels
Fixes #257.

* spot/twaalgos/degen.cc: Implement this optimization.
* tests/core/degendet.test: Add a few test cases.
* tests/core/ltl2tgba2.test: Adjust expected sizes.
* NEWS: Mention the change.
2017-05-05 16:50:04 +02:00
Alexandre Duret-Lutz
46d8aaaae1 twa_graph: introduce copy_state_names_from()
* spot/twa/twagraph.cc, spot/twa/twagraph.hh: Here.  Also
make sure "original-states" survives defrag_states().
* NEWS: Mention it.
* tests/python/origstate.py: New file.
* tests/Makefile.am: Add it.
2017-05-05 14:44:06 +02:00