Commit graph

58 commits

Author SHA1 Message Date
Alexandre Duret-Lutz
d3ccaa7cb9 [buddy] Remove some valgrind warnings about uninitialized memory when
BddCache_lookup return an entry from a Not operation.

* src/bddop.c (apply_rec, simplify_rec): When checking the cache
entry, always check entry->a and entry->c before checking
entry->b, because the "not_rec()" function does not initialize
the latter.
2011-06-09 11:56:02 +02:00
Alexandre Duret-Lutz
b535741a90 [buddy] * examples/cmilner/cmilner.c (A, transitions, initial_state)
(reachable_states, has_deadlocks): Declare as static functions,
to suppress a GCC warning.
2011-06-07 14:52:35 +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
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
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
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
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
8f5ecc14bf [buddy]
* examples/cmilner/Makefile.am (cmilner_LDADD): Link with -lm, to
find the pow() function.
2011-02-27 15:24:22 +01:00
Alexandre Duret-Lutz
4034b7f87f [buddy]
* src/bddop.c (bdd_setxor): New function.
* src/bdd.h (bdd_setxor): New function.
2010-11-07 11:15:45 +01:00
Alexandre Duret-Lutz
0fe5403956 Revert inlining of bdd_addref() and bdd_delref().
This reverts commit d462f50b59.

Conflicts:

	buddy/ChangeLog
2010-01-22 15:55:08 +01:00
Alexandre Duret-Lutz
e828783f47 [buddy]
Get rid of some "deprecated conversion from string constant to
`char*'" warnings.

* examples/bddcalc/parser_.h (yyerror): Declare the format
as a "const char*".
* examples/bddcalc/parser.yxx (yyerror): Likewise.
2010-01-22 11:14:10 +01:00
Alexandre Duret-Lutz
e20ba143bb [buddy]
* src/bddio.c (bdd_load): Check the return value of fscanf() to
kill a warning.
2010-01-21 15:51:23 +01:00
Alexandre Duret-Lutz
d462f50b59 [buddy]
Inline bdd_addref() and bdd_delref() to speedup BDD operations.

* src/kernel.c, src/kernel.h (bdd_addref, bdd_delref): Move these
functions and there associated global variables...
* src/bdd.c (bdd_error): ... and this function ...
* src/bdd.h (bdd_addref, bdd_delref, bdd_error): ...here so that
they can be inlined.
2009-12-09 14:05:54 +01:00
Alexandre Duret-Lutz
253ee35030 [buddy]
Introduce bdd_satprefix, to speedup spot::minato().

* src/bdd.h (bdd_satprefix): New function.
* src/bddop.c (bdd_satprefix, bdd_sat_prefixrec): New functions.
2009-11-23 21:40:26 +01:00
Alexandre Duret-Lutz
b7db0c3085 [buddy] Fix the previous patch in reorder.c 2009-10-01 13:33:36 +02:00
Alexandre Duret-Lutz
ada681d813 [buddy] Fix some issues reported by LLVM/Clang's static analyser. 2009-09-08 11:05:45 +02:00
Alexandre Duret-Lutz
43ba3f8378 [buddy] configure.ac: Switch from Libtool 1.5.x to Libtool 2.x, and add an AC_CONFIG_MACRO_DIR call. 2009-09-02 10:41:18 +02:00
Guillaume Sadegh
afeaf287e9 * m4/intel.m4: Fix to support the cache. 2009-07-09 21:29:50 +02:00
Guillaume Sadegh
bf925aaeeb [buddy] Adjust to support the Intel compiler (icc).
* configure.ac: Adjust to call...
    * m4/intel.m4: ...this new macro.
2009-06-12 16:37:21 +02:00
Guillaume Sadegh
7817f325eb More files to ignore. 2009-06-10 03:34:08 +02:00
Alexandre Duret-Lutz
f217ff374c * src/bddtest.cxx: Include <cstdlib> to compile with g++-4.3. 2008-03-14 16:59:40 +01:00
Alexandre Duret-Lutz
5ef7084b61 Add .gitignore files 2008-03-14 16:59:32 +01:00
Alexandre Duret-Lutz
894c864fd5 * src/kernel.c (bdd_default_gbchandler): Log garbage collection to
stderr, not stdout.  Reported by Kristin Yvonne Rozier
<kyrozier@cs.rice.edu>.
2008-02-25 14:37:54 +01:00
Alexandre Duret-Lutz
3b693c5ca7 * configure.ac: Call AC_LIBTOOL_WIN32_DLL
* src/Makefile.am (libbdd_la_LDFLAGS): Add -no-undefined.
2004-07-23 09:07:49 +00:00
Alexandre Duret-Lutz
89db9aa512 * src/Makefile.am (libbdd_la_LDFLAGS): Add -no-undefined. 2004-07-23 09:06:54 +00:00
Alexandre Duret-Lutz
7abc2604f3 * examples/bddcalc/parser.yxx (actionSeq, varlist): Rewrite as
left-recursive rules.
2004-07-12 14:03:53 +00:00
Alexandre Duret-Lutz
f1c3af808f Merge BuDDy 2.3.
* examples/calculator/, examples/internal/: Were renamed as ...
* examples/bddcalc/, examples/bddtest/: ... these.
* configure.ac: Adjust version and output Makefiles.
* examples/Makefile.am (SUBDIRS): Adjust subdir renaming.
* examples/cmilner/milner.c, examples/fdd/statespace.cxx: Were
renamed as ...
* examples/cmilner/cmilner.c, examples/fdd/fdd.cxx: ... these.
* examples/cmilner/Makefile.am, examples/fdd/Makefile.am: Adjust
accordingly.
* src/Makefile.am (AM_CPPFLAGS): Define VERSION.
2004-07-06 17:39:37 +00:00
Alexandre Duret-Lutz
aa4a582f1b Merge BuDDy 2.3.
* examples/calculator/, examples/internal/: Were renamed as ...
* examples/bddcalc/, examples/bddtest/: ... these.
* configure.ac: Adjust version and output Makefiles.
* examples/Makefile.am (SUBDIRS): Adjust subdir renaming.
* examples/cmilner/milner.c, examples/fdd/statespace.cxx: Were
renamed as ...
* examples/cmilner/cmilner.c, examples/fdd/fdd.cxx: ... these.
* examples/cmilner/Makefile.am, examples/fdd/Makefile.am: Adjust
accordingly.
* src/Makefile.am (AM_CPPFLAGS): Define VERSION.
2004-06-28 15:22:11 +00:00
Alexandre Duret-Lutz
805b6fb70b Initial revision 2004-06-28 14:19:59 +00:00
Alexandre Duret-Lutz
b9b3c1ca25 * configure.ac, NEWS: Bump version to 0.0r. 2004-03-08 22:23:04 +00:00
Alexandre Duret-Lutz
7aecf4ad09 * src/bddop.c (bdd_support): Free supportSet if it needs to be
reallocated.  This fixes a memory leak reported by
Souheib.Baarir@lip6.fr.
2004-01-07 16:05:21 +00:00
Alexandre Duret-Lutz
51ff9f8dda * examples/Makefile.def (AM_CPPFLAGS): Add -I$(srcdir). 2003-11-14 12:26:13 +00:00
Alexandre Duret-Lutz
e88b41d8c9 * doc/Makefile.am (EXTRA_DIST): Replace buddy.ps by buddy.pdf
(the latter has been rebuilt and on Jørn's request it explicitly
mentions the differences with the 2.2 manual).
2003-08-06 15:15:56 +00:00
Alexandre Duret-Lutz
3a2ecb791c . 2003-08-06 14:19:29 +00:00
Alexandre Duret-Lutz
13cc53ce99 typo 2003-08-06 14:16:49 +00:00
Alexandre Duret-Lutz
2cea6446b1 * src/bddop.c (bdd_forallcomp, bdd_uniquecomp): Fix documentation. 2003-08-06 14:14:16 +00:00
Alexandre Duret-Lutz
4bf6c52bea * rsc/bdd.h (bdd_existcomp, bdd_forallcomp,
bdd_uniquecomp, bdd_appexcomp, bdd_appallcomp,
bdd_appunicomp): Declare for C and C++.
* src/bddop.c (CACHEID_EXISTC, CACHEID_FORALLC,
CACHEID_UNIQUEC, CACHEID_APPEXC, CACHEID_APPALC,
CACHEID_APPUNCC): New macros.
(quatvarsetcomp): New variables.
(varset2vartable): Take a second argument to indicate negation,
set quatvarsetcomp.
(INVARSET): Honor quatvarsetcomp.
(quantify): New function, extracted from bdd_exist, bdd_forall,
and bdd_appunicomp.
(bdd_exist, bdd_forall, bdd_appunicomp): Use quantify.
(bdd_existcomp, bdd_forallcomp, bdd_appunicompcomp): New functions.
(appquantify): New function, extracted from bdd_appex, bdd_appall,
and bdd_appuni.
(bdd_appex, bdd_appall, bdd_appuni): Use appquantify.
(bdd_appexcomp, bdd_appallcomp, bdd_appunicomp): New functions.

* src/bddop.c (bdd_support): Return bddtrue when the support
is empty, because variable sets are conjunctions.
2003-07-17 14:09:03 +00:00
Alexandre Duret-Lutz
6f2f4d0247 more files to ignore 2003-06-30 07:48:20 +00:00
Alexandre Duret-Lutz
5100c197a2 more files to ignore 2003-05-23 12:02:09 +00:00
Alexandre Duret-Lutz
dc6efb0c40 * src/pairs.c (bdd_mergepairs): New function.
(bdd_copypair): Revert 2003-05-20's change.  Use bdd_addref
to copy result variables.
* src/bdd.h (BDD_INVMERGE): New error code.
(bdd_mergepairs): Declare.
* src/kernel.c (errorstrings): Add string of BDDINV.
2003-05-22 15:07:56 +00:00
Alexandre Duret-Lutz
10f634d91d * src/pairs.c (bdd_mergepairs): New function.
(bdd_copypair): Revert 2003-05-20's change.  Use bdd_addref
to copy result variables.
2003-05-22 15:07:26 +00:00
Alexandre Duret-Lutz
039412ea35 * src/bddop.c (bdd_simplify): Typo in doc, s/domaine/domain/. 2003-05-22 12:09:20 +00:00
Alexandre Duret-Lutz
4d6660835a * src/pairs.c (bdd_copypair): Use memcpy to copy from->result,
and correctly copy p->last from from->last.
2003-05-22 12:07:52 +00:00
Alexandre Duret-Lutz
2f6e476cba * src/pairs.c (bdd_copypair): Use memcpy to copy from->result. 2003-05-20 10:42:19 +00:00
Alexandre Duret-Lutz
42782f3a83 * src/pairs.c (bdd_setbddpair): Fix prototype in documentation. 2003-05-20 08:22:35 +00:00