diff --git a/README b/README
index 5e6f249ad..dda77999f 100644
--- a/README
+++ b/README
@@ -171,7 +171,6 @@ src/ Sources for libspot.
ta/ TA objects and cousins (TGTA).
taalgos/ Algorithms on TA/TGTA.
tgbatest/ Tests for tgba/, tgbaalgos/, tgbaparse/, ta/ and taalgos/.
- evtgba*/ Ignore these for now.
eltlparse/ Parser for ELTL formulae.
eltltest/ Tests for ELTL nodes in ltlast/ and eltlparse/.
saba/ SABA (State-labeled Alternating Büchi Automata) objects.
@@ -223,7 +222,7 @@ End:
LocalWords: Baarir Thierry Mieg CVS Università di Torino devel src libspot ac
LocalWords: ltlast ltlenv ltlparse ltlvisit ltltest misc tgba TGBA tgbaalgos
LocalWords: gtec Tarjan tgbaparse tgbatest doc html PDF spotref pdf cgi ELTL
- LocalWords: CGI ltl iface BDD Couvreur's evtgba emptchk kripke Kripke saba vm
+ LocalWords: CGI ltl iface BDD Couvreur's emptchk kripke Kripke saba vm
LocalWords: eltlparse eltltest SABA sabaalgos sabatest ssp ltlcouter scc SCC
LocalWords: formulae optimizations kripkeparse kripketest Automata
LocalWords: neverparse ltlcounter ltlclasses parallelizing automata
diff --git a/configure.ac b/configure.ac
index 24f705b9b..a29cb3c9d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -131,11 +131,6 @@ AC_CONFIG_FILES([
src/eltlparse/Makefile
src/eltltest/defs
src/eltltest/Makefile
- src/evtgbaalgos/Makefile
- src/evtgba/Makefile
- src/evtgbaparse/Makefile
- src/evtgbatest/defs
- src/evtgbatest/Makefile
src/kripke/Makefile
src/ltlast/Makefile
src/ltlenv/Makefile
diff --git a/src/Makefile.am b/src/Makefile.am
index ad6daf042..78de8ff2c 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,6 +1,6 @@
## -*- coding: utf-8 -*-
-## Copyright (C) 2009, 2010, 2012 Laboratoire de Recherche et Développement
-## de l'Epita (LRDE).
+## Copyright (C) 2009, 2010, 2012, 2013 Laboratoire de Recherche et
+## Développement de l'Epita (LRDE).
## Copyright (C) 2003, 2004 Laboratoire d'Informatique de Paris 6 (LIP6),
## département Systèmes Répartis Coopératifs (SRC), Université Pierre
## et Marie Curie.
@@ -26,10 +26,9 @@ AUTOMAKE_OPTIONS = subdir-objects
# end, after building '.' (since the current directory contains
# libspot.la needed by the tests)
SUBDIRS = misc ltlenv ltlast ltlvisit ltlparse eltlparse tgba \
- tgbaalgos tgbaparse ta taalgos evtgba evtgbaalgos \
- evtgbaparse kripke saba sabaalgos neverparse kripkeparse \
- . bin ltltest eltltest tgbatest evtgbatest sabatest sanity \
- kripketest
+ tgbaalgos tgbaparse ta taalgos kripke saba sabaalgos \
+ neverparse kripkeparse . bin ltltest eltltest tgbatest \
+ sabatest sanity kripketest
lib_LTLIBRARIES = libspot.la
libspot_la_SOURCES =
@@ -47,9 +46,6 @@ libspot_la_LIBADD = \
taalgos/libtaalgos.la \
tgbaparse/libtgbaparse.la \
neverparse/libneverparse.la \
- evtgba/libevtgba.la \
- evtgbaalgos/libevtgbaalgos.la \
- evtgbaparse/libevtgbaparse.la \
saba/libsaba.la \
sabaalgos/libsabaalgos.la \
kripke/libkripke.la \
diff --git a/src/evtgba/.cvsignore b/src/evtgba/.cvsignore
deleted file mode 100644
index 799fc9785..000000000
--- a/src/evtgba/.cvsignore
+++ /dev/null
@@ -1,6 +0,0 @@
-.deps
-.libs
-*.lo
-*.la
-Makefile
-Makefile.in
diff --git a/src/evtgba/.gitignore b/src/evtgba/.gitignore
deleted file mode 100644
index 799fc9785..000000000
--- a/src/evtgba/.gitignore
+++ /dev/null
@@ -1,6 +0,0 @@
-.deps
-.libs
-*.lo
-*.la
-Makefile
-Makefile.in
diff --git a/src/evtgba/Makefile.am b/src/evtgba/Makefile.am
deleted file mode 100644
index 9c509c2b5..000000000
--- a/src/evtgba/Makefile.am
+++ /dev/null
@@ -1,39 +0,0 @@
-## Copyright (C) 2011 Laboratoire de Recherche et Developpement de
-## l'Epita (LRDE).
-## Copyright (C) 2004 Laboratoire d'Informatique de Paris 6 (LIP6),
-## département Systèmes Répartis Coopératifs (SRC), Université Pierre
-## et Marie Curie.
-##
-## This file is part of Spot, a model checking library.
-##
-## Spot is free software; you can redistribute it and/or modify it
-## under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 3 of the License, or
-## (at your option) any later version.
-##
-## Spot is distributed in the hope that it will be useful, but WITHOUT
-## ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
-## License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with this program. If not, see .
-
-AM_CPPFLAGS = -I$(srcdir)/.. -I.. $(BUDDY_CPPFLAGS)
-AM_CXXFLAGS = $(WARNING_CXXFLAGS)
-
-evtgbadir = $(pkgincludedir)/evtgba
-
-evtgba_HEADERS = \
- evtgba.hh \
- evtgbaiter.hh \
- explicit.hh \
- product.hh \
- symbol.hh
-
-noinst_LTLIBRARIES = libevtgba.la
-libevtgba_la_SOURCES = \
- evtgba.cc \
- explicit.cc \
- product.cc \
- symbol.cc
diff --git a/src/evtgba/evtgba.cc b/src/evtgba/evtgba.cc
deleted file mode 100644
index c91bc6a14..000000000
--- a/src/evtgba/evtgba.cc
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright (C) 2004 Laboratoire d'Informatique de Paris 6 (LIP6),
-// département Systèmes Répartis Coopératifs (SRC), Université Pierre
-// et Marie Curie.
-//
-// This file is part of Spot, a model checking library.
-//
-// Spot is free software; you can redistribute it and/or modify it
-// under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 3 of the License, or
-// (at your option) any later version.
-//
-// Spot is distributed in the hope that it will be useful, but WITHOUT
-// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
-// License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-#include
-#include "evtgba.hh"
-#include "misc/escape.hh"
-#include "misc/bareword.hh"
-
-namespace spot
-{
- evtgba::evtgba()
- {
- }
-
- evtgba::~evtgba()
- {
- }
-
- std::string
- evtgba::format_label(const symbol* symbol) const
- {
- return symbol->name();
- }
-
- std::string
- evtgba::format_acceptance_condition(const symbol* symbol) const
- {
- return symbol->name();
- }
-
- std::string
- evtgba::format_acceptance_conditions(const symbol_set& symset) const
- {
- std::ostringstream o;
- symbol_set::const_iterator i = symset.begin();
- if (i != symset.end())
- {
- o << '{';
- for (;;)
- {
- o << quote_unless_bare_word(format_acceptance_condition(*i));
- if (++i == symset.end())
- break;
- o << ", ";
- }
- o << '}';
- }
- return o.str();
- }
-
-}
diff --git a/src/evtgba/evtgba.hh b/src/evtgba/evtgba.hh
deleted file mode 100644
index c56ed9c1d..000000000
--- a/src/evtgba/evtgba.hh
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright (C) 2009 Laboratoire de Recherche et Développement
-// de l'Epita (LRDE).
-// Copyright (C) 2004 Laboratoire d'Informatique de Paris 6 (LIP6),
-// département Systèmes Répartis Coopératifs (SRC), Université Pierre
-// et Marie Curie.
-//
-// This file is part of Spot, a model checking library.
-//
-// Spot is free software; you can redistribute it and/or modify it
-// under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 3 of the License, or
-// (at your option) any later version.
-//
-// Spot is distributed in the hope that it will be useful, but WITHOUT
-// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
-// License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-#ifndef SPOT_EVTGBA_EVTGBA_HH
-# define SPOT_EVTGBA_EVTGBA_HH
-
-#include "tgba/state.hh"
-#include "evtgbaiter.hh"
-
-namespace spot
-{
- // FIXME: doc me
- class evtgba
- {
- protected:
- evtgba();
-
- public:
- virtual ~evtgba();
-
- virtual evtgba_iterator* init_iter() const = 0;
- virtual evtgba_iterator* succ_iter(const state* s) const = 0;
- virtual evtgba_iterator* pred_iter(const state* s) const = 0;
-
- /// \brief Format the state as a string for printing.
- ///
- /// This formating is the responsability of the automata
- /// that owns the state.
- virtual std::string format_state(const state* state) const = 0;
-
- virtual std::string format_label(const symbol* symbol) const;
- virtual std::string format_acceptance_condition(const symbol* symbol) const;
- virtual std::string
- format_acceptance_conditions(const symbol_set& symset) const;
-
- /// \brief Return the set of all acceptance conditions used
- /// by this automaton.
- ///
- /// The goal of the emptiness check is to ensure that
- /// a strongly connected component walks through each
- /// of these acceptiong conditions. I.e., the union
- /// of the acceptiong conditions of all transition in
- /// the SCC should be equal to the result of this function.
- virtual const symbol_set& all_acceptance_conditions() const = 0;
-
- virtual const symbol_set& alphabet() const = 0;
- };
-
-}
-
-#endif // SPOT_EVTGBA_EVTGBA_HH
diff --git a/src/evtgba/evtgbaiter.hh b/src/evtgba/evtgbaiter.hh
deleted file mode 100644
index 6b4a5667f..000000000
--- a/src/evtgba/evtgbaiter.hh
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright (C) 2004, 2005 Laboratoire d'Informatique de Paris 6 (LIP6),
-// département Systèmes Répartis Coopératifs (SRC), Université Pierre
-// et Marie Curie.
-//
-// This file is part of Spot, a model checking library.
-//
-// Spot is free software; you can redistribute it and/or modify it
-// under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 3 of the License, or
-// (at your option) any later version.
-//
-// Spot is distributed in the hope that it will be useful, but WITHOUT
-// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
-// License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-#ifndef SPOT_EVTGBA_EVTGBAITER_HH
-# define SPOT_EVTGBA_EVTGBAITER_HH
-
-#include "tgba/state.hh"
-#include "symbol.hh"
-#include "evtgbaiter.hh"
-
-namespace spot
-{
- // FIXME: doc me
- class evtgba_iterator
- {
- public:
- virtual
- ~evtgba_iterator()
- {
- }
-
- virtual void first() = 0;
- virtual void next() = 0;
- virtual bool done() const = 0;
-
- virtual const state* current_state() const = 0;
- virtual const symbol* current_label() const = 0;
- virtual symbol_set current_acceptance_conditions() const = 0;
- };
-}
-
-#endif // SPOT_EVTGBA_EVTGBAITER_HH
diff --git a/src/evtgba/explicit.cc b/src/evtgba/explicit.cc
deleted file mode 100644
index 7b6b03c7d..000000000
--- a/src/evtgba/explicit.cc
+++ /dev/null
@@ -1,284 +0,0 @@
-// Copyright (C) 2011 Laboratoire de Recherche et Développement de
-// l'Epita (LRDE)
-// Copyright (C) 2004 Laboratoire d'Informatique de Paris 6 (LIP6),
-// département Systèmes Répartis Coopératifs (SRC), Université Pierre
-// et Marie Curie.
-//
-// This file is part of Spot, a model checking library.
-//
-// Spot is free software; you can redistribute it and/or modify it
-// under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 3 of the License, or
-// (at your option) any later version.
-//
-// Spot is distributed in the hope that it will be useful, but WITHOUT
-// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
-// License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-#include "explicit.hh"
-#include "misc/bareword.hh"
-#include "misc/escape.hh"
-
-namespace spot
-{
- const evtgba_explicit::state*
- state_evtgba_explicit::get_state() const
- {
- return state_;
- }
-
- int
- state_evtgba_explicit::compare(const spot::state* other) const
- {
- const state_evtgba_explicit* o =
- down_cast(other);
- assert(o);
- return o->get_state() - get_state();
- }
-
- size_t
- state_evtgba_explicit::hash() const
- {
- return
- reinterpret_cast(get_state()) - static_cast(0);
- }
-
- state_evtgba_explicit*
- state_evtgba_explicit::clone() const
- {
- return new state_evtgba_explicit(*this);
- }
-
- namespace
- {
- class evtgba_explicit_iterator: public evtgba_iterator
- {
- public:
- evtgba_explicit_iterator(const evtgba_explicit::transition_list* s)
- : s_(s), i_(s_->end())
- {
- }
-
- virtual
- ~evtgba_explicit_iterator()
- {
- }
-
- virtual void first()
- {
- i_ = s_->begin();
- }
-
- virtual void
- next()
- {
- ++i_;
- }
-
- virtual bool
- done() const
- {
- return i_ == s_->end();
- }
-
- virtual const symbol*
- current_label() const
- {
- return (*i_)->label;
- }
-
- virtual symbol_set
- current_acceptance_conditions() const
- {
- return (*i_)->acceptance_conditions;
- }
- protected:
- const evtgba_explicit::transition_list* s_;
- evtgba_explicit::transition_list::const_iterator i_;
- };
-
-
-
- class evtgba_explicit_iterator_fw: public evtgba_explicit_iterator
- {
- public:
- evtgba_explicit_iterator_fw(const evtgba_explicit::transition_list* s)
- : evtgba_explicit_iterator(s)
- {
- }
-
- virtual
- ~evtgba_explicit_iterator_fw()
- {
- }
-
- const state*
- current_state() const
- {
- return new state_evtgba_explicit((*i_)->out);
- }
- };
-
- class evtgba_explicit_iterator_bw: public evtgba_explicit_iterator
- {
- public:
- evtgba_explicit_iterator_bw(const evtgba_explicit::transition_list* s)
- : evtgba_explicit_iterator(s)
- {
- }
-
- virtual
- ~evtgba_explicit_iterator_bw()
- {
- }
-
- const state*
- current_state() const
- {
- return new state_evtgba_explicit((*i_)->in);
- }
- };
- }
-
- evtgba_explicit::evtgba_explicit()
- {
- }
-
- evtgba_explicit::~evtgba_explicit()
- {
- for (transition_list::const_iterator i = init_states_.begin();
- i != init_states_.end(); ++i)
- delete *i;
- for (ns_map::const_iterator j = name_state_map_.begin();
- j != name_state_map_.end(); ++j)
- {
- for (transition_list::const_iterator i = j->second->out.begin();
- i != j->second->out.end(); ++i)
- delete *i;
- delete j->second;
- }
- for (symbol_set::const_iterator i = alphabet_.begin();
- i != alphabet_.end(); ++i)
- (*i)->unref();
- for (symbol_set::const_iterator i = acc_set_.begin();
- i != acc_set_.end(); ++i)
- (*i)->unref();
- }
-
- evtgba_iterator*
- evtgba_explicit::init_iter() const
- {
- return new evtgba_explicit_iterator_fw(&init_states_);
- }
-
- evtgba_iterator*
- evtgba_explicit::succ_iter(const spot::state* s) const
- {
- const state_evtgba_explicit* u =
- down_cast(s);
- assert(u);
- return new evtgba_explicit_iterator_fw(&u->get_state()->out);
- }
-
- evtgba_iterator*
- evtgba_explicit::pred_iter(const spot::state* s) const
- {
- const state_evtgba_explicit* u =
- down_cast(s);
- assert(u);
- return new evtgba_explicit_iterator_fw(&u->get_state()->in);
- }
-
- std::string
- evtgba_explicit::format_state(const spot::state* s) const
- {
- const state_evtgba_explicit* u =
- down_cast(s);
- assert(u);
- sn_map::const_iterator i = state_name_map_.find(u->get_state());
- assert(i != state_name_map_.end());
- return i->second;
- }
-
- const symbol_set&
- evtgba_explicit::all_acceptance_conditions() const
- {
- return acc_set_;
- }
-
- const symbol_set&
- evtgba_explicit::alphabet() const
- {
- return alphabet_;
- }
-
- evtgba_explicit::state*
- evtgba_explicit::declare_state(const std::string& name)
- {
- ns_map::const_iterator i = name_state_map_.find(name);
- if (i != name_state_map_.end())
- return i->second;
- state* s = new state;
- name_state_map_[name] = s;
- state_name_map_[s] = name;
- return s;
- }
-
- evtgba_explicit::transition*
- evtgba_explicit::add_transition(const std::string& source,
- const rsymbol& label,
- rsymbol_set acc,
- const std::string& dest)
- {
- state* in = declare_state(source);
- state* out = declare_state(dest);
- transition* t = new transition;
- t->in = in;
- t->label = label;
- t->out = out;
- in->out.push_back(t);
- out->in.push_back(t);
-
- for (rsymbol_set::const_iterator i = acc.begin(); i != acc.end(); ++i)
- {
- const symbol* s = *i;
- t->acceptance_conditions.insert(s);
- declare_acceptance_condition(*i);
- }
-
- if (alphabet_.find(t->label) == alphabet_.end())
- {
- alphabet_.insert(t->label);
- t->label->ref();
- }
-
- return t;
- }
-
- void
- evtgba_explicit::declare_acceptance_condition(const rsymbol& acc)
- {
- const symbol* s = acc;
- if (acc_set_.find(s) == acc_set_.end())
- {
- acc_set_.insert(s);
- s->ref();
- }
- }
-
-
- void
- evtgba_explicit::set_init_state(const std::string& name)
- {
- transition* t = new transition;
- t->in = 0;
- t->out = declare_state(name);
- t->label = 0;
- init_states_.push_back(t);
- }
-
-}
diff --git a/src/evtgba/explicit.hh b/src/evtgba/explicit.hh
deleted file mode 100644
index 913bb411f..000000000
--- a/src/evtgba/explicit.hh
+++ /dev/null
@@ -1,110 +0,0 @@
-// Copyright (C) 2004 Laboratoire d'Informatique de Paris 6 (LIP6),
-// département Systèmes Répartis Coopératifs (SRC), Université Pierre
-// et Marie Curie.
-//
-// This file is part of Spot, a model checking library.
-//
-// Spot is free software; you can redistribute it and/or modify it
-// under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 3 of the License, or
-// (at your option) any later version.
-//
-// Spot is distributed in the hope that it will be useful, but WITHOUT
-// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
-// License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-#ifndef SPOT_EVTGBA_EXPLICIT_HH
-# define SPOT_EVTGBA_EXPLICIT_HH
-
-#include "evtgba.hh"
-#include
-#include "misc/hash.hh"
-
-namespace spot
-{
- // FIXME: doc me
- class evtgba_explicit: public evtgba
- {
- public:
- struct transition;
- typedef std::list transition_list;
- struct state
- {
- transition_list in, out;
- };
-
- /// Explicit transitions (used by spot::evtgba_explicit).
- struct transition
- {
- const symbol* label;
- symbol_set acceptance_conditions;
- state* in;
- state* out;
- };
-
- evtgba_explicit();
- virtual ~evtgba_explicit();
-
- // evtgba interface
- virtual evtgba_iterator* init_iter() const;
- virtual evtgba_iterator* succ_iter(const spot::state* s) const;
- virtual evtgba_iterator* pred_iter(const spot::state* s) const;
- virtual std::string format_state(const spot::state* state) const;
- virtual const symbol_set& all_acceptance_conditions() const;
- virtual const symbol_set& alphabet() const;
-
- transition* add_transition(const std::string& source,
- const rsymbol& label,
- rsymbol_set acc,
- const std::string& dest);
- /// \brief Designate \a name as initial state.
- ///
- /// Can be called multiple times in case there is several initial states.
- void set_init_state(const std::string& name);
- void declare_acceptance_condition(const rsymbol& acc);
- protected:
-
- state* declare_state(const std::string& name);
-
- typedef Sgi::hash_map ns_map;
- typedef Sgi::hash_map > sn_map;
-
- ns_map name_state_map_;
- sn_map state_name_map_;
-
- symbol_set acc_set_;
- symbol_set alphabet_;
- transition_list init_states_;
- };
-
- /// States used by spot::tgba_evtgba_explicit.
- class state_evtgba_explicit : public spot::state
- {
- public:
- state_evtgba_explicit(const evtgba_explicit::state* s)
- : state_(s)
- {
- }
-
- virtual int compare(const spot::state* other) const;
- virtual size_t hash() const;
- virtual state_evtgba_explicit* clone() const;
-
- virtual ~state_evtgba_explicit()
- {
- }
-
- const evtgba_explicit::state* get_state() const;
- private:
- const evtgba_explicit::state* state_;
- };
-
-}
-
-#endif // SPOT_EVTGBA_EXPLICIT_HH
diff --git a/src/evtgba/product.cc b/src/evtgba/product.cc
deleted file mode 100644
index c69239dea..000000000
--- a/src/evtgba/product.cc
+++ /dev/null
@@ -1,461 +0,0 @@
-// Copyright (C) 2011 Laboratoire de Recherche et Développement de
-// l'Epita (LRDE)
-// Copyright (C) 2008, 2011 Laboratoire de Recherche et Développement
-// de l'Epita (LRDE).
-// Copyright (C) 2004 Laboratoire d'Informatique de Paris 6 (LIP6),
-// département Systèmes Répartis Coopératifs (SRC), Université Pierre
-// et Marie Curie.
-//
-// This file is part of Spot, a model checking library.
-//
-// Spot is free software; you can redistribute it and/or modify it
-// under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 3 of the License, or
-// (at your option) any later version.
-//
-// Spot is distributed in the hope that it will be useful, but WITHOUT
-// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
-// License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-#include "product.hh"
-#include "misc/hashfunc.hh"
-#include "misc/modgray.hh"
-#include
-#include
-#include
-
-namespace spot
-{
- namespace
- {
- class evtgba_product_state: public state
- {
- public:
- evtgba_product_state(state const* const* s, int n)
- : s_(s), n_(n)
- {
- }
-
- ~evtgba_product_state()
- {
- for (int j = 0; j < n_; ++j)
- s_[j]->destroy();
- delete[] s_;
- }
-
- state const*
- nth(int n) const
- {
- assert(n < n_);
- return s_[n];
- }
-
- state const* const*
- all() const
- {
- return s_;
- }
-
- int
- compare(const state* other) const
- {
- const evtgba_product_state* s =
- down_cast(other);
- assert(s);
- assert(s->n_ == n_);
- for (int i = 0; i < n_; ++i)
- {
- int res = s_[i]->compare(s->nth(i));
- if (res)
- return res;
- }
- return 0;
- }
-
- size_t
- hash() const
- {
- size_t res = 0;
- for (int i = 0; i != n_; ++i)
- res ^= wang32_hash(s_[i]->hash());
- return res;
- }
-
- evtgba_product_state*
- clone() const
- {
- state const** s = new state const*[n_];
- memcpy(s, s_, n_ * sizeof(*s_));
- return new evtgba_product_state(s, n_);
- }
-
-
- private:
- state const* const* s_;
- int n_;
- };
-
-
- class evtgba_product_init_iterator:
- public evtgba_iterator, private loopless_modular_mixed_radix_gray_code
- {
- public:
- evtgba_product_init_iterator(evtgba_iterator* const* op, int n)
- : loopless_modular_mixed_radix_gray_code(n), op_(op), n_(n), done_(0)
- {
- for (int j = 0; j < n_; ++j)
- {
- op_[j]->first();
- if (op_[j]->done())
- ++done_;
- }
- }
-
- ~evtgba_product_init_iterator()
- {
- for (int j = 0; j < n_; ++j)
- delete op_[j];
- delete[] op_;
- }
-
- virtual void
- first()
- {
- loopless_modular_mixed_radix_gray_code::first();
- step_();
- }
-
- virtual void
- next()
- {
- loopless_modular_mixed_radix_gray_code::next();
- step_();
- }
-
- virtual bool
- done() const
- {
- return loopless_modular_mixed_radix_gray_code::done();
- }
-
- virtual const state*
- current_state() const
- {
- state const** s = new state const*[n_];
- for (int j = 0; j < n_; ++j)
- s[j] = op_[j]->current_state();
- return new evtgba_product_state(s, n_);
- }
-
- virtual const symbol*
- current_label() const
- {
- assert(0);
- return 0;
- }
-
- virtual symbol_set
- current_acceptance_conditions() const
- {
- assert(0);
- symbol_set s;
- return s;
- }
-
- private:
-
- void
- pre_update(int j)
- {
- if (op_[j]->done())
- --done_;
- }
-
- void
- post_update(int j)
- {
- if (op_[j]->done())
- ++done_;
- }
-
- virtual void
- a_first(int j)
- {
- pre_update(j);
- op_[j]->first();
- post_update(j);
- }
-
- virtual void
- a_next(int j)
- {
- pre_update(j);
- op_[j]->next();
- post_update(j);
- }
-
- virtual bool
- a_last(int j) const
- {
- return op_[j]->done();
- }
-
- void
- step_()
- {
- while (done_ && !loopless_modular_mixed_radix_gray_code::done())
- loopless_modular_mixed_radix_gray_code::next();
- }
-
- evtgba_iterator* const* op_;
- const int n_;
- int done_; // number of iterator for which done() is true.
- };
-
- class evtgba_product_iterator:
- public evtgba_iterator, private loopless_modular_mixed_radix_gray_code
- {
- public:
- evtgba_product_iterator(evtgba_iterator* const* op, int n,
- state const* const* from,
- const evtgba_product::common_symbol_table& cst)
- : loopless_modular_mixed_radix_gray_code(n), op_(op), n_(n),
- from_(from), cst_(cst)
- {
- count_pointer_ = new int*[n];
- for (int j = 0; j < n; ++j)
- count_pointer_[j] = 0;
- }
-
- virtual
- ~evtgba_product_iterator()
- {
- delete[] count_pointer_;
- for (int j = 0; j < n_; ++j)
- delete op_[j];
- delete[] op_;
- }
-
- virtual void
- first()
- {
- loopless_modular_mixed_radix_gray_code::first();
- step_();
- }
-
- virtual void
- next()
- {
- loopless_modular_mixed_radix_gray_code::next();
- step_();
- }
-
- virtual bool
- done() const
- {
- return loopless_modular_mixed_radix_gray_code::done();
- }
-
- virtual const state*
- current_state() const
- {
- state const** s = new state const*[n_];
- for (int j = 0; j < n_; ++j)
- {
- if (op_[j]->done())
- s[j] = from_[j]->clone();
- else
- s[j] = op_[j]->current_state();
- }
- return new evtgba_product_state(s, n_);
- }
-
- virtual const symbol*
- current_label() const
- {
- return lcm_.begin()->first;
- }
-
- virtual symbol_set
- current_acceptance_conditions() const
- {
- symbol_set s;
- for (int j = 0; j < n_; ++j)
- if (!op_[j]->done())
- {
- symbol_set t = op_[j]->current_acceptance_conditions();
- s.insert(t.begin(), t.end());
- }
- return s;
- }
-
- private:
-
- void
- pre_update(int j)
- {
- if (!--*count_pointer_[j])
- lcm_.erase(op_[j]->current_label());
- count_pointer_[j] = 0;
- }
-
- void
- post_update(int j)
- {
- if (!op_[j]->done())
- {
- count_pointer_[j] = &lcm_[op_[j]->current_label()];
- ++*count_pointer_[j];
- }
- }
-
- virtual void
- a_first(int j)
- {
- if (count_pointer_[j])
- pre_update(j);
- op_[j]->first();
- post_update(j);
- }
-
- virtual void
- a_next(int j)
- {
- pre_update(j);
- op_[j]->next();
- post_update(j);
- }
-
- virtual bool
- a_last(int j) const
- {
- return op_[j]->done();
- }
-
- void
- step_()
- {
- while (!loopless_modular_mixed_radix_gray_code::done())
- {
- if (lcm_.size() == 1)
- {
- const symbol* l = lcm_.begin()->first;
- const std::set& s = cst_.find(l)->second;
- std::set::const_iterator i;
- for (i = s.begin(); i != s.end(); ++i)
- if (op_[*i]->done())
- break;
- if (i == s.end())
- return;
- }
- loopless_modular_mixed_radix_gray_code::next();
- }
- }
-
- evtgba_iterator* const* op_;
- int n_;
- state const* const* from_;
- const evtgba_product::common_symbol_table& cst_;
- typedef std::map label_count_map;
- label_count_map lcm_;
- int** count_pointer_;
- };
-
- } // anonymous
-
-
- evtgba_product::evtgba_product(const evtgba_product_operands& op)
- : op_(op)
- {
- int n = 0;
- for (evtgba_product_operands::const_iterator i = op.begin();
- i != op.end(); ++i, ++n)
- {
- const symbol_set& al = (*i)->alphabet();
- alphabet_.insert(al.begin(), al.end());
- const symbol_set& ac = (*i)->all_acceptance_conditions();
- all_acc_.insert(ac.begin(), ac.end());
-
- for (symbol_set::const_iterator j = al.begin(); j != al.end(); ++j)
- common_symbols_[*j].insert(n);
- }
- }
-
- evtgba_product::~evtgba_product()
- {
- }
-
- evtgba_iterator*
- evtgba_product::init_iter() const
- {
- int n = op_.size();
- evtgba_iterator** it = new evtgba_iterator *[n];
- for (int i = 0; i < n; ++i)
- it[i] = op_[i]->init_iter();
-
- return new evtgba_product_init_iterator(it, n);
- }
-
- evtgba_iterator*
- evtgba_product::succ_iter(const state* st) const
- {
- const evtgba_product_state* s =
- down_cast(st);
- assert(s);
-
- int n = op_.size();
-
- evtgba_iterator** it = new evtgba_iterator *[n];
- for (int i = 0; i < n; ++i)
- it[i] = op_[i]->succ_iter(s->nth(i));
-
- return new evtgba_product_iterator(it, n, s->all(), common_symbols_);
- }
-
- evtgba_iterator*
- evtgba_product::pred_iter(const state* st) const
- {
- const evtgba_product_state* s =
- down_cast(st);
- assert(s);
-
- int n = op_.size();
-
- evtgba_iterator** it = new evtgba_iterator *[n];
- for (int i = 0; i < n; ++i)
- it[i] = op_[i]->pred_iter(s->nth(i));
-
- return new evtgba_product_iterator(it, n, s->all(), common_symbols_);
- }
-
- std::string
- evtgba_product::format_state(const state* st) const
- {
- const evtgba_product_state* s =
- down_cast(st);
- int n = op_.size();
- std::string res = "<" + op_[0]->format_state(s->nth(0));
-
- for (int i = 1; i < n; ++i)
- res = res + ", " + op_[i]->format_state(s->nth(i));
-
- return res + ">";
- }
-
- const symbol_set&
- evtgba_product::all_acceptance_conditions() const
- {
- return all_acc_;
- }
-
- const symbol_set&
- evtgba_product::alphabet() const
- {
- return alphabet_;
- }
-
-}
diff --git a/src/evtgba/product.hh b/src/evtgba/product.hh
deleted file mode 100644
index 188191e37..000000000
--- a/src/evtgba/product.hh
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright (C) 2009 Laboratoire de Recherche et Développement
-// de l'Epita (LRDE).
-// Copyright (C) 2004 Laboratoire d'Informatique de Paris 6 (LIP6),
-// département Systèmes Répartis Coopératifs (SRC), Université Pierre
-// et Marie Curie.
-//
-// This file is part of Spot, a model checking library.
-//
-// Spot is free software; you can redistribute it and/or modify it
-// under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 3 of the License, or
-// (at your option) any later version.
-//
-// Spot is distributed in the hope that it will be useful, but WITHOUT
-// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
-// License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-#ifndef SPOT_EVTGBA_PRODUCT_HH
-# define SPOT_EVTGBA_PRODUCT_HH
-
-#include "evtgba/evtgba.hh"
-#include
-
-namespace spot
-{
- // FIXME: doc me
- class evtgba_product: public evtgba
- {
- public:
- typedef std::vector evtgba_product_operands;
- evtgba_product(const evtgba_product_operands& op);
- virtual ~evtgba_product();
-
- virtual evtgba_iterator* init_iter() const;
- virtual evtgba_iterator* succ_iter(const state* s) const;
- virtual evtgba_iterator* pred_iter(const state* s) const;
-
- /// \brief Format the state as a string for printing.
- ///
- /// This formating is the responsability of the automata
- /// that owns the state.
- virtual std::string format_state(const state* state) const;
-
- /// \brief Return the set of all acceptance conditions used
- /// by this automaton.
- ///
- /// The goal of the emptiness check is to ensure that
- /// a strongly connected component walks through each
- /// of these acceptiong conditions. I.e., the union
- /// of the acceptiong conditions of all transition in
- /// the SCC should be equal to the result of this function.
- virtual const symbol_set& all_acceptance_conditions() const;
- virtual const symbol_set& alphabet() const;
-
- typedef std::map > common_symbol_table;
- private:
- const evtgba_product_operands op_;
- symbol_set alphabet_;
- symbol_set all_acc_;
- common_symbol_table common_symbols_;
- };
-
-}
-
-#endif // SPOT_EVTGBA_PRODUCT_HH
diff --git a/src/evtgba/symbol.cc b/src/evtgba/symbol.cc
deleted file mode 100644
index b58a1e607..000000000
--- a/src/evtgba/symbol.cc
+++ /dev/null
@@ -1,107 +0,0 @@
-// Copyright (C) 2004 Laboratoire d'Informatique de Paris 6 (LIP6),
-// département Systèmes Répartis Coopératifs (SRC), Université Pierre
-// et Marie Curie.
-//
-// This file is part of Spot, a model checking library.
-//
-// Spot is free software; you can redistribute it and/or modify it
-// under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 3 of the License, or
-// (at your option) any later version.
-//
-// Spot is distributed in the hope that it will be useful, but WITHOUT
-// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
-// License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-#include
-#include "symbol.hh"
-#include
-
-namespace spot
-{
- symbol::map symbol::instances_;
-
- symbol::symbol(const std::string* name)
- : name_(name), refs_(1)
- {
- }
-
- symbol::~symbol()
- {
- map::iterator i = instances_.find(name());
- assert (i != instances_.end());
- instances_.erase(i);
- }
-
- const symbol*
- symbol::instance(const std::string& name)
- {
- map::iterator i = instances_.find(name);
- if (i != instances_.end())
- {
- const symbol* s = i->second;
- s->ref();
- return s;
- }
- // Convoluted insertion because we want the NAME member of the
- // value to point to the key.
- i = instances_.insert(map::value_type(name, 0)).first;
- i->second = new symbol(&i->first);
- return i->second;
- }
-
- const std::string&
- symbol::name() const
- {
- return *name_;
- }
-
- void
- symbol::ref() const
- {
- ++refs_;
- }
-
- void
- symbol::unref() const
- {
- assert(refs_ > 0);
- --refs_;
- if (!refs_)
- delete this;
- }
-
- int
- symbol::ref_count_() const
- {
- return refs_;
- }
-
- unsigned
- symbol::instance_count()
- {
- return instances_.size();
- }
-
- std::ostream&
- symbol::dump_instances(std::ostream& os)
- {
- for (map::iterator i = instances_.begin(); i != instances_.end(); ++i)
- {
- os << i->second << " = " << i->second->ref_count_()
- << " * symbol(" << i->second->name() << ")" << std::endl;
- }
- return os;
- }
-
-
-
-
-
-
-
-}
diff --git a/src/evtgba/symbol.hh b/src/evtgba/symbol.hh
deleted file mode 100644
index 07b83170a..000000000
--- a/src/evtgba/symbol.hh
+++ /dev/null
@@ -1,124 +0,0 @@
-// Copyright (C) 2004 Laboratoire d'Informatique de Paris 6 (LIP6),
-// département Systèmes Répartis Coopératifs (SRC), Université Pierre
-// et Marie Curie.
-//
-// This file is part of Spot, a model checking library.
-//
-// Spot is free software; you can redistribute it and/or modify it
-// under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 3 of the License, or
-// (at your option) any later version.
-//
-// Spot is distributed in the hope that it will be useful, but WITHOUT
-// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
-// License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see .
-
-#ifndef SPOT_EVTGBA_SYMBOL_HH
-# define SPOT_EVTGBA_SYMBOL_HH
-
-#include
-#include
-#include