deprecate spot::acc_cond::format()
* NEWS: Mention it. * spot/twa/acc.hh (spot::acc_cond::format): Deprecate. (spot::acc_cond::mark_t::as_string): New function. * spot/taalgos/dot.cc: Use mark_t::as_string(). * spot/priv/satcommon.cc, spot/priv/satcommon.hh, spot/twaalgos/dtwasat.cc, spot/twaalgos/emptiness.cc, tests/core/acc.cc, tests/core/acc.test: Adjust to use << directly.
This commit is contained in:
parent
822fe77891
commit
bfe0ada634
9 changed files with 70 additions and 67 deletions
|
|
@ -1,5 +1,5 @@
|
|||
// -*- coding: utf-8 -*-
|
||||
// Copyright (C) 2013-2018 Laboratoire de Recherche
|
||||
// Copyright (C) 2013-2019 Laboratoire de Recherche
|
||||
// et Développement de l'Epita.
|
||||
//
|
||||
// This file is part of Spot, a model checking library.
|
||||
|
|
@ -63,8 +63,6 @@ namespace spot
|
|||
namespace
|
||||
{
|
||||
static bdd_dict_ptr debug_dict = nullptr;
|
||||
static const acc_cond* debug_ref_acc = nullptr;
|
||||
static const acc_cond* debug_cand_acc = nullptr;
|
||||
|
||||
struct path
|
||||
{
|
||||
|
|
@ -333,15 +331,14 @@ namespace spot
|
|||
std::string
|
||||
fmt_ta(unsigned src, bdd& cond, unsigned dst, unsigned nacc)
|
||||
{
|
||||
return helper.format_ta(debug_dict, debug_cand_acc, src, cond,
|
||||
dst, cacc.mark(nacc));
|
||||
return helper.format_ta(debug_dict, src, cond, dst, cacc.mark(nacc));
|
||||
}
|
||||
|
||||
std::string
|
||||
fmt_ta(unsigned src, unsigned cond, unsigned dst, unsigned nacc)
|
||||
{
|
||||
return helper.format_ta(debug_dict, debug_cand_acc, src,
|
||||
alpha_vect[cond], dst, cacc.mark(nacc));
|
||||
return helper.format_ta(debug_dict, src,
|
||||
alpha_vect[cond], dst, cacc.mark(nacc));
|
||||
}
|
||||
|
||||
std::string
|
||||
|
|
@ -349,8 +346,8 @@ namespace spot
|
|||
unsigned dst_ref, acc_cond::mark_t acc_cand = {},
|
||||
acc_cond::mark_t acc_ref = {})
|
||||
{
|
||||
return helper.format_p(debug_cand_acc, debug_ref_acc, src_cand,
|
||||
src_ref, dst_cand, dst_ref, acc_cand, acc_ref);
|
||||
return helper.format_p(src_cand, src_ref, dst_cand, dst_ref,
|
||||
acc_cand, acc_ref);
|
||||
}
|
||||
|
||||
acc_cond::mark_t
|
||||
|
|
@ -568,8 +565,6 @@ namespace spot
|
|||
assert(d.cand_size > 0);
|
||||
|
||||
#if TRACE
|
||||
debug_ref_acc = &ref->acc();
|
||||
debug_cand_acc = &d.cacc;
|
||||
solver.comment("d.ref_size:", d.ref_size, '\n');
|
||||
solver.comment("d.cand_size:", d.cand_size, '\n');
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// -*- coding: utf-8 -*-
|
||||
// Copyright (C) 2009, 2011-2018 Laboratoire de Recherche et
|
||||
// Copyright (C) 2009, 2011-2019 Laboratoire de Recherche et
|
||||
// Développement de l'Epita (LRDE).
|
||||
// Copyright (C) 2004, 2005 Laboratoire d'Informatique de Paris 6 (LIP6),
|
||||
// département Systèmes Répartis Coopératifs (SRC), Université Pierre
|
||||
|
|
@ -632,7 +632,7 @@ namespace spot
|
|||
{
|
||||
os << "ERROR: no transition with label="
|
||||
<< bdd_format_formula(aut->get_dict(), label)
|
||||
<< " and acc=" << aut->acc().format(acc)
|
||||
<< " and acc=" << acc
|
||||
<< " leaving state " << serial
|
||||
<< " for state " << aut->format_state(next) << '\n'
|
||||
<< "The following transitions leave state " << serial
|
||||
|
|
@ -644,9 +644,7 @@ namespace spot
|
|||
os << " * label="
|
||||
<< bdd_format_formula(aut->get_dict(),
|
||||
j->cond())
|
||||
<< " and acc="
|
||||
<< (aut->acc().format
|
||||
(j->acc()))
|
||||
<< " and acc=" << j->acc()
|
||||
<< " going to " << aut->format_state(s2) << '\n';
|
||||
s2->destroy();
|
||||
}
|
||||
|
|
@ -660,20 +658,19 @@ namespace spot
|
|||
{
|
||||
os << "transition with label="
|
||||
<< bdd_format_formula(aut->get_dict(), label)
|
||||
<< " and acc=" << aut->acc().format(acc)
|
||||
<< std::endl;
|
||||
<< " and acc=" << acc << std::endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
os << " | ";
|
||||
bdd_print_formula(os, aut->get_dict(), label);
|
||||
os << '\t';
|
||||
aut->acc().format(acc);
|
||||
if (acc)
|
||||
os << '\t' << acc;
|
||||
os << std::endl;
|
||||
}
|
||||
aut->release_iter(j);
|
||||
|
||||
// Sum acceptance conditions.
|
||||
// Sum acceptance marks.
|
||||
//
|
||||
// (Beware l and i designate the next step to consider.
|
||||
// Therefore if i is at the beginning of the cycle, `acc'
|
||||
|
|
@ -686,8 +683,8 @@ namespace spot
|
|||
{
|
||||
all_acc_seen = true;
|
||||
if (debug)
|
||||
os << "all acceptance conditions ("
|
||||
<< aut->acc().format(all_acc)
|
||||
os << "all acceptance marks ("
|
||||
<< all_acc
|
||||
<< ") have been seen\n";
|
||||
}
|
||||
}
|
||||
|
|
@ -696,10 +693,10 @@ namespace spot
|
|||
if (!aut->acc().accepting(all_acc))
|
||||
{
|
||||
if (debug)
|
||||
os << "ERROR: The cycle's acceptance conditions ("
|
||||
<< aut->acc().format(all_acc)
|
||||
<< ") do not\nmatch those of the automaton ("
|
||||
<< aut->acc().format(aut->acc().all_sets())
|
||||
os << "ERROR: The cycle's acceptance marks ("
|
||||
<< all_acc
|
||||
<< ") do not satisfy the acceptance condition ("
|
||||
<< aut->get_acceptance()
|
||||
<< ")\n";
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue