* m4/gspnlib.m4: Define LIBGSPNESRG_LDFLAGS.

* iface/gspn/Makefile.am (gspn_HEADERS): Add common.hh.
(libspotgspn_la_SOURCES): Add common.cc.
(libspotgspneesrg_la_LIBADD, libspotgspneesrg_la_CPPFLAGS)
(libspotgspneesrg_la_SOURCES, ltlgspn_eesrg_SOURCES)
(dotty_eesrg_LDADD, dotty_eesrg_CPPFLAGS): New variables.
(lib_LTLIBRARIES): Add libspotgspneesrg.la.
(check_PROGRAMS): Add dottygspn-eesrg.
* iface/gspn/gspn.hh, iface/gspn/gspn.cc
(gspn_exeption, operator<<(gspn_exeption), gspn_environment): Move ...
* iface/gspn/common.hh, iface/gspn/common.cc: ... in these new files.
* iface/gspn/eesrg.hh, iface/gspn/eesrg.cc, iface/gspn/dottyeesrg.cc:
New files.
This commit is contained in:
Alexandre Duret-Lutz 2003-10-30 15:53:33 +00:00
parent 66f05a2621
commit 65bfea0c8d
10 changed files with 697 additions and 117 deletions

View file

@ -1,14 +1,12 @@
#ifndef SPOT_IFACE_GSPN_HH
# define SPOT_IFACE_GSPN_HH
#ifndef SPOT_IFACE_GSPN_GSPN_HH
# define SPOT_IFACE_GSPN_GSPN_HH
// Try not to include gspnlib.h here, or it will polute the user's
// Do not include gspnlib.h here, or it will polute the user's
// namespace with internal C symbols.
# include <iostream>
# include <string>
# include "tgba/tgba.hh"
# include "ltlast/atomic_prop.hh"
# include "ltlenv/environment.hh"
# include "common.hh"
namespace spot
{
@ -18,64 +16,8 @@ namespace spot
public:
gspn_interface(int argc, char **argv);
~gspn_interface();
tgba* get_automata();
};
/// An exeption used to forward GSPN errors.
class gspn_exeption
{
public:
gspn_exeption(const std::string& where, int err)
: err_(err), where_(where)
{
}
int
get_err() const
{
return err_;
}
std::string
get_where() const
{
return where_;
}
private:
int err_;
std::string where_;
};
std::ostream& operator<<(std::ostream& os, const gspn_exeption& e)
{
os << e.get_where() << " exited with " << e.get_err();
return os;
}
class gspn_environment : public ltl::environment
{
public:
gspn_environment();
~gspn_environment();
/// Declare an atomic proposition. Return false iff the
/// proposition was already declared.
bool declare(const std::string& prop_str);
virtual ltl::formula* require(const std::string& prop_str);
/// Get the name of the environment.
virtual const std::string& name();
typedef std::map<const std::string, ltl::atomic_prop*> prop_map;
/// Get the map of atomic proposition known to this environment.
const prop_map& get_prop_map() const;
private:
prop_map props_;
// FIXME: I think we should have
// tgba* get_automata();
};
@ -107,4 +49,4 @@ namespace spot
}
#endif // SPOT_IFACE_GSPN_HH
#endif // SPOT_IFACE_GSPN_GSPN_HH