* src/ltlvisit/tostring.hh (to_spin_string): New function.
Convert a formula into a string parsable by Spin. * src/tgbaalgos/neverclaim.hh, src/tgbaalgos/neverclaim.cc: New files. Print the never claim in Spin format of a degeneralized TGBA. * src/tgbaalgos/Makefile.am: Add them. * src/tgbatest/ltl2tgba.cc: Add the option -N which outputs the never claim in Spin format of a degeneralized TGBA. * src/tgbatest/ltl2neverclaim.test: New file. * src/tgbatest/Makefile.am: Add it.
This commit is contained in:
parent
4d73490a49
commit
8d8af2e53a
11 changed files with 437 additions and 5 deletions
|
|
@ -60,6 +60,7 @@ TESTS = \
|
|||
tgbaread.test \
|
||||
readsave.test \
|
||||
ltl2tgba.test \
|
||||
ltl2neverclaim.test \
|
||||
ltlprod.test \
|
||||
bddprod.test \
|
||||
explprod.test \
|
||||
|
|
|
|||
41
src/tgbatest/ltl2neverclaim.test
Executable file
41
src/tgbatest/ltl2neverclaim.test
Executable file
|
|
@ -0,0 +1,41 @@
|
|||
#!/bin/sh
|
||||
# Copyright (C) 2004 Laboratoire d'Informatique de Paris 6 (LIP6),
|
||||
# département Systèmes Répartis Coopératifs (SRC), Université Pierre
|
||||
# et Marie Curie.
|
||||
#
|
||||
# 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 2 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 Spot; see the file COPYING. If not, write to the Free
|
||||
# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
# 02111-1307, USA.
|
||||
|
||||
|
||||
. ./defs
|
||||
|
||||
set -e
|
||||
|
||||
# We don't check the output, but just running these might be enough to
|
||||
# trigger assertions.
|
||||
|
||||
run 0 ./ltl2tgba -N -x a
|
||||
run 0 ./ltl2tgba -N -x 'a U b'
|
||||
run 0 ./ltl2tgba -N -x 'X a'
|
||||
run 0 ./ltl2tgba -N -x 'a & b & c'
|
||||
run 0 ./ltl2tgba -N -x 'a | b | (c U (d & (g U (h ^ i))))'
|
||||
run 0 ./ltl2tgba -N -x 'Xa & (b U !a) & (b U !a)'
|
||||
run 0 ./ltl2tgba -N -x 'Fa & Xb & GFc & Gd'
|
||||
run 0 ./ltl2tgba -N -x 'Fa & Xa & GFc & Gc'
|
||||
run 0 ./ltl2tgba -N -x 'Fc & X(a | Xb) & GF(a | Xb) & Gc'
|
||||
run 0 ./ltl2tgba -N -x 'a R (b R c)'
|
||||
run 0 ./ltl2tgba -N -x '(a U b) U (c U d)'
|
||||
|
|
@ -37,6 +37,7 @@
|
|||
#include "tgbaalgos/gtec/ce.hh"
|
||||
#include "tgbaparse/public.hh"
|
||||
#include "tgbaalgos/dupexp.hh"
|
||||
#include "tgbaalgos/neverclaim.hh"
|
||||
|
||||
void
|
||||
syntax(char* prog)
|
||||
|
|
@ -69,6 +70,8 @@ syntax(char* prog)
|
|||
<< std::endl
|
||||
<< " -n same as -m, but display more counter-examples"
|
||||
<< std::endl
|
||||
<< " -N display the never clain for Spin "
|
||||
<< "(implies -D)" << std::endl
|
||||
<< " -r display the relation BDD, not the reachability graph"
|
||||
<< std::endl
|
||||
<< " -R same as -r, but as a set" << std::endl
|
||||
|
|
@ -186,6 +189,11 @@ main(int argc, char** argv)
|
|||
output = -1;
|
||||
magic_many = true;
|
||||
}
|
||||
else if (!strcmp(argv[formula_index], "-N"))
|
||||
{
|
||||
degeneralize_opt = true;
|
||||
output = 8;
|
||||
}
|
||||
else if (!strcmp(argv[formula_index], "-r"))
|
||||
{
|
||||
output = 1;
|
||||
|
|
@ -295,7 +303,6 @@ main(int argc, char** argv)
|
|||
fm_symb_merge_opt);
|
||||
else
|
||||
to_free = a = concrete = spot::ltl_to_tgba_lacim(f, dict);
|
||||
spot::ltl::destroy(f);
|
||||
}
|
||||
|
||||
spot::tgba_tba_proxy* degeneralized = 0;
|
||||
|
|
@ -354,6 +361,9 @@ main(int argc, char** argv)
|
|||
case 7:
|
||||
spot::nonacceptant_lbtt_reachable(std::cout, a);
|
||||
break;
|
||||
case 8:
|
||||
spot::never_claim_reachable(std::cout, degeneralized, f);
|
||||
break;
|
||||
default:
|
||||
assert(!"unknown output option");
|
||||
}
|
||||
|
|
@ -414,6 +424,8 @@ main(int argc, char** argv)
|
|||
break;
|
||||
}
|
||||
|
||||
if (f)
|
||||
spot::ltl::destroy(f);
|
||||
if (expl)
|
||||
delete expl;
|
||||
if (degeneralize_opt)
|
||||
|
|
|
|||
|
|
@ -70,6 +70,13 @@ Algorithm
|
|||
Enabled = yes
|
||||
}
|
||||
|
||||
Algorithm
|
||||
{
|
||||
Name = "Spot (Couvreur -- FM), degeneralized, via never claim"
|
||||
Path = "${LBTT_TRANSLATE} --spin './ltl2tgba -F -f -N'"
|
||||
Enabled = yes
|
||||
}
|
||||
|
||||
Algorithm
|
||||
{
|
||||
Name = "Spot (Couvreur -- FM), fake"
|
||||
|
|
@ -257,7 +264,7 @@ FormulaOptions
|
|||
|
||||
AndPriority = 10
|
||||
OrPriority = 10
|
||||
# XorPriority = 0
|
||||
XorPriority = 0
|
||||
# EquivalencePriority = 0
|
||||
|
||||
BeforePriority = 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue