From 7d6fc328ab89344c83bda5deef42e4063254ab2b Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Sun, 14 Oct 2012 19:06:59 +0200 Subject: [PATCH] Add new tests for LTL and PSL translation, based on ltlcheck. * src/tgbatest/ltlcheck.test, src/tgbatest/ltlcheck2.test: New files. * src/tgbatest/Makefile.am: Add them. --- src/tgbatest/Makefile.am | 2 ++ src/tgbatest/ltlcheck.test | 54 +++++++++++++++++++++++++++++++++++++ src/tgbatest/ltlcheck2.test | 39 +++++++++++++++++++++++++++ 3 files changed, 95 insertions(+) create mode 100755 src/tgbatest/ltlcheck.test create mode 100755 src/tgbatest/ltlcheck2.test diff --git a/src/tgbatest/Makefile.am b/src/tgbatest/Makefile.am index 22fbe1c75..c2a926e3e 100644 --- a/src/tgbatest/Makefile.am +++ b/src/tgbatest/Makefile.am @@ -107,7 +107,9 @@ TESTS = \ emptchkr.test \ ltlcounter.test \ spotlbtt.test \ + ltlcheck.test \ spotlbtt2.test \ + ltlcheck2.test \ complementation.test \ randpsl.test \ cycles.test diff --git a/src/tgbatest/ltlcheck.test b/src/tgbatest/ltlcheck.test new file mode 100755 index 000000000..d562da101 --- /dev/null +++ b/src/tgbatest/ltlcheck.test @@ -0,0 +1,54 @@ +#!/bin/sh +# -*- coding: utf-8 -*- +# Copyright (C) 2012 Laboratoire de Recherche et +# Développement de l'Epita (LRDE). +# +# This file is part of Spot, a model checking library. +# +# Spot is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# Spot is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public +# License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +. ./defs + +ltl2tgba=../ltl2tgba + +../../bin/randltl -n 100 p1 p2 p3 p4 p5 p6 --tree-size 5..15 | +../../bin/ltlcheck \ + "$ltl2tgba -t -l %f > %T" \ + "$ltl2tgba -t -l -R3b -r4 %f > %T" \ + "$ltl2tgba -t -f %f > %T" \ + "$ltl2tgba -t -f -y %f > %T" \ + "$ltl2tgba -t -f -r4 %f > %T" \ + "$ltl2tgba -t -f -R3 %f > %T" \ + "$ltl2tgba -t -f -R3 -Rm %f > %T" \ + "$ltl2tgba -t -f -R3 -RM %f > %T" \ + "$ltl2tgba -t -l -R3b -Rm %f > %T" \ + "$ltl2tgba -t -f -D %f > %T" \ + "$ltl2tgba -t -f -D %f > %T" \ + "$ltl2tgba -t -f -r4 -R3 -RDS %f > %T" \ + "$ltl2tgba -t -f -r4 -R3 -RRS %f > %T" \ + "$ltl2tgba -t -f -r4 -R3 -RIS %f > %T" \ + "$ltl2tgba -t -f -r4 -R3 -RDS -DS %f > %T" \ + "$ltl2tgba -t -f -x -p %f > %T" \ + "$ltl2tgba -t -f -x -p -L %f > %T" \ + "$ltl2tgba -t -f -x -p -D %f > %T" \ + "$ltl2tgba -t -f -x -p -L -D %f > %T" \ + "$ltl2tgba -t -taa -r4 %f > %T" \ + "$ltl2tgba -t -taa -r4 -c %f > %T" \ + "$ltl2tgba -t -taa -r4 -R3 -RDS %f > %T" > output.json + +# Disabled because too slow, and too big automata produced. +# "$ltl2tgba -t -lo -r4 %f > %T" +# "$ltl2tgba -t -lo -R3b -r4 %f > %T" \ + + diff --git a/src/tgbatest/ltlcheck2.test b/src/tgbatest/ltlcheck2.test new file mode 100755 index 000000000..28ef70b4d --- /dev/null +++ b/src/tgbatest/ltlcheck2.test @@ -0,0 +1,39 @@ +#!/bin/sh +# -*- coding: utf-8 -*- +# Copyright (C) 2012 Laboratoire de Recherche et +# Développement de l'Epita (LRDE). +# +# This file is part of Spot, a model checking library. +# +# Spot is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# Spot is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public +# License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +. ./defs + +ltl2tgba=../../bin/ltl2tgba + +../../bin/randltl -P -n 100 p1 p2 p3 p4 p5 p6 --tree-size 5..15 | +../../bin/ltlfilt --remove-wm | +../../bin/ltlcheck \ + "$ltl2tgba --lbtt --any --small %f > %T" \ + "$ltl2tgba --lbtt --any --medium %f > %T" \ + "$ltl2tgba --lbtt --any --high %f > %T" \ + "$ltl2tgba --lbtt --deterministic --small %f > %T" \ + "$ltl2tgba --lbtt --deterministic --medium %f > %T" \ + "$ltl2tgba --lbtt --deterministic --high %f > %T" \ + "$ltl2tgba --lbtt --high --small %f > %T" \ + "$ltl2tgba --lbtt --high --medium %f > %T" \ + "$ltl2tgba --lbtt --high --high %f > %T" > output.json + + +