Commit graph

2776 commits

Author SHA1 Message Date
Alexandre Duret-Lutz
57e7bbb3b1 Remove is_syntactic_weak_scc and is_syntactic_terminal_scc
Those cannot work now that automata are not labeled by formulas
anymore.

* src/tgbaalgos/isweakscc.cc, src/tgbaalgos/isweakscc.hh
(is_syntactic_weak_scc, is_syntactic_terminal_scc): Remove.
2014-08-10 20:21:11 +02:00
Alexandre Duret-Lutz
ead04cb1ac dtgbacomp: Rewrite using tgba_digraph instead of tgba_explicit_number
* src/tgbaalgos/dtgbacomp.cc, src/tgbaalgos/dtgbacomp.hh: Rewrite.
Also prefer simple loops over reachiter.
* src/tgbatest/det.test: Adjust.
2014-08-10 20:21:03 +02:00
Alexandre Duret-Lutz
0909c2fe3d * src/tgbaalgos/minimize.cc: Get rid of tgba_explicit_number. 2014-08-10 15:29:03 +02:00
Alexandre Duret-Lutz
74e20a6ec4 complete: get rid of tgba_explicit_number
* src/tgbaalgos/complete.cc, src/tgbaalgos/complete.hh
(tgba_complete_here): New method for tgba_digraph.
(tgba_complete): Rewrite using dupexp and the above.
2014-08-10 15:18:17 +02:00
Alexandre Duret-Lutz
df05162780 tgba_digraph: Simplify declaration of forwarded methods.
* src/misc/common.hh (SPOT_RETURN): New macro.
* src/tgba/tgbagraph.hh (out, states, transitions): Use it.
2014-08-10 15:17:22 +02:00
Alexandre Duret-Lutz
6ecd71c485 * src/graph/graph.hh (transitions): New method. 2014-08-10 15:17:14 +02:00
Alexandre Duret-Lutz
7b23691629 ltl_to_tgba_fm: Build a tgba_digraph instead of a tgba_explicit_formula
The conversion is not complete, because the conversion from SERE to DRA
used for the closure operator is still building a tgba_explicit_formula.

* src/tgbaalgos/ltl2tgba_fm.cc, src/tgbaalgos/ltl2tgba_fm.hh: Return
a tgba_digraph.
* src/priv/acccompl.cc: Simplify.
* src/graph/ngraph.hh: Add a way to iterate over all names.
* src/tgba/tgbagraph.hh (compute_support_conditions): Return something
useful.  It's actually used by the constructor of testing automata.
* src/tgbatest/wdba.test: Adjust to the fact that state are not
labeled by formulas anymore.
* src/bin/ltl2tgba.cc, src/bin/ltl2tgta.cc: Do not try to enable
UTF8 on automata anymore.
2014-08-06 18:31:18 +02:00
Alexandre Duret-Lutz
38887f4960 * src/tgbaalgos/compsusp.cc: Use tgba_digraph. 2014-08-06 10:55:46 +02:00
Alexandre Duret-Lutz
5dd731eab6 * src/ltlvisit/contain.cc: Do not mention tgba_explicit_number. 2014-08-06 10:55:46 +02:00
Alexandre Duret-Lutz
7299fcda2c * src/neverparse/public.hh: Typo in comment. 2014-08-06 10:55:46 +02:00
Alexandre Duret-Lutz
f9d85d7d2e dra2ba: Use tgba_digraph.
* src/dstarparse/dra2ba.cc: Use tgba_digraph instead of
tgba_explicit_number.
* src/tgbatest/dstar.test: Adjust.
2014-08-06 10:55:46 +02:00
Alexandre Duret-Lutz
9923cbaae0 nra2nba: Produce a tgba_digraph.
* src/dstarparse/nra2nba.cc: Produce tgba_digraph instead
of tgba_explicit_number.
* src/tgbaalgos/sccinfo.hh (is_useful_state): Make sure
it is reachable.
2014-08-06 10:55:46 +02:00
Alexandre Duret-Lutz
7c0ce376c5 nsa2tgba: Construct a tgba_digraph.
* src/priv/accmap.hh (acc_mapper_consecutive_int): New class.
* src/dstarparse/nsa2tgba.cc: Build a tgba_digraph, and simplify
using acc_mapper_consecutive_int.
2014-08-06 10:55:46 +02:00
Alexandre Duret-Lutz
ed94a35bea dstarparse: Build a tgba_digraph instead of tgba_explicit_number.
* src/dstarparse/dstarparse.yy, src/dstarparse/public.hh: Adjust the
parser to build a tgba_digraph.
* src/dstarparse/dra2ba.cc, src/dstarparse/nra2nba.cc,
src/dstarparse/nsa2tgba.cc: Temporarily adjust these functions to the
new type until they are rewritten.
2014-08-06 10:55:46 +02:00
Alexandre Duret-Lutz
886d4e75a2 neverparse: build a tgba_digraph
* src/neverparse/neverclaimparse.yy, src/neverparse/public.hh,
src/tgbatest/ltl2tgba.cc, src/tgbatest/neverclaimread.test: Adjust.
2014-08-06 10:55:46 +02:00
Alexandre Duret-Lutz
ff83e92db4 tgba_digraph: Fix handling of initial state.
* src/tgba/tgbagraph.hh: Store the number of the initial state, not a
pointer to it, because if the state vector is reallocated due to some
later calls to new_state(), this pointer will be invalid.
* src/graphtest/tgbagraph.cc, src/graphtest/tgbagraph.test: Test
for this.
2014-08-06 10:55:46 +02:00
Alexandre Duret-Lutz
fd5fbda4dd Use emplace() for associative containers.
* HACKING: Adjust requirements.  g++4.8 is now OK
for all our targets.
* iface/dve2/dve2.cc, src/dstarparse/dstarparse.yy
src/dstarparse/nsa2tgba.cc, src/graph/ngraph.hh,
src/ltlast/atomic_prop.cc, src/ltlast/binop.cc, src/ltlast/bunop.cc,
src/ltlast/multop.cc, src/ltlast/unop.cc, src/ltlvisit/mark.cc,
src/ltlvisit/relabel.cc, src/taalgos/emptinessta.cc,
src/taalgos/tgba2ta.cc, src/tgba/tgbaexplicit.hh, src/tgba/tgbagraph.hh,
src/tgba/tgbasafracomplement.cc, src/tgba/tgbatba.cc,
src/tgbaalgos/cycles.cc, src/tgbaalgos/degen.cc,
src/tgbaalgos/dtbasat.cc, src/tgbaalgos/dtgbasat.cc,
src/tgbaalgos/emptiness.cc, src/tgbaalgos/gtec/gtec.cc,
src/tgbaalgos/ltl2tgba_fm.cc, src/tgbaalgos/magic.cc,
src/tgbaalgos/ndfs_result.hxx, src/tgbaalgos/reachiter.cc,
src/tgbaalgos/scc.cc, src/tgbaalgos/sccfilter.cc, src/tgbaalgos/se05.cc,
src/tgbaalgos/simulation.cc, src/tgbaalgos/tau03.cc,
src/tgbaalgos/tau03opt.cc, src/tgbaalgos/weight.cc: Use emplace()
instead of insert(make_pair(...)) or insert(...::value_type(...)).
2014-07-31 16:59:47 +02:00
Alexandre Duret-Lutz
1eaaf8832a * NEWS: Mention recent removals. 2014-07-31 15:47:01 +02:00
Alexandre Duret-Lutz
401179eae7 Delete the cutscc algorithms.
These were used in old experiments, but have not turned useful in
practice.  Not worth keeping and maintaining.

* src/tgbaalgos/cutscc.cc, src/tgbaalgos/cutscc.hh: Delete.
* bench/scc-stats/, bench/split-product/: Delete.
* configure.ac, src/tgbaalgos/Makefile.am, README, bench/Makefile.am:
Adjust.
2014-07-31 11:44:02 +02:00
Alexandre Duret-Lutz
1a93166d15 tgbadigraph: delegate useful graph methods
* src/tgba/tgbagraph.hh (new_state, new_states, new_transitions, out,
trans_data): Delegate these useful graph methods so we do not have to
call get_graph().
* src/graphtest/tgbagraph.cc, src/tgbaalgos/dtbasat.cc,
src/tgbaalgos/dtgbasat.cc, src/tgbaalgos/dupexp.cc,
src/tgbaalgos/emptiness.cc, src/tgbaalgos/lbtt.cc,
src/tgbaalgos/powerset.cc, src/tgbaalgos/randomgraph.cc,
src/tgbaalgos/sccfilter.cc,
src/tgbaalgos/sccinfo.cc,src/tgbaalgos/simulation.cc: Simplify.
2014-07-10 10:23:48 +02:00
Alexandre Duret-Lutz
18f6fe772b bdddict: remove now/next variables.
These were only used by the BDD-based implementation of TGBA, which has
been removed.

* src/tgba/bdddict.cc, src/tgba/bdddict.hh, src/tgba/bddprint.cc: Remove
support for now/next variables.
2014-07-09 23:32:23 +02:00
Alexandre Duret-Lutz
c7da4003a7 * src/tgba/taatgba.cc: Fix a memory leak. 2014-07-09 18:10:26 +02:00
Alexandre Duret-Lutz
116fe8654f Remove ltl2tgba_lacim and all supporting classes.
This translator algorithm is seldom used in practice because we work
with explicit automata everywhere, and this is only useful to build
symbolic automata.  Furthermore, the symbolic automata produced by this
algorithm are larger (when looked at explicitly) than those produced by
ltl2tgba_fm or other explicit translators.

The nice side effect of this removal is that we can also remove a lot of
supporting classes, that were relying a lot on BDDs.

* src/tgba/public.hh, src/tgba/statebdd.cc, src/tgba/statebdd.hh,
src/tgba/succiterconcrete.cc, src/tgba/succiterconcrete.hh,
src/tgba/tgbabddconcrete.cc, src/tgba/tgbabddconcrete.hh,
src/tgba/tgbabddconcretefactory.cc, src/tgba/tgbabddconcretefactory.hh,
src/tgba/tgbabddconcreteproduct.cc, src/tgba/tgbabddconcreteproduct.hh,
src/tgba/tgbabddcoredata.cc, src/tgba/tgbabddcoredata.hh,
src/tgba/tgbabddfactory.hh, src/tgbaalgos/ltl2tgba_lacim.cc,
src/tgbaalgos/ltl2tgba_lacim.hh, src/tgbatest/bddprod.test,
src/tgbatest/mixprod.cc, src/tgbatest/mixprod.test: Delete all these
files.
* bench/ltlcounter/Makefile.am, bench/ltlcounter/README,
bench/ltlcounter/plot.gnu, bench/ltlcounter/run, src/tgba/Makefile.am,
src/tgbaalgos/Makefile.am, src/tgbatest/Makefile.am,
src/tgbatest/cycles.test, src/tgbatest/dupexp.test,
src/tgbatest/emptchk.test, src/tgbatest/ltl2tgba.cc,
src/tgbatest/ltl2tgba.test, src/tgbatest/ltlcross.test,
src/tgbatest/ltlprod.cc, src/tgbatest/spotlbtt.test,
src/tgbatest/wdba.test, src/tgbatest/wdba2.test,
src/tgba/tgbaexplicit.hh, wrap/python/ajax/ltl2tgba.html,
wrap/python/ajax/spot.in, wrap/python/spot.i,
wrap/python/tests/interdep.py, wrap/python/tests/ltl2tgba.py,
wrap/python/tests/ltl2tgba.test: Adjust.
2014-07-09 18:08:44 +02:00
Alexandre Duret-Lutz
26b932828b * src/tgba/taatgba.cc: Fix a memory leak. 2014-07-08 16:23:28 +02:00
Alexandre Duret-Lutz
d80a7cd9bd powerset: use tgba_digraph instead of tgba_explicit_number.
* src/tgbaalgos/powerset.cc, src/tgbaalgos/powerset.hh:
Use tgba_digraph.
* src/tgba/tgbagraph.hh: Improve interface.
* src/tgbaalgos/minimize.cc, src/tgbatest/powerset.cc: Adjust.
2014-07-07 21:00:14 +02:00
Alexandre Duret-Lutz
7602bd1a37 automatop: remove this type of formula operator.
This was only used in ELTL stuff, which I just removed because it was
unused.

* src/ltlast/automatop.cc, src/ltlast/automatop.hh,
src/ltlast/formula_tree.cc, src/ltlast/formula_tree.hh,
src/ltlast/nfa.cc, src/ltlast/nfa.hh: Delete.
* src/ltlast/Makefile.am: Adjust.
* src/ltlast/allnodes.hh, src/ltlast/formula.hh, src/ltlast/predecl.hh,
src/ltlast/visitor.hh, src/ltltest/equals.cc, src/ltltest/ltlrel.cc,
src/ltltest/reduc.cc, src/ltlvisit/clone.cc, src/ltlvisit/clone.hh,
src/ltlvisit/dotty.cc, src/ltlvisit/lbt.cc, src/ltlvisit/mark.cc,
src/ltlvisit/postfix.cc, src/ltlvisit/postfix.hh,
src/ltlvisit/relabel.cc, src/ltlvisit/simplify.cc, src/ltlvisit/snf.cc,
src/ltlvisit/tostring.cc, src/tgba/formula2bdd.cc,
src/tgbaalgos/ltl2taa.cc, src/tgbaalgos/ltl2tgba_fm.cc,
src/tgbaalgos/ltl2tgba_lacim.cc, src/tgbatest/ltl2tgba.cc,
iface/dve2/dve2check.cc: Remove all references to automatop.
2014-07-04 10:47:23 +02:00
Alexandre Duret-Lutz
af8ce5dfa1 eltl2tgba: remove this unused code.
* src/eltlparse/.gitignore, src/eltlparse/Makefile.am,
src/eltlparse/eltlparse.yy, src/eltlparse/eltlscan.ll,
src/eltlparse/fmterror.cc, src/eltlparse/parsedecl.hh,
src/eltlparse/public.hh, src/eltltest/.gitignore,
src/eltltest/Makefile.am, src/eltltest/acc.cc, src/eltltest/acc.test,
src/eltltest/defs.in, src/eltltest/nfa.cc, src/eltltest/nfa.test,
src/tgbaalgos/eltl2tgba_lacim.cc, src/tgbaalgos/eltl2tgba_lacim.hh,
src/tgbatest/eltl2tgba.test: Delete these files.
* src/Makefile.am, src/tgbaalgos/Makefile.am, src/tgbatest/Makefile.am,
src/tgbatest/ltl2tgba.cc, src/tgbatest/ltlcross.test,
src/tgbatest/spotlbtt.test, README, configure.ac: Adjust.
2014-07-04 08:22:11 +02:00
Alexandre Duret-Lutz
06b3a80af3 .gitignore: More files to ignore. 2014-07-04 02:45:16 +02:00
Alexandre Duret-Lutz
61791baf4c dtgbasat: replace tgba_explicit_number by tgba_digraph
* src/tgbaalgos/dtbasat.cc, src/tgbaalgos/dtbasat.hh,
src/tgbaalgos/dtgbasat.cc, src/tgbaalgos/dtgbasat.hh: Use tgba_digraph
and modernize syntax slightly.
2014-07-04 02:23:07 +02:00
Alexandre Duret-Lutz
ee087b5996 emptiness: Upgrade to tgba_digraph.
* src/tgbaalgos/emptiness.cc, src/tgbaalgos/emptiness.hh: Use
tgba_digraph instead of tgba_explicit_string.
2014-07-04 02:23:01 +02:00
Alexandre Duret-Lutz
97e3eb7655 * src/priv/countstates.cc: Handle tgba_digraph. 2014-07-03 11:12:05 +02:00
Alexandre Duret-Lutz
120ce7d8e6 lbtt: build an explicit automaton on input.
* src/priv/accmap.hh (acc_mapper): Rename into...
(acc_mapper_string): ... this, and add
(acc_mapper_int): ... this variant.
* src/tgbaparse/tgbaparse.yy: Adjust to renaming.
* src/tgbaalgos/lbtt.cc: Use acc_mapper_int and build an explicit
automaton.
* src/tgbaalgos/lbtt.hh: Adjust return type.
* src/tgbatest/ltl2tgba.cc: Adjust to new return type.
2014-07-03 10:06:53 +02:00
Alexandre Duret-Lutz
1d28714c3a * src/tgbaalgos/randomgraph.cc: Update comment. 2014-07-02 11:17:50 +02:00
Alexandre Duret-Lutz
64822be6a1 * src/tgbaparse/tgbaparse.yy: Cosmetics. 2014-07-02 11:15:40 +02:00
Alexandre Duret-Lutz
2beacc3924 common: introduce SPOT_UNREACHABLE and SPOT_UNIMPLEMENTED.
* src/misc/common.hh (SPOT_UNIMPLEMENTED, SPOT_UNREACHABLE,
SPOT_UNREACHABLE_BUILTIN): New macros.
* src/bin/dstar2tgba.cc, src/bin/ltlcross.cc,
src/dstarparse/dstar2tgba.cc, src/eltlparse/eltlparse.yy,
src/ltlast/binop.cc, src/ltlast/bunop.cc, src/ltlast/constant.cc,
src/ltlast/formula_tree.cc, src/ltlast/multop.cc, src/ltlast/nfa.cc,
src/ltlast/unop.cc, src/ltlvisit/dotty.cc, src/ltlvisit/lbt.cc,
src/ltlvisit/lunabbrev.cc, src/ltlvisit/mark.cc,
src/ltlvisit/randomltl.cc, src/ltlvisit/simpfg.cc,
src/ltlvisit/simplify.cc, src/ltlvisit/snf.cc, src/ltlvisit/tostring.cc,
src/misc/intvcomp.cc, src/misc/minato.cc, src/tgba/bdddict.cc,
src/tgba/formula2bdd.cc, src/tgba/tgbasafracomplement.cc,
src/tgbaalgos/eltl2tgba_lacim.cc, src/tgbaalgos/ltl2taa.cc,
src/tgbaalgos/ltl2tgba_fm.cc, src/tgbaalgos/ltl2tgba_lacim.cc,
src/tgbaalgos/simulation.cc, src/tgbatest/ltl2tgba.cc:  Use them.
* src/sanity/style.test: Catch assert(0) and assert(!"text");
2014-06-27 15:55:26 +02:00
Alexandre Duret-Lutz
c93b41a2c7 randomgraph: Use tgba_digraph.
* src/graph/graph.hh (new_states): Call reserve().
* src/tgbaalgos/randomgraph.cc: Use tgba_digraph
instead of tgba_string_explicit.
2014-06-27 11:40:57 +02:00
Alexandre Duret-Lutz
4170080c35 tgbaparse: Return a tgba_digraph.
* src/tgbaparse/parsedecl.hh, src/tgbaparse/public.hh,
src/tgbaparse/tgbaparse.yy: Adjust to return a tgba_digraph.
* src/priv/accmap.hh: New file to help creating acceptance
conditions from strings.
* src/priv/Makefile.am: Add accmap.hh
* src/tgba/tgbagraph.hh (tgba_digraph::named_t): New typedef.
* wrap/python/spot.i: Declare that tgba_digraph inherits from tgba.
* src/tgbatest/complementation.cc, src/tgbatest/explpro2.test,
src/tgbatest/explpro3.test, src/tgbatest/explpro4.test,
src/tgbatest/explprod.cc, src/tgbatest/explprod.test,
src/tgbatest/ltl2tgba.cc, src/tgbatest/maskacc.cc,
src/tgbatest/maskacc.test, src/tgbatest/mixprod.cc,
src/tgbatest/powerset.cc, src/tgbatest/randtgba.test,
src/tgbatest/readsave.test, src/tgbatest/tgbaread.cc,
src/tgbatest/tgbaread.test, src/tgbatest/tripprod.cc,
src/tgbatest/tripprod.test: Adjust to the change.
2014-06-27 11:40:28 +02:00
Alexandre Duret-Lutz
c0b28dc9c8 ltl::environment: correctly declare name() as const
* src/ltlenv/declenv.cc, src/ltlenv/declenv.hh,
src/ltlenv/defaultenv.cc, src/ltlenv/defaultenv.hh,
src/ltlenv/environment.hh, src/tgbaalgos/compsusp.cc: Declare name as
const.
2014-06-27 10:32:39 +02:00
Alexandre Duret-Lutz
a6f754b7c7 * src/tgbaalgos/sccfilter.cc: Work around g++ 4.6. 2014-06-22 13:10:58 +02:00
Alexandre Duret-Lutz
7d70229f5b [buddy] Improve handling of bddtrue and bddfalse.
* src/bdd.h, src/cppext.cxx: Handle bddtrue and bddfalse using
special types.
2014-06-20 18:38:58 +02:00
Alexandre Duret-Lutz
4df4b4efd2 Adjust some uses of bddtrue/bddfalse.
* src/tgbaalgos/dtgbasat.cc, src/tgbaalgos/eltl2tgba_lacim.cc,
src/tgbaalgos/simulation.cc, src/tgbaalgos/tau03opt.cc: Fix
cases where bddtrue and bddfalse where used in a ternary operator.
* src/sanity/style.test: Allow bdd_true()/bdd_false() to be
used in ternary operators.
2014-06-20 18:38:57 +02:00
Alexandre Duret-Lutz
af6cb049f2 sccfilter: improve the new version to simplify acceptance sets
* src/tgbaalgos/sccinfo.cc, src/tgbaalgos/sccinfo.hh: Implement
the acc_filter_simplify filter, and generalize composition to
be n-ary.
* src/tgbaalgos/sccfilter.cc (used_acc): New method.
2014-06-20 17:28:11 +02:00
Alexandre Duret-Lutz
84f92541f3 * src/graph/graph.hh, src/tgba/tgbagraph.hh: Cosmetic fixes. 2014-06-20 13:46:39 +02:00
Alexandre Duret-Lutz
13673a1421 sccfilter: implement a new version of tgba_digraph
The new version currently supports removal of useless state as well as
removal of acceptance sets from non-accepting SCCs (the two versions).
It does not yet support simplifation of acceptance sets and removal of
suspendable formulae.  However the design, using filters that are
composed before being applied, should make it easier to implement.

* src/tgbaalgos/sccfilter.cc, src/tgbaalgos/sccfilter.hh: Implement
the new scc_filter and supporting classes.
* src/tgbaalgos/simulation.cc, src/tgbaalgos/simulation.hh: Use it.
The simulation now always return a tgba_digraph.
* src/tgbatest/sim.test: Adjust.
2014-06-20 13:31:23 +02:00
Alexandre Duret-Lutz
e299a3d1bf simulation: build tgba_digraph
* src/tgbaalgos/simulation.cc: Buid a tgba_digraph as the result of the
simulation.
* src/tgba/tgbagraph.hh (create_namer): New function.
* src/tgbatest/basimul.test: Add an additional test case that caused a
bug fixed in a previous patch.
* src/tgbatest/sim.test: Adjust.
2014-06-20 13:31:23 +02:00
Alexandre Duret-Lutz
31bf8c2c1e ngraph: support aliasing states
* src/graph/ngraph.hh (alias_state): New method.
* src/graphtest/ngraph.cc: Use it.
2014-06-20 13:31:23 +02:00
Alexandre Duret-Lutz
424de90385 tgbagraph: add a merge_transitions() method.
* src/graph/graph.hh: Add some framework to erase transitions, and
defrag the resulting transitions_ vector on demand.  Also remove
the nb_states() and nb_transitions() because num_states() and
num_transitions() already exist.
* src/graphtest/graph.cc, src/graphtest/ngraph.cc: Adjust to
use num_states().
* src/tgba/tgbagraph.hh (merge_transitions): New method.
* src/misc/hash.hh: Add a pair_hash class, needed by
merge_transitions().
* src/graphtest/tgbagraph.cc, src/graphtest/tgbagraph.test: Add states
for transitions removal and merge_transitions().
2014-06-20 13:31:23 +02:00
Alexandre Duret-Lutz
9909699c63 implement scc_filter_states for tgba_digraph
* src/tgbaalgos/sccfilter.cc,
src/tgbaalgos/sccfilter.hh (scc_filter_states): New overload taking
a tgba_digraph and some scc_info.
2014-06-20 13:31:23 +02:00
Alexandre Duret-Lutz
9903ae2fa8 Implement an scc_info class that should eventually replace scc_map.
* src/graph/graph.hh (trans_iterator): Add operator->() and operator
bool().
* src/tgbaalgos/sccinfo.cc, src/tgbaalgos/sccinfo.hh: New files.
* src/tgbaalgos/Makefile.am: Add them.
* src/tgbatest/ltl2tgba.cc: Use the new dump_scc_info_dot() function.
2014-06-20 13:31:23 +02:00
Alexandre Duret-Lutz
5187752c9a org: Prevent a race on the buildfarm.
* doc/org/init.el.in (org-publish-timestamp-directory): Use a build
directory, not $HOME.
2014-05-29 16:16:36 +02:00