Commit graph

273 commits

Author SHA1 Message Date
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
f9eefdc295 emptiness stats: remove some unused code
* spot/twaalgos/emptiness_stats.hh (unsigned_statistics_copy): Remove.
* tests/core/randtgba.cc: Remove option -H.
2017-03-10 16:24:46 +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
0d8a88b28b degen: improve test coverage
* spot/twaalgos/degen.cc: Make use_cust_acc_orders as unlikely, as it
was never true in the whole test suite before this patch.
* tests/core/ltlcross2.test: Play with degen-order and degen-lcache
options to test more cases.
2017-03-08 15:48:38 +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
be4f139757 tests: remove ltlprod
This very old test did not do anything useful today.

* tests/core/ltlprod.cc, tests/core/ltlprod.test: Delete.
* tests/Makefile.am: Adjust.
2017-03-07 23:15:37 +01:00
Alexandre Duret-Lutz
2c9f201c0d twa_graph: fix set_univ_init_state() with initializer_list
Reported by Thomas Medioni.

* spot/twa/twagraph.hh (set_univ_init_state): Remove the bogus
template parameter.
* tests/core/twagraph.cc, tests/core/tgbagraph.test: Test the method.
* NEWS: Mention the bug.
2017-03-07 13:36:49 +01:00
Alexandre Duret-Lutz
a66e7704d8 monitor: fix -MD/-M difference in property output
Fixes #241.

* spot/twaalgos/postproc.cc: Use the deterministic monitor if it
has as many states as the non-deterministic one.
* spot/twaalgos/minimize.cc (minimize_monitor): Quickly check
for terminal automata.
* spot/twaalgos/stripacc.cc: Set the weak property.
* spot/twaalgos/stripacc.hh: Improve documentation.
* tests/core/monitor.test, tests/core/sbacc.test: Update.
* NEWS: Mention the issue.
2017-03-03 18:37:32 +01:00
Alexandre Duret-Lutz
2b9accdf58 postproc: fix monitor code
Fixes #240.

* spot/twaalgos/postproc.cc: Do not call do_simul on the output of
minimize_monitor(), and do not skip complete() when PREF_==Any.
* tests/core/monitor.test: Add a test case.
* NEWS: Mention the bug.
* doc/org/ltl2tgba.org: Document complete monitors.
2017-03-03 14:39:55 +01:00
Alexandre Duret-Lutz
37fc948be4 sbacc: fix a typo and remove some useless code
* spot/twaalgos/sbacc.cc: Do not assign to one_in twice, and
fix the value of init_acc.
* tests/core/sbacc.test: Add a test case.
* NEWS: Mention the bug.
2017-03-03 11:55:00 +01:00
Alexandre Duret-Lutz
1eb5be543d acc: implement min_set() and max_set() using gcc builtins
Fixes #238.

* spot/twa/acc.hh (max_set): Add a version using __builtin_clz().
(min_set): New method.
* tests/core/acc.cc, tests/core/acc.test: Add some tests.
2017-03-02 14:17:06 +01:00
Alexandre Duret-Lutz
18283d6907 add options to %x to list atomic propositions
* bin/common_aoutput.cc, bin/common_aoutput.hh, bin/common_output.cc,
bin/common_output.hh: Add options to %x to list atomic propositions
with various quoting scheme.  Deprecate --format=%a in favor of the
new --format=%x for consistency with --stats=%x.
* tests/core/format.test, tests/core/remprop.test: Adjust and add more
tests.
* NEWS: Mention these changes.
2017-03-01 16:02:09 +01:00
Alexandre Duret-Lutz
68ad391948 correct handling of --stats=%P
Fixes #236.

* bin/common_aoutput.cc: Fix it.
* tests/core/format.test: Improve test cases.
* NEWS: Mention the bug.
2017-02-28 17:02:06 +01:00
Alexandre Duret-Lutz
0d00ab24d2 bin: --stats=%x to count atomic propositions
* bin/common_aoutput.cc, bin/common_aoutput.hh: Implement %x and %X.
* tests/core/remprop.test: Test them.
* NEWS: Mention them.
2017-02-28 17:02:06 +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
c0eeea2c5f autfilt: Add '--decompose-scc' option
See #172.

* bin/autfilt.cc: Add option.
* tests/core/strength.test: Remove ambiguity with
'--decompose-strength'.
* NEWS: Mention it.
* tests/core/scc.test: Test it.
2017-02-21 21:33:14 +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
Alexandre Duret-Lutz
1c96afb1d0 genltl: --kv-phi is in fact --kv-psi
* bin/genltl.cc: Change the name and add the bibtex entry.
* bin/man/genltl.x: Replace LNCS by LNAI.
* tests/core/genltl.test: Also test the %F output.
2017-02-18 10:49:36 +01:00
Vincent Tourneur
fc2831bf24 genltl: Add 3 families of LTL formulas from a paper
Fixes #80.

* bin/genltl.cc: Add --kr-n2, --kr-nlogn and --kr-n.
* bin/man/genltl.x: Add the paper in the documentation.
* tests/core/genltl.test: Test them.
2017-02-16 18:59:34 +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
Arthur Remaud
34859568cd autfilt: add option (y) to --dot to split universal transitions
Fixes #207

* NEWS: Informations about the option 'y' for --dot added
* bin/common_aoutput.cc: Documentation for the option 'y'
for --dot added
* spot/twaalgos/dot.cc (print_dst, process_link): Functions
modified for the new option
* tests/core/alternating.test: Tests added
2017-02-16 18:52:37 +01:00
Etienne Renault
5516209d8c ltsmin: more information for MacOS users
* tests/ltsmin/README: this fixes #230.
2017-02-16 14:10:33 +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
15c6fd9562 alternation: fix detection of non-weak automata
Fixes #218.

* spot/twaalgos/alternation.cc: Adjust check.
* tests/core/alternating.test: Add test case from #218.
* NEWS: Mention the bug.
2017-02-12 01:37:52 +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
Maximilien Colange
3f5470898d Rework the 'down_cast' macro, closing #196.
* spot/misc/casts.hh: New inline functions and compile-time checks.
* spot/kripke/kripkegraph.hh, spot/ta/taexplicit.cc,
  spot/ta/taproduct.cc, spot/ta/tgtaproduct.cc, spot/taalgos/tgba2ta.cc,
  spot/twa/taatgba.hh, spot/twa/taatgba.cc, spot/twa/twagraph.hh,
  spot/twa/twaproduct.cc, spot/twaalgos/emptiness.cc,
  spot/twaalgos/stutter.cc, spot/ltsmin/ltsmin.cc, tests/core/ikwiad.cc,
  tests/core/ngraph.cc: Remove downcast checks from code.
2017-02-02 17:01:40 +01:00
Maximilien Colange
07a76e4d93 Do not warn about static_asserts.
* tests/sanity/style.test: Filter out static_assert.
2017-02-02 17:01:12 +01:00
Etienne Renault
63116ff79c Fixes #205.
* tests/core/hierarchy.test: here.
2017-02-01 19:41:54 +01:00
Alexandre Duret-Lutz
a4b575db1c ltldo: add portfolio options
Fixes #206.

* bin/ltldo.cc: Implement --smallest and --greatest.
* tests/core/ltldo2.test: Test them.
* NEWS, doc/org/ltldo.org: Document them.
2017-01-27 20:35:40 +01:00
Maximilien Colange
6acb168a5d Do not specify tests extensions as we use a unique runner.
* tests/Makefile.am: Remove TEST_EXTENSIONS + typos.
2017-01-23 09:40:15 +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 Duret-Lutz
c7141bd189 ltlcross: disable products columns in CSV if --products=0
* bin/ltlcross.cc: Fix it.
* tests/core/ltlcross3.test: Test it.
* NEWS: Mention the bug.
2017-01-14 10:43:35 +01:00
Alexandre Duret-Lutz
b210db8949 sat_minimize: do not complete in the preproc step
Fixes #204.

* spot/twaalgos/dtwasat.cc (sat_minimize): Here.
* tests/core/satmin2.test: Add a test case.
* NEWS: Mention the bug.
2017-01-14 10:18:16 +01:00
Alexandre Duret-Lutz
3ff2acb397 alternation: better detection of non-weak alternating automata
* spot/twaalgos/alternation.cc: Fix the code to also check the
weakness of single-state SCCs.
* tests/core/alternating.test: Add a test from ltl3hoa.
2017-01-14 10:02:37 +01:00
Alexandre Duret-Lutz
43520a3e87 ltlcross, ltldo: add a --relabel option
* bin/common_trans.cc, bin/common_trans.hh: Add the --relabel option.
* bin/ltlcross.cc, bin/ltldo.cc: Implement it.
* doc/org/ltldo.org, NEWS: Document it.
* tests/core/ltl3ba.test: Test it.
2017-01-13 22:12:43 +01:00
Alexandre Duret-Lutz
b0ba6190b7 ltlcross: relabel unsupported atomic propisitions in %s
* bin/ltlcross.cc: Do it.
* bin/common_trans.cc: Adjust documentation.
* tests/core/ltl3ba.test: Test it.
* NEWS: Document it.
2017-01-13 22:12:43 +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
Alexandre Duret-Lutz
7d9ce0d6fc tl: mp_class() and --format=%[vw]h
Tools for deciding the class of a formula.

* spot/tl/hierarchy.cc, spot/tl/hierarchy.hh: New files.
* spot/tl/Makefile.am: Add them.
* bin/common_output.cc, bin/common_output.hh: Implement --format=%h.
* tests/core/hierarchy.test: More tests.
* NEWS: Update.
2017-01-10 22:41:11 +01:00
Alexandre Duret-Lutz
de8a248fb2 ltlfilt: add --recurrence and --persistence
* spot/twaalgos/remfin.cc, spot/twaalgos/remfin.hh
(rabin_to_buchi_maybe): Make this function public.
* bin/ltlfilt.cc: Implement the two options.
* tests/core/hierarchy.test: New file.
* tests/Makefile.am: Add it.
* NEWS: Mention the new options.
2017-01-10 16:11:11 +01:00
Alexandre Duret-Lutz
12ecb3febf twagraph: fix purge_dead_states on alternating automata
* tests/core/alternating.test: Run some of the test through
valgrind to exhibit the bug.
* spot/twa/twagraph.cc: Fix it.
2017-01-10 10:29:32 +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