Commit graph

1347 commits

Author SHA1 Message Date
Alexandre Duret-Lutz
ced733e4da * src/misc/intvcomp.hh, src/misc/intvcmp2.hh: Include stddef.h for
size_t.
2011-05-16 16:18:49 +02:00
Alexandre Duret-Lutz
3752c3918e * src/misc/intvcmp2.cc: Cosmetics to please sanity checks. 2011-05-05 15:06:41 +02:00
Alexandre Duret-Lutz
fea61e9f51 Fix compilation error with g++ <= 4.3.
* src/misc/intvcmp2.cc (int_array_array_compression): Specify full
type of stream_compression_base<int_array_array_compression> in
constructor to please g++ versions <= 4.3.
2011-05-05 12:10:08 +02:00
Alexandre Duret-Lutz
ff43212e67 DVE2: Minor memory compaction.
* iface/dve2/dve2.cc (dve2_state, dve2_compressed_state): Store
size and count on 16 bits, and hash on 32 bits, to limit memory
wasted.
2011-05-02 14:46:19 +02:00
Alexandre Duret-Lutz
bf8becccea DVE2: Optionally use the new compression.
* iface/dve2/dve2.cc, iface/dve2/dve2.hh, iface/dve2/dve2check.cc:
Add a -Z option and pass it through.
2011-05-02 14:46:19 +02:00
Alexandre Duret-Lutz
a832eab156 Implement a new compression inspired from simple-9.
* src/misc/intvcmp2.cc, src/misc/intvcmp2.hh: New files.
* src/misc/Makefile.am: Add them.
* src/tgbatest/intvcmp2.cc: New test.
* src/tgbatest/Makefile.am: Add it.
* src/tgbatest/intvcomp.test: Call it.
2011-05-02 14:46:18 +02:00
Alexandre Duret-Lutz
21a28ca822 * src/misc/intvcomp.cc: Low-level fine-tuning. 2011-04-15 17:57:37 +02:00
Alexandre Duret-Lutz
445a785e10 Fix compression of large repetitions
* src/misc/intvcomp.cc (stream_compression_base::run): Limit
repeatitions to 40, not 42.
(stream_decompression_base::refill): Refill the end of the stream
with 0.
(stream_decompression_base::look_n_bits): Add assertion.
* src/tgbatest/intvcomp.cc: Add a new test case.
2011-04-13 11:33:40 +02:00
Alexandre Duret-Lutz
1b447c3676 More interfaces to the int array compression routines.
* src/misc/intvcomp.cc, src/misc/intvcomp.cc: Add interfaces to
compress vector<int> to vector<unsigned>.
* src/tgbatest/intvcomp.cc: Test them.
* src/sanity/style.test: Refine check to avoid a spurious report.
2011-04-12 11:44:53 +02:00
Alexandre Duret-Lutz
3aa9c3bab6 * iface/dve2/dve2.cc: Typo when handling dead==true. 2011-04-11 15:28:32 +02:00
Alexandre Duret-Lutz
2b6ea2279f Always pass --enable-devel or --disable-devel to BuDDy.
* configure.ac: Do not add CXXFLAGS and CFLAGS in ac_configure_args,
it causes problem when using config.cache.  Instead ...
* m4/devel.m4: Add --enable-devel or --disable-devel on
ac_configure_args, now that BuDDy understands that.
2011-04-10 22:12:25 +02:00
Alexandre Duret-Lutz
cdede3d134 * src/misc/escape.hh: Fix Doxygen documentation.
* src/misc/intvcomp.hh: Likewise.
2011-04-10 09:25:10 +02:00
Alexandre Duret-Lutz
4ec936387e Move the compression routines into their own *.cc file.
* src/misc/intvcomp.hh: Move all code...
* src/misc/intvcomp.cc: ... in this new file.
* src/misc/Makefile.am: Add invcomp.cc
2011-04-09 17:34:04 +02:00
Alexandre Duret-Lutz
ebb85c4da7 DVE2: Use mspool for compressed states.
* iface/dve2/dve2.cc: Adjust to use the new mspool allocator,
and get rid of the std::vector used to store compressed states.
* src/misc/intvcomp.hh: Add an "int* -> int*" interface
in addition to the "int* -> vector<unsigned>*" interface.
* src/tgbatest/intvcomp.cc: Test the two interfaces.
2011-04-09 17:34:04 +02:00
Alexandre Duret-Lutz
56e487d468 Add a multiple-size memory pool implementation.
* src/misc/mspool.hh: New file.
* src/misc/Makefile.am: Add it.
2011-04-09 17:34:04 +02:00
Alexandre Duret-Lutz
cefedff192 * src/misc/fixpool.hh: Typo in comment. 2011-04-09 17:34:04 +02:00
Alexandre Duret-Lutz
c938e652e4 DVE2: preliminary implementation of compressed states.
* iface/dve2/dve2.cc (dve2_compressed_state): New class.
(callback_context): Deal with general state*s, not dve2_state*s.
(transition_callback_compress): New function.
(dve2_kripke): Take a compress option.
(get_init_state, compute_state_condition, succ_iter,
format_state, state_condition): Handle compressed states.
(get_vars, compute_state_condition_aux): New helper methods.
* iface/dve2/dve2.hh (load_dve2): Add a compress option.
* iface/dve2/dve2check.cc: Add a -z option.
* iface/dve2/finite.test, iface/dve2/dve2check.test: Add more
tests.
2011-04-09 17:34:04 +02:00
Alexandre Duret-Lutz
bc1275455c Preliminary implementation of an int array compressor.
* src/misc/intvcomp.hh: New file.
* src/misc/Makefile.am: Add it.
* src/tgbatest/intvcomp.cc, src/tgbatest/intvcomp.test: New files.
* src/tgbatest/Makefile.am: Add them.
2011-04-09 17:34:03 +02:00
Alexandre Duret-Lutz
9ad062b247 Fix two spurious segfaults in test cases for the Python interface.
* wrap/python/tests/setxor.py, wrap/python/tests/bddnqueen.py:
Clean all used bdd variables before calling bdd_done(), so that
bdd_delref() is never called after bdd_done().  In NDEBUG builds,
bdd_delref() does not check whether the BuDDy is running or not,
and calling it after bdd_done() will crash.
2011-04-09 17:33:42 +02:00
Alexandre Duret-Lutz
0caf51abd8 * HACKING: Add an example for using callgrind. 2011-04-09 10:56:12 +02:00
Alexandre Duret-Lutz
0368d653ca * iface/dve2/dve2check.cc (main): Catch out-of-memory errors
during emptiness check or counterexample generation.
2011-04-06 09:38:16 +02:00
Alexandre Duret-Lutz
c44b60f08f * src/tgba/tgbaproduct.hh, src/tgba/tgbaproduct.cc: Use
a fixed-size memory pool for product_state instances.
2011-04-04 17:31:25 +02:00
Alexandre Duret-Lutz
5d12152449 * iface/dve2/dve2.cc: Use a fixed-size memory pool for dve2_state
instances and their variables.
2011-04-03 23:14:24 +02:00
Alexandre Duret-Lutz
3396a03818 Add a fixed-size memory pool implementation.
* src/misc/fixpool.hh: New file.
* src/misc/Makefile.am (misc_HEADERS): Add fixpool.hh.
2011-04-03 23:14:24 +02:00
Alexandre Duret-Lutz
050ea69f47 * HACKING (command): Some notes about link-time optimizations. 2011-04-03 14:33:24 +02:00
Alexandre Duret-Lutz
87172f145d * configure.ac: Pass CXXFLAGS/CFLAGS/CPPFLAGS debug/optimization
settings to sub configure.
2011-04-03 10:51:32 +02:00
Alexandre Duret-Lutz
9f63bb6637 Introduct a down_cast macro.
* src/misc/casts.hh: New file.
* src/misc/Makefile.am: Add it.
* iface/dve2/dve2.cc, iface/gspn/gspn.cc, iface/gspn/ssp.cc,
src/evtgba/explicit.cc, src/evtgba/product.cc, src/misc/casts.hh,
src/tgba/state.hh, src/tgba/statebdd.cc, src/tgba/taatgba.cc,
src/tgba/taatgba.hh, src/tgba/tgbabddconcrete.cc,
src/tgba/tgbaexplicit.cc, src/tgba/tgbaexplicit.hh,
src/tgba/tgbakvcomplement.cc, src/tgba/tgbaproduct.cc,
src/tgba/tgbasafracomplement.cc, src/tgba/tgbasgba.cc,
src/tgba/tgbatba.cc, src/tgba/tgbaunion.cc, src/tgba/wdbacomp.cc,
src/tgbaalgos/ndfs_result.hxx, src/tgbaalgos/reductgba_sim.cc,
src/tgbaalgos/reductgba_sim_del.cc: Use down_cast when
appropriate.
2011-03-31 19:39:44 +02:00
Alexandre Duret-Lutz
12783ff784 Cosmetics.
* src/sanity/style.test: Catch some binary operators not
delimited with spaces.
* src/tgbaalgos/bfssteps.cc, src/tgbaalgos/magic.cc,
src/tgbaalgos/reducerun.cc, src/tgbaalgos/se05.cc,
src/tgbaalgos/tau03.cc, src/tgbaalgos/tau03opt.cc: Fix these.
2011-03-31 10:19:59 +02:00
Alexandre Duret-Lutz
36f7c648b6 Make state_explicit instances persistent objects.
* src/tgba/tgbaexplicit.cc, src/tgba/tgbaexplicit.hh: Merge
state_explicit and tgba_explicit::state.  In the past,
state_explicit was a small object encapsulating a pointer to the
persistent tgba_explicit::state; and we used to clone() and
destroy() a lot of state_explicit instance.  Now state_explicit is
persistent, and clone() and destroy() have no effects.
* src/tgba/tgbareduce.cc: Adjust, since this inherits from
tgbaexplicit and uses the internals of state_explicit.
* src/tgbatest/reductgba.cc: Fix deletion order for automata.
* src/tgba/tgba.hh (last_support_conditions_input_,
last_support_variables_input_): Make these protected, so
they can be zeroed by tgba_explicit.
2011-03-31 08:26:34 +02:00
Alexandre Duret-Lutz
cd900a403b Remove tgba_reduc::format_state().
* src/tgba/tgbareduc.cc, src/tgba/tgbareduc.hh (format_state):
Remove this useless copy of the tgba_explicit_string::format_state
method.
2011-03-30 21:55:00 +02:00
Alexandre Duret-Lutz
29a908cc8f Protect the state destructor.
Client code should always call the destroy() method instead.  (It
was introduced in Spot 0.7.)

* src/tgba/state.hh (state::~state): Make it protected.
2011-03-30 21:55:00 +02:00
Alexandre Duret-Lutz
94ac863cfb Speedup tgba_product when one of the argument is a Kripke structure.
The gain is not very impressive.  The runtime of the first example
in iface/dve2/README (also in dve2check.test) is 15% faster.

* src/tgba/tgbaproduct.hh (tgba_succ_iterator_product): Move ...
* src/tgba/tgbaproduct.cc (tgba_succ_iterator_product,
tgba_succ_iterator_product_common): ... in these two classes.
(tgba_succ_iterator_product_kripke): New class to speedup
successor computation on Kripke structures.  We can assume that
all the transitions leaving the same state have the same label.
(tgba_product::tgba_product, tgba_product::succ_iter): Use
tgba_succ_iterator_product_kripke when appropriate.
(tgba_product_init::tgba_product_init): Adjust for the case
where tgba_product did reverse its operands.
2011-03-30 21:53:19 +02:00
Alexandre Duret-Lutz
33732493fe * iface/dve2/dve2check.cc: Remove stray debug output. 2011-03-30 15:43:28 +02:00
Alexandre Duret-Lutz
cc0a903a6e * src/tgba/tgbaproduct.hh: Do not include statebdd.hh. 2011-03-30 10:25:58 +02:00
Alexandre Duret-Lutz
35a0193781 Include <cstddef> in python modules to workaround Swig bug.
* wrap/python/spot.i, wrap/python/buddy.i: Include <cstddef>
because Swig 2.0.2 uses ptrdiff_t and does not do the include
itself.  In g++ most libstdc++ standard headers have been changed
to no longer include <cstddef> as an implementation detail, so
the difference shows.
2011-03-29 22:52:17 +02:00
Alexandre Duret-Lutz
4ce06114d7 * THANKS: Add Michael Weber for his help on the DiVinE interface. 2011-03-21 10:49:22 +01:00
Alexandre Duret-Lutz
a5a74481d9 * src/ltltest/genltl.cc (syntax): Typos in the help text. 2011-03-21 10:49:22 +01:00
Alexandre Duret-Lutz
1878bfd0fc Improve a reduction rule for "a M b".
* src/ltlvisit/reduce.cc (reduce_visitor): Always reduce "a M b"
to "a & b" if "a" is a pure eventual formula, remove the
constraint on "b".
* src/ltltest/reduccmp.test: Add two tests.
2011-03-17 12:25:43 +01:00
Alexandre Duret-Lutz
b51b7ab8b9 * NEWS: Mention recent changes to dotty_reachable. 2011-03-11 10:20:47 +01:00
Alexandre Duret-Lutz
cb83e855a4 Add support for finite behaviors in the DVE interface.
* iface/dve2/dve2.hh (load_dve2): Take a "dead" argument.
* iface/dve2/dve2.cc (callback_context): Add a destructor
to simplify...
(dve2_succ_iterator::~dve2_succ_iterator) ... this one.
(convert_aps): Skip the dead proposition.
(dve2_kripke::dve2_kripke): Take a dead argument, and
setup alive_prop and dead_prop.
(compute_state_condition, get_succ): Use a cache for the
conditions and successor of the last state, to share
some work between these two function.  Add loops on dead
states.
(load_dve2): Pass dead to dve2_kripke and convert_aps.
* iface/dve2/dve2check.cc: Add a -dDEAD option.
* iface/dve2/finite.test, iface/dve2/finite.dve: New file.
* iface/dve2/Makefile.am: Declare them.
2011-03-10 22:37:44 +01:00
Alexandre Duret-Lutz
ef976c93d0 * iface/dve2/dve2.cc (convert_aps): Fix two typos while
parsing >= and >, mistakenly registered as <= and <.
2011-03-10 22:29:56 +01:00
Alexandre Duret-Lutz
6d213e5e4c Remove the Nips interface.
* NEWS: Mention it.
* configure.ac, README: Remove it.
* iface/Makefile.am (SUBDIRS): Remove nips.
* iface/nips/: Delete this directory.
2011-03-07 14:04:25 +01:00
Alexandre Duret-Lutz
8256ae9bfb Accept "P_0 == CS" as synonym for "P_0.CS" in the dve2 interface.
Suggested by Yann Thierry-Mieg.

* iface/dve2/dve2.cc (convert_aps): Allow string on the right
of operators, and look them up.
* iface/dve2/dve2check.test: Test this syntax.
2011-03-07 12:45:37 +01:00
Alexandre Duret-Lutz
5318c1f966 Add some tests for the DVE2 interface.
* iface/dve2/defs.in, iface/dve2/dve2check.test,
iface/dve2/beem-peterson.4.dve: New files.
* iface/dve2/Makefile.am: Add them.
* configure.ac: Generate iface/dve2/defs.
2011-03-07 12:24:32 +01:00
Alexandre Duret-Lutz
0584d278d1 Clear the timer map to help valgrind.
* src/misc/timer.hh (reset_all): New method.
* iface/dve2/dve2check.cc: Use it to help valgrind.
2011-03-07 11:09:53 +01:00
Alexandre Duret-Lutz
e75a73dfb1 Some documentation of about the dve2 interface.
* iface/dve2/README: New file.
* NEWS: Mention it.
* THANKS: Add Michael Weber.
2011-03-07 11:09:53 +01:00
Alexandre Duret-Lutz
76cfd57973 * iface/dve2/dve2.cc, iface/dve2/dve2check.cc: Cosmetic changes
to please sanity checks.
2011-03-07 11:09:53 +01:00
Alexandre Duret-Lutz
51e6989d91 Call divine to compile dve models.
* iface/dve2/dve2.cc (compile_dve2): New function.  Compile
the *.dve source if there is no newer *.dve2C already.
(load_dve2): Call compile_dve2 when given a *.dve file.
* iface/dve2/dve2.hh (load_dve2): Document it.
2011-03-07 11:09:53 +01:00
Alexandre Duret-Lutz
4a62224932 Allow atomic propositions and identifiers like `X.Y'.
* src/ltlparse/ltlscan.ll: Do not recognize `.' as an AND.  Allow
it in atomic propositions.
* src/evtgbaparse/evtgbascan.ll, src/tgbaparse/tgbascan.ll: Accept
`.' in identifiers.
* src/misc/bareword.cc (is_bareword): Accept `.' inside
barewords, so that there is no need to quote `X.Y'.
* src/ltltest/parse.test: Do not use `.' as and operator..
2011-03-07 11:09:53 +01:00
Alexandre Duret-Lutz
8ce39e09b2 Augment dve2check to perform LTL model checking.
* iface/dve2/dve2check.cc: Add many option to perform
emptiness check and other debugging tasks.
2011-03-07 11:09:53 +01:00