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

@ -36,31 +36,39 @@ namespace spot
{
/// Forward declaration. See below.
class succ_iterator;
/// Forward declaration. NFA's labels are reprensented by nodes
/// which are defined in formula_tree.hh, included in nfa.cc.
namespace formula_tree
{
class node;
}
/// \brief Nondeterministic Finite Automata used by automata operators.
///
/// States & labels are represented by integers.
/// States are represented by integers.
/// Labels are represented by formula_tree's nodes.
/// Currently, only one initial state is possible.
class nfa
{
public:
struct transition;
typedef std::list<transition*> state;
struct transition;
typedef std::list<transition*> state;
typedef boost::shared_ptr<formula_tree::node> label;
/// Iterator over the successors of a state.
typedef succ_iterator iterator;
typedef boost::shared_ptr<nfa> ptr;
typedef succ_iterator iterator;
typedef boost::shared_ptr<nfa> ptr;
/// Explicit transitions.
struct transition
{
int label;
label lbl;
const state* dst;
};
nfa();
~nfa();
void add_transition(int src, int dst, int label);
void add_transition(int src, int dst, const label lbl);
void set_init_state(int name);
void set_final(int name);
@ -101,7 +109,7 @@ namespace spot
is_map is_;
si_map si_;
int arity_;
size_t arity_;
std::string name_;
state* init_;