remove twa::transition_annotation
Fixes #149. * spot/twa/twa.hh, spot/twa/twa.cc, spot/kripke/fairkripke.hh, spot/kripke/kripke.hh, spot/twa/twaproduct.cc, spot/twa/twaproduct.hh: Remove this method. * spot/twaalgos/emptiness.cc, spot/twaalgos/emptiness.hh, tests/ltsmin/finite.test: Adjust. * NEWS: Mention the removal.
This commit is contained in:
parent
e1f5eb1fd6
commit
39b95474f8
10 changed files with 17 additions and 80 deletions
2
NEWS
2
NEWS
|
|
@ -82,6 +82,8 @@ New in spot 1.99.7a (not yet released)
|
||||||
* The twa_safra_complement class has been removed. Use
|
* The twa_safra_complement class has been removed. Use
|
||||||
tgba_determinize() and dtwa_complement() instead.
|
tgba_determinize() and dtwa_complement() instead.
|
||||||
|
|
||||||
|
* The twa::transition_annotation() method has been removed.
|
||||||
|
|
||||||
Python:
|
Python:
|
||||||
|
|
||||||
* The ltsmin interface has been binded in Python. See
|
* The ltsmin interface has been binded in Python. See
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
// -*- coding: utf-8 -*-
|
// -*- coding: utf-8 -*-
|
||||||
// Copyright (C) 2009, 2010, 2013, 2014, 2015 Laboratoire de Recherche et
|
// Copyright (C) 2009, 2010, 2013, 2014, 2015, 2016 Laboratoire de
|
||||||
// Developpement de l'Epita
|
// Recherche et Developpement de l'Epita
|
||||||
//
|
//
|
||||||
// This file is part of Spot, a model checking library.
|
// This file is part of Spot, a model checking library.
|
||||||
//
|
//
|
||||||
|
|
@ -79,7 +79,6 @@ namespace spot
|
||||||
/// - kripke::state_condition()
|
/// - kripke::state_condition()
|
||||||
/// - kripke::state_acceptance_conditions()
|
/// - kripke::state_acceptance_conditions()
|
||||||
/// - kripke::format_state()
|
/// - kripke::format_state()
|
||||||
/// - and optionally kripke::transition_annotation()
|
|
||||||
///
|
///
|
||||||
/// The other methods of the tgba interface are supplied by this
|
/// The other methods of the tgba interface are supplied by this
|
||||||
/// class and need not be defined.
|
/// class and need not be defined.
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
// -*- coding: utf-8 -*-
|
// -*- coding: utf-8 -*-
|
||||||
// Copyright (C) 2009, 2010, 2013, 2014 Laboratoire de Recherche et
|
// Copyright (C) 2009, 2010, 2013, 2014, 2016 Laboratoire de Recherche
|
||||||
// Developpement de l'Epita
|
// et Developpement de l'Epita
|
||||||
//
|
//
|
||||||
// This file is part of Spot, a model checking library.
|
// This file is part of Spot, a model checking library.
|
||||||
//
|
//
|
||||||
|
|
@ -81,7 +81,6 @@ namespace spot
|
||||||
/// - kripke::succ_iter()
|
/// - kripke::succ_iter()
|
||||||
/// - kripke::state_condition()
|
/// - kripke::state_condition()
|
||||||
/// - kripke::format_state()
|
/// - kripke::format_state()
|
||||||
/// - and optionally kripke::transition_annotation()
|
|
||||||
///
|
///
|
||||||
/// The other methods of the tgba interface (like those dealing with
|
/// The other methods of the tgba interface (like those dealing with
|
||||||
/// acceptance conditions) are supplied by this kripke class and
|
/// acceptance conditions) are supplied by this kripke class and
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
// -*- coding: utf-8 -*-
|
// -*- coding: utf-8 -*-
|
||||||
// Copyright (C) 2011, 2014, 2015 Laboratoire de Recherche et Developpement de
|
// Copyright (C) 2011, 2014, 2015, 2016 Laboratoire de Recherche et
|
||||||
// l'EPITA (LRDE).
|
// Developpement de l'EPITA (LRDE).
|
||||||
// Copyright (C) 2003, 2004, 2005 Laboratoire d'Informatique de Paris 6 (LIP6),
|
// Copyright (C) 2003, 2004, 2005 Laboratoire d'Informatique de Paris 6 (LIP6),
|
||||||
// département Systèmes Répartis Coopératifs (SRC), Université Pierre
|
// département Systèmes Répartis Coopératifs (SRC), Université Pierre
|
||||||
// et Marie Curie.
|
// et Marie Curie.
|
||||||
|
|
@ -69,12 +69,6 @@ namespace spot
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string
|
|
||||||
twa::transition_annotation(const twa_succ_iterator*) const
|
|
||||||
{
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
twa::is_empty() const
|
twa::is_empty() const
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -774,24 +774,6 @@ namespace spot
|
||||||
/// data structure stored in the automaton.
|
/// data structure stored in the automaton.
|
||||||
virtual std::string format_state(const state* s) const = 0;
|
virtual std::string format_state(const state* s) const = 0;
|
||||||
|
|
||||||
/// \brief Return a possible annotation for the transition
|
|
||||||
/// pointed to by the iterator.
|
|
||||||
///
|
|
||||||
/// You may decide to use annotations when building a tgba class
|
|
||||||
/// that represents the state space of a model, for instance to
|
|
||||||
/// indicate how the tgba transitions relate to the original model
|
|
||||||
/// (e.g. the annotation could be the name of a PetriNet
|
|
||||||
/// transition, or the line number of some textual formalism).
|
|
||||||
///
|
|
||||||
/// Implementing this method is optional; the default annotation
|
|
||||||
/// is the empty string.
|
|
||||||
///
|
|
||||||
/// This method is used for instance in replay_twa_run().
|
|
||||||
///
|
|
||||||
/// \param t a non-done twa_succ_iterator for this automaton
|
|
||||||
virtual std::string
|
|
||||||
transition_annotation(const twa_succ_iterator* t) const;
|
|
||||||
|
|
||||||
/// \brief Project a state on an automaton.
|
/// \brief Project a state on an automaton.
|
||||||
///
|
///
|
||||||
/// This converts \a s, into that corresponding spot::state for \a
|
/// This converts \a s, into that corresponding spot::state for \a
|
||||||
|
|
|
||||||
|
|
@ -402,21 +402,6 @@ namespace spot
|
||||||
return right_->project_state(s2->right(), t);
|
return right_->project_state(s2->right(), t);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string
|
|
||||||
twa_product::transition_annotation(const twa_succ_iterator* t) const
|
|
||||||
{
|
|
||||||
const twa_succ_iterator_product_common* i =
|
|
||||||
down_cast<const twa_succ_iterator_product_common*>(t);
|
|
||||||
assert(i);
|
|
||||||
std::string left = left_->transition_annotation(i->left_);
|
|
||||||
std::string right = right_->transition_annotation(i->right_);
|
|
||||||
if (left == "")
|
|
||||||
return right;
|
|
||||||
if (right == "")
|
|
||||||
return left;
|
|
||||||
return "<" + left + ", " + right + ">";
|
|
||||||
}
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
// twa_product_init
|
// twa_product_init
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
// -*- coding: utf-8 -*-
|
// -*- coding: utf-8 -*-
|
||||||
// Copyright (C) 2011, 2013, 2014, 2015 Laboratoire de Recherche et
|
// Copyright (C) 2011, 2013, 2014, 2015, 2016 Laboratoire de Recherche
|
||||||
// Développement de l'Epita (LRDE).
|
// et Développement de l'Epita (LRDE).
|
||||||
// Copyright (C) 2003, 2004, 2006 Laboratoire d'Informatique de Paris
|
// Copyright (C) 2003, 2004, 2006 Laboratoire d'Informatique de Paris
|
||||||
// 6 (LIP6), département Systèmes Répartis Coopératifs (SRC),
|
// 6 (LIP6), département Systèmes Répartis Coopératifs (SRC),
|
||||||
// Université Pierre et Marie Curie.
|
// Université Pierre et Marie Curie.
|
||||||
|
|
@ -97,9 +97,6 @@ namespace spot
|
||||||
|
|
||||||
virtual std::string format_state(const state* state) const;
|
virtual std::string format_state(const state* state) const;
|
||||||
|
|
||||||
virtual std::string
|
|
||||||
transition_annotation(const twa_succ_iterator* t) const;
|
|
||||||
|
|
||||||
virtual state* project_state(const state* s, const const_twa_ptr& t) const;
|
virtual state* project_state(const state* s, const const_twa_ptr& t) const;
|
||||||
|
|
||||||
const acc_cond& left_acc() const;
|
const acc_cond& left_acc() const;
|
||||||
|
|
|
||||||
|
|
@ -434,20 +434,6 @@ namespace spot
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace
|
|
||||||
{
|
|
||||||
static void
|
|
||||||
print_annotation(std::ostream& os,
|
|
||||||
const const_twa_ptr& a,
|
|
||||||
const twa_succ_iterator* i)
|
|
||||||
{
|
|
||||||
std::string s = a->transition_annotation(i);
|
|
||||||
if (s == "")
|
|
||||||
return;
|
|
||||||
os << ' ' << s;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bool twa_run::replay(std::ostream& os, bool debug) const
|
bool twa_run::replay(std::ostream& os, bool debug) const
|
||||||
{
|
{
|
||||||
const state* s = aut->get_init_state();
|
const state* s = aut->get_init_state();
|
||||||
|
|
@ -579,9 +565,7 @@ namespace spot
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
const state* s2 = j->dst();
|
const state* s2 = j->dst();
|
||||||
os << " *";
|
os << " * label="
|
||||||
print_annotation(os, aut, j);
|
|
||||||
os << " label="
|
|
||||||
<< bdd_format_formula(aut->get_dict(),
|
<< bdd_format_formula(aut->get_dict(),
|
||||||
j->cond())
|
j->cond())
|
||||||
<< " and acc="
|
<< " and acc="
|
||||||
|
|
@ -598,9 +582,7 @@ namespace spot
|
||||||
}
|
}
|
||||||
if (debug)
|
if (debug)
|
||||||
{
|
{
|
||||||
os << "transition";
|
os << "transition with label="
|
||||||
print_annotation(os, aut, j);
|
|
||||||
os << " with label="
|
|
||||||
<< bdd_format_formula(aut->get_dict(), label)
|
<< bdd_format_formula(aut->get_dict(), label)
|
||||||
<< " and acc=" << aut->acc().format(acc)
|
<< " and acc=" << aut->acc().format(acc)
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
|
|
@ -608,7 +590,6 @@ namespace spot
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
os << " | ";
|
os << " | ";
|
||||||
print_annotation(os, aut, j);
|
|
||||||
bdd_print_formula(os, aut->get_dict(), label);
|
bdd_print_formula(os, aut->get_dict(), label);
|
||||||
os << '\t';
|
os << '\t';
|
||||||
aut->acc().format(acc);
|
aut->acc().format(acc);
|
||||||
|
|
|
||||||
|
|
@ -302,9 +302,7 @@ namespace spot
|
||||||
///
|
///
|
||||||
/// This is similar to <code>os << run;</code>, except that the
|
/// This is similar to <code>os << run;</code>, except that the
|
||||||
/// run is actually replayed on the automaton while it is printed.
|
/// run is actually replayed on the automaton while it is printed.
|
||||||
/// Doing so makes it possible to display transition annotations
|
/// The output will stop if the run cannot be completed.
|
||||||
/// (returned by spot::twa::transition_annotation()). The output
|
|
||||||
/// will stop if the run cannot be completed.
|
|
||||||
///
|
///
|
||||||
/// \param os the stream on which the replay should be traced
|
/// \param os the stream on which the replay should be traced
|
||||||
/// \param debug if set the output will be more verbose and extra
|
/// \param debug if set the output will be more verbose and extra
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
# Copyright (C) 2011, 2013, 2014 Laboratoire de Recherche et Développement
|
# Copyright (C) 2011, 2013, 2014, 2016 Laboratoire de Recherche et
|
||||||
# de l'Epita (LRDE).
|
# Développement de l'Epita (LRDE).
|
||||||
#
|
#
|
||||||
# This file is part of Spot, a model checking library.
|
# This file is part of Spot, a model checking library.
|
||||||
#
|
#
|
||||||
|
|
@ -53,6 +53,6 @@ run 0 ../modelcheck -ddead -E $srcdir/finite.dve \
|
||||||
run 0 ../modelcheck -ddead -e $srcdir/finite.dve \
|
run 0 ../modelcheck -ddead -e $srcdir/finite.dve \
|
||||||
'!(G(dead -> ("P.a==2" | "P.b==3")))'
|
'!(G(dead -> ("P.a==2" | "P.b==3")))'
|
||||||
|
|
||||||
# This used to segfault because of a bug in
|
# This used to segfault because of a bug in a
|
||||||
# twa_product::transition_annotation.
|
# function that do not exist anymore.
|
||||||
run 0 ../modelcheck -gp $srcdir/finite.dve true
|
run 0 ../modelcheck -gp $srcdir/finite.dve true
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue