Make bdd_dict a shared pointer.

* src/tgba/bdddict.hh (bdd_dict_ptr): New type.
(make_bdd_dict): New function.
* iface/dve2/dve2.cc, iface/dve2/dve2.hh, iface/dve2/dve2check.cc,
src/bin/dstar2tgba.cc, src/bin/ltlcross.cc,
src/dstarparse/dstarparse.yy, src/dstarparse/public.hh,
src/graphtest/tgbagraph.cc, src/kripke/kripkeexplicit.cc,
src/kripke/kripkeexplicit.hh, src/kripke/kripkeprint.cc,
src/kripkeparse/kripkeparse.yy, src/kripkeparse/public.hh,
src/kripketest/parse_print_test.cc, src/ltlvisit/apcollect.cc,
src/ltlvisit/contain.cc, src/ltlvisit/contain.hh,
src/ltlvisit/simplify.cc, src/ltlvisit/simplify.hh,
src/neverparse/neverclaimparse.yy, src/neverparse/public.hh,
src/priv/accmap.hh, src/saba/saba.hh, src/saba/sabacomplementtgba.cc,
src/saba/sabacomplementtgba.hh, src/sabatest/sabacomplementtgba.cc,
src/ta/ta.hh, src/ta/taexplicit.cc, src/ta/taexplicit.hh,
src/ta/taproduct.cc, src/ta/taproduct.hh, src/ta/tgtaexplicit.cc,
src/ta/tgtaexplicit.hh, src/taalgos/dotty.cc, src/tgba/bddprint.cc,
src/tgba/bddprint.hh, src/tgba/formula2bdd.cc, src/tgba/formula2bdd.hh,
src/tgba/taatgba.cc, src/tgba/taatgba.hh, src/tgba/tgba.hh,
src/tgba/tgbagraph.hh, src/tgba/tgbakvcomplement.cc,
src/tgba/tgbakvcomplement.hh, src/tgba/tgbaproduct.cc,
src/tgba/tgbaproduct.hh, src/tgba/tgbaproxy.cc, src/tgba/tgbaproxy.hh,
src/tgba/tgbasafracomplement.cc, src/tgba/tgbasafracomplement.hh,
src/tgba/tgbascc.cc, src/tgba/tgbascc.hh, src/tgba/tgbasgba.cc,
src/tgba/tgbasgba.hh, src/tgba/tgbaunion.cc, src/tgba/tgbaunion.hh,
src/tgba/wdbacomp.cc, src/tgbaalgos/compsusp.cc,
src/tgbaalgos/compsusp.hh, src/tgbaalgos/degen.cc,
src/tgbaalgos/dtbasat.cc, src/tgbaalgos/dtgbasat.cc,
src/tgbaalgos/emptiness.cc, src/tgbaalgos/lbtt.cc,
src/tgbaalgos/lbtt.hh, src/tgbaalgos/ltl2taa.cc,
src/tgbaalgos/ltl2taa.hh, src/tgbaalgos/ltl2tgba_fm.cc,
src/tgbaalgos/ltl2tgba_fm.hh, src/tgbaalgos/randomgraph.cc,
src/tgbaalgos/randomgraph.hh, src/tgbaalgos/save.cc,
src/tgbaalgos/translate.cc, src/tgbaalgos/translate.hh,
src/tgbaalgos/word.cc, src/tgbaalgos/word.hh, src/tgbaparse/public.hh,
src/tgbaparse/tgbaparse.yy, src/tgbatest/complementation.cc,
src/tgbatest/explprod.cc, src/tgbatest/ltl2tgba.cc,
src/tgbatest/ltlprod.cc, src/tgbatest/maskacc.cc,
src/tgbatest/powerset.cc, src/tgbatest/randtgba.cc,
src/tgbatest/taatgba.cc, src/tgbatest/tgbaread.cc,
src/tgbatest/tripprod.cc, wrap/python/ajax/spot.in,
wrap/python/tests/alarm.py, wrap/python/tests/ltl2tgba.py,
wrap/python/tests/parsetgba.py: Update to use bdd_dict_ptr and
make_bdd_dict().
This commit is contained in:
Alexandre Duret-Lutz 2014-08-13 16:55:25 +02:00
parent 10e5c62386
commit dc5ad78b3e
93 changed files with 199 additions and 245 deletions

View file

@ -31,7 +31,7 @@
namespace spot
{
/// Global dictionary used by print_handler() to lookup variables.
static const bdd_dict* dict;
static bdd_dict_ptr dict;
/// Global flag to enable Acc[x] output (instead of `x').
static bool want_acc;
@ -98,7 +98,7 @@ namespace spot
}
std::ostream&
bdd_print_sat(std::ostream& os, const bdd_dict* d, bdd b)
bdd_print_sat(std::ostream& os, bdd_dict_ptr d, bdd b)
{
dict = d;
where = &os;
@ -120,7 +120,7 @@ namespace spot
}
std::ostream&
bdd_print_acc(std::ostream& os, const bdd_dict* d, bdd b)
bdd_print_acc(std::ostream& os, bdd_dict_ptr d, bdd b)
{
dict = d;
where = &os;
@ -143,7 +143,7 @@ namespace spot
}
std::ostream&
bdd_print_accset(std::ostream& os, const bdd_dict* d, bdd b)
bdd_print_accset(std::ostream& os, bdd_dict_ptr d, bdd b)
{
dict = d;
where = &os;
@ -156,7 +156,7 @@ namespace spot
}
std::string
bdd_format_accset(const bdd_dict* d, bdd b)
bdd_format_accset(bdd_dict_ptr d, bdd b)
{
std::ostringstream os;
bdd_print_accset(os, d, b);
@ -164,7 +164,7 @@ namespace spot
}
std::string
bdd_format_sat(const bdd_dict* d, bdd b)
bdd_format_sat(bdd_dict_ptr d, bdd b)
{
std::ostringstream os;
bdd_print_sat(os, d, b);
@ -172,7 +172,7 @@ namespace spot
}
std::ostream&
bdd_print_set(std::ostream& os, const bdd_dict* d, bdd b)
bdd_print_set(std::ostream& os, bdd_dict_ptr d, bdd b)
{
dict = d;
want_acc = true;
@ -183,7 +183,7 @@ namespace spot
}
std::string
bdd_format_set(const bdd_dict* d, bdd b)
bdd_format_set(const bdd_dict_ptr d, bdd b)
{
std::ostringstream os;
bdd_print_set(os, d, b);
@ -191,7 +191,7 @@ namespace spot
}
std::ostream&
bdd_print_formula(std::ostream& os, const bdd_dict* d, bdd b)
bdd_print_formula(std::ostream& os, bdd_dict_ptr d, bdd b)
{
const ltl::formula* f = bdd_to_formula(b, d);
print_ltl(f, os);
@ -200,7 +200,7 @@ namespace spot
}
std::string
bdd_format_formula(const bdd_dict* d, bdd b)
bdd_format_formula(bdd_dict_ptr d, bdd b)
{
std::ostringstream os;
bdd_print_formula(os, d, b);
@ -208,7 +208,7 @@ namespace spot
}
std::ostream&
bdd_print_dot(std::ostream& os, const bdd_dict* d, bdd b)
bdd_print_dot(std::ostream& os, bdd_dict_ptr d, bdd b)
{
dict = d;
want_acc = true;
@ -219,7 +219,7 @@ namespace spot
}
std::ostream&
bdd_print_table(std::ostream& os, const bdd_dict* d, bdd b)
bdd_print_table(std::ostream& os, bdd_dict_ptr d, bdd b)
{
dict = d;
want_acc = true;
@ -236,7 +236,7 @@ namespace spot
}
std::ostream&
bdd_print_isop(std::ostream& os, const bdd_dict* d, bdd b)
bdd_print_isop(std::ostream& os, bdd_dict_ptr d, bdd b)
{
dict = d;
want_acc = true;
@ -252,7 +252,7 @@ namespace spot
}
std::string
bdd_format_isop(const bdd_dict* d, bdd b)
bdd_format_isop(bdd_dict_ptr d, bdd b)
{
std::ostringstream os;
bdd_print_isop(os, d, b);