Add an ltl2tgba option to read Kripke structure.
Also offers two ways to output Kripke structures. * src/kripketest/parse_print_test.cc, src/kripke/kripkeexplicit.cc : Simplify includes. * src/kripke/kripkeprint.hh (kripke_save_reachable, kripke_save_reachable_renumbered): New declarations. (KripkePrinter): Move and rename... * src/kripke/kripkeprint.cc (kripke_printer): ... here. (kripke_printer_renumbered): New class. (kripke_save_reachable, kripke_save_reachable_renumbered): New function. * src/tgbatest/ltl2tgba.cc: Add an option to read Kripke structures. * iface/dve2/dve2check.cc: Use kripke_save_reachable_renumbered. * iface/dve2/defs.in (run2): Remove. * iface/dve2/kripke.test: Adjust tests.
This commit is contained in:
parent
172ce2d7fd
commit
ba3108f98d
9 changed files with 188 additions and 118 deletions
|
|
@ -23,30 +23,32 @@
|
|||
# define SPOT_KRIPKE_KRIPKEPRINT_HH
|
||||
|
||||
# include <iosfwd>
|
||||
# include "tgbaalgos/reachiter.hh"
|
||||
namespace spot
|
||||
{
|
||||
|
||||
class kripke_explicit;
|
||||
class state_kripke;
|
||||
class kripke_succ_iterator;
|
||||
class kripke;
|
||||
|
||||
/// \brief Iterate over all reachable states of a spot::kripke
|
||||
/// Override start and process_state methods from
|
||||
/// tgba_reachable_iterator_breadth_first.
|
||||
class KripkePrinter : public tgba_reachable_iterator_breadth_first
|
||||
{
|
||||
public:
|
||||
KripkePrinter(const kripke* state, std::ostream& os);
|
||||
/// \brief Save the reachable part of Kripke structure in text format.
|
||||
///
|
||||
/// The states will be named with the value returned by the
|
||||
/// kripke::format_state() method. Such a string can be large, so
|
||||
/// the output will not be I/O efficient. We recommend using this
|
||||
/// function only for debugging. Use
|
||||
/// kripke_save_reachable_renumbered() for large output.
|
||||
///
|
||||
/// \ingroup tgba_io
|
||||
std::ostream& kripke_save_reachable(std::ostream& os, const kripke* k);
|
||||
|
||||
void start();
|
||||
|
||||
void process_state(const state*, int, tgba_succ_iterator* si);
|
||||
|
||||
private:
|
||||
std::ostream& os_;
|
||||
};
|
||||
/// \brief Save the reachable part of Kripke structure in text format.
|
||||
///
|
||||
/// States will be renumbered with sequential number. This is much
|
||||
/// more I/O efficient when dumping large Kripke structures with big
|
||||
/// state names. The drawback is that any information carried by
|
||||
/// the state name is lost.
|
||||
///
|
||||
/// \ingroup tgba_io
|
||||
std::ostream& kripke_save_reachable_renumbered(std::ostream& os,
|
||||
const kripke* k);
|
||||
|
||||
} // End namespace spot
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue