Modify the ELTL parser to be able to support PSL operators. Add a

new keyword in the ELTL format: finish, which applies to an
automaton operator and tells whether it just completed.

* src/eltlparse/eltlparse.yy: Clean it. Add finish.
* src/eltlparse/eltlscan.ll: Add finish.
* src/formula_tree.cc, src/formula_tree.hh: New files. Define a
small AST representing formulae where atomic props are unknown
which is used in the ELTL parser.
* src/ltlast/automatop.cc, ltlast/automatop.hh, ltlast/nfa.cc,
ltlast/nfa.hh: Adjust.
* src/ltlast/unop.cc, src/ltlast/unop.hh: Finish is an unop.
* src/ltlvisit/basicreduce.cc, src/ltlvisit/nenoform.cc,
src/ltlvisit/reduce.cc, src/ltlvisit/syntimpl.cc,
src/ltlvisit/tostring.cc, src/ltlvisit/tunabbrev.cc,
src/tgba/formula2bdd.cc, src/tgbaalgos/ltl2tgba_fm.cc,
src/tgbaalgos/ltl2tgba_lacim.cc: Handle finish in switches.
* src/tgbaalgos/eltl2tgba_lacim.cc: Translate finish.
* src/tgbatest/eltl2tgba.test: More tests.
This commit is contained in:
Damien Lefortier 2009-06-05 01:17:19 +02:00
parent 4de885afb1
commit e48338e8d8
23 changed files with 479 additions and 237 deletions

View file

@ -223,6 +223,10 @@ namespace spot
result_ = unop::instance(unop::G, result_);
return;
case unop::Finish:
result_ = unop::instance(unop::Finish, result_);
return;
}
/* Unreachable code. */
assert(0);

View file

@ -102,6 +102,12 @@ namespace spot
result_ = unop::instance(negated_ ? unop::F : unop::G,
recurse(f));
return;
case unop::Finish:
result_ = unop::instance(unop::Finish, recurse_(f, false));
if (negated_)
result_ = unop::instance(unop::Not, result_);
return;
}
/* Unreachable code. */
assert(0);

View file

@ -97,6 +97,10 @@ namespace spot
|| !is_universal(result_))
result_ = unop::instance(unop::G, result_);
return;
case unop::Finish:
result_ = unop::instance(unop::Finish, result_);
return;
}
/* Unreachable code. */
assert(0);

View file

@ -241,6 +241,8 @@ namespace spot
if (syntactic_implication(f, constant::false_instance()))
result_ = true;
return;
case unop::Finish:
return;
}
/* Unreachable code. */
assert(0);
@ -431,6 +433,8 @@ namespace spot
destroy(tmp);
return;
}
case unop::Finish:
return;
}
/* Unreachable code. */
assert(0);

View file

@ -144,6 +144,10 @@ namespace spot
case unop::G:
os_ << "G";
break;
case unop::Finish:
os_ << "finish";
need_parent = true;
break;
}
top_level_ = false;
@ -297,6 +301,10 @@ namespace spot
case unop::G:
os_ << "[]";
break;
case unop::Finish:
os_ << "finish";
need_parent = true;
break;
}
top_level_ = false;

View file

@ -39,6 +39,7 @@ namespace spot
{
switch (uo->op())
{
case unop::Finish:
case unop::X:
case unop::Not:
this->super::visit(uo);