Commit graph

121 commits

Author SHA1 Message Date
Alexandre Duret-Lutz
19cd2cda6f python: add binding for is_unambiguous
Fixes #117.

* wrap/python/spot.py, wrap/python/spot_impl.i: Add binding.
* wrap/python/tests/remfin.py: Add a small test case.
* NEWS: Mention it.
2015-11-05 13:43:02 +01:00
Alexandre Duret-Lutz
8ea5f73c1a twa: no default argument for property setters
This is a preliminary for the renaming suggested in #116.

* src/twa/twa.hh (prop_state_based_acc, prop_inherently_weak,
prop_deterministic, prop_unambiguous, prop_stutter_invariant,
prop_stutter_sensitive): Do not default the argument to true.
* src/parseaut/parseaut.yy, src/twaalgos/degen.cc,
src/twaalgos/dtbasat.cc, src/twaalgos/dtgbasat.cc,
src/twaalgos/minimize.cc, src/twaalgos/randomgraph.cc,
src/twaalgos/remfin.cc, src/twaalgos/sbacc.cc,
src/twaalgos/simulation.cc, src/twaalgos/totgba.cc,
wrap/python/tests/remfin.py: Adjust.
2015-11-04 18:25:49 +01:00
Alexandre Duret-Lutz
f6af2a84cb twa_succ_iterator: rename accessors
* src/twa/twa.hh, src/ta/ta.hh (current_state,
current_acceptance_conditions, current_condition): Rename as...
(dst, acc, cond): ... these.
* iface/ltsmin/ltsmin.cc, src/kripke/fairkripke.cc,
src/kripke/fairkripke.hh, src/kripke/kripke.cc,
src/kripke/kripke.hh, src/kripke/kripkeexplicit.cc,
src/kripke/kripkeexplicit.hh, src/kripke/kripkeprint.cc,
src/ta/taexplicit.cc, src/ta/taexplicit.hh, src/ta/taproduct.cc,
src/ta/taproduct.hh, src/ta/tgtaproduct.cc, src/ta/tgtaproduct.hh,
src/taalgos/dot.cc, src/taalgos/emptinessta.cc,
src/taalgos/minimize.cc, src/taalgos/reachiter.cc,
src/taalgos/tgba2ta.cc, src/twa/taatgba.cc, src/twa/taatgba.hh,
src/twa/twagraph.hh, src/twa/twaproduct.cc,
src/twa/twasafracomplement.cc, src/twaalgos/bfssteps.cc,
src/twaalgos/bfssteps.hh, src/twaalgos/compsusp.cc,
src/twaalgos/copy.cc, src/twaalgos/emptiness.cc,
src/twaalgos/gtec/gtec.cc, src/twaalgos/gv04.cc,
src/twaalgos/lbtt.cc, src/twaalgos/ltl2tgba_fm.cc,
src/twaalgos/magic.cc, src/twaalgos/minimize.cc,
src/twaalgos/ndfs_result.hxx, src/twaalgos/reachiter.cc,
src/twaalgos/se05.cc, src/twaalgos/stats.cc,
src/twaalgos/stutter.cc, src/twaalgos/tau03.cc,
src/twaalgos/tau03opt.cc, wrap/python/tests/interdep.py: Adjust.
* NEWS: Mention the renamings.
2015-10-28 21:16:21 +01:00
Alexandre Duret-Lutz
dee73ee342 parse_aut: simplify the interface
* src/parseaut/public.hh, src/parseaut/parseaut.yy,
src/parseaut/fmterror.cc: Add a raise_errors options.  Remove the
parse_strict() method.  Store parse errors and filename in the output
parsed_aut to simplify usage.
* doc/org/tut20.org, doc/org/tut21.org, doc/org/tut30.org,
src/bin/autfilt.cc, src/bin/common_hoaread.cc, src/bin/dstar2tgba.cc,
src/bin/ltlcross.cc, src/bin/ltldo.cc, src/tests/complementation.cc,
src/tests/ikwiad.cc, src/tests/ltlcross3.test, src/tests/ltldo.test,
wrap/python/spot.py, wrap/python/tests/parsetgba.py: Adjust usage.
* NEWS: Mention the changes.
2015-10-26 20:28:06 +01:00
Alexandre Duret-Lutz
80a6a183e3 python: add a timeout argument to automaton() and automata()
* wrap/python/spot.py: Implement it.  Also report non-zero
exit using CalledProcessError.
* wrap/python/tests/automata-io.ipynb, wrap/python/tests/piperead.ipynb:
Adjust.
* NEWS: Mention the change.
2015-10-21 11:57:57 +02:00
Alexandre Duret-Lutz
0f3bc27d7b python: fix bindings for scc_filter as a method
* wrap/python/spot.py: Fix bindings for scc_filter.
* wrap/python/tests/remfin.py: Test them.
2015-10-20 14:54:06 +02:00
Alexandre Duret-Lutz
87cb58d0a1 python: introduce a spot.postprocess() function
This simplifies the use of the spot.postprocessor object.

* wrap/python/spot.py: Add it.
* wrap/python/tests/automata.ipynb: Use it.
* NEWS: Mention it.
2015-10-19 18:09:22 +02:00
Alexandre Duret-Lutz
e1ddf97862 fix unabbreviate
This is a bug:

    % ltlfilt -f 'a W b' --unabbreviate=WR
    a U (b | (a W b))

* src/tl/unabbrev.cc: Here.
* src/tests/unabbrevwm.test: Harden test case.
* wrap/python/tests/randltl.ipynb: Adjust expected output.
* NEWS: Mention the fix.
2015-10-19 10:56:31 +02:00
Alexandre Duret-Lutz
43a5187ab4 python: add get_name & set_name for automata
* wrap/python/spot_impl.i (get_name, set_name): New methods for twa.
* wrap/python/tests/remfin.py: Test them.
* wrap/python/ajax/spotcgi.in: Use set_name().
* NEWS: Mention it.
2015-10-18 15:43:19 +02:00
Alexandre Duret-Lutz
176c9e2e17 tl: rename ltl_simplifier to tl_simplifier
* doc/org/tut01.org, doc/tl/tl.tex, src/bin/common_r.hh,
src/bin/ltlfilt.cc, src/tests/equalsf.cc, src/tests/ikwiad.cc,
src/tests/randtgba.cc, src/tests/reduc.cc, src/tests/syntimpl.cc,
src/tl/nenoform.cc, src/tl/randomltl.cc, src/tl/randomltl.hh,
src/tl/simplify.cc, src/tl/simplify.hh, src/twaalgos/ltl2tgba_fm.cc,
src/twaalgos/ltl2tgba_fm.hh, src/twaalgos/stutter.cc,
src/twaalgos/translate.cc, src/twaalgos/translate.hh,
wrap/python/ajax/spotcgi.in, wrap/python/spot.py,
wrap/python/tests/interdep.py: Rename ltl_simplifier to tl_simplifier.
* NEWS: Mention it.
2015-10-18 13:35:23 +02:00
Alexandre Duret-Lutz
9689c4ccfc python: update the formulaiterator bindings
* wrap/python/spot.py: Add the unabbreviate() method, and
remove unabbrivate_ltl() and get_literal().
* wrap/python/tests/randltl.ipynb: Demonstrate unabbreviate().
2015-10-18 11:54:51 +02:00
Alexandre Duret-Lutz
1d30242d17 remove_fin: fix bug in remove_fin_det_weak
* wrap/python/tests/remfin.py: New file.
* wrap/python/tests/Makefile.am: Add it.
* src/twaalgos/remfin.cc (remove_fin_det_weak): Purge dead states.
2015-10-17 17:42:50 +02:00
Alexandre Duret-Lutz
cd2e527526 scc_filter_states: also remove useless acceptance marks
* src/twaalgos/sccfilter.hh,
src/twaalgos/sccfilter.cc (scc_filter_states): Remove useless acceptance
marks while preserving state-based acceptance.  Add a new argument
to specify if all useless mark have to be removed, like for scc_filter.
* src/twaalgos/simulation.cc: Use the new parameter.
* src/twaalgos/postproc.cc: Likewise.  Also call do_scc_filter even
after WDBA simplification to cleanup trivial SCCs.  Preserve state-based
acceptance for weak automata.
* src/tests/readsave.test: Add one test.
* src/tests/dstar.test, src/tests/prodor.test, src/tests/remfin.test,
src/tests/sim3.test, wrap/python/tests/automata.ipynb,
wrap/python/tests/piperead.ipynb: Adjust expected output.
* NEWS: Mention the change.
2015-10-14 20:02:19 +02:00
Alexandre Duret-Lutz
e8ce08a989 python: better way to extend existing classes
* wrap/python/spot.py: Use a decorator to extend classes.
* wrap/python/tests/formulas.ipynb: Adjust expected help text.
2015-10-08 08:54:50 +02:00
Alexandre Duret-Lutz
1f0258e9f7 python: docstrings cleanup
* wrap/python/spot.py: Better docstrings.
* wrap/python/tests/formulas.ipynb: Update.
2015-10-04 12:17:06 +02:00
Alexandre Duret-Lutz
5bfd0267e7 python: implement formula.__format__
Fixes #105.

* src/bin/common_trans.cc (quote_shell_string): Move ...
* src/misc/escape.cc, src/misc/escape.hh (quote_shell_string):
... here.
* wrap/python/spot_impl.i: Wrap escape.hh.
* wrap/python/spot.py: Implement formula.__format__.
* wrap/python/tests/ltlsimple.py: Test it.
* NEWS, doc/org/tut01.org, wrap/python/tests/formulas.ipynb: Document
it.
2015-10-03 15:46:05 +02:00
Alexandre Duret-Lutz
6ff4fa9722 Work around weird Python 3.5 generator/iterator interaction
* wrap/python/spot.py: Python 3.5 reports some unexpected SystemError
messages when the stack of iterator(...(iterator(generator))) we build
for random LTL generation raises a StopIteration.  The messages are
attached either to delete_formula or delete_randltlgenerator, claiming
that these functions exit with an error; but I have checked that they
do not.  I've been unable to understand the cause of the issue.
Replacing the generator by an iterator at least fixes the problem in a
way that is transparent for our API.
* wrap/python/tests/randltl.ipynb: Adjust expected formulas.
2015-10-03 15:46:05 +02:00
Alexandre Duret-Lutz
5f2d55ab2e python: do not crash when a function returns a null formula
* wrap/python/spot_impl.i: Map null formulas to None.
* wrap/python/tests/randgen.py: New file.
* wrap/python/tests/Makefile.am: Add it.
2015-10-03 15:46:05 +02:00
Alexandre Duret-Lutz
5e07e8384d tgba_complete: rename as complete and export in Python
* src/twaalgos/complete.cc, src/twaalgos/complete.hh
(tgba_complete, tgba_complete_here): Rename as...
(complete, complete_here): ... these.  Also fix useless output of
acceptance marks on transition leading to the sink when the automaton
does not use state-based acceptance.
* src/tests/ikwiad.cc, src/twaalgos/dtgbacomp.cc,
src/twaalgos/dtgbasat.cc, src/twaalgos/postproc.cc,
src/twaalgos/product.cc: Adjust.
* wrap/python/spot_impl.i: Export these function.
* wrap/python/tests/automata.ipynb: Test spot.complete().
2015-10-03 15:46:05 +02:00
Alexandre Duret-Lutz
3e10dba978 python: work around old swig version
Swig 3.0.2 (currently installed by Debian), install strongly typed
enumerator in the main namespace instead of in its own namespace.
This is fixed in latter versions of Swig.

* wrap/python/spot.py: If spot.op does not exists, populated it with all
operators from the spot namespace.
* wrap/python/tests/ltlsimple.py: Use operators from spot.op.
2015-09-28 15:24:52 +02:00
Alexandre Duret-Lutz
fad05632a2 python: implement the map and transform functions for formulas
* wrap/python/spot.py: Implement them.
* wrap/python/tests/ltlsimple.py: New tests.
2015-09-28 08:31:53 +02:00
Alexandre Duret-Lutz
533268000d python: implement __getitem__ for formula
* wrap/python/spot_impl.i: Implement it.
* wrap/python/tests/ltlsimple.py: Test a for loop.
* src/ltlast/formula.hh: Remove superfluous assert().
2015-09-28 08:31:34 +02:00
Alexandre Duret-Lutz
b77f7e24c3 revamp the formula hierarchy (montro-patch)
Flatten the formula ltl::formula hiearchy into a single ltl::vnode that
has an enumerator to distinguish the types of node, and a common
interface to access children, update reference counts, etc.  The
ltl::formula class is now a thin wrapper around an ltl::vnode pointer to
keep track of reference counts automatically.  Visitor are not used
anymore; we now have map() and traversor() methods that are more
concise.

This basically fixes #43, but should be followed by some fine tuning
that should now be localized to the formula.hh and formula.cc files.

Some statistics about this patch.  I started working on it on Sep 9, had
a first compiling version two weeks later on Sep 22, and it then took 5
days to fixes the ~70 distincts bugs that were introduced during the
conversion.  About 13200 lines were modified, and one third of those
were removed.

* src/ltlast/formula.cc, src/ltlast/formula.hh: Complete rewrite,
including what was in separate nearby files.
* src/ltlast/allnodes.hh, src/ltlast/atomic_prop.cc,
src/ltlast/atomic_prop.hh, src/ltlast/binop.cc, src/ltlast/binop.hh,
src/ltlast/bunop.cc, src/ltlast/bunop.hh, src/ltlast/constant.cc,
src/ltlast/constant.hh, src/ltlast/multop.cc, src/ltlast/multop.hh,
src/ltlast/unop.cc, src/ltlast/unop.hh, src/ltlvisit/dump.cc,
src/ltlvisit/dump.hh, src/ltlast/predecl.hh: Delete these files.  Their
feature have been merged in formula.hh and formula.cc.
* src/ltlast/visitor.hh, src/ltlvisit/clone.cc, src/ltlvisit/clone.hh,
src/ltlvisit/dump.hh, src/ltlvisit/postfix.cc, src/ltlvisit/postfix.hh:
Delete these files, as we do not use visitors anymore.
* bench/stutter/stutter_invariance_formulas.cc,
bench/stutter/stutter_invariance_randomgraph.cc, doc/org/tut01.org,
doc/org/tut02.org, doc/org/tut10.org, doc/org/tut22.org,
iface/ltsmin/ltsmin.cc, iface/ltsmin/ltsmin.hh,
iface/ltsmin/modelcheck.cc, src/bin/autfilt.cc,
src/bin/common_aoutput.cc, src/bin/common_aoutput.hh,
src/bin/common_finput.cc, src/bin/common_finput.hh,
src/bin/common_output.cc, src/bin/common_output.hh,
src/bin/common_trans.cc, src/bin/common_trans.hh, src/bin/dstar2tgba.cc,
src/bin/genltl.cc, src/bin/ltl2tgba.cc, src/bin/ltl2tgta.cc,
src/bin/ltlcross.cc, src/bin/ltldo.cc, src/bin/ltlfilt.cc,
src/bin/ltlgrind.cc, src/bin/randaut.cc, src/bin/randltl.cc,
src/kripke/kripkeexplicit.cc, src/kripke/kripkeexplicit.hh,
src/kripkeparse/kripkeparse.yy, src/ltlast/Makefile.am,
src/ltlenv/declenv.cc, src/ltlenv/declenv.hh, src/ltlenv/defaultenv.cc,
src/ltlenv/defaultenv.hh, src/ltlenv/environment.hh,
src/ltlparse/ltlparse.yy, src/ltlparse/public.hh,
src/ltlvisit/Makefile.am, src/ltlvisit/apcollect.cc,
src/ltlvisit/apcollect.hh, src/ltlvisit/contain.cc,
src/ltlvisit/contain.hh, src/ltlvisit/dot.cc, src/ltlvisit/dot.hh,
src/ltlvisit/exclusive.cc, src/ltlvisit/exclusive.hh,
src/ltlvisit/length.cc, src/ltlvisit/length.hh, src/ltlvisit/mark.cc,
src/ltlvisit/mark.hh, src/ltlvisit/mutation.cc,
src/ltlvisit/mutation.hh, src/ltlvisit/nenoform.cc,
src/ltlvisit/nenoform.hh, src/ltlvisit/print.cc, src/ltlvisit/print.hh,
src/ltlvisit/randomltl.cc, src/ltlvisit/randomltl.hh,
src/ltlvisit/relabel.cc, src/ltlvisit/relabel.hh,
src/ltlvisit/remove_x.cc, src/ltlvisit/remove_x.hh,
src/ltlvisit/simpfg.cc, src/ltlvisit/simpfg.hh,
src/ltlvisit/simplify.cc, src/ltlvisit/simplify.hh, src/ltlvisit/snf.cc,
src/ltlvisit/snf.hh, src/ltlvisit/unabbrev.cc, src/ltlvisit/unabbrev.hh,
src/parseaut/parseaut.yy, src/ta/taexplicit.cc, src/ta/tgtaexplicit.cc,
src/taalgos/minimize.cc, src/taalgos/tgba2ta.cc, src/tests/bare.test,
src/tests/checkpsl.cc, src/tests/checkta.cc,
src/tests/complementation.cc, src/tests/consterm.cc,
src/tests/emptchk.cc, src/tests/equalsf.cc, src/tests/ikwiad.cc,
src/tests/isop.test, src/tests/kind.cc, src/tests/length.cc,
src/tests/ltldo.test, src/tests/ltlfilt.test, src/tests/ltlgrind.test,
src/tests/ltlprod.cc, src/tests/ltlrel.cc,
src/tests/parse_print_test.cc, src/tests/parseaut.test,
src/tests/parseerr.test, src/tests/randtgba.cc, src/tests/readltl.cc,
src/tests/reduc.cc, src/tests/syntimpl.cc, src/tests/taatgba.cc,
src/tests/tostring.cc, src/tests/twagraph.cc, src/tests/utf8.test,
src/twa/acc.cc, src/twa/bdddict.cc, src/twa/bdddict.hh,
src/twa/bddprint.cc, src/twa/formula2bdd.cc, src/twa/formula2bdd.hh,
src/twa/taatgba.cc, src/twa/taatgba.hh, src/twa/twa.cc, src/twa/twa.hh
src/twa/twagraph.cc, src/twa/twagraph.hh, src/twa/twasafracomplement.cc,
src/twaalgos/compsusp.cc, src/twaalgos/compsusp.hh,
src/twaalgos/dtgbasat.cc, src/twaalgos/hoa.cc, src/twaalgos/lbtt.cc,
src/twaalgos/ltl2taa.cc, src/twaalgos/ltl2taa.hh,
src/twaalgos/ltl2tgba_fm.cc, src/twaalgos/ltl2tgba_fm.hh,
src/twaalgos/minimize.cc, src/twaalgos/minimize.hh,
src/twaalgos/neverclaim.cc, src/twaalgos/postproc.cc,
src/twaalgos/postproc.hh, src/twaalgos/powerset.cc,
src/twaalgos/powerset.hh, src/twaalgos/randomgraph.cc,
src/twaalgos/remprop.cc, src/twaalgos/remprop.hh, src/twaalgos/stats.cc,
src/twaalgos/stats.hh, src/twaalgos/stutter.cc, src/twaalgos/stutter.hh,
src/twaalgos/translate.cc, src/twaalgos/translate.hh,
wrap/python/ajax/spotcgi.in, wrap/python/spot.py,
wrap/python/spot_impl.i, wrap/python/Makefile.am,
wrap/python/tests/automata-io.ipynb, wrap/python/tests/formulas.ipynb,
wrap/python/tests/ltl2tgba.py, wrap/python/tests/ltlparse.py,
wrap/python/tests/ltlsimple.py, wrap/python/tests/randltl.ipynb: Adjust
to use the new interface.
* src/sanity/style.test: Accept more C++11 patterns.
* NEWS: Mention the change.
2015-09-26 15:12:24 +02:00
Alexandre Duret-Lutz
d1f915c748 merge tunnabrev/lunnabrev/wmunabbrev into a single function
* src/ltlvisit/lunabbrev.cc, src/ltlvisit/lunabbrev.hh,
src/ltlvisit/tunabbrev.cc, src/ltlvisit/tunabbrev.hh,
src/ltlvisit/wmunabbrev.cc, src/ltlvisit/wmunabbrev.hh: Delete.
* src/ltlvisit/unabbrev.cc, src/ltlvisit/unabbrev.hh: New files.
* src/ltlvisit/Makefile.am: Adjust.
* src/ltlvisit/print.cc, src/tests/equalsf.cc, src/tests/Makefile.am,
src/twaalgos/ltl2taa.cc, wrap/python/spot_impl.i, src/bin/ltlfilt.cc:
Adjust callers.
* src/ltlvisit/contain.cc, src/tests/syntimpl.cc: Remove useless
include.
* wrap/python/tests/formulas.ipynb: New test cases.
* doc/tl/tl.tex: Group all rules in a single section.
* NEWS: Mention it.
2015-08-17 17:38:47 +02:00
Alexandre Duret-Lutz
2eab0344b9 fix latex escaping
* src/ltlvisit/print.cc: Property output the double
quotes in latex mode, not only sclatex.
* src/misc/escape.cc: Fix LaTeX escape to work in math mode.
* src/tests/latex.test: Add a test.
* wrap/python/tests/formulas.ipynb: Adjust expected output
* NEWS: Mention the fix.
2015-08-13 17:25:00 +02:00
Alexandre Duret-Lutz
86e16af97c debian: Distribute the html version of the ipython notebooks
* configure.ac: Check for ipython.
* wrap/python/tests/Makefile.am (nb-html): New rule, using ipython.
* debian/control: Depend on ipython.
* debian/rules: Run nb-html.
* debian/python3-spot.examples: Install the genrated html files.
2015-08-07 15:09:29 +02:00
Alexandre Duret-Lutz
344ac0f930 sccinfo: do not accumulate successors during merge
The command in #96 now takes 1min 16s.

* src/twaalgos/sccinfo.cc: Only gather successor SCCs when popping an
SCC.
* wrap/python/tests/automata.ipynb: Adjust.
2015-07-09 10:05:02 +02:00
Alexandre Duret-Lutz
a86391ab77 hoaparse: rename to parseaut
Because this parser is not specific to HOA anymore.

* src/hoaparse/Makefile.am, src/hoaparse/fmterror.cc,
src/hoaparse/hoaparse.yy, src/hoaparse/parsedecl.hh,
src/parseaut/public.hh, src/hoaparse/hoascan.ll,
src/tests/hoaparse.test: Rename to...
* src/parseaut/Makefile.am, src/parseaut/fmterror.cc,
src/parseaut/parseaut.yy, src/parseaut/parsedecl.hh,
src/hoaparse/public.hh, src/parseaut/scanaut.ll,
src/tests/parseaut.test: ... these, and also adjust the name internally.
For instance hoa_aut_ptr is now parsed_aut_ptr; hoa_stream_parser is now
automaton_stream_parser, and hoa_parse() has become parse_aut().
* NEWS, README, configure.ac, doc/org/tut20.org, src/Makefile.am,
src/bin/autfilt.cc, src/bin/common_aoutput.cc,
src/bin/common_aoutput.hh, src/bin/common_conv.cc,
src/bin/ltlcross.cc, src/bin/ltldo.cc, src/tests/Makefile.am,
src/tests/complementation.cc, src/tests/ltl2tgba.cc,
src/tests/readsave.test, wrap/python/ajax/spot.in,
wrap/python/spot.py, wrap/python/spot_impl.i,
wrap/python/tests/automata-io.ipynb, wrap/python/tests/parsetgba.py:
Adjust.
2015-06-11 13:31:13 +02:00
Alexandre Duret-Lutz
9f32021e0f lbtt: take options as a string like other print functions
* src/twaalgos/lbtt.hh (print_lbtt): Take a const char* opt argument.
* src/twaalgos/lbtt.cc: Use it, select state-based
vs. transition-based using automaton property, and implement output
for generalized state-based acceptance.
* src/bin/common_aoutput.cc, src/bin/common_aoutput.hh,
src/bin/dstar2tgba.cc: Adjust usage.  We do not need to handle
--lbtt=t as a special case anymore.
* src/tests/lbttparse.test, wrap/python/spot.py,
wrap/python/tests/automata-io.ipynb, wrap/python/tests/piperead.ipynb:
Adjust.
2015-06-10 23:29:41 +02:00
Alexandre Duret-Lutz
6c2985e753 fix Python bindings for relabeling_map, and document them
This fixes #61, and addresses one item of #14.

* src/ltlvisit/relabel.hh: Use a map rather than a unordered_map,
because the Swig binding for unordered_map do not seem functional.
* wrap/python/spot_impl.i: Adjust.
* wrap/python/tests/relabel.py: New file.
* wrap/python/tests/Makefile.am: Add it.
* doc/org/tut02.org: New file.
* doc/Makefile.am: Add it.
2015-06-07 14:22:31 +02:00
Alexandre Duret-Lutz
738f939ff8 adjust names for automata printers
The following renamings are made:

  never_claim_reachable -> print_never_claim
  hoa_reachable   -> print_hoa
  lbtt_reachable  -> print_lbtt
  dotty_reachable -> print_dot
  ltl::dotty      -> print_dot_psl

Fixes #89.

* src/ltlvisit/dotty.cc, src/ltlvisit/dotty.hh, src/taalgos/dotty.cc,
src/taalgos/dotty.hh src/twaalgos/dotty.cc, src/twaalgos/dotty.hh:
Rename...
* src/ltlvisit/dot.cc, src/ltlvisit/dot.hh src/taalgos/dot.cc,
src/taalgos/dot.hh src/twaalgos/dot.cc, src/twaalgos/dot.hh:
... those.
* bench/stutter/stutter_invariance_randomgraph.cc,
iface/ltsmin/modelcheck.cc, src/bin/common_aoutput.cc,
src/bin/dstar2tgba.cc, src/bin/ltl2tgta.cc, src/dstarparse/dra2ba.cc,
src/ltlvisit/Makefile.am, src/taalgos/Makefile.am,
src/tests/checkpsl.cc, src/tests/checkta.cc,
src/tests/complementation.cc, src/tests/emptchk.cc,
src/tests/ltl2tgba.cc, src/tests/ltlprod.cc, src/tests/randtgba.cc,
src/tests/readltl.cc, src/tests/taatgba.cc, src/tests/twagraph.cc,
src/twa/twa.hh, src/twa/twasafracomplement.cc,
src/twaalgos/Makefile.am, src/twaalgos/dtbasat.cc,
src/twaalgos/dtgbasat.cc, src/twaalgos/dupexp.cc,
src/twaalgos/lbtt.cc, src/twaalgos/lbtt.hh,
src/twaalgos/ltl2tgba_fm.cc, src/twaalgos/neverclaim.cc,
src/twaalgos/neverclaim.hh, wrap/python/ajax/spot.in,
wrap/python/spot.py, wrap/python/spot_impl.i,
wrap/python/tests/ltl2tgba.py, wrap/python/tests/parsetgba.py: Adjust.
2015-06-05 21:42:29 +02:00
Alexandre Duret-Lutz
98790f5345 ltlparse: rename the main functions
parse         -> parse_infix_psl
parse_lbt     -> parse_prefix_ltl
parse_sere    -> parse_infix_sere
parse_boolean -> parse_infix_boolean

Fixes #87.

* src/ltlparse/ltlparse.yy, src/ltlparse/public.hh:
Do the above changes.
* doc/mainpage.dox, doc/org/tut01.org, iface/ltsmin/modelcheck.cc,
src/bin/common_finput.cc, src/hoaparse/hoaparse.yy,
src/kripkeparse/kripkeparse.yy, src/tests/checkpsl.cc,
src/tests/checkta.cc, src/tests/complementation.cc,
src/tests/consterm.cc, src/tests/emptchk.cc, src/tests/equalsf.cc,
src/tests/kind.cc, src/tests/length.cc, src/tests/ltl2tgba.cc,
src/tests/ltlprod.cc, src/tests/ltlrel.cc, src/tests/randtgba.cc,
src/tests/readltl.cc, src/tests/reduc.cc, src/tests/syntimpl.cc,
src/tests/tostring.cc, wrap/python/ajax/spot.in,
wrap/python/tests/alarm.py, wrap/python/tests/interdep.py,
wrap/python/tests/ltl2tgba.py, wrap/python/tests/ltlparse.py: Adjust.
2015-06-04 09:26:57 +02:00
Alexandre Duret-Lutz
a75a9c091c random: fix rounding in barand()
This fixes #85.

* src/misc/random.hh (barand): Use round() before casting.
* doc/org/oaut.org: Recompute example.
* src/tests/randaut.test, wrap/python/tests/randaut.ipynb: Adjust.
2015-06-01 19:54:51 +02:00
Alexandre Duret-Lutz
0ac35a1591 randaut: rename -S as -Q for consistency
This way -S means --state-based-acc like with other tools
producing automata.   This fixes #82.

* src/bin/randaut.cc: Rename -S as -Q, rename --state-acc as
--state-based-acc (with --sbacc as a synonym), and declare -S as the
short version of --state-based-acc.
* doc/org/autfilt.org, doc/org/oaut.org, doc/org/randaut.org,
src/tests/isomorph.test, src/tests/randaut.test,
src/tests/randtgba.test, src/tests/readsave.test, src/tests/uniq.test,
wrap/python/tests/randaut.ipynb: Adjust all calls to randaut.
2015-06-01 09:20:52 +02:00
Alexandre Duret-Lutz
88141b2711 randaut: better generation of acceptance conditions
* src/bin/randaut.cc: Replace the --acc-type and --acc-sets
options by a more general --acceptance option, that take either
an acceptance formula, or an acceptance name parametred by ranges.
Also accept a range for the number of atomic propositions.
* src/twaalgos/randomgraph.cc (random_acceptance): Move...
* src/twa/acc.cc, src/twa/acc.hh (random): ... here.
(parse_acc_code): Generalize to accept ranges instead of
numbers whenever sensible, and accept a 'random' acceptance.
* src/tests/randaut.test: Adjust tests and add more.
* wrap/python/tests/randaut.ipynb: Adjust call to randaut.
2015-05-26 09:09:31 +02:00
Alexandre Duret-Lutz
5d7f4464ea acc: Adjust generalition of parity acceptance
According to https://github.com/adl/hoaf/issues/46

* src/twa/acc.cc (parity): Adjust generation.
* src/tests/hoaparse.test, wrap/python/tests/accparse.ipynb:
Adjust existing test cases.
* wrap/python/tests/accparse2.py: New test cases.
2015-05-24 00:00:36 +02:00
Alexandre Duret-Lutz
7b5c37d5a5 python: fix check of is_parity()
* wrap/python/tests/accparse2.py: Do not check max and odd if
is_parity is False, as this "argout" parameters are not initialized by
SWIG.
2015-05-22 07:54:45 +02:00
Alexandre Duret-Lutz
7b28f1ffb5 acc: typo in parse_acc_code for generalized_co_buchi
* src/twa/acc.cc: Fix it.
* wrap/python/tests/accparse.ipynb: Adjust.
2015-05-22 00:02:09 +02:00
Alexandre Duret-Lutz
e04b4eb9fb acc: better Rabin/Streett detection
* src/twa/acc.cc: Allow duplicate and reordered pairs.  Also recognize
the single-pair cases.
* src/twaalgos/hoa.cc: When Rabin or Streett is detected, canonicalize
the Acceptance: line.
* src/tests/hoaparse.test, wrap/python/tests/accparse2.py: More tests.
* src/tests/sbacc.test: Adjust.
2015-05-21 08:57:49 +02:00
Alexandre Duret-Lutz
04171207e6 acc: recognize parity acceptance
It has two modes: strict or not.  In strict mode (tested in
hoaparse.test), the acceptance formula has to match exactly the one
given in the HOA spec.  In non-strict mode (tested in accparse2.py)
any equivalent formula is accepted.

* src/twa/acc.cc, src/twa/acc.hh (acc_cond::is_parity): New method.
* src/twaalgos/hoa.cc: Use it.
* src/tests/hoaparse.test: Test it.
* wrap/python/spot_impl.i: Bind it.
* wrap/python/tests/accparse2.py: New file.
* wrap/python/tests/Makefile.am: Add it.
2015-05-20 20:00:25 +02:00
Alexandre Duret-Lutz
704eaf26c2 acc: add support for generating parity conditions
* src/twa/acc.cc, src/twa/acc.hh: Here.
* wrap/python/tests/accparse.ipynb: Test it.
2015-05-20 20:00:25 +02:00
Alexandre Duret-Lutz
8e1c846984 acc: parse standard acceptance names
* src/twa/acc.cc, src/twa/acc.hh: Add method to create
standard acceptance conditions, and adjust the parse_acc_code
to recognize them
* wrap/python/spot_impl.i (acc_cond::acc_code): Add a printer.
* wrap/python/tests/accparse.ipynb: New test file.
* wrap/python/tests/Makefile.am: Add it.
* src/tests/satmin2.test: Use the new syntax.
2015-05-18 21:49:51 +02:00
Alexandre Duret-Lutz
19a273929c python: rewrite translate() to deal with unambiguous and sbacc
and make it easier to extend and use.

* src/twaalgos/postproc.hh, src/twaalgos/translate.cc,
src/twaalgos/translate.hh: Incorporate the Unambiguous option
with the other preferences.  It's cleaner this way, and the
previous setup did not work well with Python.
* src/bin/ltl2tgba.cc: Adjust to this change.
* wrap/python/spot.py (translate): Rewrite.
* wrap/python/tests/automata.ipynb: Adjust existing cases, and
add more as well as some comments.
2015-05-15 23:50:19 +02:00
Alexandre Duret-Lutz
8aa88c2951 dot: --dot=B to use bullets for all automata but Büchi and co-Büchi
* src/twaalgos/dotty.cc: Add option 'B'.
* src/taalgos/dotty.cc: Ignore it.
* src/bin/common_aoutput.cc, src/bin/dstar2tgba.cc: Document it.
* wrap/python/spot.py (setup): Use it by default, and rewrite
the function to be a bit more flexible.
* wrap/python/tests/automata-io.ipynb, wrap/python/tests/automata.ipynb,
wrap/python/tests/piperead.ipynb, wrap/python/tests/randaut.ipynb,
wrap/python/tests/testingaut.ipynb: Use setup() everywhere.
2015-04-28 18:25:10 +02:00
Alexandre Duret-Lutz
5bfed246f9 hoaparse: make it possible to read from a string
* src/hoaparse/public.hh, src/hoaparse/parsedecl.hh,
src/hoaparse/hoascan.ll, src/hoaparse/hoaparse.yy: Implement this new
interface.
* wrap/python/spot.py (automata): Use it when the argument contains
a newline.
* wrap/python/tests/automata-io.ipynb: Test it.
2015-04-27 00:11:29 +02:00
Etienne Renault
5f4b7e1f3f Remove all cvsignore files.
* .cvsignore, bench/.cvsignore,
bench/emptchk/.cvsignore, bench/emptchk/models/.cvsignore,
bench/ltl2tgba/.cvsignore, buddy/.cvsignore,
buddy/doc/.cvsignore, buddy/examples/.cvsignore,
buddy/examples/adder/.cvsignore,
buddy/examples/bddcalc/.cvsignore,
buddy/examples/bddtest/.cvsignore,
buddy/examples/calculator/.cvsignore,
buddy/examples/cmilner/.cvsignore,
buddy/examples/fdd/.cvsignore,
buddy/examples/internal/.cvsignore,
buddy/examples/milner/.cvsignore,
buddy/examples/money/.cvsignore,
buddy/examples/queen/.cvsignore,
buddy/examples/solitare/.cvsignore,
buddy/src/.cvsignore, buddy/tools/.cvsignore,
doc/.cvsignore, iface/.cvsignore,
src/.cvsignore, src/ltlast/.cvsignore,
src/ltlenv/.cvsignore, src/ltlparse/.cvsignore,
src/ltlvisit/.cvsignore, src/misc/.cvsignore,
src/sanity/.cvsignore, src/tests/.cvsignore,
src/twa/.cvsignore, tools/.cvsignore,
wrap/.cvsignore, wrap/python/.cvsignore,
wrap/python/tests/.cvsignore: here.
2015-04-24 13:57:56 +02:00
Alexandre Duret-Lutz
e0bd0ad4c0 rename tgba_digraph as twa_graph
Automatic mass renaming.

* src/bin/autfilt.cc, src/bin/common_aoutput.cc,
src/bin/common_aoutput.hh, src/bin/common_conv.cc,
src/bin/common_conv.hh, src/bin/common_output.hh, src/bin/dstar2tgba.cc,
src/bin/ltlcross.cc, src/bin/ltldo.cc, src/bin/randaut.cc,
src/dstarparse/dra2ba.cc, src/dstarparse/dstar2tgba.cc,
src/dstarparse/dstarparse.yy, src/dstarparse/nra2nba.cc,
src/dstarparse/nsa2tgba.cc, src/dstarparse/public.hh,
src/graphtest/tgbagraph.cc, src/hoaparse/hoaparse.yy,
src/hoaparse/public.hh, src/ltlvisit/contain.hh,
src/ltlvisit/exclusive.cc, src/ltlvisit/exclusive.hh,
src/priv/accmap.hh, src/taalgos/minimize.cc, src/tgba/fwd.hh,
src/tgba/tgba.cc, src/tgba/tgbagraph.cc, src/tgba/tgbagraph.hh,
src/tgba/tgbasafracomplement.cc, src/tgba/tgbasafracomplement.hh,
src/tgbaalgos/are_isomorphic.cc, src/tgbaalgos/are_isomorphic.hh,
src/tgbaalgos/canonicalize.cc, src/tgbaalgos/canonicalize.hh,
src/tgbaalgos/cleanacc.cc, src/tgbaalgos/cleanacc.hh,
src/tgbaalgos/complete.cc, src/tgbaalgos/complete.hh,
src/tgbaalgos/compsusp.cc, src/tgbaalgos/compsusp.hh,
src/tgbaalgos/cycles.hh, src/tgbaalgos/degen.cc, src/tgbaalgos/degen.hh,
src/tgbaalgos/dotty.cc, src/tgbaalgos/dtbasat.cc,
src/tgbaalgos/dtbasat.hh, src/tgbaalgos/dtgbacomp.cc,
src/tgbaalgos/dtgbacomp.hh, src/tgbaalgos/dtgbasat.cc,
src/tgbaalgos/dtgbasat.hh, src/tgbaalgos/dupexp.cc,
src/tgbaalgos/dupexp.hh, src/tgbaalgos/emptiness.cc,
src/tgbaalgos/emptiness.hh, src/tgbaalgos/hoa.cc,
src/tgbaalgos/isdet.cc, src/tgbaalgos/isdet.hh, src/tgbaalgos/lbtt.cc,
src/tgbaalgos/ltl2tgba_fm.cc, src/tgbaalgos/ltl2tgba_fm.hh,
src/tgbaalgos/mask.cc, src/tgbaalgos/mask.hh, src/tgbaalgos/minimize.cc,
src/tgbaalgos/minimize.hh, src/tgbaalgos/neverclaim.cc,
src/tgbaalgos/postproc.cc, src/tgbaalgos/postproc.hh,
src/tgbaalgos/powerset.cc, src/tgbaalgos/powerset.hh,
src/tgbaalgos/product.cc, src/tgbaalgos/product.hh,
src/tgbaalgos/randomgraph.cc, src/tgbaalgos/randomgraph.hh,
src/tgbaalgos/randomize.cc, src/tgbaalgos/randomize.hh,
src/tgbaalgos/relabel.cc, src/tgbaalgos/relabel.hh,
src/tgbaalgos/remfin.cc, src/tgbaalgos/remfin.hh,
src/tgbaalgos/remprop.cc, src/tgbaalgos/remprop.hh,
src/tgbaalgos/safety.cc, src/tgbaalgos/safety.hh,
src/tgbaalgos/sbacc.cc, src/tgbaalgos/sbacc.hh,
src/tgbaalgos/sccfilter.cc, src/tgbaalgos/sccfilter.hh,
src/tgbaalgos/sccinfo.cc, src/tgbaalgos/sccinfo.hh,
src/tgbaalgos/simulation.cc, src/tgbaalgos/simulation.hh,
src/tgbaalgos/stats.cc, src/tgbaalgos/stats.hh,
src/tgbaalgos/stripacc.cc, src/tgbaalgos/stripacc.hh,
src/tgbaalgos/stutter.cc, src/tgbaalgos/stutter.hh,
src/tgbaalgos/totgba.cc, src/tgbaalgos/totgba.hh,
src/tgbaalgos/translate.cc, src/tgbaalgos/translate.hh,
src/tgbatest/checkpsl.cc, src/tgbatest/complementation.cc,
src/tgbatest/emptchk.cc, src/tgbatest/ltl2tgba.cc,
src/tgbatest/randtgba.cc, wrap/python/spot_impl.i,
wrap/python/tests/automata-io.ipynb, wrap/python/tests/automata.ipynb,
wrap/python/tests/piperead.ipynb, wrap/python/tests/testingaut.ipynb:
Rename tgba_digraph as twa_graph.
2015-04-22 16:57:21 +02:00
Etienne Renault
65a729ab3d Add remove_fin Python binding.
* wrap/python/spot_impl.i: here.
* wrap/python/tests/automata.ipynb: tests here.
2015-04-21 09:09:04 +02:00
Etienne Renault
f067dd7871 Add setup method for spot.
* wrap/python/spot.py: here.
* wrap/python/tests/automata.ipynb: tests here.
2015-04-20 13:05:58 +02:00
Etienne Renault
d55c15baf2 Use bdd dictionnary during translation.
* wrap/python/spot.py: here
* wrap/python/tests/automata.ipynb: tests here.
2015-04-20 13:05:58 +02:00