* src/ltlvisit/lunabbrev.cc, src/ltlvisit/lunabbrev.hh: New files.
* src/ltlvisit/Makefile.am (libltlvisit_a_SOURCES): Add them. * src/ltlast/multop.cc (multop::multop(type)): New constructor. * src/ltlast/multop.hh (multop::multop(type)): New constructor. * src/ltltest/lunabbrev.test: New file. * src/ltltest/Makefile.am (TESTS): Add lunabbrev.test. (check_PROGRAMS): Add lunabbrev. (lunabbrev_SOURCES, lunabbrev_CPPFLAGS): New variables. * src/ltltest/equals.cc (main) [LUNABBREV]: Call unabbreviate_logic.
This commit is contained in:
parent
5d714612a3
commit
526012a795
10 changed files with 197 additions and 5 deletions
30
src/ltlvisit/lunabbrev.hh
Normal file
30
src/ltlvisit/lunabbrev.hh
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
#include "ltlast/formula.hh"
|
||||
#include "ltlast/visitor.hh"
|
||||
|
||||
namespace spot
|
||||
{
|
||||
namespace ltl
|
||||
{
|
||||
// This visitor is public, because it's convenient
|
||||
// to derive from it and override part of its methods.
|
||||
class unabbreviate_logic_visitor : public const_visitor
|
||||
{
|
||||
public:
|
||||
unabbreviate_logic_visitor();
|
||||
virtual ~unabbreviate_logic_visitor();
|
||||
|
||||
formula* result() const;
|
||||
|
||||
void visit(const atomic_prop* ap);
|
||||
void visit(const unop* uo);
|
||||
void visit(const binop* bo);
|
||||
void visit(const multop* mo);
|
||||
void visit(const constant* c);
|
||||
|
||||
private:
|
||||
formula* result_;
|
||||
};
|
||||
|
||||
formula* unabbreviate_logic(const formula* f);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue