bdd_has_common_assignement determines if two bdds a and b
have (at least) one common assignement.
That is it will return true iff bdd_and(a, b) != bddfalse.
* src/bddx.h: Here
* src/bddop.c: Here
* src/bddx.h, misc/bddlt.hh (bdd_stable_cmp): Define this
new function, based on some code that was implemented in Spot, but was
unnecessarily doing reference counting.
This patch addresses the BuDDy part of #396,
reported by Florian Renkin and Reed Oei.
* src/kernel.c, src/kernel.h: Declare a bddrecstack and
associated macros. Resize it when new variable are declared.
* src/cache.h: Add a BddCache_index macro.
* src/bddop.c (not_rec, apply_rec, quant_rec, appquant_rec,
support_rec, ite_rec, compose_rec, restrict_rec, satone_rec,
satoneset_rec): Rewrite using this stack to get rid of the recursion.
* src/bddop.c (bdd_satcount, bdd_satcountln): If the number of
declared variables changed since we last used it, reset misccache.
Otherwise, bdd_satcount() and friends might return incorrect results
after the number of variable is changed. These is needed for the next
patch in Spot to pass all tests.
(misccache_varnum): New global variable to track that.
(bdd_satcountset): Make sure that bdd_satcountset(bddtrue, bddtrue)
return 1.0 and not 0.0.
It seems clang now warn about fallthrough case statements in C, but
ignore any /* fall through */ comment if that comes from a macro.
* src/bddop.c: Use the fallthrough attribute if available.
* src/bddop.c, src/bddx.h, src/cache.c, src/cache.h, src/kernel.c,
src/kernel.h, src/prime.c, src/prime.h, src/reorder.c: Use power of
two for the sizes of all hash tables, in order to reduce the amount of
divisions performed. Also allow bddhash to be smaller than bddnodes.
* src/fdd.c (fdd_intaddvarblock): Add missing addref.
Signed-off-by: Jaco van de Pol <J.C.vandepol@ewi.utwente.nl>
Signed-off-by: Michael Weber <michaelw@cs.utwente.nl>
* m4/gccwarns.m4: Add -Wno-gnu to workaround a diagnostic from
clang 3.9.1 on arch Linux. clang was complaining whtat assert()
is using a GNU extension.
* src/bddop.c: Empty macro arguments are undefined ISO C90 and
ISO C++98. Use '+' when calling APPLY_SHORTCUTS.
* src/fdd.c, src/kernel.c: Avoid constructs invalid in C90.
* src/bddop.c, src/bddx.h, src/kernel.c, src/kernel.h,
examples/cmilner/cmilner.c: Remove C++ comments.
This avoids dynamic lookups to resolve symbols inside the library, but
disallows symbol interposition.
* m4/symbolic.m4: New file.
* buddy/m4/symbolic.m4: New link.
* configure.ac, buddy/configure.ac: Add AX_SYMBOLIC.
* buddy/src/Makefile.am, iface/ltsmin/Makefile.am, src/Makefile.am,
wrap/python/Makefile.am: Link with $(SYMBOLIC_LDFLAGS).
The bug was found while running Spot's src/tgbatest/randpsl.test
on Debian i386 with gcc-4.9.2. The following call would crash:
./ltl2tgba -R3 -t '(!(F(({{{(p0) |
{[*0]}}:{{{(p1)}[*2]}[:*]}[*]:[*2]}[:*0..3]}[]-> (G(F(p1)))) &
(G((!(p1)) | ((!(p2)) W (G(!(p0)))))))))'
On amd64 the call does not crash, but valgrind nonetheless
report that uninitialized memory is being read by bdd_gbc()
during the second garbage collect.
* src/kernel.h (PUSHREF): Define as a function rather than a macro
to avoid undefined behavior. See comments for details.