Commit graph

3680 commits

Author SHA1 Message Date
Alexandre Duret-Lutz
9799a6455e autfilt: complement of non-deterministic automata as well
* bin/autfilt.cc: Determinize automata before complementation
if needed.
* tests/core/complement.test: Adjust.
* NEWS: Mention the new feature.
2016-02-12 17:00:20 +01:00
Alexandre Duret-Lutz
6a662a6d8e get read of twa_safra_complement
* spot/twa/twasafracomplement.cc, spot/twa/twasafracomplement.hh,
tests/core/complementation.cc: Delete.
* tests/Makefile.am, spot/twa/Makefile.am: Adjust.
* tests/core/complementation.test: Rewrite using the new determinization
code.
* python/spot/impl.i: Do not mention twa_safra_complement anymore.
* NEWS: Mention the removal.
2016-02-12 15:09:37 +01:00
Alexandre Duret-Lutz
df0f99410c * NEWS: Summarize recent changes. 2016-02-12 14:27:48 +01:00
Alexandre Duret-Lutz
b066c6f3f2 postproc: add fine-tuning options for determinization
* spot/twaalgos/postproc.cc, spot/twaalgos/postproc.hh:
Add options det-scc, det-simul, det-stutter.
* bin/spot-x.cc: Document them.
* doc/org/ltl2tgba.org: Illustrate one of them and link
to the spot-x man page.
2016-02-12 14:07:58 +01:00
Alexandre Duret-Lutz
8feab7e2bb postproc: more documentation
* spot/twaalgos/postproc.hh: Here.
2016-02-12 14:07:28 +01:00
Alexandre Duret-Lutz
1e52d2a7a8 doc: more doc about determinization
* doc/org/autfilt.org: Here.
2016-02-12 14:07:28 +01:00
Alexandre Duret-Lutz
0288aaa304 determinize: add tests for the bug Alexandre L fixed
* tests/core/safra.test: More tests.
2016-02-12 14:07:28 +01:00
Alexandre Duret-Lutz
0d9019ea39 python: fix translate's doc string
* python/spot/__init__.py (translate): Mention 'generic' in doc string.
2016-02-12 14:07:28 +01:00
Alexandre Lewkowicz
8a5f652384 determinize: Correct scc optimisation
* spot/twaalgos/determinize.cc:  Don't reuse previous SCC's.
2016-02-12 14:07:28 +01:00
Alexandre Duret-Lutz
8568c3b423 postproc: integrate tgba_determinize()
* spot/twa/acc.hh: Add a smaller version of is_parity().
* spot/twaalgos/postproc.cc: Call tgba_determinize() if asked for
Generic acceptance and Deterministic output.
* bin/common_post.cc: Add 'G' as a shorthand for --generic.
* doc/org/ltl2tgba.org: Illustrate =ltl2tgba -G -D=.
2016-02-12 14:07:28 +01:00
Alexandre Duret-Lutz
03d9a7512a determinize: do not work on deterministic automata
* spot/twaalgos/determinize.cc: Here.
2016-02-12 14:07:28 +01:00
Alexandre Duret-Lutz
c18ee329fb determinize: rename the main function
* spot/twaalgos/determinize.cc, spot/twaalgos/determinize.hh,
tests/core/safra.cc (tgba_determinisation): Rename as...
(twa_determinisation): ... this.
2016-02-12 14:07:28 +01:00
Alexandre Duret-Lutz
4635ce44a9 determinize: add some doc
* spot/twaalgos/determinize.hh: Add documentaion and rename options.
* spot/twaalgos/determinize.cc: Rename options as well.
2016-02-12 14:07:28 +01:00
Alexandre Duret-Lutz
2853c4ca04 * tests/core/safra.cc (help): Simplify. 2016-02-12 14:07:28 +01:00
Alexandre Duret-Lutz
8e26852a1b determinize: remove superfluous options
bisimulation and complete just trigger extra algorithms to be called at
the end of this one, so they need not be part of this algorithm.

* spot/twaalgos/determinize.cc, spot/twaalgos/determinize.hh: Reduce
the number of options.
* tests/core/safra.cc: Implement those options here.
2016-02-12 14:07:28 +01:00
Alexandre Duret-Lutz
e0c2452534 determinize: hide private data structures
* spot/twaalgos/determinize.hh: Move class definitions...
* spot/twaalgos/determinize.cc: ... here.
2016-02-12 14:07:28 +01:00
Alexandre Duret-Lutz
f9252aa703 safra: rename as determinize
* spot/twaalgos/safra.cc, spot/twaalgos/safra.hh: Rename as...
* spot/twaalgos/determinize.cc, spot/twaalgos/determinize.hh: ... these.
* spot/twaalgos/Makefile.am, tests/core/safra.cc: Adjust.
2016-02-12 14:07:28 +01:00
Alexandre Lewkowicz
cd71286fb5 safra: Add stutter-invarience optimisation
* spot/twaalgos/safra.cc, spot/twaalgos/safra.hh: Here.
* tests/core/safra.cc: Add option.
2016-02-12 14:07:28 +01:00
Alexandre Lewkowicz
1d68decaca safra: Add compute_succ function
* spot/twaalgos/safra.cc, spot/twaalgos/safra.hh:  Enables use to
compute successor safra state for any edge.
2016-02-12 14:07:28 +01:00
Alexandre Lewkowicz
be0e6bffcf safra: Build safra-state after each AP
* spot/twaalgos/safra.cc: Here.
2016-02-12 14:07:28 +01:00
Alexandre Lewkowicz
dbd7740874 safra: Iterate on APs to compute successors
* spot/twaalgos/safra.cc, spot/twaalgos/safra.hh: Here.
2016-02-12 14:07:28 +01:00
Alexandre Lewkowicz
8068cfad93 safra: Add complete option and rename files
* src/tests/safra.cc, src/twaalgos/safra.cc,
src/twaalgos/safra.hh, src/tests/safra.test: Rename as...
* spot/twaalgos/safra.cc, spot/twaalgos/safra.hh, tests/core/safra.cc
tests/core/safra.test: ... these.
* tests/Makefile.am: Update.
2016-02-12 14:07:28 +01:00
Alexandre Lewkowicz
f88154e507 safra: Add bisimulation optimisation
* src/tests/safra.cc, src/twaalgos/safra.cc,
src/twaalgos/safra.hh, spot/twaalgos/simulation.cc,
spot/twaalgos/simulation.hh: Here.
2016-02-12 14:07:28 +01:00
Alexandre Lewkowicz
d15b5f43a6 safra: Fix properties and use new API
* src/tests/safra.cc, src/twaalgos/safra.cc: Here.
2016-02-12 14:07:28 +01:00
Alexandre Lewkowicz
bb93f6e9af safra: Nodes are grouped by SCC
* src/tests/safra.cc, src/tests/safra.test: Update it.
* src/twaalgos/safra.cc, src/twaalgos/safra.hh: all nodes in a safra
state are grouped by SCC. This is done by putting them in different
braces.  The same SCC can have different ids depending on the safra
state.
2016-02-12 14:07:28 +01:00
Alexandre Lewkowicz
b59b31f806 safra: Give more explicit names to types
* src/twaalgos/safra.cc, src/twaalgos/safra.hh: Here.
2016-02-12 14:07:28 +01:00
Alexandre Lewkowicz
18396e5973 safra: SSC based construction
* src/tests/safra.test: Update it.
* src/twaalgos/safra.cc, src/twaalgos/safra.hh: Acceptance is now MIN
ODD.  We only track runs within an SCC and only consider accepting SCC.
2016-02-12 14:07:28 +01:00
Alexandre Lewkowicz
0cf83d7cbc safra: Update pretty printer function
* src/twaalgos/safra.cc: Here.
2016-02-12 14:07:28 +01:00
Alexandre Lewkowicz
3bd95c32e7 safra: Remove paths when leaving an SCC
* src/tests/safra.cc:  Add option.
* src/twaalgos/safra.cc, src/twaalgos/safra.hh:  When a node leaves an
SCC, all the subpaths of that node are removed.
2016-02-12 14:07:28 +01:00
Alexandre Lewkowicz
e8c428d0a3 safra: Edges to accepting SCC are accepting
*  src/twaalgos/safra.cc, src/twaalgos/safra.hh: Implement optimisation.
Update function calls with new API.
* src/tests/safra.cc, src/tests/safra.test: Use new API.
2016-02-12 14:07:28 +01:00
Alexandre Lewkowicz
f29de22b8a safra: Add bisimulation option
* src/tests/safra.cc, src/twaalgos/safra.cc,
src/twaalgos/safra.hh: Here.
2016-02-12 14:07:28 +01:00
Alexandre Lewkowicz
64b27a9a26 safra: Add pretty printer for states
* src/tests/safra.cc, src/tests/safra.test: Add options and test.
* src/twaalgos/safra.cc, src/twaalgos/safra.hh: Here.
2016-02-12 14:07:28 +01:00
Alexandre Lewkowicz
64cdd1adc7 safra: Fix the nesting comparision function
* src/twaalgos/safra.cc, src/twaalgos/safra.hh: Here.
2016-02-12 14:07:28 +01:00
Alexandre Lewkowicz
ebe03cf3d0 safra: Fix nesting comparision
* src/tests/safra.cc:  Output error message for wrong ltl formula.
* src/twaalgos/safra.cc:  Default comparision of vector does not
correspond to the desired comparision.
2016-02-12 14:07:28 +01:00
Alexandre Lewkowicz
8362bf3a5f safra: Ensure parity min even acceptance
* src/tests/safra.cc, src/tests/safra.test:  Use HOA format in tests.
* src/twaalgos/safra.cc:  Make sure the number of sets are always odd so
that cycles without any acceptance set are rejected.
2016-02-12 14:07:28 +01:00
Alexandre Lewkowicz
d0d42f86f9 safra: Use sub-transitions during determinization
* src/tests/safra.cc, src/tests/safra.test:  Update results.
* src/twaalgos/safra.cc, src/twaalgos/safra.hh: The use of transitions
resulted in non deterministic automata.  By using sub-transitions the
problem is solved.
2016-02-12 14:07:28 +01:00
Alexandre Lewkowicz
8b1f9d3712 safra: Ensure automata is degeneralized
* src/tests/safra.cc, src/tests/safra.test:  Update it.
* src/twaalgos/safra.cc: Here;
2016-02-12 14:07:28 +01:00
Alexandre Lewkowicz
20fc8b0269 safra: Use std::map to represent macrostates
* src/twaalgos/safra.cc, src/twaalgos/safra.hh: Here.
2016-02-12 14:07:28 +01:00
Alexandre Lewkowicz
3ecdba6094 safra: Add a couple of tests
* src/tests/safra.cc, src/tests/safra.test: New.
2016-02-12 14:07:28 +01:00
Alexandre Lewkowicz
ef3143f048 safra: Output parity acceptance sets
* src/twaalgos/safra.cc, src/twaalgos/safra.hh:  Note that the created
automaton is not a true parity automaton as they are not handled yet
by Spot.
2016-02-12 14:07:28 +01:00
Alexandre Lewkowicz
f2fa92004c safra: handle single accepting set
* src/twaalgos/safra.cc, src/twaalgos/safra.hh: Here.
2016-02-12 14:07:28 +01:00
Alexandre Lewkowicz
496083b14a safra: implement powerset construction
* spot/twaalgos/Makefile.am: Update it.
* src/twaalgos/safra.cc, src/twaalgos/safra.hh: New.
2016-02-12 14:07:28 +01:00
Alexandre Duret-Lutz
064ccd5c05 fix paths mentioning buddy/src/.libs
Those had been incorrectly renamed to buddy/spot/.libs when we rename
the main src/ directory into spot/.  This only affected the setting of
DYLD_LIBRARY_PATH, that used to be needed on Darwin.

* doc/org/.dir-locals.el.in, doc/org/init.el.in, python/ajax/spotcgi.in,
tests/run.in: Fix the PATH.
2016-02-12 14:02:47 +01:00
Alexandre Duret-Lutz
fbdd146565 simplify: add missing recursion
"1 U (a | Fb)" was not always reduced to "F(a | b)".

Fixes #143.

* spot/tl/simplify.cc: Add the missing recurse() call.
* tests/core/reduc0.test: Add a test.
* NEWS: Mention the bug.
2016-02-12 08:18:39 +01:00
Alexandre Duret-Lutz
992c97151c ltldo, ltl2tgba: support %< and %>
* bin/common_aoutput.hh, bin/common_aoutput.cc,
bin/ltl2tgba.cc, bin/ltldo.cc: Add support for %< and %>.
* tests/core/ltl2tgba.test, tests/core/ltldo.test: Test it.
* NEWS: Mention it.
2016-02-12 08:18:15 +01:00
Alexandre Duret-Lutz
86646ac31f bin: fix destruction order of global variables
Fixes #142, reported by Joachim Klein.

* bin/autfilt.cc, bin/ltlfilt.cc, bin/randaut.cc, bin/randltl.cc: Make
sure all global variables that have a destructor are destructed in the
main.  Otherwise they risk being destructed after the library's global
structures are destructed, causing access to freed memory.
* NEWS: Mention the bug.
2016-02-10 19:12:48 +01:00
Alexandre Duret-Lutz
bceb54c80e * spot/ltsmin/ltsmin.cc (format_state): Thinko. 2016-02-09 14:49:28 +01:00
Alexandre Duret-Lutz
a31793960f * tests/ltsmin/modelcheck.cc: Typo when printing accepting run. 2016-02-09 14:49:28 +01:00
Alexandre Duret-Lutz
e146527852 twa_run: add a highlight method
* spot/twaalgos/emptiness.hh, spot/twaalgos/emptiness.cc: Add
the method.
* tests/python/highlighting.ipynb: Add a small test.
2016-02-06 17:10:55 +01:00
Alexandre Duret-Lutz
77b0b5b3fe dot: add option C(COLOR)
This fixes the output gliches visible in the previous patches,
where highlighting a state would remove its fill color.

* spot/twaalgos/dot.cc, spot/taalgos/dot.cc: Implement option C(COLOR).
* bin/common_aoutput.cc, doc/org/oaut.org: Document it.
* doc/org/.dir-locals.el.in, doc/org/init.el.in,
python/spot/__init__.py: Use it.
* tests/python/automata-io.ipynb, tests/python/automata.ipynb,
tests/python/highlighting.ipynb: Test it.
* tests/core/readsave.test: Adjust.
* NEWS: Mention recent changes.
2016-02-05 19:26:38 +01:00