Commit graph

2258 commits

Author SHA1 Message Date
Alexandre Duret-Lutz
0c4eccd8c7 * src/twaalgos/ltl2tgba_fm.hh: Typo in comment. 2015-06-21 13:47:16 +02:00
Alexandre Duret-Lutz
b327565ca6 doxygen: fix membership to misc_tools module
* src/misc/bareword.hh, src/misc/bitvect.hh, src/misc/escape.hh,
src/misc/hashfunc.hh, src/misc/intvcmp2.hh, src/misc/intvcomp.hh,
src/misc/random.hh, src/misc/timer.hh, src/misc/tmpfile.hh: Use ingroup
rather than addtogroup.
2015-06-21 13:42:15 +02:00
Alexandre Duret-Lutz
813c3799c0 ltl: remove is_eltl_formula()
* doc/tl/tl.tex, src/ltlast/atomic_prop.cc, src/ltlast/binop.cc,
src/ltlast/bunop.cc, src/ltlast/constant.cc, src/ltlast/formula.cc,
src/ltlast/formula.hh, src/ltlast/multop.cc, src/ltlast/unop.cc:
Remove is_eltl_formula().
* src/tests/kind.test: Adjust.
2015-06-20 15:21:31 +02:00
Alexandre Duret-Lutz
b7fbf72461 bin: fix documentation of degeneralization option
Reported by Jan Strejček.

* src/bin/spot-x.cc: Fix documentation.
* src/twaalgos/degen.cc, src/twaalgos/degen.hh: Fix comments.
2015-06-16 11:06:32 +02:00
Alexandre Duret-Lutz
b2e812b105 ltlcross: skip product that require too much acceptance sets
Reported by Fanda when he was testing ltl3dra 0.2.2.

* src/bin/ltlcross.cc: Here.
* src/tests/ltl3dra.test: New file.
* src/tests/Makefile.am: Add it.
2015-06-15 23:35:31 +02:00
Alexandre Duret-Lutz
7ea9ebe07a bin: typo in ltl3dra shorthand
Reported by Fanda.

* src/bin/common_trans.cc: Here.
2015-06-15 18:42:27 +02:00
Alexandre Duret-Lutz
17dc2f8654 Rename src/tests/ltl2tgba as src/tests/ikwiad.
Fixes #23.

* src/tests/ltl2tgba.cc: Rename as ...
* src/tests/ikwiad.cc: ... this.
* src/tests/Makefile.am, src/tests/babiak.test, src/tests/checkta.cc,
src/tests/complementation.test, src/tests/cycles.test,
src/tests/dbacomp.test, src/tests/degendet.test,
src/tests/degenid.test, src/tests/det.test, src/tests/dfs.test,
src/tests/dstar.test, src/tests/dupexp.test, src/tests/emptchke.test,
src/tests/kv.test, src/tests/ltl2neverclaim-lbtt.test,
src/tests/ltl2neverclaim.test, src/tests/ltl2tgba.test,
src/tests/ltlcounter.test, src/tests/ltlcross.test,
src/tests/neverclaimread.test, src/tests/obligation.test,
src/tests/parseaut.test, src/tests/randaut.test,
src/tests/randpsl.test, src/tests/renault.test,
src/tests/satmin2.test, src/tests/sccsimpl.test, src/tests/sim2.test,
src/tests/simdet.test, src/tests/spotlbtt.test, src/tests/wdba.test,
src/tests/wdba2.test, bench/emptchk/README, bench/emptchk/defs.in,
bench/ltlclasses/run, bench/ltlcounter/run, bench/wdba/run: Adjust.
2015-06-12 20:52:34 +02:00
Alexandre Duret-Lutz
af8634d8c4 graph: rename num_transitions() as num_edges()
And in fact, rename most "trans*" as "edges*", because that what they
really are.

* src/bin/autfilt.cc, src/bin/ltlcross.cc, src/bin/randaut.cc,
src/dstarparse/dra2ba.cc, src/dstarparse/dstarparse.yy,
src/dstarparse/nra2nba.cc, src/dstarparse/nsa2tgba.cc,
src/graph/graph.hh, src/graph/ngraph.hh, src/ltlvisit/exclusive.cc,
src/parseaut/parseaut.yy, src/tests/complementation.cc,
src/tests/graph.cc, src/tests/ltl2tgba.cc, src/tests/ngraph.cc,
src/tests/twagraph.cc, src/twa/twagraph.cc, src/twa/twagraph.hh,
src/twa/twamask.hh, src/twaalgos/are_isomorphic.cc,
src/twaalgos/are_isomorphic.hh, src/twaalgos/canonicalize.cc,
src/twaalgos/cleanacc.cc, src/twaalgos/complete.cc,
src/twaalgos/compsusp.cc, src/twaalgos/cycles.cc,
src/twaalgos/degen.cc, src/twaalgos/dot.cc, src/twaalgos/dtbasat.cc,
src/twaalgos/dtgbacomp.cc, src/twaalgos/dtgbasat.cc,
src/twaalgos/dupexp.cc, src/twaalgos/emptiness.cc,
src/twaalgos/isunamb.cc, src/twaalgos/isweakscc.cc,
src/twaalgos/ltl2tgba_fm.cc, src/twaalgos/mask.hh,
src/twaalgos/minimize.cc, src/twaalgos/postproc.cc,
src/twaalgos/powerset.cc, src/twaalgos/product.cc,
src/twaalgos/randomgraph.cc, src/twaalgos/randomize.cc,
src/twaalgos/randomize.hh, src/twaalgos/relabel.cc,
src/twaalgos/remfin.cc, src/twaalgos/safety.cc, src/twaalgos/sbacc.cc,
src/twaalgos/sccfilter.cc, src/twaalgos/sepsets.cc,
src/twaalgos/simulation.cc, src/twaalgos/stutter.cc,
src/twaalgos/totgba.cc: Rename these.
2015-06-11 23:52:02 +02:00
Alexandre Duret-Lutz
6f500f3f50 twa: forward num_sets() to acc_.
* src/twa/twa.hh (num_sets): New method.  Delegating to acc_.
* src/twa/twagraph.hh, src/twa/twaproduct.cc, src/twa/twaproxy.cc,
src/twaalgos/degen.cc, src/twaalgos/dot.cc, src/twaalgos/dtgbacomp.cc,
src/twaalgos/dtgbasat.cc, src/twaalgos/gv04.cc, src/twaalgos/hoa.cc,
src/twaalgos/lbtt.cc, src/twaalgos/magic.cc, src/twaalgos/mask.cc,
src/twaalgos/ndfs_result.hxx, src/twaalgos/postproc.cc,
src/twaalgos/powerset.cc, src/twaalgos/product.cc,
src/twaalgos/remfin.cc, src/twaalgos/se05.cc,
src/twaalgos/simulation.cc, src/twaalgos/stats.cc,
src/twaalgos/stutter.cc, src/twaalgos/tau03.cc,
src/twaalgos/tau03opt.cc, src/twaalgos/totgba.cc: Simplify
acc().num_sets() into num_sets().
2015-06-11 21:55:23 +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
cf6c17b509 * src/twaalgos/hoa.hh (print_hoa): Add default value for opt. 2015-06-10 08:27:39 +02:00
Alexandre Duret-Lutz
b229bfc224 rename hoa_reachable as print_hoa
As actually claimed (but not done) by
738f939ff8.

* src/twaalgos/hoa.hh, src/twaalgos/hoa.cc: Rename it.
* src/bin/common_aoutput.cc, src/bin/dstar2tgba.cc,
src/bin/ltlcross.cc, src/tests/complementation.cc,
src/tests/ltl2tgba.cc, src/tests/randtgba.cc, src/twaalgos/hoa.cc,
wrap/python/spot.py: Adjust.
2015-06-10 00:10:22 +02:00
Alexandre Duret-Lutz
2dee90b3fb * src/hoaparse/public.hh: Typo. 2015-06-10 00:07:48 +02:00
Alexandre Duret-Lutz
da5ba0b138 hoaparse: catch non-Boolean guard in LBTT format
Fixes #90.

* src/hoaparse/hoaparse.yy: Here.
* src/tests/hoaparse.test: Test it.
2015-06-09 08:33:37 +02:00
Alexandre Duret-Lutz
240d5b4605 * src/tests/ltl2dstar.test: Fix after recent change to relabeling_map. 2015-06-07 19:11:48 +02:00
Alexandre Duret-Lutz
e7f5af6c6a org: add example of LTL->BA translation
This addresses one item in #14.

* doc/org/tut10.org: New file.
* doc/Makefile.am: Add it.
* src/twaalgos/translate.hh: Fix inclusion of types from
postprocessor.
* wrap/python/spot.py (translate): Fix typo in doc string.
2015-06-07 16:51:33 +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
8fb7b279f7 ltlvisit: rename tostring.hh as print.hh and rename printer functions
This actually performs three related changes, but separating them
would be quite inconvenient.

1) rename tostring.hh to print.hh a welcome side-effect is that
I could fix several files that included this file for not reason.

2) de-overload some of the to_string functions, and rename them
as follow:

  to_string -> print_psl, print_sere, str_psl, str_sere
  to_utf8_string -> print_utf8_psl, print_utf8_sere,
                    str_utf8_psl, str_utf8_sere
  to_spin_string -> print_spin_ltl, str_spin_ltl
  to_wring_string -> print_wring_ltl, str_wing_ltl
  to_lbt_string -> print_lbt_ltl, str_lbt_ltl
  to_latex_string -> print_latex_psl, str_latex_psl
  to_sclatex_string -> print_sclatex_psl, str_sclatex_psl

Now it is clearer what these functions do, and their restrictions.

3) all those print_* functions now take the stream to write onto
as their first argument.  This fixes #88.

* src/ltlvisit/tostring.cc, src/ltlvisit/tostring.hh: Rename into...
* src/ltlvisit/print.cc, src/ltlvisit/print.hh: ... those, and make
the changes listed above.
* doc/org/tut01.org, src/bin/common_output.cc,
src/bin/common_trans.cc, src/bin/ltl2tgba.cc, src/bin/ltl2tgta.cc,
src/bin/ltlcross.cc, src/bin/ltldo.cc, src/bin/ltlfilt.cc,
src/bin/randltl.cc, src/ltlparse/ltlparse.yy,
src/ltlvisit/Makefile.am, src/ltlvisit/mark.cc,
src/ltlvisit/relabel.cc, src/ltlvisit/simplify.cc,
src/ltlvisit/snf.cc, src/ta/taexplicit.cc, src/ta/tgtaexplicit.cc,
src/taalgos/tgba2ta.cc, src/tests/equalsf.cc, src/tests/ltl2tgba.cc,
src/tests/ltlrel.cc, src/tests/randtgba.cc, src/tests/reduc.cc,
src/tests/syntimpl.cc, src/tests/tostring.cc, src/twa/bdddict.cc,
src/twa/bddprint.cc, src/twa/taatgba.cc, src/twa/taatgba.hh,
src/twa/twagraph.cc, src/twaalgos/compsusp.cc, src/twaalgos/lbtt.cc,
src/twaalgos/ltl2taa.cc, src/twaalgos/ltl2tgba_fm.cc,
src/twaalgos/neverclaim.cc, src/twaalgos/remprop.cc,
src/twaalgos/stats.cc, wrap/python/ajax/spot.in, wrap/python/spot.py,
wrap/python/spot_impl.i: Adjust.
2015-06-04 22:56:57 +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
aedce8101c ltlvisit: merge lbt.hh into tostring.hh
Fixes #86.

* src/ltlvisit/lbt.hh, src/ltlvisit/lbt.cc: Delete and move contents
into...
* src/ltlvisit/tostring.hh, src/ltlvisit/tostring.cc: ... these.
* doc/org/tut01.org, src/bin/common_output.cc,
src/bin/common_trans.cc, src/bin/ltlcross.cc,
src/ltlvisit/Makefile.am, src/twaalgos/lbtt.cc,
wrap/python/spot_impl.i: Adjust.
2015-06-03 08:38:33 +02:00
Alexandre Duret-Lutz
16336be3cc acc: Do not restrict acceptance codes to small vectors.
* src/twa/acc.hh (acc_word): This is a 32-bit structure, so
we can use short for both size and op.
2015-06-03 00:01:29 +02:00
Alexandre Duret-Lutz
203d07693d bin: generalized shorthands for ltldo and ltlcross
* src/bin/common_trans.cc: Skip leading directories, and
do not require that the prefix is followed by space of 0.
* src/tests/ltldo.test: Add a test.
* doc/org/ltlcross.org: Update.
2015-06-02 18:22:55 +02:00
Alexandre Duret-Lutz
6298918497 bin: Use --output-format=hoa by default when calling ltl2dstar
* src/bin/common_trans.cc: Here.
* doc/org/ltlcross.org: Adjust examples.
2015-06-02 17:27:58 +02:00
Alexandre Duret-Lutz
715805fad3 randaut: add a --colored option
Fixes #83.

* src/bin/randaut.cc: Add option.
* src/twaalgos/randomgraph.cc, src/twaalgos/randomgraph.hh: Honor it.
* src/tests/randaut.test: Add tests.
* doc/org/randaut.org: Document it.
2015-06-01 21:56:39 +02:00
Alexandre Duret-Lutz
97665a584e hoa: detect colored automata
Fixes #84.

* src/twaalgos/hoa.cc: Detect and output the colored property.
* src/tests/hoaparse.test, src/tests/satmin2.test: Update.
2015-06-01 20:36:03 +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
eabed370bf bin: clear temporary files on termination signals
This is particularly important for src/tests/satmin.test, where ltl2tgba
might be killed while writing a huge temporary file used for SAT-based
minimization.  Before this patch, the temporary files would remain in
src/tests/satmin.dir/, easily overflowing the 100GB limit of the docker
containers we use on the build farm.

* src/bin/common_setup.cc: Catch termination signals for all tools,
even those that do not yet clear temporary files.
* configure.ac: Check for sigaction.
2015-06-01 17:50:02 +02:00
Alexandre Duret-Lutz
83364c636f * src/bin/common_trans.cc: Fix wording in error message. 2015-06-01 17:50:02 +02:00
Alexandre Duret-Lutz
1d9ceb8146 * src/bin/common_trans.cc: Use nullptr instead of 0. 2015-06-01 17:50:02 +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
3230b7c8aa hoaparse: fix errors observed with gcc-snapshot
gcc version 6.0.0 20150516 (experimental) [trunk revision 223239]
(Debian 20150516-1)

* src/hoaparse/hoaparse.yy (state_info): Initialize used and declared,
otherwise they are uninitialized after a vector resize.
2015-05-27 08:25:39 +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
7b6626d176 ltlcross: add a complete column
* src/bin/ltlcross.cc: Add the column.
* NEWS: Update.
2015-05-25 17:41:02 +02:00
Alexandre Duret-Lutz
ae0f0d5fc2 ltlcross: add --automata option
* src/bin/ltlcross.cc: Implement it.
* src/tests/ltlcross3.test: Use it.
* NEWS: Mention it.
2015-05-25 17:35:43 +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
96e2da8666 sat-minimize: some documentation and associated fixes
* doc/org/satmin.org: Document the new DTωA-minimization procedure.
* doc/org/tools.org: Fix link.
* src/bin/autfilt.cc: Pass -S to sat_minimize().
* src/twa/twagraph.hh: (state_acc_sets) New method.
* src/twaalgos/dotty.cc: Use it to correctly display co-Büchi automata.
* src/twaalgos/dtbasat.cc: Set the deterministic property on the result.
* src/twaalgos/dtgbasat.cc: Likewise, and preprocess the input automaton
in sat_minimize().
* src/twaalgos/dtgbasat.hh: Fix documentation, and take the state-based
information as an argument.
* src/twaalgos/postproc.cc: Do not call simulation-based reduction
on non-separated acceptances.
* src/tests/satmin2.test: Use -S rather than 'state-based'.
* NEWS: Update.
2015-05-22 00:02:09 +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
8f2865070e * src/twaalgos/simulation.cc: Preserve the unambiguous flag. 2015-05-22 00:02:03 +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
d276f73eed hoa: output acc-name for several acceptance types
So far the HOA output would emit an acc-name only
for generalized-Buchi or inferior types (Buchi, all).
It now knows about none, co-Buchi, generalized-co-Buchi,
Rabin, Streett, and generalized-Rabin as well.

* src/twa/acc.cc, src/twa/acc.hh: Add detection code.
* src/twaalgos/hoa.cc: Use it.
* src/tests/remfin.test, src/tests/maskacc.test,
src/tests/complete.test, src/tests/sim3.test,
src/tests/ltl2dstar.test: Adjust tests.
* src/tests/hoaparse.test: Adjust and add more tests.
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
7880b25aae sat-minimize: add a max-states option
* src/twaalgos/dtbasat.cc, src/twaalgos/dtbasat.hh,
src/twaalgos/dtgbasat.cc, src/twaalgos/dtgbasat.hh: Add it.
* src/tests/satmin2.test: Add couple of tests.
2015-05-18 21:46:11 +02:00
Alexandre Duret-Lutz
91f68ab1d8 sat-minimize: ignore silly histories
If the target acceptance is Fin(0)&Inf(1), there is no need to
distinguish between an history of {0,1} and an history of {0}, as a
cycle with either history will be rejected.  This implements this
simplification.  If both the canditate and reference automata
are Rabin automata with n pairs, then we now use at most
  Q * Q' * Q * Q' * 3^n * 3^n
variables to encode the partial cycles histories, versus
  Q * Q' * Q * Q' * 4^n * 4^n
before.

* src/twaalgos/dtgbasat.cc: Implement this.
* src/tests/satmin2.test: More tests.
2015-05-18 21:46:11 +02:00
Alexandre Duret-Lutz
ec49398e84 * src/twa/acc.hh (mark_t::clear): New method. 2015-05-18 21:46:11 +02:00
Alexandre Duret-Lutz
6e32b65875 * src/twa/acc.cc: Fix BDD conversion in case of unused sets. 2015-05-18 21:46:11 +02:00
Alexandre Duret-Lutz
0ede968760 sat-minimize: allow different acceptances as input and output
* src/twaalgos/dtgbasat.cc (sat_minimize): Use any arbitrary
acceptance condition passed via the "acc" option.
* src/twa/acc.hh (mark_t::max_set): New method.
* src/tests/satmin2.test: Add two test cases with DRA as input
and DSA as output.
2015-05-18 21:46:11 +02:00