tgba_digraph: add a set_single_acceptance_set() method.
* src/tgba/tgbagraph.cc: New file. * src/tgba/Makefile.am: Adjust. * src/tgba/tgbagraph.hh (set_single_acceptance_set, new_acc_transition): New methods. (set_acceptance_conditions, merge_transitions): Move body to tgbagraph.cc. * src/tgbaalgos/complete.cc, src/tgbaalgos/degen.cc, src/tgbaalgos/dtbasat.cc, src/tgbaalgos/dtgbacomp.cc, src/neverparse/neverclaimparse.yy, src/dstarparse/dra2ba.cc, src/dstarparse/nra2nba.cc: Simplify using these new methods.
This commit is contained in:
parent
5739240c0f
commit
917f70073f
10 changed files with 144 additions and 145 deletions
|
|
@ -23,7 +23,6 @@
|
|||
#include "tgbaalgos/reachiter.hh"
|
||||
#include "tgbaalgos/gtec/gtec.hh"
|
||||
#include "tgbaalgos/sccfilter.hh"
|
||||
#include "ltlast/constant.hh"
|
||||
|
||||
namespace spot
|
||||
{
|
||||
|
|
@ -239,13 +238,7 @@ namespace spot
|
|||
bdd_dict* bd = a->aut->get_dict();
|
||||
bd->register_all_variables_of(a->aut, out_);
|
||||
out_->set_bprop(tgba_digraph::StateBasedAcc);
|
||||
|
||||
// Invent a new acceptance set for the degeneralized automaton.
|
||||
int accvar =
|
||||
bd->register_acceptance_variable(ltl::constant::true_instance(),
|
||||
out_);
|
||||
acc_ = bdd_ithvar(accvar);
|
||||
out_->set_acceptance_conditions(acc_);
|
||||
acc_ = out_->set_single_acceptance_set();
|
||||
out_->new_states(num_states_ * (a->accpair_count + 1));
|
||||
out_->set_init_state(a->aut->get_init_state_number());
|
||||
}
|
||||
|
|
@ -299,10 +292,9 @@ namespace spot
|
|||
// accepting cycle.
|
||||
out_->new_transition(in, out + shift, cond);
|
||||
|
||||
bdd acc = bddfalse;
|
||||
if (l.get(i)) // In the Li set. (Löding's Fi set.)
|
||||
acc = acc_;
|
||||
out_->new_transition(in + shift, out + shift, cond, acc);
|
||||
// Acceptance transitions are those in the Li set. (Löding's Fi set.)
|
||||
out_->new_acc_transition(in + shift, out + shift, cond,
|
||||
l.get(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@
|
|||
#include "public.hh"
|
||||
#include "tgbaalgos/reachiter.hh"
|
||||
#include "tgbaalgos/sccfilter.hh"
|
||||
#include "ltlast/constant.hh"
|
||||
|
||||
namespace spot
|
||||
{
|
||||
|
|
@ -49,13 +48,8 @@ namespace spot
|
|||
bd->register_all_variables_of(aut, out_);
|
||||
|
||||
// Invent a new acceptance set for the degeneralized automaton.
|
||||
int accvar =
|
||||
bd->register_acceptance_variable(ltl::constant::true_instance(),
|
||||
out_);
|
||||
out_->set_single_acceptance_set();
|
||||
out_->set_bprop(tgba_digraph::StateBasedAcc);
|
||||
|
||||
acc_ = bdd_ithvar(accvar);
|
||||
out_->set_acceptance_conditions(acc_);
|
||||
out_->new_states(num_states_ * (d_->accpair_count + 1));
|
||||
|
||||
auto i = aut->get_init_state();
|
||||
|
|
@ -104,10 +98,10 @@ namespace spot
|
|||
// accepting cycle.
|
||||
out_->new_transition(in, out + shift, cond);
|
||||
|
||||
bdd acc = bddfalse;
|
||||
if (l.get(i)) // In the Li set. (Löding's Fi set.)
|
||||
acc = acc_;
|
||||
out_->new_transition(in + shift, out + shift, cond, acc);
|
||||
// A transition is accepting if it is in the Li
|
||||
// set. (Löding's Fi set.)
|
||||
out_->new_acc_transition(in + shift, out + shift, cond,
|
||||
l.get(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -116,7 +110,6 @@ namespace spot
|
|||
tgba_digraph* out_;
|
||||
const dstar_aut* d_;
|
||||
size_t num_states_;
|
||||
bdd acc_;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue