Commit graph

107 commits

Author SHA1 Message Date
Maximilien Colange
b09c293f1a Clean the usage of spot::acc_cond::mark_t
spot::acc_cond::mark_t is implemented as a bit vector using a single
unsigned, and implicit conversions between mark_t and unsigned may be
confusing. We try to use the proper interface.

* bin/autfilt.cc, bin/ltlsynt.cc, spot/kripke/kripke.cc,
  spot/misc/game.hh, spot/parseaut/parseaut.yy, spot/priv/accmap.hh,
  spot/ta/ta.cc, spot/ta/taexplicit.cc, spot/ta/taproduct.cc,
  spot/taalgos/emptinessta.cc, spot/taalgos/tgba2ta.cc, spot/twa/acc.cc,
  spot/twa/acc.hh, spot/twa/taatgba.cc, spot/twa/taatgba.hh,
  spot/twa/twagraph.hh, spot/twaalgos/alternation.cc,
  spot/twaalgos/cleanacc.cc, spot/twaalgos/cobuchi.cc,
  spot/twaalgos/complete.cc, spot/twaalgos/couvreurnew.cc,
  spot/twaalgos/degen.cc, spot/twaalgos/dot.cc,
  spot/twaalgos/dtwasat.cc, spot/twaalgos/dualize.cc,
  spot/twaalgos/emptiness.cc, spot/twaalgos/gtec/ce.cc,
  spot/twaalgos/gtec/gtec.cc, spot/twaalgos/gtec/sccstack.cc,
  spot/twaalgos/gv04.cc, spot/twaalgos/hoa.cc, spot/twaalgos/lbtt.cc,
  spot/twaalgos/ltl2tgba_fm.cc, spot/twaalgos/magic.cc,
  spot/twaalgos/ndfs_result.hxx, spot/twaalgos/rabin2parity.cc,
  spot/twaalgos/randomgraph.cc, spot/twaalgos/remfin.cc,
  spot/twaalgos/sbacc.cc, spot/twaalgos/sccfilter.cc,
  spot/twaalgos/sccinfo.cc, spot/twaalgos/sccinfo.hh,
  spot/twaalgos/se05.cc, spot/twaalgos/sepsets.cc,
  spot/twaalgos/simulation.cc, spot/twaalgos/strength.cc,
  spot/twaalgos/stripacc.cc, spot/twaalgos/stutter.cc,
  spot/twaalgos/sum.cc, spot/twaalgos/tau03.cc,
  spot/twaalgos/tau03opt.cc, spot/twaalgos/totgba.cc,
  spot/twaalgos/toweak.cc, python/spot/impl.i, tests/core/acc.cc,
  tests/core/twagraph.cc: do not confuse mark_t and unsigned
* tests/python/acc_cond.ipynb: warn about possible change of the API
2018-03-15 10:05:24 +01:00
Alexandre Duret-Lutz
527c802511 more coverage
* python/spot/impl.i: Add missing bindings from remprop.hh
* tests/python/except.py: New file to test several error cases.
* tests/Makefile.am: Add it.
* spot/twaalgos/rabin2parity.cc (iar): Fix error message.
2018-01-19 21:19:36 +01:00
Maximilien Colange
7e02aae366 Rabin to parity translation
* spot/twaalgos/rabin2parity.cc, spot/twaalgos/rabin2parity.hh:
  implement it
* spot/twaalgos/postproc.cc: use it
* spot/twaalgos/Makefile.am: build the new files
* NEWS: document the new function
* python/spot/impl.i: Python bindings for the new function
* tests/Makefile.am, tests/core/rabin2parity.test: test the new function
2018-01-16 16:23:10 +01:00
Alexandre Duret-Lutz
61b0a542f1 postproc: add support for co-Büchi output
* spot/twaalgos/cobuchi.cc, spot/twaalgos/cobuchi.hh (to_nca): New
function.
(weak_to_cobuchi): New internal function, used in to_nca and to_dca
when appropriate.
* spot/twaalgos/postproc.cc, spot/twaalgos/postproc.hh: Implement
the CoBuchi option.
* python/spot/__init__.py: Support it in Python.
* bin/common_post.cc: Add support for --buchi.
* bin/autfilt.cc: Remove the --dca option.
* tests/core/dca.test, tests/python/automata.ipynb: Adjust and add
more tests.  In particular, add more complex persistence and
recurrence formulas to the list of dca.test.
* tests/python/dca.test: Adjust and rename to...
* tests/core/dca2.test: ... this.  Add more tests, to the point
that this is now failing, as described in issue #317.
* tests/python/dca.py: Remove.
* tests/Makefile.am: Adjust.
2018-01-14 22:16:40 +01:00
Alexandre Duret-Lutz
f369db6cb1 python: add colored parity support to postproc and translate
* python/spot/impl.i: Bind is_colored().
* python/spot/__init__.py: Add Colored support to postproc.
* tests/python/parity.py: Add a test case.
2018-01-08 11:37:22 +01:00
Alexandre Duret-Lutz
17b295e10f python: SVG display of word as signals
Fixes #309.

* python/spot/__init__.py (twa_word.as_svg, twa_word.show): New
  methods.
* tests/python/word.ipynb: Use them.
* NEWS: Mention them.
2018-01-04 18:43:12 +01:00
Alexandre Duret-Lutz
288ea95658 postproc: add Python bindings for Parity changes
* python/spot/__init__.py: Here.
* tests/python/parity.py: New file.
* tests/Makefile.am: Add it.
2018-01-02 17:45:33 +01:00
Alexandre Duret-Lutz
8579bedfaf python: highlighting with vector of bools
* python/spot/__init__.py: Deal with vectors of bools.
* tests/python/highlighting.ipynb: Test this.
2017-12-23 09:58:41 +01:00
Alexandre Duret-Lutz
19348c8938 python: give access to the "product-states" property
* python/spot/impl.i (get_product_states, set_product_states): New.
* tests/python/product.ipynb: Use it.
* NEWS: Mention it.
2017-12-22 17:27:26 +01:00
Alexandre Duret-Lutz
31ccab026b python: allow spot.formula(spot.formula(...))
* python/spot/__init__.py: Recognize if the input is already a
formula.
* tests/python/formulas.ipynb: Test this.
2017-12-22 17:18:36 +01:00
Alexandre Duret-Lutz
62d1e0219d Add support for computing operator nesting depth
* spot/tl/hierarchy.hh, spot/tl/hierarchy.cc (nesting_depth): New
function.
* python/spot/__init__.py: Also make it a method of formula in Python
* bin/common_output.cc, bin/common_output.hh: Implement
--stats=%[OP]n.
* NEWS: Mention it.
* tests/core/format.test, tests/python/formulas.ipynb: Test it.
2017-12-10 20:31:56 +01:00
Alexandre Duret-Lutz
7b2517a518 formula: accept additional arguments for map and traverse
Fixes #306.

* spot/tl/formula.hh, python/spot/__init__.py: Implement this
in C++ and Python.
* doc/org/tut03.org: Document (and indirectly test) it.
* NEWS: Mention it.
2017-11-23 23:04:15 +01:00
Alexandre Duret-Lutz
4711dcd74f introduce stutter_invariant_letters()
* spot/twaalgos/stutter.cc,
spot/twaalgos/stutter.hh (stutter_invariant_letters)
(stutter_invariant_states): Get rid of the broken local variant.
* tests/python/stutter-inv.ipynb, NEWS: Document.
* python/spot/impl.i: Bind vector<bdd>.
2017-11-03 17:02:30 +01:00
Alexandre Duret-Lutz
9b18729721 stutter: detect stutter-invariance at the state level
* spot/twaalgos/stutter.cc, spot/twaalgos/stutter.hh: Implement
stutter-invariance detection at the state level.
* python/spot/impl.i: Instantiate std::vector<bool>
* tests/python/stutter-inv-states.ipynb: New file.
* tests/Makefile.am, doc/org/tut.org: Add it.
2017-10-11 15:01:29 +02:00
Alexandre Duret-Lutz
11704d31eb scc_info: improve split_on_sets
* spot/twaalgos/sccinfo.cc, spot/twaalgos/sccinfo.hh (split_on_set):
Allow names to be preserved
* python/spot/impl.i: Instantiate std::vector<spot::twa_graph_ptr>.
2017-10-06 09:55:01 +02:00
Thibaud Michaud
a13a4e7d23 remove universal transitions on the fly
* spot/twaalgos/alternation.cc, spot/twaalgos/alternation.hh: Implement
remove_univ_otf.
* tests/python/alternating.py: Test it.
* python/spot/impl.i: Bindings.
* NEWS: Document it.
2017-09-27 19:30:42 +02:00
Laurent XU
27982fb80f parity: add spot::change_parity()
This function changes the parity acceptance of an automaton.

* spot/twaalgos/parity.cc, spot/twaalgos/parity.hh: Here
* python/spot/impl.i: Add spot/twaalgos/parity.hh
* spot/twaalgos/Makefile.am: Add spot/twaalgos/parity.{cc,hh}
* tests/core/parity.cc, tests/core/parity.test: Add
spot::change_parity() tests
* tests/python/parity.ipynb: Add documentation about
spot::change_parity()
* tests/Makefile.am: Add tests/core/parity.{cc,hh} and
tests/python/parity.ipynb
* doc/org/tut.org: Add the html page of tests/python/parity.ipynb
2017-09-25 12:10:14 +02:00
Laurent XU
b7ef7c55d7 misc: add spot::is_colored()
This function checks whether an automaton is colored, an automaton
is said to be colored iff all the transitions belong to exactly one
acceptance set.

* spot/twaalgos/iscolored.cc, spot/twaalgos/iscolored.hh: Here.
* spot/twaalgos/Makefile.am: add spot/twaalgos/iscolored.{cc,hh}
* python/spot/impl.i: add spot/twaalgos/iscolored.hh
2017-09-25 12:10:14 +02:00
Alexandre GBAGUIDI AISSE
cf18c06940 twaalgos/cobuchi: Add nsa_to_nca()
* NEWS: Update.
* spot/twaalgos/cobuchi.hh: Declare to_dca() and nsa_to_nca().
* spot/twaalgos/cobuchi.cc: Implement them.
* python/spot/impl.i: Include new file for python bindings.
* spot/twaalgos/Makefile.am: Add new file.
* bin/autfilt.cc: Add --dca command line option. This option does not
return a deterministic automaton yet, but it will.
* tests/core/dca.test: Add tests for Büchi automata.
* tests/python/dca.py: Add a python script that builds a nondet. Streett
automaton.
* tests/python/dca.test: Add tests for Streett automata.
* tests/Makefile.am: Add all tests.
2017-09-19 17:37:00 +01:00
Clément Gillard
ad3588420c fix typos and indentation
* bin/autfilt.cc, python/spot/__init__.py, spot/twa/twa.hh,
spot/twa/twaproduct.cc, spot/twaalgos/couvreurnew.cc,
tests/python/bugdet.py: Here.
2017-09-05 13:23:01 +02:00
Alexandre Duret-Lutz
223b0c6a9e is_weak_scc and friend: make them work for alternating automata
* spot/twaalgos/isweakscc.cc, spot/twaalgos/isweakscc.hh,
spot/twaalgos/mask.cc, spot/twaalgos/mask.hh: Adjust to
work with alternating automata.
* spot/twaalgos/sccinfo.cc, spot/twaalgos/sccinfo.hh
(determine_unknown_acceptance): Do not complain about
not supporting alternating automata if there is not
indeterminate acceptance.
* spot/twaalgos/stats.cc: Fix a bug were %[iw]c was
read as %[iww]c.
* tests/core/alternating.test: Test is_inherently_weak_scc() and
is_weak_scc().
* python/spot/impl.i: Add missing python bindings
for isweakscc.hh.
2017-08-04 15:12:27 +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
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
xlauko
d45b60a4e5 remfin: Use tra2tba as new rabin strategy in remove_fin
Move implementation of tra2tba to remfin.

* python/spot/impl.i: Remove tra2tba python bindings
* spot/twaalgos/Makefile.am: Remove tra2tba
* spot/twaalgos/remfin.cc: Update rabin_strategy
* spot/twaalgos/tra2tba.cc: Delete the file
* spot/twaalgos/tra2tba.hh: Delete the file
* tests/core/remfin.test: Update tests
* tests/python/tra2tba.py: Update tests
2017-07-17 17:21:19 +02:00
xlauko
e1271bf8b3 tra2tba: Implement transformation of TRA to TBA acceptance condition
* python/spot/impl.i: Add bindings for tra2tba
* spot/twaalgos/Makefile.am: Record tra2tba.cc, tra2tba.hh
* spot/twaalgos/tra2tba.cc: Implement transformation of TRA to TBA
* spot/twaalgos/tra2tba.hh: Introduce declaration of tra_to_tba
* tests/Makefile.am: Record tra2tba tests
* tests/core/tra2tba.cc: Add driver for tests
* tests/core/tra2tba.test: Add tests of tra2tba transformation
2017-07-17 17:20:52 +02:00
Alexandre Duret-Lutz
2ecd93ace8 python: export the sbacc() algorithm
Fixes #274.

* python/spot/impl.i: Bind sbacc().
* tests/python/sbacc.py: New tesat.
* tests/Makefile.am: Add sbacc.py.
2017-07-17 15:30:54 +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
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
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
649793df75 gen: pass the bdd_dict to aut_pattern()
* spot/gen/automata.hh (aut_pattern): Add the dict argument.
* spot/gen/automata.cc, python/spot/gen.i: Adjust.
* tests/python/gen.py: Make sure two automata built without
specifying any dictionary share the same one.
2017-04-28 13:32:03 +02:00
Alexandre Duret-Lutz
11ca2803c9 gen: hide ks_cobuchi(), introduce aut_pattern()
* spot/gen/automata.hh, spot/gen/automata.cc: Hide ks_cobuchi() behind
introduce aut_pattern(), as we have already done for the formulas.
* bin/genaut.cc: Simplify using this interface.
* python/spot/gen.i: Introduce aut_patterns().
* tests/python/gen.ipynb, tests/python/gen.py: Adjust.
2017-04-28 13:32:03 +02:00
Alexandre Duret-Lutz
540b971355 gen: rename genltl() to ltl_pattern() and introduce ltl_patterns()
* spot/gen/formulas.hh, spot/gen/formulas.cc (genltl): Rename as...
(ltl_pattern): This.
(ltl_pattern_max): New function.
* bin/genltl.cc: Adjust names, and simplify using ltl_pattern_max().
* python/spot/gen.i (ltl_patterns): New function.
* tests/python/gen.py: Test it.
* tests/python/gen.ipynb: New file to document the spot.gen package.
* tests/Makefile.am, doc/org/tut.org: Add gen.ipynb.
2017-04-26 15:06:02 +02:00
Alexandre Duret-Lutz
8939e0dd50 genltl: move all formula generation code to spot/gen/
Fixes #254.

* spot/gen/formulas.cc, spot/gen/formulas.hh: New files.
* spot/gen/Makefile.am: Add them.
* spot/Makefile.am: Fix build order.
* bin/genltl.cc: Move most code to the above files and adjust.
* bin/Makefile.am: Link genltl with libspotgen.
* doc/org/arch.tex: Adjust picture to show that genltl uses
libspotgen.
* python/spot/gen.i: Include formulas.hh.
* tests/python/gen.py: Make sure genltl() and ltl_pattern_name()
can be called.
2017-04-25 18:14:15 +02:00
Alexandre Duret-Lutz
f185aabf44 python: add wrapper for libspotgen
For #254.

* python/spot/gen.i, tests/python/gen.py: New files.
* python/Makefile.am, tests/Makefile.am: Adjust.
* NEWS: Mention the spot.gen python package.
2017-04-23 17:24:23 +02:00
Thomas Medioni
b428ed31ec Implements is_streett_like() and streett_like_pairs(), is_rabin_like...
Adds the method spot::acc_cond::is_streett_like() that behaves like
spot::acc_cond::is_streett() except that it works on a wider range
of acceptance conditions, called Streett-like. Also adds
spot::acc_cond::streett_like_pairs() that returns a boolean assessing
whether the acceptance condition is Streett-like and also returns all
the Streett_like pairs.
Defines the new struct type spot::acc_cond::rs_pair.
Similarily, Adds the methods spot::acc_cond::is_rabin_like() and
spot::acc_cond::rabin_like_pairs().

* NEWS: Mention this modification
* python/spot/impl.i: Declares the new struct to SWIG, and defines
the streett_like_pairs() vector as an output parameter, which makes
the python code return a tuple (boolean, vector) rather than a
pass-by-reference vector.
* spot/twa/acc.cc, spot/twa/acc.hh: Declares an implements the new
methods and the new nested struct.
* tests/Makefile.am: Add new tests to the suite
* tests/python/rs_like.py: Tests the new methods and
the SWIG bindings.
2017-04-21 16:24:08 +02:00
Thomas Medioni
cc3bdfcd2e mark_t: sets() no longer returns a vector
spot::mark_t::sets() was modified so that it now returns an iterable
object rather than an std::vector<unsigned>.

* NEWS: Mention the modification.
* python/spot/impl.i: Declares mark_container as iterable to SWIG.
* spot/parseaut/parseaut.yy: Adapts to the modification.
* spot/twa/acc.hh: Implement the modification.
* tests/python/acc_cond.ipynb: Adapts to the modification.
2017-04-20 14:06:57 +02:00
Thomas Medioni
152b5d0d30 dtwa_complement: deprecated, use dualize() instead.
* NEWS: Mention of the deprecation
* bench/stutter/stutter_invariance_randomgraph.cc,
  bin/autfilt.cc, bin/ltlcross.cc, spot/twaalgos/langmap.cc,
  spot/twaalgos/minimize.cc, spot/twaalgos/powerset.cc,
  spot/twaalgos/stutter.cc, tests/core/ikwiad.cc,
  tests/python/bugdet.py, tests/python/remfin.py,
  tests/python/sum.py: Refactor calls to dtwa_complement() with calls
  to dualize().
* doc/org/upgrade2.org: Change mention of dtwa_complement with dualize.
* spot/twaalgos/complement.hh: Add deprecation notice.
* python/spot/impl.i: Add deprecation notice for the python bindings.
2017-04-07 17:15:38 +02:00
Thomas Medioni
c9d8d41fd3 implement dualize to complement automatons
* NEWS: Mention the implementation
* python/spot/impl.i: Add dualize() to python interface.
* spot/twaalgos/Makefile.am: Add dualize.cc,hh to the build
* spot/twaalgos/dualize.cc: Implement dualize() that takes an automaton
  and returns its dual
* spot/twaalgos/dualize.hh: Implement dualize()
* tests/Makefile.am: Add dualize tests to the test suite
* tests/python/dualize.py: Test cases for dualize
2017-04-07 17:15:38 +02:00
Maximilien Colange
41ac0e681f Properly track dependencies of SWIG files.
Properly track dependencies of SWIG files to trigger recompilation when
appropriate.
Closes issue #250.

* python/Makefile.am: Track the dependencies of .i files à la automake.
2017-03-29 23:51:59 +02:00
Alexandre Duret-Lutz
f6e6099d9b python: mark prop_deterministic as deprecated
Related to #212.

* python/spot/impl.i: Here.
2017-03-29 20:00:26 +02:00
Alexandre Duret-Lutz
b81d7e5839 python: add python bindings for declarative_environment
* python/spot/impl.i: Here.
* tests/python/declenv.py: New file.
* tests/Makefile.am: Add it.
2017-03-09 17:22:06 +01:00
Thomas Medioni
194c199232 Implement sum(..) and sum_and(..).
Fixes #231.

* NEWS: Mention of implementation of sum, sum_and.
* bin/autfilt.cc: Add --sum, --sum-or and --sum-and options.
* python/spot/impl.i: Add bindings for sum, sum_and.
* spot/twaalgos/Makefile.am: Add sum.cc, sum.hh.
* spot/twaalgos/sum.cc: Implement sum, sum_and.
* spot/twaalgos/sum.hh: Declaration of sum, sum_and.
* tests/Makefile.am: Add sum tests.
* tests/core/explsum.test: Test the sum of two automatons,
  false or false, unsatisfied mark propagation, handling of univ.
  transitions.
* tests/python/sum.py: Check that two automatons that does not
  share their bdd dict are not accepted, then run tests over the
  sum of randomly generated LTL formulas.
2017-03-09 11:42:08 +01:00
Alexandre Duret-Lutz
5793cf32f9 python: add bindings for to_generalized_buchi()
* python/spot/impl.i: Here.
* NEWS: Mention it.
2017-03-08 17:33:51 +01:00
Alexandre Duret-Lutz
4e9303e380 python: add bindings for bdd_to_formula()
Follow-up to an email from Ayrat Khalimov.

* python/spot/impl.i: Include twa/formula2bdd.hh.
* python/spot/__init__.py: Make the dictionnary
optional.
* spot/twa/formula2bdd.cc: Throw an exception instead of asserting.
* tests/python/bdditer.py: New file.
* tests/Makefile.am: Add it.
* NEWS: Update.
2017-03-08 15:39:08 +01:00
Alexandre Duret-Lutz
2e763a08cc twa_graph: more test coverage
The goal is to improve coverage stats, but I discovered two issues
while doing so.

* tests/python/twagraph.py: New test case.
* tests/Makefile.am: Add it.
* spot/twa/twagraph.hh: Add fix typos in error messages.
* python/spot/impl.i: Fix broken wrappers for state_from_number and
state_acc_sets.
2017-03-07 23:15:42 +01:00
Alexandre Duret-Lutz
d2e9515c10 skip divine tests when divine does not understand compile --help
Fixes #235, reported by Henrich Lauko.

* python/spot/ltsmin.i: Catch CalledProcessError.
* NEWS: Mention the bug.
* THANKS: Add Henrich.
2017-02-28 17:02:06 +01:00
Alexandre Duret-Lutz
289b2383ad scc_info: add Python bindings
Related to #172, where we discussed that scc_info bindings were
missing.

* spot/twaalgos/sccinfo.hh (spot::scc_info::scc_node): Move...
(spot::scc_info_node): ... here to help Swig.
* python/spot/impl.i: Add bindings for scc_info.
* tests/python/sccinfo.py: New file.
* tests/Makefile.am: Add it.
2017-02-20 14:31:16 +01:00
Alexandre Duret-Lutz
ff4c4a7231 python: render the M&P hierarchy in SVG
* python/spot/__init__.py (show_mp_hierarchy, mp_hierarchy_svg): New
functions.
* tests/python/formulas.ipynb: Illustrate show_mp_hierarchy.
* python/ajax/spotcgi.in: Use mp_hierarchy_svg.
* python/ajax/css/trans.css: Adjust for possible overflows.
* NEWS: Mention this new feature.
2017-01-18 20:58:20 +01:00
Alexandre Duret-Lutz
ebdb198b64 hierarchy: expose mp_class to python
* bin/common_output.cc: Move some of the printing code...
* spot/tl/hierarchy.cc, spot/tl/hierarchy.hh: ... here, as new
  variants of mp_class...
* python/spot/impl.i: ... that we can now call from Python.
* python/ajax/spotcgi.in: Use those to simplify and extend
the code printing class membership.
2017-01-14 23:43:01 +01:00
Alexandre Duret-Lutz
c9918f6407 minimize_wdba: fix handling of input with useless SCCs
* spot/twaalgos/minimize.cc (minimize_wdba): Diminish the color of
terminal SCCs that are incomplete, as if they had a non-accepting
sink as successor.
* spot/twaalgos/strength.hh, spot/twaalgos/strength.cc
(is_terminal_automaton): Add an option to ignore trivial SCC as we did
before, since it matters for deciding membership to the guarantee
class.
(is_safety_mwdba): Rewrite as ...
(is_safety_automaton): ... generalizating to any acceptance, and
ignoring trivial SCCs.
* bin/ltlfilt.cc, python/ajax/spotcgi.in, spot/tl/hierarchy.cc,
tests/core/ikwiad.cc: Adjust usage of is_terminal_automaton and
is_safety_automaton().
* tests/core/hierarchy.test: Add a problematic formula as test-case.
* NEWS: Mention the bug.
2017-01-12 21:02:56 +01:00