Extend the ELTL parser to support more complex aliases of

automaton operators such as Strong=G(F($0))->G(F($1)) and
G=R(false, $0).

* src/eltlparse/eltlparse.yy, src/eltlparse/eltlscan.ll: Add
support for more complex aliases.
* src/eltltest/acc.cc, src/eltltest/acc.test: Adjust.
* src/ltlast/nfa.cc, src/ltlast/nfa.hh (arity): Now returns an
unsigned value.
* src/tgbatest/eltl2tgba.test: Adjust.
* src/tgbalagos/eltl2tgba_lacim.cc: Fix sanity.
This commit is contained in:
Damien Lefortier 2009-04-18 16:24:18 +02:00
parent bbbc1acc14
commit b06c9cd563
10 changed files with 188 additions and 66 deletions

View file

@ -27,7 +27,7 @@ namespace spot
namespace ltl
{
nfa::nfa()
: is_(), si_(), arity_(-1), name_(), init_(0), finals_()
: is_(), si_(), arity_(0), name_(), init_(0), finals_()
{
}
@ -68,8 +68,8 @@ namespace spot
t->dst = add_state(dst);
t->label = label;
s->push_back(t);
if (label > arity_)
arity_ = label;
if (label >= arity_)
arity_ = label + 1;
}
void
@ -96,10 +96,10 @@ namespace spot
return finals_.empty();
}
int
unsigned
nfa::arity()
{
return arity_ + 1;
return arity_;
}
const nfa::state*

View file

@ -74,7 +74,7 @@ namespace spot
bool is_loop();
/// \brief Get the `arity' i.e. max t.cost, for each transition t.
int arity();
unsigned arity();
/// \brief Return an iterator on the first succesor (if any) of \a state.
///