From 21e2439d0645acd6df1cd605e848ecdf6090462a Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Tue, 17 Apr 2007 13:11:49 +0000 Subject: [PATCH] * src/misc/bddalloc.cc (bdd_allocator::initialize): Call bdd_isrunning() and don't run bdd_init() if it has already been called. --- ChangeLog | 6 ++++++ src/misc/bddalloc.cc | 9 ++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 472a284ca..aad49b222 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-04-17 Alexandre Duret-Lutz + + * src/misc/bddalloc.cc (bdd_allocator::initialize): Call + bdd_isrunning() and don't run bdd_init() if it has already been + called. + 2007-02-06 Alexandre Duret-Lutz * src/tgbaalgos/randomgraph.cc (random_graph): Fix the diff --git a/src/misc/bddalloc.cc b/src/misc/bddalloc.cc index b74df77ca..2a7dcc337 100644 --- a/src/misc/bddalloc.cc +++ b/src/misc/bddalloc.cc @@ -1,6 +1,6 @@ -// Copyright (C) 2003, 2004, 2006 Laboratoire d'Informatique de Paris 6 (LIP6), -// département Systèmes Répartis Coopératifs (SRC), Université Pierre -// et Marie Curie. +// Copyright (C) 2003, 2004, 2006, 2007 Laboratoire d'Informatique de +// Paris 6 (LIP6), département Systèmes Répartis Coopératifs (SRC), +// Université Pierre et Marie Curie. // // This file is part of Spot, a model checking library. // @@ -40,6 +40,9 @@ namespace spot if (initialized) return; initialized = true; + // Buddy might have been initialized by a third-party library. + if (bdd_isrunning()) + return; // The values passed to bdd_init should depends on the problem // the library is solving. It would be nice to allow users // to tune this. By the meantime, we take the typical values