Add the "don't care" simulation
* src/tgba/bddprint.cc, src/tgba/bddprint.hh: Add bdd_print_isop that prints the bdd into a Irreductible Sum Of Product. * src/tgbaalgos/dupexp.cc, src/tgbaalgos/dupexp.hh: Add a way to know which states (in the input) is which (in the result). * src/tgbaalgos/simulation.cc, src/tgbaalgos/simulation.hh: Add the Don't Care Simulation and the Don't Care Iterated Simulation. * src/tgbatest/ltl2tgba.cc, src/tgbatest/spotlbtt.test, src/tgbatest/Makefile.am, src/tgbatest/sim.test: Test them. * bench/ltl2tgba/algorithms, bench/ltl2tgba/README, bench/ltl2tgba/algorithms: Add a way to bench the don't care simulation.
This commit is contained in:
parent
5796114e37
commit
08c77318ae
12 changed files with 1171 additions and 76 deletions
|
|
@ -56,10 +56,31 @@ namespace spot
|
|||
out_->add_acceptance_conditions(t, si->current_acceptance_conditions());
|
||||
}
|
||||
|
||||
private:
|
||||
protected:
|
||||
tgba_explicit_number* out_;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
class dupexp_iter_save: public dupexp_iter<T>
|
||||
{
|
||||
public:
|
||||
dupexp_iter_save(const tgba* a,
|
||||
std::map<const state*,
|
||||
const state*,
|
||||
state_ptr_less_than>& relation)
|
||||
: dupexp_iter<T>(a),
|
||||
relation_(relation)
|
||||
{
|
||||
}
|
||||
|
||||
void process_state(const state* s, int n, tgba_succ_iterator*)
|
||||
{
|
||||
relation_[this->out_->add_state(n)] = const_cast<state*>(s);
|
||||
}
|
||||
|
||||
std::map<const state*, const state*, state_ptr_less_than>& relation_;
|
||||
};
|
||||
|
||||
} // anonymous
|
||||
|
||||
tgba_explicit_number*
|
||||
|
|
@ -78,4 +99,25 @@ namespace spot
|
|||
return di.result();
|
||||
}
|
||||
|
||||
tgba_explicit_number*
|
||||
tgba_dupexp_bfs(const tgba* aut,
|
||||
std::map<const state*,
|
||||
const state*, state_ptr_less_than>& rel)
|
||||
{
|
||||
dupexp_iter_save<tgba_reachable_iterator_breadth_first> di(aut,
|
||||
rel);
|
||||
di.run();
|
||||
return di.result();
|
||||
}
|
||||
|
||||
tgba_explicit_number*
|
||||
tgba_dupexp_dfs(const tgba* aut,
|
||||
std::map<const state*,
|
||||
const state*, state_ptr_less_than>& rel)
|
||||
{
|
||||
dupexp_iter_save<tgba_reachable_iterator_depth_first> di(aut,
|
||||
rel);
|
||||
di.run();
|
||||
return di.result();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue