* src/misc/bddalloc.cc (bdd_allocator::varnum): Suppress.

(bdd_allocator::bdd_allocator): Adjust.
(bdd_allocator::extvarnum): Always call bdd_varnum(), so that
it doesn't matter if the number of variable has been augmented
externally.
* src/misc/bddalloc.hh (bdd_allocator::varnum): Suppress.
This commit is contained in:
Alexandre Duret-Lutz 2004-05-17 13:17:13 +00:00
parent eccfdc6c1e
commit 7f1d5f597c
3 changed files with 12 additions and 6 deletions

View file

@ -26,10 +26,9 @@
namespace spot
{
bool bdd_allocator::initialized = false;
int bdd_allocator::varnum = 2;
bdd_allocator::bdd_allocator()
: lvarnum(varnum)
: lvarnum(bdd_varnum())
{
initialize();
fl.push_front(pos_lenght_pair(0, lvarnum));
@ -46,14 +45,15 @@ namespace spot
// to tune this. By the meantime, we take the typical values
// for large examples advocated by the BuDDy manual.
bdd_init(1000000, 10000);
bdd_setvarnum(varnum);
bdd_setvarnum(2);
}
void
bdd_allocator::extvarnum(int more)
{
// If varnum has been extended from another allocator, use
// the new variables.
int varnum = bdd_varnum();
// If varnum has been extended from another allocator (or
// externally), use the new variables.
if (lvarnum < varnum)
{
more -= varnum - lvarnum;

View file

@ -44,7 +44,6 @@ namespace spot
using free_list::dump_free_list;
protected:
static bool initialized; ///< Whether the BDD library has been initialized.
static int varnum; ///< number of variables in use in the BDD library.
int lvarnum; ///< number of variables in use in this allocator.
private:
/// Require more variables.