Commit graph

107 commits

Author SHA1 Message Date
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
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
e1c14eb90a twa_graph: honor state-names & product-states in format_state()
* spot/twa/twagraph.cc, spot/twa/twagraph.hh (format_state): Honor
the state-names and product-states properties.
* tests/python/highlighting.ipynb: Adjust.
2017-05-05 14:44:06 +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
Alexandre Duret-Lutz
172bee495a minimize_dfa: use the twa_graph interface
Fixes #233, although more cleanup would be welcome.

* spot/twaalgos/minimize.cc: Replace the uses of twa methods by
twa_graph methods, and simplify some data structures.
* tests/core/acc_word.test, tests/core/readsave.test,
tests/python/automata.ipynb: Adjust changed output due
to different data structures.
2017-05-01 22:10:29 +02:00
Alexandre Duret-Lutz
ae78e1d2b2 gen: set more properties in automata
* spot/gen/automata.cc: Set more properties.
* tests/python/gen.py: Check that they are set.
2017-04-28 13:32:48 +02:00
Alexandre Duret-Lutz
ec51f976f8 gen: introduce a new automaton family
* spot/gen/automata.cc, spot/gen/automata.hh: Define AUT_L_NBA.
* bin/genaut.cc (--l-nba): New option.
* bin/man/genaut.x, doc/org/genaut.org, NEWS: Document it.
* tests/python/gen.py, tests/core/genaut.test: Test it.
2017-04-28 13:32:42 +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
ca7f72bb4b gen: prefix ltl_pattern identifiers with LTL_
This helps with autocompletion in IPython, and it will prevent us from
mixing LTL patterns with automata patterns (once we have more than one
automata generator).

* spot/gen/formulas.hh: Here.
* spot/gen/formulas.cc, bin/genltl.cc, 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
Maximilien Colange
17bbef6cce Check that automata produced by ks_cobuchi are state-based.
* tests/python/gen.py: implement the check.
2017-04-24 14:03:04 +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
Alexandre Duret-Lutz
f6b735234d python: update some incorrect or obsolete code
* tests/python/ipnbdoctest.py: Use importlib instead of imp.
* tests/python/ltlparse.py: Fix invalid escape sequence.
2017-03-29 20:04:08 +02:00
Alexandre Duret-Lutz
f6a238efd5 twa_graph: fix purge_unreachable_states on alternating automata
The algorithm had two problems: it was removing only useless
destination from universal destination (instead of removing the entire
edge), and it was not properly iterating over the entire reachable
automaton.

* spot/twa/twagraph.cc: Fix it.
* spot/twa/twagraph.hh: Adjust documentation.
* tests/core/alternating.test: Add more tests.
* tests/python/twagraph.py: Adjust.
* NEWS: Mention the bug.
2017-03-29 10:08:23 +02:00
Alexandre Duret-Lutz
4a5d7a3978 rename is_deterministic to is_universal
For #212.

* spot/twa/twa.hh: Rename prop_deterministic() as prop_universal(),
and keep the old name as deprecated.
* spot/twaalgos/isdet.cc, spot/twaalgos/isdet.hh: Rename
is_deterministic() as is_universal(), and add a new function
for is_deterministic().
* doc/org/concepts.org, doc/org/hoa.org, doc/org/tut21.org,
spot/tl/hierarchy.cc, spot/twa/twagraph.cc,
spot/twaalgos/are_isomorphic.cc, spot/twaalgos/determinize.cc,
spot/twaalgos/dtbasat.cc, spot/twaalgos/dtwasat.cc,
spot/twaalgos/hoa.cc, spot/twaalgos/minimize.cc,
spot/twaalgos/postproc.cc, spot/twaalgos/product.cc,
spot/twaalgos/randomgraph.cc, spot/twaalgos/remfin.cc,
spot/twaalgos/simulation.cc, spot/twaalgos/totgba.cc,
spot/twaalgos/word.cc, tests/python/product.ipynb,
tests/python/remfin.py: Adjust.
* NEWS: Mention the change.
2017-03-27 19:34:10 +02:00
Alexandre Duret-Lutz
0de5f50da9 twa: add support for prop_complete()
* spot/twa/twa.hh: Add support.  Make two constructors for prop_set in
order to diagnose constructions with 5 arguments.
* spot/parseaut/parseaut.yy: Adjust diagnostics for complete and
deterministic.
* spot/tl/exclusive.cc, spot/twa/twagraph.cc,
spot/twaalgos/alternation.cc, spot/twaalgos/complete.cc,
spot/twaalgos/complete.hh, spot/twaalgos/degen.cc,
spot/twaalgos/determinize.cc, spot/twaalgos/hoa.cc,
spot/twaalgos/isdet.cc, spot/twaalgos/mask.cc,
spot/twaalgos/minimize.cc, spot/twaalgos/product.cc,
spot/twaalgos/remfin.cc, spot/twaalgos/remprop.cc,
spot/twaalgos/sbacc.cc, spot/twaalgos/sccfilter.cc,
spot/twaalgos/simulation.cc, spot/twaalgos/strength.cc,
spot/twaalgos/stutter.cc, spot/twaalgos/totgba.cc,
tests/core/parseaut.test, tests/python/product.ipynb: Adjust.
* NEWS, doc/org/concepts.org, doc/org/hoa.org,
doc/org/tut21.org: Document it.
2017-03-20 21:07:08 +01:00
Alexandre Duret-Lutz
3d3baf449e parsetl: improve coverage
* spot/parsetl/parsetl.yy: Adjust one diagnostic.
* spot/parsetl/scantl.ll: Fix recovering of missing closing brace
in lenient mode.
* tests/python/declenv.py: Move some tests...
* tests/python/ltlparse.py: ... here, and add many more.
* NEWS: Mention the lenient mode bug.
2017-03-15 14:23:19 +01:00
Alexandre Duret-Lutz
2e3fc0d4d2 emptiness checks: replace assert-preconditions by exceptions
* spot/twaalgos/couvreurnew.cc, spot/twaalgos/gv04.cc,
spot/twaalgos/magic.cc, spot/twaalgos/se05.cc, spot/twaalgos/tau03.cc,
spot/twaalgos/tau03opt.cc: Throw if precondition on acceptance
condition is not satisfied.
* tests/python/misc-ec.py: New file.
* tests/Makefile.am: Add it.
* NEWS: Mention the change.
2017-03-10 14:36:22 +01: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
47e1c9692e typos: dictionnary -> dictionary
* doc/org/upgrade2.org, tests/python/prodexpt.py,
tests/python/product.ipynb, NEWS: Fix typos.
* tests/sanity/style.test: Add a check for this.
2017-03-08 16:10:47 +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
Clément Gillard
da051e112d decompose_scc: Update 'decompose' notebook
* tests/python/decompose.ipynb: Add about `decompose_scc`.
* doc/org/tut.org: Update description.
2017-02-21 21:36:26 +01:00
Clément Gillard
5d143cc1f8 decompose_scc: factor autfilt into decompose_acc_scc
Put what is done by `autfilt` in a new function, `decompose_acc_scc`.

* bin/autfilt.cc: Move code from here...
* spot/twaalgos/strength.cc, spot/twaalgos/strength.hh: To here.
* tests/python/decompose_scc.py: Test python binding.
2017-02-21 21:33:15 +01:00
Clément Gillard
164135d3d7 Add a decompose_scc() function
See #172.
While at it, fix typo in doxygen comment.

* spot/twaalgos/strength.cc, spot/twaalgos/strength.hh: New function.
* tests/python/decompose_scc.py, tests/Makefile.am: Test python
binding.

* spot/twaalgos/mask.hh: Fix typo.
2017-02-21 21:32:11 +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
Arthur Remaud
f7bbfd2812 autfilt: Better display of cluster when universal edge loops in it
Fixes #208

* NEWS: Informations about the modifications
* spot/twaalgos/dot.cc (print): Gestion of cluster for
universal transitions
* tests/core/alternating.test: tests added
* tests/core/neverclaimread.test: tests changed for
new dot format
* tests/core/readsave.test: tests changed
* tests/core/sccdot.test: tests changed
* tests/python/_altscc.ipynb: tests changed
* tests/python/decompose.ipynb: tests changed
2017-02-16 18:53:18 +01:00
Alexandre Duret-Lutz
fefb375d5f is_alternating() -> !is_existential()
Part of #212.

* spot/misc/common.hh (SPOT_DEPRECATED): Improve support current
compilers and options flags.
* spot/twa/twagraph.hh, spot/graph/graph.hh (is_alternating): Mark it
as deprecated.
(is_existential): New method.
* bin/autfilt.cc, bin/ltlcross.cc, spot/parseaut/parseaut.yy,
spot/twa/twa.cc, spot/twa/twagraph.cc, spot/twaalgos/alternation.cc,
spot/twaalgos/are_isomorphic.cc, spot/twaalgos/canonicalize.cc,
spot/twaalgos/couvreurnew.cc, spot/twaalgos/cycles.cc,
spot/twaalgos/degen.cc, spot/twaalgos/determinize.cc,
spot/twaalgos/dot.cc, spot/twaalgos/dtbasat.cc,
spot/twaalgos/dtwasat.cc, spot/twaalgos/hoa.cc,
spot/twaalgos/isunamb.cc, spot/twaalgos/isweakscc.cc,
spot/twaalgos/mask.hh, spot/twaalgos/minimize.cc,
spot/twaalgos/postproc.cc, spot/twaalgos/product.cc,
spot/twaalgos/randomize.cc, spot/twaalgos/remfin.cc,
spot/twaalgos/sbacc.cc, spot/twaalgos/sccfilter.cc,
spot/twaalgos/sccinfo.cc, spot/twaalgos/simulation.cc,
spot/twaalgos/strength.cc, tests/core/graph.cc, tests/core/ngraph.cc,
tests/python/alternating.py: Adjust all uses.
* NEWS: Mention the renaming.
2017-02-12 15:56:02 +01:00
Alexandre Duret-Lutz
fb59cab09f emptiness: allow twa_run::as_twa to preserve names
* spot/twaalgos/emptiness.cc, spot/twaalgos/emptiness.hh: Here.
* tests/python/ltsmin-dve.ipynb: Add a test.
* NEWS: Mention the change.
2017-02-04 10:02:23 +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
5939ca4e85 langmap: Add example in notebook
* tests/python/highlighting.ipynb: Add an example of
highlight_languages().
2017-01-17 22:53:20 +01:00
Alexandre Duret-Lutz
0ad62cb97b langmap: adjust to only color non-unique languages
Fixes #203.

* spot/twaalgos/langmap.hh (highlight_languages): Simplify the
interface by only taking the automaton to color.
* spot/twaalgos/langmap.cc (highlight_languages): Only introduce
color for states that have a non-unique language.
* tests/core/highlightstate.test: Update and add more tests.
* tests/python/langmap.py: Keep the tests simple.
* bin/autfilt.cc: Adjust usage and help string.
2017-01-17 21:58:03 +01:00
Alexandre GBAGUIDI AISSE
ef2355a542 twaalgos: Set 'dicho' algo as default for SAT-based minimization
* python/spot/__init__.py: Handle options.
* spot/twaalgos/dtwasat.cc: Handle options.
* spot/twaalgos/postproc.cc: Handle options.
* spot/twaalgos/postproc.hh: Handle options.
* tests/core/satmin.test: Update tests.
Now use 'sat-minimize=4' to use the naive algo.
* tests/core/satmin2.test: Update tests.
Now use --sat-minimize='naive' to use the naive algo.
* tests/python/satmin.py: Update tests.
Now use 'naive=True' to use the naive algo.
2017-01-06 19:53:21 +01:00
Alexandre GBAGUIDI AISSE
67e3a4f28e spot: Add 'langmap' option with dichotomy (it helps to choose min val)
* python/spot/__init__.py: Handle 'dicho' option in 'sat_minimize'.
* spot/priv/satcommon.cc: Implement get_number_of_distinct_vals.
* spot/priv/satcommon.hh: Declare get_number_of_distinct_vals.
* spot/twaalgos/dtbasat.cc: Use get_number_of_distinct_vals.
* spot/twaalgos/dtbasat.hh: Change dichotomy function's prototype.
* spot/twaalgos/dtwasat.cc: Use get_number_of_distinct_vals.
* spot/twaalgos/dtwasat.hh: Change dichotomy function's prototype.
Handle options.
* spot/twaalgos/postproc.cc: Handle options.
* spot/twaalgos/postproc.hh: Add dicho_langmap_ var for options.
* tests/core/satmin2.test: Add tests for dichotomy.
* tests/core/satmin.test: Add tests for dichotomy.
* tests/python/satmin.py: Replace 'dichotomy' with 'dicho' option.
2017-01-06 19:53:21 +01:00
Alexandre GBAGUIDI AISSE
8a0eed6cef twaalgos: Implement language_map algo
* python/spot/impl.i: Add python bindings.
* spot/twaalgos/langmap.cc: Implement algo.
* spot/twaalgos/langmap.hh: Declare algo.
* spot/twaalgos/Makefile.am: Add new files.
* tests/python/langmap.py: Add tests.
* NEWS: Update.
2017-01-06 19:53:21 +01:00
Alexandre GBAGUIDI AISSE
9a204b770f spot: Implement dt*a_sat_minimize_assume(...) methods
* python/spot/__init__.py: Add 'assume' option.
* spot/misc/satsolver.cc: Add function to handle assumptions.
* spot/misc/satsolver.hh: Declare assumption function.
* spot/twaalgos/dtbasat.cc: Implement dtba_sat_minimize_assume.
* spot/twaalgos/dtbasat.hh: Declare it.
* spot/twaalgos/dtwasat.cc: Implement dtwa_sat_minimize_assume and
handle options.
* spot/twaalgos/dtwasat.hh: Declare it.
* spot/twaalgos/postproc.cc: Handle options.
* spot/twaalgos/postproc.hh: Use param_ var for incr and assume.
* tests/core/satmin.test: Add tests for the new function.
* tests/core/satmin2.test: Add tests for the new function.
* tests/python/satmin.py: Add tests for the new function.
2017-01-06 19:53:21 +01:00
Alexandre GBAGUIDI AISSE
ee17c2dee4 twaalgos: Implement dt*a_sat_minimize_incr(...) functions
* python/spot/__init__.py: Add 'incr' boolean argument.
* spot/twaalgos/dtbasat.cc: Implement dtba_sat_minimize_incr(...).
* spot/twaalgos/dtbasat.hh: Declare it.
* spot/twaalgos/dtwasat.cc: Implement dtwa_sat_minimize_incr(...) and
deal with options.
* spot/twaalgos/dtwasat.hh: Declare it.
* spot/twaalgos/postproc.cc: Add option --sat-minimize=incr.
* spot/twaalgos/postproc.hh: Add incr parameter.
* tests/core/satmin.test: Add tests for incremental version.
Update expected result.
* tests/core/satmin2.test: Add tests for incremental version.
* tests/python/satmin.py: Add tests for incremental version.
2017-01-06 19:53:21 +01:00
Alexandre GBAGUIDI AISSE
dfd500a559 tests: Improve tests related to SAT-minimization
* tests/core/satmin.test: Delete check for SPOT_SATSOLVER env
variable and add state numbers verification.
* tests/core/satmin2.test: Delete check for SPOT_SATSOLVER
env variable.
* tests/python/satmin.py: Delete check for SPOT_SATSOLVER
env variable.
2017-01-06 19:53:21 +01:00
Alexandre Duret-Lutz
32086f7c83 tests: update ipnbdoctest to graphviz 2.40 and Python 3.6
This fix recent failures observed on arch linux because
it uses newer versions of graphviz and Python.

* tests/python/ipnbdoctest.py (sanitize): More substitutions.
2017-01-06 17:20:55 +01:00
Alexandre Duret-Lutz
12f6c8cf10 twa_graph: add a merge_univ_dests() method
and call it after parsing

* spot/twa/twagraph.cc, spot/twa/twagraph.hh
(twa_graph::merge_univ_dests): New method.
* spot/parseaut/parseaut.yy: Call it.
* spot/twaalgos/dot.cc: Improve output, now that
several edges can use the same universal destination.
* tests/core/alternating.test, tests/core/complete.test,
tests/core/parseaut.test, tests/python/_altscc.ipynb,
tests/python/alternating.py, tests/python/alternation.ipynb: Adjust
test case.
* doc/org/tut24.org: Adjust example.
2016-12-29 12:57:53 +01:00
Alexandre Duret-Lutz
fa06cfa303 alternation: implement remove_alternation() for weak alt automata
This mixes the subset construction (for 1-state rejecting SCCs) and
the breakpoint construction (for larger rejecting SCCs).  The
algorithm should probably be rewritten in a cleaner and more efficient
way, but that should do for a first version.  It should be easy to
extend it to support Büchi acceptance (since the breakpoint
construction works for this) when we need it.

* spot/twaalgos/alternation.hh,
spot/twaalgos/alternation.cc (remove_alternation): New function.
* tests/python/alternation.ipynb: New file.
* tests/Makefile.am, doc/org/tut.org: Add it.
2016-12-29 12:57:16 +01:00
Alexandre Duret-Lutz
a4ce999402 sccinfo: adjust to work with alternating automata
* spot/twaalgos/sccinfo.cc: Consider universal edges as if they were
existential edges.
* spot/twaalgos/sccinfo.hh: Document that.
* spot/twaalgos/dot.cc: Allow option 's' again, for easy testing.
* tests/core/alternating.test: Adjust tests.
* tests/python/_altscc.ipynb: New file (more tests).
* tests/Makefile.am: Add it.
2016-12-27 12:36:38 +01:00