2023-08-01  Alexandre Duret-Lutz  <adl@lrde.epita.fr>

	fix cache index of bdd_forall

	Fix a 20 year old typo that caused a bug reported by Guillermo Perez.

	* src/bddop.c (bdd_forall, bdd_forallcomp): Fix the cache index.

2023-07-31  Alexandre Duret-Lutz  <adl@lrde.epita.fr>

	fix cache index of bdd_forall

	Fix a 20 year old typo that caused a bug reported by Guillermo Perez.

	* src/bddop.c (bdd_forall, bdd_forallcomp): Fix the cache index.

2022-10-25  Alexandre Duret-Lutz  <adl@lrde.epita.fr>

	Add a default_deleter for bddPair

	* src/bddx.h (std::default_deleter<bddPair>): Here.

2022-05-18  Alexandre Duret-Lutz  <adl@lrde.epita.fr>

	remove some unused variables

	* src/reorder.c (reorder_win2ite): Do not set c=1.

2022-05-17  Alexandre Duret-Lutz  <adl@lrde.epita.fr>

	remove some unused variables

	* src/reorder.c (reorder_win2ite): Do not set c=1.

2021-11-05  philipp  <philipp@lrde.epita.fr>

	Improve bdd_have_common_assignment

	* src/bddop.c: Improve here
	* src/bddtest.cxx: Tests here

2021-11-05  philipp  <philipp@lrde.epita.fr>

	Fix is_cube() and add tests

	* src/bddop.c: Fix is_cube with bddtrue as input
	* src/bddtest.cxx: Add tests here

2021-11-04  Alexandre Duret-Lutz  <adl@lrde.epita.fr>

	fix a spurious failure

	* examples/bddtest/bddtest.cxx: reset some global BDDs to avoid
	issues when they are destroyed after BuDDy.

2021-11-04  Alexandre Duret-Lutz  <adl@lrde.epita.fr>

	execute some of the tests during "make check"

	* examples/bddtest/Makefile.am, src/Makefile.am (TESTS):
	Add this variable.
	* examples/bddtest/bddtest.cxx: Return non-zero on error.

2021-09-16  philipp  <philipp@lrde.epita.fr>

	Adding bdd_is_cube

	bdd_is_cube determines whether or not a given bdd
	represents a cube.

	* src/bddop.c: Here
	* src/bddx.h: And here

2021-09-16  Alexandre Duret-Lutz  <adl@lrde.epita.fr>

	introduce a bdd_satoneshortest() function

	* src/bddop.c, src/bddx.h: Introduce this function.
	* src/bddtest.cxx: Add some short tests.

2021-08-10  Alexandre Duret-Lutz  <adl@lrde.epita.fr>

	typo coma -> comma

	* ChangeLog.1: Here.

2021-07-30  Alexandre Duret-Lutz  <adl@lrde.epita.fr>

	fix bdd_has_common_assignement

	* src/bddop.c, src/bddx.h (bdd_has_common_assignement): Rename as...
	(bdd_have_common_assignment): ... this, and fix level comparisons.
	Also add a cache.

2021-07-27  philipp  <philipp@lrde.epita.fr>

	Adding bdd_has_common_assignement

	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

2021-06-11  Alexandre Duret-Lutz  <adl@lrde.epita.fr>

	typo coma -> comma

	* ChangeLog.1: Here.

2021-06-11  Alexandre Duret-Lutz  <adl@lrde.epita.fr>

	introduce bdd_stable_cmp

	* 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.

2021-04-12  Alexandre Duret-Lutz  <adl@lrde.epita.fr>

	introduce minterm enumeration support

	* src/bddop.c, src/bddx.h (bdd_ibuildcube2, bdd_first_minterm,
	bdd_next_minterm): New functions.
	* src/bddx.h (minterms_of): New class.

2021-01-14  Alexandre Duret-Lutz  <adl@lrde.epita.fr>

	update obsolete autoconf constructs

	Part of #447.

	* configure.ac, m4/bdebug.m4: Replace AC_ERROR and AC_HELP_STRING by
	by AC_MSG_ERROR and AS_HELP_STRING.

2020-08-05  Alexandre Duret-Lutz  <adl@lrde.epita.fr>

	get rid of many recursive algorithms

	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.

2020-07-16  Alexandre Duret-Lutz  <adl@lrde.epita.fr>

	build in C++17 mode by default

	* configure.ac: Activate C++17, and replace --enable-c++17 by
	--enable-c++20.

2020-07-13  Alexandre Duret-Lutz  <adl@lrde.epita.fr>

	avoid cache errors in bdd_satcount() and friends

	* 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.

2020-05-18  Alexandre Duret-Lutz  <adl@lrde.epita.fr>

	avoid cache errors in bdd_satcount() and friends

	* 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.

2020-04-30  Alexandre Duret-Lutz  <adl@lrde.epita.fr>

	workaround newer clang warning

	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.

2019-09-27  Alexandre Duret-Lutz  <adl@lrde.epita.fr>

	improve C++ backward compatibility around bdd_allsat change

	* src/bddx.h (bdd_allsat): Add a version with the old prototype.

2019-09-26  Alexandre Duret-Lutz  <adl@lrde.epita.fr>

	fix ARM compilation

	* src/bddop.c, src/bddx.h, examples/bddtest/bddtest.cxx: Use signed
	char* instead of char*.

2019-09-26  Alexandre Duret-Lutz  <adl@lrde.epita.fr>

	fix ARM compilation

	* src/bddop.c, src/bddx.h, examples/bddtest/bddtest.cxx: Use signed
	char* instead of char*.

2019-02-05  Alexandre Duret-Lutz  <adl@lrde.epita.fr>

	remember to free bddhash on exit

	* src/kernel.c (bdd_done): Free bddhash.

2018-03-14  Alexandre Duret-Lutz  <adl@lrde.epita.fr>

	do not use ACLOCAL_AMFLAGS anymore

	Fixes #326.

	* Makefile.am: Here.

2018-03-09  Alexandre Duret-Lutz  <adl@lrde.epita.fr>

	do not use ACLOCAL_AMFLAGS anymore

	Fixes #326.

	* Makefile.am: Here.

2017-08-22  Alexandre Duret-Lutz  <adl@lrde.epita.fr>

	switch to C++14 compilation

	* configure.ac: Here.  Rename --enable-c++14 into --enable-c++17.

2017-07-24  Alexandre Duret-Lutz  <adl@lrde.epita.fr>

	use powers of two for the sizes of all hash tables

	* 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.

2017-06-20  Alexandre Duret-Lutz  <adl@lrde.epita.fr>

	fix handling of bdd_apply_biimp

	* src/bddop.c: Fix shortcut.

2017-06-20  Alexandre Duret-Lutz  <adl@lrde.epita.fr>

	fix handling of bdd_apply_biimp

	* src/bddop.c: Fix shortcut.

2017-05-04  Alexandre Duret-Lutz  <adl@lrde.epita.fr>

	rename ChangeLog

	We generate ChangeLog from git log now.

	* ChangeLog: Rename as...
	* ChangeLog.1: ... this.
	* Makefile.am: Distribute the latter.

2017-05-04  Alexandre Duret-Lutz  <adl@lrde.epita.fr>

	fix libbddx.pc generation

	Report from Jeroen Meijer.

	* src/Makefile.am (libbddx.pc): Depends on Makefile.  Use a
	temporary.  Declare in CLEANFILES instead of DISTCLEANFILES.

2017-05-04  Alexandre Duret-Lutz  <adl@lrde.epita.fr>

	rename ChangeLog

	We generate ChangeLog from git log now.

	* ChangeLog: Rename as...
	* ChangeLog.1: ... this.
	* Makefile.am: Distribute the latter.

2017-05-04  Alexandre Duret-Lutz  <adl@lrde.epita.fr>

	fix libbddx.pc generation

	Report from Jeroen Meijer.

	* src/Makefile.am (libbddx.pc): Depends on Makefile.  Use a
	temporary.  Declare in CLEANFILES instead of DISTCLEANFILES.

2017-04-19  Alexandre Duret-Lutz  <adl@lrde.epita.fr>

	fix previous patch

	* src/fdd.c: C++ comments are not supported in C90.

2017-04-19  Alexandre Duret-Lutz  <adl@lrde.epita.fr>

	fix previous patch

	* src/fdd.c: C++ comments are not supported in C90.

2017-04-19  Michael Weber  <michaelw@foldr.org>

	Addref in fdd_intaddvarblock

	* src/fdd.c (fdd_intaddvarblock): Add missing addref.

2017-04-19  Michael Weber  <michaelw@foldr.org>

	Addref in fdd_intaddvarblock

	* src/fdd.c (fdd_intaddvarblock): Add missing addref.

2017-03-31  Alexandre Duret-Lutz  <adl@lrde.epita.fr>

	Typos in comments

	* src/kernel.c (bdd_addref): Fix typo documentation.
	* src/bddop.c (bdd_appall, bdd_appallcomp): Likewise.

2017-03-30  Alexandre Duret-Lutz  <adl@lrde.epita.fr>

	Typos in comments

	* src/kernel.c (bdd_addref): Fix typo documentation.
	* src/bddop.c (bdd_appall, bdd_appallcomp): Likewise.

2017-03-14  Alexandre Duret-Lutz  <adl@lrde.epita.fr>

	add -Wno-gnu if supported

	* 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.

2017-03-14  Alexandre Duret-Lutz  <adl@lrde.epita.fr>

	remove useless #include<assert.h>

	* src/bddio.c, src/bddop.c, src/imatrix.c, src/pairs.c: Here.

2017-03-14  Alexandre Duret-Lutz  <adl@lrde.epita.fr>

	add -Wno-gnu if supported

	* 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.

2017-03-13  Alexandre Duret-Lutz  <adl@lrde.epita.fr>

	remove useless #include<assert.h>

	* src/bddio.c, src/bddop.c, src/imatrix.c, src/pairs.c: Here.

2017-02-01  Alexandre Duret-Lutz  <adl@lrde.epita.fr>

	update the warning flags to match Spot's

	* m4/gccwarns.m4: Add more flags taken from Spot.
	Also add -Wno-long-long to suppress one warning.

2017-02-01  Alexandre Duret-Lutz  <adl@lrde.epita.fr>

	fix some -Wpedantic messages

	* 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.

2017-01-14  Alexandre Duret-Lutz  <adl@lrde.epita.fr>

	install a pkg-config file

	* src/libbddx.pc.in: New file.
	* src/Makefile.am: Generate libbddx.pc, and install it.
	Distribute libbddx.pc.in.
	* src/.gitignore: Ignore *.pc.

2016-12-13  Maximilien Colange  <colange@lrde.epita.fr>

	Add an option to enable C++14.

	* configure.ac: add an option --enable-c++14.

2016-11-19  Alexandre Duret-Lutz  <adl@lrde.epita.fr>

	fix bdd_noderesize

	* src/kernel.c: Fix error introduced by 5a862295.
	Report from Tomáš Babiak.

2016-11-09  Alexandre Duret-Lutz  <adl@lrde.epita.fr>

	avoid costly calls to setjmp() when BDD_REORDER_NONE

	* src/reorder.c, src/kernel.h: Expose bddreordermethod.
	* src/bddop.c: Test bddreordermethod before ever calling setjmp().

2016-11-09  Alexandre Duret-Lutz  <adl@lrde.epita.fr>

	consolidate shortcuts for binary operation

	* src/bddop.c (apply_rec, appquant_rec): Define missing shortcuts
	for bddop_less, bddop_diff, bddop_revimpl and define them once.

2016-11-08  Alexandre Duret-Lutz  <adl@lrde.epita.fr>

	improve initialization of bddnode

	* src/kernel.c, src/kernel.h: Here.

2016-10-28  Alexandre Duret-Lutz  <adl@lrde.epita.fr>

	Fix several PVS-Studio warnings

	For #192.

	* src/bddio.c, src/cppext.cxx, src/kernel.c: Fix printf formats, calls
	to new, and simplify one check in bdd_delref_nc().

2016-10-20  Alexandre Duret-Lutz  <adl@lrde.epita.fr>

	slight optimization of bdd_implies

	* src/bddop.c: Avoid the first recursion when it is obvious that the
	second will fail.

2016-10-20  Alexandre Duret-Lutz  <adl@lrde.epita.fr>

	typo in comment

	* src/bddop.c (bdd_implies): Fix documentation.

2016-10-19  Alexandre Duret-Lutz  <adl@lrde.epita.fr>

	speedup bdd_init and bdd_noderesize

	* src/kernel.c: The initialization code of the BDD cache was
	awfully slow due to multiple references to global variables.

2016-07-27  Alexandre Duret-Lutz  <adl@lrde.epita.fr>

	fix an undefined behavior

	* src/prime.c (BitIsSet): Do not shift signed
	int by 31 places; shift unsigned int instead.

2015-03-11  Alexandre Duret-Lutz  <adl@lrde.epita.fr>

	backport some fixes from upstream

	* src/fdd.c, src/imatrix.c, src/kernel.c, src/reorder.c: Here.

2015-03-10  Alexandre Duret-Lutz  <adl@lrde.epita.fr>

	fix undefined behavior

	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.

2014-10-28  Alexandre Duret-Lutz  <adl@lrde.epita.fr>

	pack cache entry on 16 bytes, not 20.

	The double result is never used with a triple keys,
	so we can pack the cache entry more tightly.

	* src/cache.h: Reorganize the cache entry the structure.
	* src/cache.c: Cleanup the code while we are at it.
	* src/bddop.c: Adjust to accesses to cache entries.

2014-08-11  Alexandre Duret-Lutz  <adl@lrde.epita.fr>

	Fix a harmless uninitialized read.

	This can only cause failure when running under valgrind (i.e., in the
	test suite), but is not a problem in practice as the test is certain
	to fail the entry->c check whenever entry->b is uninitialized.

	* src/bddop.c (bdd_implies): Here.

2014-08-10  Alexandre Duret-Lutz  <adl@lrde.epita.fr>

	Fix a harmless uninitialized read.

	This can only cause failure when running under valgrind (i.e., in the
	test suite), but is not a problem in practice as the test is certain
	to fail the entry->c check whenever entry->b is uninitialized.

	* src/bddop.c (bdd_implies): Here.

2014-06-20  Alexandre Duret-Lutz  <adl@lrde.epita.fr>

	Improve handling of bddtrue and bddfalse.

	* src/bdd.h, src/cppext.cxx: Handle bddtrue and bddfalse using
	special types.
