Commit graph

1568 commits

Author SHA1 Message Date
Alexandre Duret-Lutz
866af2a715 Remove Kristin Rozier's LTLcounter.pl scripts, now that we can
generate these formulae with "genltl".

* src/tgbatest/ltlcounter/: Remove this directory.
* src/tgbatest/Makefile.am: Adjust.
* src/tgbatest/ltlcounter.test, bench/ltlcounter/run: Use genltl
to generate the formulae.
* bench/ltlcounter/README: Do not mention src/tgbatest/ltlcounter/
anymore.
2011-06-06 17:57:55 +02:00
Alexandre Duret-Lutz
4087d37fe5 Better layout of the LTL formula parse tree.
* src/ltlvisit/dotty.cc: Display "L" and "R" tail-labels
for binary operators.  Gather all constants and atomic
propositions in a sub-graph with "rank=sink".
2011-06-06 17:04:49 +02:00
Alexandre Duret-Lutz
625b9362c8 Add more formula families to genltl.
* src/ltltest/genltl.cc (fair_response, ltl_counter)
(ltl_counter_carry): New functions, constructing function from
gastin.03.cav and rozier.07.cav.  The LTL counter will replace the
scripts in src/tgbatest/ltlcounter/.
(X_n): New helper function.
2011-06-06 15:58:15 +02:00
Alexandre Duret-Lutz
67ff9f203f Install a misc/_config.h to hide all the defines that clutter the
built output.

This is also a step towards better checks for things like
__attribute__ or std::tr1.

* m4/ax_prefix_config_h.m4: New file.
* configure.ac: Call AC_CONFIG_HEADERS and AX_PREFIX_CONFIG_H.
* src/misc/Makefile.am: Install misc/_config.h.
* src/misc/random.cc, src/misc/version.cc: Include misc/_config.h.
2011-06-06 12:52:50 +02:00
Alexandre Duret-Lutz
78f932081b Document the protocol used between ltl2tgba.html and spot.py.
* wrap/python/ajax/protocol.txt: New file.
* wrap/python/ajax/Makefile.am (EXTRA_DIST): Add it.
2011-06-03 17:13:53 +02:00
Alexandre Duret-Lutz
23334e7e25 * iface/dve2/README: Document state compression. 2011-06-02 19:37:20 +02:00
Alexandre Duret-Lutz
f3bae53e5b Update jQuery and jQuery-UI.
* wrap/python/ajax/ltl2tgba.html: Adjust to use
jQuery 1.6.1 and jQuery-UI 1.8.13.  Remove a useless check
of $("#autoupdate").attr("checked") since this checkbox no longer
exists.
* wrap/python/ajax/css/ui-lightness/jquery-ui-1.8.8.custom.css:
Replace by ...
* wrap/python/ajax/css/ui-lightness/jquery-ui-1.8.13.custom.css: This.
* wrap/python/ajax/Makefile.am (EXTRA_DIST): Adjust.
2011-06-02 14:10:40 +02:00
Alexandre Duret-Lutz
bf2b44c6de * iface/dve2/dve2.cc: Kill a spurious warning. 2011-05-30 12:00:58 +02:00
Alexandre Duret-Lutz
1eb0464afc * bench/wdba/README: Typos. 2011-05-30 09:11:40 +02:00
Alexandre Duret-Lutz
290b825a3a Some intvcomp2 speedups.
* src/misc/intvcmp2.cc (stream_compression_base::run):
Implement a shift-less encoding for the 1-bit and 3-bit cases.
Also declare offsets as size_t, to help 64-bit compilers.
2011-05-18 19:00:53 +02:00
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
1d1872ab90 [buddy] Inline the "is bdd constant" check performed in copies/constructors.
This avoids a library call to bdd_addref or bdd_delref.

* src/kernel.c (bdd_delref_nc, bdd_addref_nc): New function,
that work only on BDD that are not constant.
* src/cpext.cxx (bdd::operator=): Move...
* src/bdd.hh (bdd::operator=): ... here.
(bdd::bdd, bdd::~bdd, bdd::operator=): Inline the "is bdd constant"
check and call bdd_delref_nc/bdd_addref_nc only otherwise.
2011-04-30 13:37:53 +02:00
Alexandre Duret-Lutz
2b58fb90c4 [buddy] Hint gcc about likely/unlikely branches.
* src/bdd.h (__likely, __unlikely): Introduce these two macros.
* src/bddop.c, src/kerner.c: Use them in many situations.
2011-04-30 13:30:13 +02:00
Alexandre Duret-Lutz
24054605da [buddy] * src/pairs.c (bdd_pairalloc): Fix prototype. 2011-04-30 13:22:27 +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
e9396502f7 more files to ignore 2011-04-10 22:14:12 +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
e5f35dea48 [buddy]
Fix some warnings reported by gcc.

* buddy/src/kernel.c (errorstrings): Mark these as const.
* buddy/src/reorder.c (reorder_gbc): Fix prototype.
(siftTestCmp): Add missing const in cast.
(bdd_reorder_auto): Actually call bdd_reorder_ready().
2011-04-10 22:12:25 +02:00
Alexandre Duret-Lutz
35de7e9008 [buddy]
Add support for --enable-devel and similar macros.

* m4/debug.m4: Rename to ...
* m4/bdebug.m4: ... this.
* m4/debug.m4, m4/devel.m4, m4/gccoptim.m4, m4/ndebug.m4: New file.
* m4/gccwarns.m4: Fix usage of cache variable.  Fix shell
syntax.  Do not check for -Waggregate-return.  Update CFLAGS.
* configure.ac: Adjust to handle --enable-devel and similar macros
in the same way as Spot.
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
5fdfe28689 [buddy]
Tag functions with attributes pure, const, or noreturn.

* src/bdd.h (__purefn, __constfn, __noreturnfn): Define
new macros.
* src/bdd.h, src/bddio.c, src/bvec.h, src/imatrix.h: Use them
to tag many functions as suggested by -Wsuggest-attribute=pure,
-Wsuggest-attribute=const, -Wsuggest-attribute=noreturn.
2011-04-05 09:29:03 +02:00
Alexandre Duret-Lutz
61d9e721a0 [buddy]
Remove more sanity checks when NDEBUG is set.

* src/kernel.h (CHECKnc): New macro.
* src/kernel.c (bdd_var, bdd_low, bdd_high, bdd_ithvar,
bdd_nithvar): Use it.
2011-04-04 19:10:06 +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
30f00584d4 [buddy]
* src/kernel.h (CHECK, CHECKa, CHECKn): Disable if NDEBUG is set.
2011-04-03 14:28:45 +02:00
Alexandre Duret-Lutz
44aed5cda6 [buddy]
Fix declaration of bddproduced.

* src/reorder.c (bddproduced): Declare a longint, to match
the definition in kerner.c.
2011-04-03 13:54:01 +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
197019ea62 [buddy]
* buddy/src/kernel.c (bdd_addref, bdd_delref): Disable sanity
checks when compiled with NDEBUG.
2011-04-03 10:49:35 +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