Commit graph

589 commits

Author SHA1 Message Date
Alexandre Duret-Lutz
dac3d78244 hoa: better support for aliases on output
Part of issue #497.

* doc/org/concepts.org: Declare a new "aliases" named property.
* spot/parseaut/parseaut.yy: Fill the aliases named property.
* spot/twa/twa.cc (copy_named_properties_of): Copy it.
* spot/twaalgos/hoa.cc: Use "aliases" while encoding BDDs for
output.
* spot/twaalgos/hoa.hh: Add helper function to set/get aliases.
* python/spot/impl.i: Create a type for aliases.
* tests/core/parseaut.test: Adjust test case.
* tests/python/aliases.py: New file.
* tests/Makefile.am: Add it.
* NEWS: Mention this change.
2022-01-21 16:53:11 +01:00
Alexandre Duret-Lutz
890423936f dot: improve output to work around GraphViz bug
The related GraphViz issue is
https://gitlab.com/graphviz/graphviz/-/issues/2179

* spot/twaalgos/dot.cc: Avoid initial newline in title.
* NEWS: Mention the bug.
* tests/core/det.test, tests/core/dstar.test,
tests/core/neverclaimread.test, tests/python/automata-io.ipynb: Adjust
test cases.
2022-01-11 22:19:20 +01:00
Alexandre Duret-Lutz
8c33f959a3 hoa: add support for controllable-AP
* doc/spot.bib (perez.19.hoa): New entry.
* spot/parseaut/public.hh: Mention it.
* spot/parseaut/parseaut.yy, spot/parseaut/scanaut.ll: Learn to parse
the controllable-AP header.
* spot/twaalgos/hoa.cc: Print it.
* tests/core/ltlsynt.test, tests/core/parseaut.test,
tests/core/readsave.test, tests/python/_synthesis.ipynb,
tests/python/except.py, tests/python/games.ipynb,
tests/python/mealy.py, tests/python/synthesis.py: Adjust or augment
test cases.
2022-01-10 14:51:34 +01:00
Alexandre Duret-Lutz
d8f245a7de complement: fix a regression with 2.9.8
Reported by Reuben Rowe.

* spot/twaalgos/complement.cc (complement): Remove the hard-coded
simul=0 option on automata with >32 states.  In 2.10 simul=0 now
implies det-simul=0, causing the regression, and most importantly it
is not needed anymore, because we have other threashold like simul-max
and simul-trans-pruning in place.
* tests/core/complement.test: Add Reuben's automaton as test case.
* NEWS: Mention the fix.
2021-12-17 12:20:12 +01:00
Alexandre Duret-Lutz
c0a43cd92b sbacc: remove spurious initial state in some output
This fixes #492, based on a report from Jérôme Dubois.

* spot/twaalgos/sbacc.cc: If the initial state is in a rejecting
component, start with an initial state whose colors are unsat_mark.
* tests/core/sbacc.test: Add test case.
* tests/python/pdegen.py: Adjust it.
2021-12-16 17:23:06 +01:00
Alexandre Duret-Lutz
8ffd06e9a6 catch overflow in SVA delays during parsing
* spot/parsetl/scantl.ll: Diagnose delays (##n) larger than
unbounded().  Remove all checks for delays with 1 or 2 characters.
* tests/core/parseerr.test: Add a test case.
* NEWS: Mention this fix.
2021-12-02 14:36:23 +01:00
Jérôme Dubois
81f146f648 build: fix multiple Clang13 warnings
* spot/kripke/kripkegraph.hh, spot/misc/hash.hh, spot/twa/taatgba.cc,
  spot/twa/twagraph.hh, tests/core/ngraph.cc: Replace subtraction of
  pointeur minus nullptr by an explicit cast to size_t.
* spot/twa/acc.hh: Add explicit default copy assignment operator for
  rs_pair.
2021-11-22 10:29:15 +01:00
Alexandre Duret-Lutz
afdd38277d formula: catch min/max overflows at construction
For issue #485.

* spot/tl/formula.cc, spot/tl/formula.hh: Catch min/max overflow
when the operators are constructed.  Also disable travial
simplification rules that would create such overflow.
For instance x[*200][*2] will not become x[*400] anymore.
* python/spot/impl.i: Catch std::overflow_error.
* tests/core/equals.test, tests/python/except.py: Add test cases.
2021-11-18 22:03:23 +01:00
Alexandre Duret-Lutz
81375d7a93 tl: diagnose repetitions that do not fit in uint_8
For issue #485.

* spot/parsetl/parsetl.yy: Add a diagnostic.
* tests/core/parseerr.test: Test it.
2021-11-18 13:24:53 +01:00
Alexandre Duret-Lutz
f99ddef787 bin: use regexes to detect shorthands, and add support for owl-21.0
Fixes #480.

* bin/common_trans.cc (shorthands_ltl, shorthands_autproc): Write
those lists using regexes.  Add entries for Owl 21.0.
(show_shorthands, tool_spec): Adjust to use those regexes.
* doc/org/autcross.org, doc/org/ltlcross.org, doc/org/ltldo.org:
Update the list of shorthands.
* tests/core/ltldo.test: Add a couple of tests.
* NEWS: Mention this new feature.
2021-11-04 15:24:10 +01:00
Florian Renkin
97046ea263 Synthesis decomposition: Add a new rewriting and tests
* spot/twaalgos/synthesis.cc: add a new rewriting rule
* tests/core/ltlsynt.test: test rewritings
2021-11-04 15:10:07 +01:00
Florian Renkin
7947ffc930 ltlsynt: correct verbose when --aiger is used
* bin/ltlsynt.cc: here
* tests/core/ltlsynt.test: add test
2021-11-04 10:20:48 +01:00
Florian Renkin
8aa9da7fc8 Synthesis: rewrite bypass
* spot/twaalgos/synthesis.cc: here
* spot/twaalgos/synthesis.hh: introduce a realizability_code
* bin/ltlsynt.cc, spot/twaalgos/aiger.cc: use this enum
* tests/core/ltlsynt.test: update tests
2021-11-02 10:22:40 +01:00
Alexandre Duret-Lutz
6464324a2c ltlsynt: fix a bug in split_2step_fast_here
* spot/twaalgos/synthesis.cc (split_2step_fast_here::get_ps): Fix the
state number recorded in the map.
* tests/core/ltlsynt.test: Add test case.
2021-10-24 22:34:06 +02:00
Alexandre Duret-Lutz
074678416f ltlsynt: improve error message in case of missing --ins and --outs
* bin/ltlsynt.cc: Here.
* tests/core/ltlsynt.test: Test the error.
2021-10-22 17:46:21 +02:00
Alexandre Duret-Lutz
82d4fc8ed9 ltlsynt: report AP missing from --ins and --outs
* bin/ltlsynt.cc (process_formula): Add a check.
* tests/core/ltlsynt.test: Add test case.
2021-10-09 21:18:21 +02:00
Alexandre Duret-Lutz
0e5f2d4819 ltlsynt: --ins is optional but not its argument
Fixes #481, reported by Michaël Cadilhac.

* bin/ltlsynt.cc (argp_option): Remove erroneous OPTION_ARG_OPTIONAL.
* tests/core/ltlsynt.test: Add test case.
2021-10-09 20:50:38 +02:00
Alexandre Duret-Lutz
bdd20bd1a1 rename game_info to synthesis_info; move it with the synthesis code
* spot/twaalgos/game.cc, spot/twaalgos/game.hh (game_info): Move...
* spot/twaalgos/synthesis.cc,
spot/twaalgos/synthesis.hh (synthesis_info): ... here, because this
structure contains only synthesis stuff.  Also rename "solver" to
"algo" to match the ltlsynt option.
(solve_game): Move the two argument version of this function here,
since that's the only game-related generic function that use
synthesis_info.
* bin/ltlsynt.cc, tests/core/ltlsynt.test, tests/python/games.ipynb,
tests/python/synthesis.py, NEWS: Adjust all uses and mentions.
2021-10-07 09:06:15 +02:00
Alexandre Duret-Lutz
0ac5bbc05d ltlsynt: replace -x minimization-lvl=N by --simplify
* bin/ltlsynt.cc: Implement the new option, and make it default
to bisimulation with output assignment (a.k.a. bwoa).
* NEWS, bin/spot-x.cc, doc/org/ltlsynt.org: Update the documentation.
* spot/twaalgos/game.hh: Make bwoa the default.
* tests/core/ltlsynt.test: Add and adjust test cases.
* tests/python/games.ipynb: Adjust.
2021-10-06 18:00:24 +02:00
Alexandre Duret-Lutz
af5474d791 ltlsynt: replace -x specification-decomposition by --decompose
* bin/ltlsynt.cc: Implement the option, and enable it by default.
* doc/org/ltlsynt.org, doc/org/ltlsynt.tex, bin/spot-x.cc, NEWS:
Document it.
* tests/core/ltlsynt.test: Adjust test cases.
2021-10-06 10:51:42 +02:00
Alexandre Duret-Lutz
188fee4756 * tests/core/ltlsynt.test: Test --aiger without option. 2021-10-03 18:37:55 +02:00
Alexandre Duret-Lutz
ee83e8e4c2 tests: work around to compiler warnings
* tests/core/cube.cc, tests/core/twagraph.cc: Fix warning about
unused variable in absence of assert().
2021-10-03 00:57:21 +02:00
Alexandre Duret-Lutz
644342f5d4 simplify: fix some discrepancies between Intel and ARM
* spot/tl/simplify.cc (tl_simplifier_cache::as_bdd): Fix the order in
which as_bdd() is called recursively in binary nodes, do not let the
choice to the compiler.
* tests/core/ltlsynt.test: Adjust expected output.
2021-10-03 00:57:15 +02:00
Alexandre Duret-Lutz
1b69ed96f9 ltlsynt: deduce --outs from --ins or vice-versa
* bin/ltlsynt.cc: Implement it.
* NEWS, doc/org/ltlsynt.org: Document it.
* tests/core/ltlsynt.test: Test it.
2021-10-02 21:57:58 +02:00
Alexandre Duret-Lutz
cb3a833a8d ltlsynt: fix syntax error handling
Fixes #477.

* bin/common_finput.cc (job_processor::process_string): Fix return
value.
* bin/ltlsynt.cc: Fix handling of syntax errors.  While we are here,
make sure game_info is destroyed before Spot's globals.
* tests/core/ltlsynt.test: Add a test case.
2021-09-17 17:09:49 +02:00
philipp
7d908b9320 ltlsynt rewrite
Introducing the new game interface
to ltlsynt.
ltlsynt now also uses direct strategy deduction
and formula decomposition.

* bin/ltlsynt.cc: Here
* spot/twaalgos/aiger.cc
, spot/twaalgos/aiger.hh: Use strategy_like
* spot/twaalgos/game.hh: Minor adaption
* spot/twaalgos/mealy_machine.cc: Use new interface
* spot/twaalgos/synthesis.cc
, spot/twaalgos/synthesis.hh: Spezialised split
* tests/core/ltlsynt.test
, tests/python/games.ipynb: Adapting
2021-09-16 14:53:48 +02:00
philipp
a5185c2123 Use new minterm enumeration in split_2step
Also remove self-loop for sink and make it work for any
acceptance condition.

* spot/twaalgos/synthesis.cc: Here
* tests/core/ltlsynt.test: Adjust tests
* tests/python/split.py: Adjust tests
2021-09-16 14:53:48 +02:00
philipp
4260b17fba New game api
Introduce a new, uniform way to create and solve
games.
Games can now be created directly from specification
using creat_game, uniformly solved using
solve_game and transformed into a strategy
using create_strategy.
Strategy are mealy machines, which can be minimized.

* bin/ltlsynt.cc: Minor adaption
* spot/twaalgos/game.cc: solve_game, setters and getters
for named properties
* spot/twaalgos/game.hh: Here too
* spot/twaalgos/mealy_machine.cc: Minor adaption
* spot/twaalgos/synthesis.cc: create_game, create_strategy and
minimize_strategy
* spot/twaalgos/synthesis.hh: Here too
* tests/core/ltlsynt.test: Adapting
* tests/python/aiger.py
, tests/python/games.ipynb
, tests/python/mealy.py
, tests/python/parity.py
, tests/python/split.py: Adapting
2021-09-16 14:53:47 +02:00
philipp
786599ed20 Adding selective edge sorting and state merging
The merging is (possibly) more expensive but also
merges more states when applied to all states.

* spot/graph/graph.hh: edge sorting
* spot/twa/twagraph.cc,
spot/twa/twagraph.hh: selective state merging
* tests/core/twagraph.cc: Adjusting tests
2021-09-16 14:53:47 +02:00
philipp
17db582341 Making aiger a class
Aiger circuits noew have their own class.
Monitors can be translated to and obtained
from aiger circuits.
Moreover a step by step evaluation method
is provided.

* spot/twaalgos/aiger.hh,
spot/twaalgos/aiger.cc: Here
* bin/ltlsynt.cc: Adopt new modes
* tests/core/ltlsynt.test: Adapt tests
* python/spot/impl.i: Add python support
* tests/Makefile.am,
tests/python/aiger.py: New test cases
2021-09-16 14:53:46 +02:00
Alexandre Duret-Lutz
b6df1f8f92 bitvect: add a foreach_set_index(callback) function
Related to #476, where that is needed.

* spot/misc/bitvect.hh: Here.
* tests/core/bitvect.cc, tests/core/bitvect.test: Add some tests.
2021-09-11 01:00:24 +02:00
Alexandre Duret-Lutz
4855d3c877 dot: add an option to output id= attributes
This will be handy latter to develop widgets with interactive
highlighting of automata.

* spot/twaalgos/dot.cc: Implement it.
* bin/common_aoutput.cc, NEWS, doc/org/oaut.org,
doc/org/spot.css: Document it.
* tests/core/alternating.test, tests/core/readsave.test,
tests/core/sccdot.test: Test it.
2021-09-03 22:38:24 +02:00
Alexandre Duret-Lutz
d4e3b0bed4 tests: fix a gcc-snapshot warning
* tests/core/ikwiad.cc: replace dynamic_pointer_cast by a
static_pointer_cast to get rid of a possible nullptr warning.
2021-09-01 14:02:46 +02:00
Alexandre Duret-Lutz
4570c735f3 merge_states: don't call defrag_states if unnecessary
* spot/twa/twagraph.cc (merge_states): Return the number
of removed states, and use that to decide if defrag_states
is needed.
* spot/twa/twagraph.hh, NEWS: Document that.
* tests/core/tgbagraph.test, tests/core/twagraph.cc: Adjust test case.
2021-07-26 11:43:17 +02:00
Alexandre Duret-Lutz
99241d0bea typos: coma -> comma
* ChangeLog.1, tests/core/autcross3.test, tests/core/ltl3ba.test,
tests/core/ltl3dra.test, tests/core/ltlcross3.test,
tests/core/ltlsynt.test, tests/sanity/style.test: Here.
2021-06-11 11:47:34 +02:00
Alexandre Duret-Lutz
634dd28379 merge_states: include sorting and detection of identical self-loops
* spot/twa/twagraph.cc: Implement it.
* spot/twa/twagraph.hh, NEWS: Document it.
* tests/python/mergedge.py: Test it.
* tests/core/ltlsynt.test, tests/python/games.ipynb: Adjust expectations.
2021-05-18 10:50:12 +02:00
Alexandre Duret-Lutz
23323b743f postproc: introduce dba-simul, and have simul=0 disable all *-simul
* spot/twaalgos/postproc.cc, spot/twaalgos/postproc.hh: Implement the
dba-simul option, and disable ba-simul, dba-simul, dpa-simul,
det-simul when simul=0.
* bin/ltlsynt.cc: Adjust.
* bin/spot-x.cc: Document dba-simul and adjust other variables.
* tests/core/minusx.test: Add some test.
2021-05-03 13:30:03 +02:00
Alexandre Duret-Lutz
0744052bc0 remove a useless test
We have enough outputs checked verbatim everywhere so that testing
that three execution of a single command return the same output is now
a waste of time.

* tests/core/simdet.test: Remove.
* tests/Makefile.am: Adjust.
2021-04-30 22:22:02 +02:00
Alexandre Duret-Lutz
d32f19f5d0 postproc: add support for -x dpa-simul and simul-trans-pruning
Also have simul-max default to 4096 instead of 512, because it's
really simul-trans-pruning that is very slow and need to be limited.

* spot/twaalgos/postproc.cc, spot/twaalgos/postproc.hh,
spot/twaalgos/simulation.cc, spot/twaalgos/simulation.hh,
spot/twaalgos/determinize.cc, spot/twaalgos/determinize.hh:
Implement the above options.
* bin/spot-x.cc, NEWS: Document them.
* tests/core/ltlsynt.test, tests/core/minusx.test,
tests/core/sim3.test: Add some test cases.
2021-04-30 22:22:02 +02:00
Alexandre Duret-Lutz
fca6513604 simulation: fix merging transiant SCCs
This fixes #452, and also fix a bug related to transiant SCCs
incorrectly merged in cosimulation: the source of the edges was
updated without fixing the chaining of the edges.

* spot/twaalgos/simulation.cc: Fix all the above.
* tests/python/simstate.py: Add test case from issue #452.
* tests/core/det.test, tests/core/ltlsynt.test,
tests/core/satmin.test: Lower expected sizes.
* tests/python/decompose.ipynb: Adjust for changed order.
2021-04-19 23:38:50 +02:00
Alexandre Duret-Lutz
803a61a03d parse_aut: add support for #line
Fixes issue #232.

* spot/parseaut/parseaut.yy, spot/parseaut/public.hh,
spot/parseaut/scanaut.ll: Add support for #line.
* tests/core/parseaut.test: Test it.
* NEWS: Mention it.
2021-04-17 10:39:02 +02:00
Alexandre Duret-Lutz
2a38328a5c replace bdd_satoneset(x,y,bddtrue) loops by minterms_of(x,y)
Because the loops iterate in the opposite order, multiple
test cases need to be adjusted.

* spot/taalgos/tgba2ta.cc, spot/twaalgos/alternation.cc,
spot/twaalgos/dualize.cc, spot/twaalgos/ltl2tgba_fm.cc,
spot/twaalgos/simulation.cc, spot/twaalgos/stutter.cc,
spot/twaalgos/toweak.cc: Replace loops based on
bdd_satonest(x,y,bddtrue) by loops based on minterms_of(x,y).
* tests/core/degenscc.test, tests/core/dualize.test,
tests/core/genltl.test, tests/core/readsave.test,
tests/python/alternation.ipynb, tests/python/automata.ipynb,
tests/python/decompose.ipynb, tests/python/decompose_scc.py,
tests/python/dualize.py, tests/python/sccinfo.py,
tests/python/simstate.py, tests/python/testingaut.ipynb,
tests/python/word.ipynb: Adjust expected test cases.  The
only regression is in genltl.test, but the worsened case
should eventually be fixed as discussed in issue #425 anyway.
2021-04-14 17:31:45 +02:00
Alexandre Duret-Lutz
c58aa678ec test minterms_of enumerator
* tests/core/minterm.cc, tests/core/minterm.test: New files.
* tests/core/.gitignore, tests/Makefile.am: Add them.
2021-04-12 17:54:12 +02:00
Alexandre Duret-Lutz
535d4555e5 bricks: fix the test-suite
Fixes #446 using a fix from Étienne Renault.

* tests/core/bricks.cc: Pass the hash table by reference while
instantiating the threads.
2021-03-24 10:04:38 +01:00
Alexandre Duret-Lutz
caa960d857 twagraph: new kill_state method
This proceeds from a discussion with Michaël Cadilhac.
http://lists.lrde.epita.fr/pipermail/spot/2021q1/000356.html

* bin/autfilt.cc (--kill-states): New option.
* NEWS: Mention those.
* spot/twa/twagraph.hh, spot/twa/twagraph.cc: Add a kill_state()
method.
* tests/core/maskkeep.test: Test it.
2021-02-19 16:42:55 +01:00
Alexandre Duret-Lutz
da0dd4c534 autfilt: fix incorrect diagnostic
* bin/autfilt.cc (OPT_KEEP_STATES): Mention the correct option.
* tests/core/maskkeep.test: Test for it.
* NEWS: Mention the bug.
2021-02-19 16:01:07 +01:00
Alexandre Duret-Lutz
c06e15e085 fix eventual/universal properties for ->/<->/xor
* spot/tl/formula.cc: Correctly set eventual and universal properties
for ->, <->, and xor.  This wasn't really relevant before, but there
are now situation where those are not rewritten.
* tests/core/kind.test: Adjust expected output.
* tests/core/ltl2tgba2.test: New test case, reported by Florian
Renkin.
* NEWS: Mention the bug.
2021-02-03 12:23:34 +01:00
Alexandre Duret-Lutz
93d8f43285 translate: speed up some -G -D cases
When gf-guarentee works and produce a deterministic automaton, use it
right away without comparing it with the automaton produced by the
regular translation.  This used to be the case for all -D scenarios
except -G -D.

Reported by Florian Renkin.

* spot/twaalgos/translate.cc: Use the result of
gf_guarantee_to_ba_maybe() or fg_safety_to_dca_maybe() whenever -D is
used.
* spot/twaalgos/postproc.cc: Call remove_unused_ap() in finalize(), to
iron out some slight output differences.
* tests/core/ltl2tgba2.test, tests/python/toparity.py: Lower expected
results in the test cases.
* tests/python/automata.ipynb, tests/core/prodor.test: Adjust to new
order.
2021-01-27 13:26:49 +01:00
Alexandre Duret-Lutz
2072151499 twa_graph: swap the two passes of merge_edges()
This improves the determinism in a few cases.

* spot/twa/twagraph.cc (merge_edges): Encapsulate the two
passes into lambdas so that they are very easy to swap.
* spot/twa/twagraph.hh (merge_edges): Adjust documentation.
* tests/python/mergedge.py: Add test case.
* tests/core/alternating.test, tests/python/alternation.ipynb:
Determinism was improved.
* tests/core/parity2.test, tests/core/readsave.test,
tests/core/sbacc.test, tests/python/_product_susp.ipynb,
tests/python/atva16-fig2a.ipynb, tests/python/decompose.ipynb,
tests/python/highlighting.ipynb, tests/python/satmin.ipynb,
tests/python/simstate.py: Adjust expected order of edges.
* NEWS: Mention the change.
2021-01-20 00:16:12 +01:00
Alexandre Duret-Lutz
8785f5a74b bin: add support for -b/--buchi
* bin/common_post.cc, bin/randaut.cc: Implement -b/--buchi.
Also add --sba as alias for -B, and --gba as alias for --tgba.
* NEWS: Document those changes.
* doc/org/ltl2tgba.org, doc/org/oaut.org: Adjust documentation.
* tests/core/ltl2tgba2.test, tests/core/ltlcross2.test,
tests/core/randaut.test: Add more tests.
* tests/core/sbacc.test: --sbacc cannot be abbreviated as --sba
anymore.
2020-12-18 12:24:08 +01:00