Commit graph

2544 commits

Author SHA1 Message Date
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
1c0a93cc0f * src/graph/graph.hh (trans_iterator): Respect the forward_iterator API. 2014-05-23 18:36:43 +02:00
Alexandre Duret-Lutz
ac98d7c006 * src/tgbaalgos/simulation.cc: More map->vector conversions. 2014-05-23 18:36:43 +02:00
Alexandre Duret-Lutz
32a0db6ae1 dupexp, simulation: more simplifications.
* src/tgbaalgos/dupexp.cc, src/tgbaalgos/dupexp.hh: Return the
association between new states and old states in a vector instead of a
map.
* src/tgbaalgos/simulation.cc: Adjust.
2014-05-23 18:36:43 +02:00
Alexandre Duret-Lutz
bb2ce45b8a simulation: simplify using tgba_digraph more
* src/graph/graph.hh (new_states): New.
* src/tgba/tgbagraph.hh (graph_t): Make it public.
* src/tgbaalgos/simulation.cc: Get read of the acc_compl_automaton
class and replace it by a loop over all states of a tgba_digraph.
Remove some useless data structures.
2014-05-23 18:36:43 +02:00
Alexandre Duret-Lutz
2c36ef54c0 * src/tgbaalgos/compsusp.cc: Ignore useless suspendable subformulae. 2014-05-23 18:36:43 +02:00
Alexandre Duret-Lutz
92eed08261 dupexp, simulation: use tgba_digraph.
* src/tgbaalgos/dupexp.cc, src/tgbaalgos/dupexp.hh: Produce
a tgba_digraph instead of a tgba_explicit_number.
* src/tgbaalgos/simulation.cc: First pass to adjust to the use of
tgba_digraph as a return of tgba_dupexp_dfs() and tgba_dupexp_bfs().
Some maps have been replaced by vectors because states are indexed,
but more simplifications could be done.
2014-05-23 18:36:42 +02:00
Alexandre Duret-Lutz
1f70e6742d tgba: Implement a tgbagraph subclass
* src/tgba/tgbagraph.hh: New file.
* src/tgba/Makefile.am: Add it.
* src/graph/graph.hh: Add methods needed by tgbagraph.hh.
* src/graphtest/tgbagraph.cc, src/graphtest/tgbagraph.test: New files.
* src/graphtest/Makefile.am: Add them.
2014-05-23 18:36:42 +02:00
Alexandre Duret-Lutz
f968c4ed67 graph: add SPOT_API on public classes.
* src/graph/graph.hh, src/graph/ngraph.hh: Here.
2014-05-20 15:40:17 +02:00
Alexandre Duret-Lutz
c793d3f13a graph: Add a test close to the tgba_explicit_string setup.
* src/graph/graph.hh (boxed_label): If State_Data==void, inherit from
std::tuple<> and implement a data() method.
(digraph::state_data): Return by reference.
* src/graphtest/ngraph.cc, src/graphtest/ngraph.test: Test the
case where State_Data implements the spot::state interface.
2014-05-20 15:40:17 +02:00
Alexandre Duret-Lutz
a8fd188d5e graph: Add a named_graph class.
* src/graph/ngraph.hh: New file.
* src/graph/Makefile.am: Add it.
* src/graphtest/ngraph.cc, src/graphtest/ngraph.test: New files.
* src/graphtest/Makefile.am: Add them
2014-05-20 15:40:17 +02:00
Alexandre Duret-Lutz
f7711e9a63 graph: Implement a directed graph.
* src/graph/graph.hh, src/graph/Makefile.am, src/graphtest/graph.cc,
src/graphtest/graph.test, src/graphtest/defs.in,
src/graphtest/Makefile.am: New files.
* src/Makefile.am, configure.ac: Add graph/ and graphtest/.
* README: Mention these directories.
2014-05-20 15:40:16 +02:00
Alexandre Duret-Lutz
7bcf655350 * src/ltltest/equals.cc: Fix style. 2014-05-16 09:39:45 +02:00
Alexandre Duret-Lutz
05ed3def00 snf: Fix the handling of bounded repetition.
star_normal_form() used to be called under bounded
repetitions like [*0..4], but some of these rewritings
are only correct for [*0..].  For instance
     (a*|1)[*]      can be rewritten to    1[*]
but  (a*|1)[*0..1]  cannot be rewritten to 1[*0..1]
it would be correct to rewrite the latter as (a[+]|1)[*0..1],
canceling the empty word in a*.

Also (a*;b*)[*]     can be rewritten to    (a|b)[*]
but  (a*;b*)[*0..1]  cannot be rewritten to (a|b)[*0..1]
and it cannot either be rewritten to (a[+]|b[+])[*0..1].

This patch introduces a new function to implement
rewritings under bounded repetition.

* src/ltlvisit/snf.hh, src/ltlvisit/snf.cc (star_normal_form_unbounded):
New function.
* src/ltlvisit/simplify.cc: Use it.
* src/ltltest/reduccmp.test: Add tests.
* doc/tl/tl.tex: Document the rewritings implemented.
2014-05-16 09:39:45 +02:00
Alexandre Duret-Lutz
53de8fc3a4 Merge branch 'master' into next
Conflicts:
	src/ltlvisit/simplify.cc
	src/tgbatest/Makefile.am
2014-05-15 14:30:49 +02:00
Alexandre Duret-Lutz
f431852af9 * NEWS, configure.ac: Bump version to 1.2.4a. 2014-05-15 12:13:29 +02:00
Alexandre Duret-Lutz
c11f15c76c Release Spot 1.2.4
* NEWS, configure.ac, doc/org/tools.org: Bump version.
2014-05-15 11:07:25 +02:00
Alexandre Duret-Lutz
9761703736 doc: update bibliographic references
* doc/org/satmin.org, src/bin/man/dstar2tgba.x, src/bin/man/ltl2tgba.x:
Cite the FORTE'14 paper.
* doc/org/tools.org, src/bin/man/ltl2tgba.x: Replace the VECOS'11
citation by IJCCBS'14.
* src/bin/man/ltl2tgba.x: Cite SPIN'13.
2014-05-14 18:16:12 +02:00
Alexandre Duret-Lutz
c46d6cee9a * src/ltlast/multop.hh: Typo in comment. 2014-05-13 18:26:32 +02:00
Alexandre Duret-Lutz
d741d9266d simplify: remove an incorrect simplification rule
Fortunately was only enabled with the
ltl_simplifier_options::favor_event_univ option, which cannot yet be
turned on from the command-line tools.

* src/ltlvisit/simplify.cc, doc/tl/tl.tex: Remove the rule.
* src/ltltest/eventuniv.test: Adjust.
* NEWS: Mention the bug.
2014-05-13 17:31:51 +02:00
Alexandre Duret-Lutz
362862dace llt2tgba_fm: fix translation of ":" in some SERE
* src/tgbaalgos/ltl2tgba_fm.cc: Here.
* src/ltltest/reduccmp.test: Add a test case.
* NEWS: Mention it.
2014-05-13 17:09:11 +02:00
Alexandre Duret-Lutz
48471b5114 simplify: fix 3 incorrect simplification rules
* src/ltlvisit/simplify.cc: Remove two incorrect rules, and
partially disable another one.
* doc/tl/tl.tex: Reflect the change.
* src/ltltest/reduccmp.test: Likewise.
* src/ltltest/equals.cc: Add safety checks to catch such errors in the
future.
* NEWS: Mention the bug.
2014-05-13 16:59:51 +02:00
Alexandre Duret-Lutz
2a155593ba org: Prevent a race on the buildfarm.
* doc/org/init.el.in (org-publish-timestamp-directory): Use a build
directory, not $HOME.
2014-04-28 11:34:51 +02:00
Alexandre Duret-Lutz
27b78a5cc5 Simplify the code of a test case.
* src/tgbatest/maskacc.cc: Simplify iteration on acceptance sets.
* src/tgbatest/maskacc.test: Adjust expected order.
2014-04-24 16:38:45 +02:00
Alexandre Duret-Lutz
34fd27a381 * AUTHORS: Fix So[u]heib's name at his request. 2014-04-11 11:37:25 +02:00
Alexandre Duret-Lutz
a5b6865c0b ltl2ta: fix a crash with --ta.
* src/taalgos/tgba2ta.cc: Do not assume the input is an sba.
* src/tgbatest/ltl2ta2.test: New file.
* src/tgbatest/Makefile.am: Add it.
* NEWS: Mention the fix.
2014-04-07 18:21:10 +02:00
Alexandre Duret-Lutz
c4307e21ae * NEWS: Mention recent changes. 2014-04-07 18:21:10 +02:00
Alexandre Duret-Lutz
ae62265ec8 Adjust to Swig 3.0.
* wrap/python/tests/ltl2tgba.py, wrap/python/tests/ltlparse.py: Use
Boolean instead of integers.
2014-04-07 18:21:10 +02:00
Alexandre Duret-Lutz
f5914647aa * src/dstarparse/nra2nba.cc: Fix comment. 2014-04-07 18:21:10 +02:00