* 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:
Alexandre Duret-Lutz 2003-04-16 15:30:44 +00:00
parent 5d714612a3
commit 526012a795
10 changed files with 197 additions and 5 deletions

35
src/ltltest/lunabbrev.test Executable file
View file

@ -0,0 +1,35 @@
#! /bin/sh
# Check for the equals visitor
. ./defs || exit 1
check()
{
./lunabbrev "$1" "$2" || exit 1
}
# A few things that do not change
check 'a' 'a'
check '1' '1'
check '0' '0'
check 'G a ' ' G a'
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'
# other formulae that do change
check 'a ^ b' '(a & !b) | (!a & b)'
check 'a ^ Xb' '(!Xb & a) | (!a & Xb) | (Xb & !a)'
check 'GF a => F G(b)' '!GFa | F Gb'
check '!a <-> Xb' '(Xb & !a) | (!!a & !Xb)'
check '(a ^ b) | (b ^ c)' '(c & !b) | (!c & b) | (a & !b) | (!a & b)'
# Success.
: