* 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
39
src/ltltest/tunabbrev.test
Executable file
39
src/ltltest/tunabbrev.test
Executable file
|
|
@ -0,0 +1,39 @@
|
|||
#! /bin/sh
|
||||
|
||||
# Check for the unabbreviate_ltl visitor
|
||||
|
||||
. ./defs || exit 1
|
||||
|
||||
check()
|
||||
{
|
||||
./tunabbrev "$1" "$2" || exit 1
|
||||
}
|
||||
|
||||
# A few things that do not change
|
||||
check 'a' 'a'
|
||||
check '1' '1'
|
||||
check '0' '0'
|
||||
check 'a U b' 'a U b'
|
||||
check 'a & b' 'a & b'
|
||||
check 'a & b' 'b & a'
|
||||
check 'a & b & c' 'c & a & b'
|
||||
check 'a & b & c' 'b & c & a'
|
||||
check 'a & b & a' 'b & a & b'
|
||||
check 'a & b' 'b & a & b'
|
||||
check 'a & b' 'b & a & a'
|
||||
check 'a & b & (c |(f U g)| e)' 'b & a & a & (c | e |(f U g)| e | c) & b'
|
||||
|
||||
# same as in lunabbrev.test:
|
||||
check 'a ^ b' '(a & !b) | (!a & b)'
|
||||
check 'a ^ Xb' '(!Xb & a) | (!a & Xb) | (Xb & !a)'
|
||||
check '!a <-> Xb' '(Xb & !a) | (!!a & !Xb)'
|
||||
check '(a ^ b) | (b ^ c)' '(c & !b) | (!c & b) | (a & !b) | (!a & b)'
|
||||
|
||||
# LTL unabbreviations:
|
||||
check 'G a ' 'false R a'
|
||||
check 'GF a => F G(b)' '!(false R (true U a)) | (true U (false V b))'
|
||||
check 'GGGGa' 'false V (false V (false V (false V a)))'
|
||||
check 'FFFfalse' 'true U ((true) U (true U (false)))'
|
||||
|
||||
# Success.
|
||||
:
|
||||
Loading…
Add table
Add a link
Reference in a new issue