get rid of tgba_tba_proxy
Replace it by a new degeneralize_tba(), that use the same tricks as degeneralize(). * src/tgba/tgbatba.cc, src/tgba/tgbatba.hh: Delete. * src/tgba/Makefile.am: Adjust. * src/tgbaalgos/degen.cc, src/tgbaalgos/degen.hh: Implement a degeneralize_tba() function sharing its code with degeneralize(). * src/tgbatest/ltl2tgba.cc: Rename -D to -DT so that we can pass it the same option as -DS. * src/tgbatest/degenid.test, src/tgbatest/emptchk.test, src/tgbatest/emptchke.test, src/tgbatest/ltlcounter.test, src/tgbatest/ltlcross.test, src/tgbatest/spotlbtt.test, src/tgbatest/ltl2tgba.test: Adjust. * src/tgbatest/det.test, src/tgbatest/emptchk.test: Adjust numbers to the smaller output. * src/saba/sabacomplementtgba.cc, src/saba/sabacomplementtgba.hh, src/tgbaalgos/minimize.cc, src/tgbaalgos/neverclaim.cc, src/tgbaalgos/neverclaim.hh, src/tgbaalgos/postproc.cc, src/tgbatest/randtgba.cc, src/tgbatest/complementation.cc, wrap/python/spot.i, wrap/python/tests/ltl2tgba.py, src/sabatest/sabacomplementtgba.cc: Adjust to the removal of tgba_tba_proxy, using degeneralize_tba() if needed.
This commit is contained in:
parent
e9893586cc
commit
5739240c0f
25 changed files with 488 additions and 1090 deletions
|
|
@ -32,7 +32,6 @@
|
|||
#include "tgbaalgos/stats.hh"
|
||||
#include "tgbaalgos/emptiness_stats.hh"
|
||||
#include "tgbaalgos/degen.hh"
|
||||
#include "tgba/tgbatba.hh"
|
||||
|
||||
#include "tgba/tgbasafracomplement.hh"
|
||||
#include "tgba/tgbakvcomplement.hh"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#!/bin/sh
|
||||
# Copyright (C) 2011, 2013 Laboratoire de Recherche et Développement
|
||||
# de l'Epita (LRDE).
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2011, 2013, 2014 Laboratoire de Recherche et
|
||||
# Développement de l'Epita (LRDE).
|
||||
#
|
||||
# This file is part of Spot, a model checking library.
|
||||
#
|
||||
|
|
@ -24,7 +25,7 @@ set -e
|
|||
# Make sure degeneralization is idempotent
|
||||
|
||||
for f in 'FGa|GFb' 'GFa & GFb & GFc' 'GF(a->FGb)&GF(c->FGd)'; do
|
||||
for opt in -DS -D; do
|
||||
for opt in -DS -DT; do
|
||||
../ltl2tgba $opt -b "$f" > autX.spot
|
||||
../ltl2tgba -X -kt autX.spot > base.size
|
||||
cat base.size
|
||||
|
|
|
|||
|
|
@ -24,9 +24,9 @@ set -e
|
|||
ltl2tgba=../../bin/ltl2tgba
|
||||
|
||||
cat >formulas <<'EOF'
|
||||
1,14,X((a M F((!b & !c) | (b & c))) W (G!c U b))
|
||||
1,13,X((a M F((!b & !c) | (b & c))) W (G!c U b))
|
||||
1,5,X(((a & b) R (!a U !c)) R b)
|
||||
1,10,XXG(Fa U Xb)
|
||||
1,9,XXG(Fa U Xb)
|
||||
1,5,(!a M !b) W F!c
|
||||
1,3,(b & Fa & GFc) R a
|
||||
1,2,(a R (b W a)) W G(!a M (b | c))
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
#!/bin/sh
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2008, 2009, 2010, 2014 Laboratoire de Recherche et
|
||||
# Développement de l'Epita (LRDE).
|
||||
# Développement de l'Epita (LRDE).
|
||||
# Copyright (C) 2003, 2004, 2005 Laboratoire d'Informatique de
|
||||
# Paris 6 (LIP6), département Systèmes Répartis Coopératifs (SRC),
|
||||
# Université Pierre et Marie Curie.
|
||||
# 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.
|
||||
#
|
||||
|
|
@ -34,13 +35,13 @@ expect_ce_do()
|
|||
expect_ce()
|
||||
{
|
||||
expect_ce_do -CR -e -taa "$1"
|
||||
expect_ce_do -CR -e -taa -D "$1"
|
||||
expect_ce_do -CR -e -taa -DT "$1"
|
||||
expect_ce_do -CR -e -f "$1"
|
||||
expect_ce_do -CR -e -f -D "$1"
|
||||
expect_ce_do -CR -e -f -DT "$1"
|
||||
expect_ce_do -CR -e'Cou99(shy)' -taa "$1"
|
||||
expect_ce_do -CR -e'Cou99(shy)' -taa -D "$1"
|
||||
expect_ce_do -CR -e'Cou99(shy)' -taa -DT "$1"
|
||||
expect_ce_do -CR -e'Cou99(shy)' -f "$1"
|
||||
expect_ce_do -CR -e'Cou99(shy)' -f -D "$1"
|
||||
expect_ce_do -CR -e'Cou99(shy)' -f -DT "$1"
|
||||
expect_ce_do -CR -eCVWY90 -taa "$1"
|
||||
expect_ce_do -CR -eCVWY90 -f "$1"
|
||||
run 0 ../ltl2tgba -CR -e'CVWY90(bsh=10M)' -taa "$1"
|
||||
|
|
@ -61,13 +62,13 @@ expect_ce()
|
|||
expect_no()
|
||||
{
|
||||
run 0 ../ltl2tgba -CR -E -taa "$1"
|
||||
run 0 ../ltl2tgba -CR -E -taa -D "$1"
|
||||
run 0 ../ltl2tgba -CR -E -taa -DT "$1"
|
||||
run 0 ../ltl2tgba -CR -E -f "$1"
|
||||
run 0 ../ltl2tgba -CR -E -f -D "$1"
|
||||
run 0 ../ltl2tgba -CR -E -f -DT "$1"
|
||||
run 0 ../ltl2tgba -CR -E'Cou99(shy)' -taa "$1"
|
||||
run 0 ../ltl2tgba -CR -E'Cou99(shy)' -taa -D "$1"
|
||||
run 0 ../ltl2tgba -CR -E'Cou99(shy)' -taa -DT "$1"
|
||||
run 0 ../ltl2tgba -CR -E'Cou99(shy)' -f "$1"
|
||||
run 0 ../ltl2tgba -CR -E'Cou99(shy)' -f -D "$1"
|
||||
run 0 ../ltl2tgba -CR -E'Cou99(shy)' -f -DT "$1"
|
||||
run 0 ../ltl2tgba -CR -ECVWY90 -taa "$1"
|
||||
run 0 ../ltl2tgba -CR -ECVWY90 -f "$1"
|
||||
run 0 ../ltl2tgba -CR -E'CVWY90(bsh=10M)' -taa "$1"
|
||||
|
|
@ -88,11 +89,11 @@ expect_ce 'a' 1
|
|||
expect_ce 'a U b' 1
|
||||
expect_ce 'X a' 1
|
||||
expect_ce 'a & b & c' 1
|
||||
expect_ce 'a | b | (c U (d & (g U (h ^ i))))' 2
|
||||
expect_ce 'a | b | (c U (d & (g U (h ^ i))))' 1
|
||||
expect_ce 'Xa & (b U !a) & (b U !a)' 1
|
||||
expect_ce 'Fa & Xb & GFc & Gd' 1
|
||||
expect_ce 'Fa & Xa & GFc & Gc' 2
|
||||
expect_ce 'Fc & X(a | Xb) & GF(a | Xb) & Gc' 1
|
||||
expect_ce '!((FF a) <=> (F x))' 3
|
||||
expect_ce '!((FF a) <=> (F x))' 2
|
||||
expect_no 'Xa && (!a U b) && !b && X!b' 2
|
||||
expect_no '(a U !b) && Gb' 2
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
#!/bin/sh
|
||||
# Copyright (C) 2009, 2010 Laboratoire de Recherche et Développement
|
||||
# de l'Epita (LRDE).
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2009, 2010, 2014 Laboratoire de Recherche et
|
||||
# Développement de l'Epita (LRDE).
|
||||
# Copyright (C) 2003, 2004, 2005 Laboratoire d'Informatique de
|
||||
# Paris 6 (LIP6), département Systèmes Répartis Coopératifs (SRC),
|
||||
# Université Pierre et Marie Curie.
|
||||
# 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.
|
||||
#
|
||||
|
|
@ -28,9 +29,9 @@ set -e
|
|||
expect_ce()
|
||||
{
|
||||
run 0 ../ltl2tgba -CR -e -X "$1"
|
||||
run 0 ../ltl2tgba -CR -e -D -X "$1"
|
||||
run 0 ../ltl2tgba -CR -e -DT -X "$1"
|
||||
run 0 ../ltl2tgba -CR -e'Cou99(shy)' -X "$1"
|
||||
run 0 ../ltl2tgba -CR -e'Cou99(shy)' -D -X "$1"
|
||||
run 0 ../ltl2tgba -CR -e'Cou99(shy)' -DT -X "$1"
|
||||
run 0 ../ltl2tgba -CR -eCVWY90 -X "$1"
|
||||
run 0 ../ltl2tgba -CR -eGV04 -X "$1"
|
||||
run 0 ../ltl2tgba -CR -eSE05 -X "$1"
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@
|
|||
#include "tgbaalgos/save.hh"
|
||||
#include "tgbaalgos/dotty.hh"
|
||||
#include "tgbaalgos/lbtt.hh"
|
||||
#include "tgba/tgbatba.hh"
|
||||
#include "tgba/tgbasgba.hh"
|
||||
#include "tgbaalgos/degen.hh"
|
||||
#include "tgba/tgbaproduct.hh"
|
||||
|
|
@ -190,7 +189,7 @@ syntax(char* prog)
|
|||
<< std::endl
|
||||
<< " -lS move generalized acceptance conditions to states "
|
||||
<< "(SGBA)" << std::endl
|
||||
<< " -D degeneralize the automaton as a TBA" << std::endl
|
||||
<< " -DT degeneralize the automaton as a TBA" << std::endl
|
||||
<< " -DS degeneralize the automaton as an SBA" << std::endl
|
||||
<< " (append z/Z, o/O, l/L: to turn on/off options "
|
||||
<< "(default: zol)\n "
|
||||
|
|
@ -451,15 +450,18 @@ main(int argc, char** argv)
|
|||
}
|
||||
else if (!strcmp(argv[formula_index], "-D"))
|
||||
{
|
||||
degeneralize_opt = DegenTBA;
|
||||
std::cerr << "-D was renamed to -DT\n";
|
||||
abort();
|
||||
}
|
||||
else if (!strcmp(argv[formula_index], "-DC"))
|
||||
{
|
||||
opt_dtgbacomp = true;
|
||||
}
|
||||
else if (!strncmp(argv[formula_index], "-DS", 3))
|
||||
else if (!strncmp(argv[formula_index], "-DS", 3)
|
||||
|| !strncmp(argv[formula_index], "-DT", 3))
|
||||
{
|
||||
degeneralize_opt = DegenSBA;
|
||||
degeneralize_opt =
|
||||
argv[formula_index][2] == 'S' ? DegenSBA : DegenTBA;
|
||||
const char* p = argv[formula_index] + 3;
|
||||
while (*p)
|
||||
{
|
||||
|
|
@ -1354,7 +1356,10 @@ main(int argc, char** argv)
|
|||
{
|
||||
if (degeneralize_opt == DegenTBA)
|
||||
{
|
||||
degeneralized = a = new spot::tgba_tba_proxy(a);
|
||||
degeneralized = a = spot::degeneralize_tba(a,
|
||||
degen_reset,
|
||||
degen_order,
|
||||
degen_cache);
|
||||
}
|
||||
else if (degeneralize_opt == DegenSBA)
|
||||
{
|
||||
|
|
@ -1604,7 +1609,13 @@ main(int argc, char** argv)
|
|||
degeneralize_opt = DegenTBA;
|
||||
if (degeneralize_opt == DegenTBA)
|
||||
{
|
||||
product_degeneralized = a = new spot::tgba_tba_proxy(a);
|
||||
tm.start("degeneralize product");
|
||||
product_degeneralized = a =
|
||||
spot::degeneralize_tba(a,
|
||||
degen_reset,
|
||||
degen_order,
|
||||
degen_cache);
|
||||
tm.stop("degeneralize product");
|
||||
}
|
||||
else if (degeneralize_opt == DegenSBA)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ run 0 ../ltl2tgba -e -R3 '(G!{(b;1)*;a} && ({1;1[*3]*}[]->{(b&!a)[*2];!b&!a}))'
|
|||
|
||||
# Make sure 'a U (b U c)' has 3 states and 6 transitions,
|
||||
# before and after degeneralization.
|
||||
for opt in '' -D -DS; do
|
||||
for opt in '' -DT -DS; do
|
||||
../ltl2tgba -ks -f -R3 $opt 'a U (b U c)' > stdout
|
||||
grep 'transitions: 6$' stdout
|
||||
grep 'states: 3$' stdout
|
||||
|
|
@ -127,7 +127,7 @@ done
|
|||
|
||||
# Make sure '!(Ga U b)' has 3 states and 6 transitions,
|
||||
# before and after degeneralization.
|
||||
for opt in '' -D -DS; do
|
||||
for opt in '' -DT -DS; do
|
||||
../ltl2tgba -kt -f -R3 $opt '!(Ga U b)' > stdout
|
||||
grep 'sub trans.: 11$' stdout
|
||||
grep 'transitions: 6$' stdout
|
||||
|
|
@ -136,7 +136,7 @@ done
|
|||
|
||||
# Make sure 'Ga U b' has 4 states and 6 transitions,
|
||||
# before and after degeneralization.
|
||||
for opt in '' -D -DS; do
|
||||
for opt in '' -DT -DS; do
|
||||
../ltl2tgba -kt -f -R3 $opt 'Ga U b' > stdout
|
||||
grep 'sub trans.: 12$' stdout
|
||||
grep 'transitions: 6$' stdout
|
||||
|
|
@ -146,7 +146,7 @@ done
|
|||
# Make sure '(G (p -> F q)) && ((X (p) U q) || ! X (p U (p && q)))'
|
||||
# has 6 states and 15 transitions, before and after degeneralization.
|
||||
f='(G (p -> F q)) && ((X (p) U q) || ! X (p U (p && q)))'
|
||||
for opt in '' -D -DS; do
|
||||
for opt in '' -DT -DS; do
|
||||
../ltl2tgba -ks -f -R3 $opt "$f" > stdout
|
||||
grep 'transitions: 15$' stdout
|
||||
grep 'states: 6$' stdout
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Copyright (C) 2009, 2010, 2011, 2012 Laboratoire de Recherche et
|
||||
# Développement de l'EPITA (LRDE)
|
||||
# -*- coding: utf-8 -*-
|
||||
# Copyright (C) 2009, 2010, 2011, 2012, 2014 Laboratoire de Recherche
|
||||
# et Développement de l'EPITA (LRDE)
|
||||
#
|
||||
# This file is part of Spot, a model checking library.
|
||||
#
|
||||
|
|
@ -33,7 +33,7 @@ check_formula()
|
|||
# First, check the satisfiability of the formula with Spot
|
||||
$run ../ltl2tgba -CR -e -x -f "$1" >/dev/null
|
||||
# Also check the satisfiability of the degeneralized formula
|
||||
$run ../ltl2tgba -CR -e -D -x -f "$1" >/dev/null
|
||||
$run ../ltl2tgba -CR -e -DT -x -f "$1" >/dev/null
|
||||
$run ../ltl2tgba -CR -e -DS -x -f "$1" >/dev/null
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -31,16 +31,16 @@ ltl2tgba=../ltl2tgba
|
|||
"$ltl2tgba -t -f -R3 %f > %T" \
|
||||
"$ltl2tgba -t -f -R3 -Rm %f > %T" \
|
||||
"$ltl2tgba -t -f -R3 -RM %f > %T" \
|
||||
"$ltl2tgba -t -f -D %f > %T" \
|
||||
"$ltl2tgba -t -f -D %f > %T" \
|
||||
"$ltl2tgba -t -f -DT %f > %T" \
|
||||
"$ltl2tgba -t -f -DS %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 -f -x -p -DT %f > %T" \
|
||||
"$ltl2tgba -t -f -x -p -L -DT %f > %T" \
|
||||
"$ltl2tgba -t -taa -r4 %f > %T" \
|
||||
"$ltl2tgba -t -taa -r4 -c %f > %T" \
|
||||
"$ltl2tgba -t -taa -r4 -R3 -RDS %f > %T"
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@
|
|||
#include "tgbaparse/public.hh"
|
||||
#include "misc/random.hh"
|
||||
#include "misc/optionmap.hh"
|
||||
#include "tgba/tgbatba.hh"
|
||||
#include "tgbaalgos/degen.hh"
|
||||
#include "tgba/tgbaproduct.hh"
|
||||
#include "misc/timer.hh"
|
||||
|
||||
|
|
@ -928,7 +928,7 @@ main(int argc, char** argv)
|
|||
{
|
||||
spot::tgba* degen = 0;
|
||||
if (opt_degen && real_n_acc > 1)
|
||||
degen = new spot::tgba_tba_proxy(a);
|
||||
degen = degeneralize_tba(a);
|
||||
|
||||
int n_alg = ec_algos.size();
|
||||
int n_ec = 0;
|
||||
|
|
|
|||
|
|
@ -1,9 +1,7 @@
|
|||
#!/bin/sh
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright (C) 2009, 2010, 2011, 2012, 2014 Laboratoire de Recherche
|
||||
# et Développement de l'Epita (LRDE).
|
||||
|
||||
# Copyright (C) 2003, 2004, 2005, 2006, 2007 Laboratoire
|
||||
# d'Informatique de Paris 6 (LIP6), département Systèmes Répartis
|
||||
# Coopératifs (SRC), Université Pierre et Marie Curie.
|
||||
|
|
@ -124,7 +122,7 @@ Algorithm
|
|||
{
|
||||
Name = "Spot (Couvreur -- FM), degeneralized"
|
||||
Path = "${LBTT_TRANSLATE}"
|
||||
Parameters = "--spot '../ltl2tgba -F -f -t -D'"
|
||||
Parameters = "--spot '../ltl2tgba -F -f -t -DT'"
|
||||
Enabled = yes
|
||||
}
|
||||
|
||||
|
|
@ -237,7 +235,7 @@ Algorithm
|
|||
{
|
||||
Name = "Spot (Couvreur -- FM post_branch + exprop), degeneralized"
|
||||
Path = "${LBTT_TRANSLATE}"
|
||||
Parameters = "--spot '../ltl2tgba -F -f -p -x -t -D'"
|
||||
Parameters = "--spot '../ltl2tgba -F -f -p -x -t -DT'"
|
||||
Enabled = yes
|
||||
}
|
||||
|
||||
|
|
@ -245,8 +243,8 @@ Algorithm
|
|||
{
|
||||
Name = "Spot (Couvreur -- FM post_branch + exprop + flapprox), degeneralized"
|
||||
Path = "${LBTT_TRANSLATE}"
|
||||
Parameters = "--spot '../ltl2tgba -F -f -p -x -t -L -D'"
|
||||
Enabled = yes
|
||||
Parameters = "--spot '../ltl2tgba -F -f -p -x -t -L -DT'"
|
||||
ENABLED = yes
|
||||
}
|
||||
|
||||
Algorithm
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue