Commit 254896d5 authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz
Browse files

Remove anything related to evtgba.

* src/evtgba/, src/evtgbaalgos/, src/evtgbaparse/, src/evtgbatest/:
Delete.
* src/Makefile.am (SUBDIRS): Adjust.
* configure.ac, README: Adujst.
parent 16c7bc19
......@@ -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
......
......@@ -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
......
## -*- 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 \
......
.deps
.libs
*.lo
*.la
Makefile
Makefile.in
.deps
.libs
*.lo
*.la
Makefile
Makefile.in
## Copyright (C) 2011 Laboratoire de Recherche et Developpement de
## l'Epita (LRDE).
## Copyright (C) 2004 Laboratoire d'Informatique de Paris 6 (LIP6),
## dpartement Systmes Rpartis Coopratifs (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 <http://www.gnu.org/licenses/>.
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
// Copyright (C) 2004 Laboratoire d'Informatique de Paris 6 (LIP6),
// dpartement Systmes Rpartis Coopratifs (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 <http://www.gnu.org/licenses/>.
#include <sstream>
#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();
}
}
// 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 <http://www.gnu.org/licenses/>.
#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
// Copyright (C) 2004, 2005 Laboratoire d'Informatique de Paris 6 (LIP6),
// dpartement Systmes Rpartis Coopratifs (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 <http://www.gnu.org/licenses/>.
#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
// Copyright (C) 2011 Laboratoire de Recherche et Dveloppement de
// l'Epita (LRDE)
// Copyright (C) 2004 Laboratoire d'Informatique de Paris 6 (LIP6),
// dpartement Systmes Rpartis Coopratifs (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 <http://www.gnu.org/licenses/>.
#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<const state_evtgba_explicit*>(other);
assert(o);
return o->get_state() - get_state();
}
size_t
state_evtgba_explicit::hash() const
{
return
reinterpret_cast<const char*>(get_state()) - static_cast<const char*>(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<const state_evtgba_explicit*>(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<const state_evtgba_explicit*>(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<const state_evtgba_explicit*>(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);
}
}
// 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 <http://www.gnu.org/licenses/>.
#ifndef SPOT_EVTGBA_EXPLICIT_HH
# define SPOT_EVTGBA_EXPLICIT_HH
#include "evtgba.hh"
#include <list>
#include "misc/hash.hh"
namespace spot
{
// FIXME: doc me
class evtgba_explicit: public evtgba
{
public:
struct transition;
typedef std::list<transition*> transition_list;
struct state
{
transition_list in, out;
};
/// Explicit transitions (used by spot::evtgba_explicit).
struct transition
{
const symbol* label;
symbol_set acceptance_conditions;