* src/ltlvisit/tunabbrev.cc, src/ltlvisit/tunabbrev.hh: New files.
* src/ltlvisit/Makefile.am (libltlvisit_a_SOURCES): Add them. * src/ltltest/tunabbrev.test: New file. * src/ltltest/lunabbrev.test: Fix comment. * src/ltltest/Makefile.am (TESTS): Add tunabbrev.test. (check_PROGRAMS): Add tunabbrev. (tunabbrev_SOURCES, tunabbrev_CPPFLAGS): New variables. * src/ltltest/equals.cc (main) [TUNABBREV]: Call unabbreviate_ltl. * src/ltlvisit/lunabbrev.hh (unabbreviate_logic_visitor::recurse): New virtual function. * src/ltlvisit/lunabbrev.cc (unabbreviate_logic_visitor::recurse): Likewise. (unabbreviate_logic_visitor::visit): Use it instead of calling unabbreviate_logic directly.
This commit is contained in:
parent
fc3ceebd4f
commit
080214ebb8
11 changed files with 160 additions and 9 deletions
|
|
@ -34,14 +34,14 @@ namespace spot
|
|||
void
|
||||
unabbreviate_logic_visitor::visit(const unop* uo)
|
||||
{
|
||||
result_ = new unop(uo->op(), unabbreviate_logic(uo->child()));
|
||||
result_ = new unop(uo->op(), recurse(uo->child()));
|
||||
}
|
||||
|
||||
void
|
||||
unabbreviate_logic_visitor::visit(const binop* bo)
|
||||
{
|
||||
formula* f1 = unabbreviate_logic(bo->first());
|
||||
formula* f2 = unabbreviate_logic(bo->second());
|
||||
formula* f1 = recurse(bo->first());
|
||||
formula* f2 = recurse(bo->second());
|
||||
switch (bo->op())
|
||||
{
|
||||
/* f1 ^ f2 == (f1 & !f2) | (f2 & !f1) */
|
||||
|
|
@ -82,11 +82,16 @@ namespace spot
|
|||
unsigned mos = mo->size();
|
||||
for (unsigned i = 0; i < mos; ++i)
|
||||
{
|
||||
res->add(unabbreviate_logic(mo->nth(i)));
|
||||
res->add(recurse(mo->nth(i)));
|
||||
}
|
||||
result_ = res;
|
||||
}
|
||||
|
||||
formula* unabbreviate_logic_visitor::recurse(const formula* f)
|
||||
{
|
||||
return unabbreviate_logic(f);
|
||||
}
|
||||
|
||||
formula*
|
||||
unabbreviate_logic(const formula* f)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue