bddprint: do not store a global shared_ptr to the bdd_dict
* src/twa/bddprint.cc: Do not store a global shared_ptr to the bdddict used for printing (a simple pointer is enough), otherwise it risks being the last shared_ptr to be destroyed, and it might be destroyed after the unicity maps of the formulas.
This commit is contained in:
parent
c67540db14
commit
ca95e4d1d2
1 changed files with 5 additions and 6 deletions
|
|
@ -31,7 +31,7 @@
|
|||
namespace spot
|
||||
{
|
||||
/// Global dictionary used by print_handler() to lookup variables.
|
||||
static bdd_dict_ptr dict;
|
||||
static bdd_dict* dict;
|
||||
|
||||
/// Global flag to enable Acc[x] output (instead of `x').
|
||||
static bool want_acc;
|
||||
|
|
@ -100,7 +100,7 @@ namespace spot
|
|||
std::ostream&
|
||||
bdd_print_sat(std::ostream& os, const bdd_dict_ptr& d, bdd b)
|
||||
{
|
||||
dict = d;
|
||||
dict = d.get();
|
||||
where = &os;
|
||||
want_acc = false;
|
||||
assert(bdd_satone(b) == b);
|
||||
|
|
@ -124,7 +124,7 @@ namespace spot
|
|||
std::ostream&
|
||||
bdd_print_accset(std::ostream& os, const bdd_dict_ptr& d, bdd b)
|
||||
{
|
||||
dict = d;
|
||||
dict = d.get();
|
||||
where = &os;
|
||||
want_acc = true;
|
||||
first_done = false;
|
||||
|
|
@ -153,7 +153,7 @@ namespace spot
|
|||
std::ostream&
|
||||
bdd_print_set(std::ostream& os, const bdd_dict_ptr& d, bdd b)
|
||||
{
|
||||
dict = d;
|
||||
dict = d.get();
|
||||
want_acc = true;
|
||||
bdd_strm_hook(print_handler);
|
||||
os << bddset << b;
|
||||
|
|
@ -192,7 +192,7 @@ namespace spot
|
|||
std::ostream&
|
||||
bdd_print_isop(std::ostream& os, const bdd_dict_ptr& d, bdd b)
|
||||
{
|
||||
dict = d;
|
||||
dict = d.get();
|
||||
want_acc = true;
|
||||
minato_isop isop(b);
|
||||
|
||||
|
|
@ -201,7 +201,6 @@ namespace spot
|
|||
{
|
||||
os << bdd_format_set(d, p);
|
||||
}
|
||||
|
||||
return os;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue