simulation: Fix co-simulation and iterated simulations of BA automata
* src/tgbaalgos/simulation.hh, src/tgbaalgos/simulation.cc (simulation_sba, cosimulation_sba, iterated_simulations_sba): New function. Also speedup the existing functions by avoiding add_acceptince_conditions() and add_conditions(). Finally, use scc_filter_states() when dealing with degeneralized automata. * src/tgbaalgos/postproc.cc, src/tgbaalgos/postproc.hh (do_ba_simul): New method. Use it after degeneralization. * src/tgba/tgbaexplicit.hh (get_transition, get_state): New methods. * src/tgbatest/basimul.test: New file. * src/tgbatest/Makefile.am (TESTS): Add it. * NEWS: Introduce the new function and summarize the bug.
This commit is contained in:
parent
372790a489
commit
0c7c933805
8 changed files with 303 additions and 110 deletions
|
|
@ -1,6 +1,6 @@
|
|||
// -*- coding: utf-8 -*-
|
||||
// Copyright (C) 2009, 2010, 2011, 2012 Laboratoire de Recherche et
|
||||
// Développement de l'Epita.
|
||||
// Copyright (C) 2009, 2010, 2011, 2012, 2013 Laboratoire de Recherche
|
||||
// et Développement de l'Epita.
|
||||
// Copyright (C) 2003, 2004, 2006 Laboratoire d'Informatique de Paris
|
||||
// 6 (LIP6), département Systèmes Répartis Coopératifs (SRC),
|
||||
// Université Pierre et Marie Curie.
|
||||
|
|
@ -318,6 +318,15 @@ namespace spot
|
|||
return const_cast<transition*>(&(*(si->get_iterator())));
|
||||
}
|
||||
|
||||
transition*
|
||||
get_transition(const tgba_succ_iterator* si)
|
||||
{
|
||||
const tgba_explicit_succ_iterator<State>* tmp
|
||||
= down_cast<const tgba_explicit_succ_iterator<State>*>(si);
|
||||
assert(tmp);
|
||||
return get_transition(tmp);
|
||||
}
|
||||
|
||||
void add_condition(transition* t, const ltl::formula* f)
|
||||
{
|
||||
t->condition &= formula_to_bdd(f, dict_, this);
|
||||
|
|
@ -336,12 +345,24 @@ namespace spot
|
|||
return dict_->is_registered_acceptance_variable(f, this);
|
||||
}
|
||||
|
||||
//old tgba explicit labelled interface
|
||||
//old tgba explicit labeled interface
|
||||
bool has_state(const label_t& name)
|
||||
{
|
||||
return ls_.find(name) != ls_.end();
|
||||
}
|
||||
|
||||
/// \brief Return the state associated to a given label.
|
||||
///
|
||||
/// This is similar to add_state(), except that it returns 0 if
|
||||
/// the state does not exist.
|
||||
const State* get_state(const label_t& name)
|
||||
{
|
||||
typename ls_map::const_iterator i = ls_.find(name);
|
||||
if (i == ls_.end())
|
||||
return 0;
|
||||
return &i->second;
|
||||
}
|
||||
|
||||
const label_t& get_label(const State* s) const
|
||||
{
|
||||
typename sl_map::const_iterator i = sl_.find(s);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue