* configure.ac: Output src/tgbaparse/Makefile.
* src/Makefile.am (SUBDIRS): Add tgbaparse. (libspot_la_LDADD): Add tgbaparse/libtgbaparse.la. * src/tgba/tgbaexplicit.cc (tgba_explicit::get_condition, tgba_explicit::get_promise, tgba_explicit::add_neg_condition, tgba_explicit::add_neg_promise): New methods. * src/tgba/tgbaexplicit.hh: Declare them. * src/tgbaparse/Makefile.am, src/tgbaparse/fmterror.cc, src/tgbaparse/parsedecl.hh, src/tgbaparse/public.hh, src/tgbaparse/tgbaparse.yy, src/tgbaparse/tgbascan.ll, src/tgbatest/tgbaread.cc, src/tgbatest/tgbaread.test: New files. * src/tgbatest/Makefile.am (check_PROGRAMS): Add tgbaread. (TESTS): Add tgbaread.cc. (CLEANFILES): Add input. (tgbaread_SOURCES): New variable.
This commit is contained in:
parent
cebffb11e8
commit
6884a7f985
18 changed files with 495 additions and 14 deletions
|
|
@ -122,7 +122,7 @@ namespace spot
|
|||
return t;
|
||||
}
|
||||
|
||||
void tgba_explicit::add_condition(transition* t, ltl::formula* f)
|
||||
int tgba_explicit::get_condition(ltl::formula* f)
|
||||
{
|
||||
assert(dynamic_cast<ltl::atomic_prop*>(f));
|
||||
tgba_bdd_dict::fv_map::iterator i = dict_.var_map.find(f);
|
||||
|
|
@ -137,10 +137,20 @@ namespace spot
|
|||
{
|
||||
v = i->second;
|
||||
}
|
||||
t->condition &= ithvar(v);
|
||||
return v;
|
||||
}
|
||||
|
||||
void tgba_explicit::add_promise(transition* t, ltl::formula* f)
|
||||
void tgba_explicit::add_condition(transition* t, ltl::formula* f)
|
||||
{
|
||||
t->condition &= ithvar(get_condition(f));
|
||||
}
|
||||
|
||||
void tgba_explicit::add_neg_condition(transition* t, ltl::formula* f)
|
||||
{
|
||||
t->condition &= ! ithvar(get_condition(f));
|
||||
}
|
||||
|
||||
int tgba_explicit::get_promise(ltl::formula* f)
|
||||
{
|
||||
tgba_bdd_dict::fv_map::iterator i = dict_.prom_map.find(f);
|
||||
int v;
|
||||
|
|
@ -154,7 +164,17 @@ namespace spot
|
|||
{
|
||||
v = i->second;
|
||||
}
|
||||
t->promise &= ithvar(v);
|
||||
return v;
|
||||
}
|
||||
|
||||
void tgba_explicit::add_promise(transition* t, ltl::formula* f)
|
||||
{
|
||||
t->promise &= ithvar(get_promise(f));
|
||||
}
|
||||
|
||||
void tgba_explicit::add_neg_promise(transition* t, ltl::formula* f)
|
||||
{
|
||||
t->promise &= ! ithvar(get_promise(f));
|
||||
}
|
||||
|
||||
state*
|
||||
|
|
|
|||
|
|
@ -32,7 +32,9 @@ namespace spot
|
|||
create_transition(const std::string& source, const std::string& dest);
|
||||
|
||||
void add_condition(transition* t, ltl::formula* f);
|
||||
void add_neg_condition(transition* t, ltl::formula* f);
|
||||
void add_promise(transition* t, ltl::formula* f);
|
||||
void add_neg_promise(transition* t, ltl::formula* f);
|
||||
|
||||
// tgba interface
|
||||
virtual ~tgba_explicit();
|
||||
|
|
@ -44,6 +46,9 @@ namespace spot
|
|||
|
||||
protected:
|
||||
state* add_state(const std::string& name);
|
||||
int get_condition(ltl::formula* f);
|
||||
int get_promise(ltl::formula* f);
|
||||
|
||||
typedef std::map<const std::string, tgba_explicit::state*> ns_map;
|
||||
typedef std::map<const tgba_explicit::state*, std::string> sn_map;
|
||||
ns_map name_state_map_;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue