This is a huge patch, that took over a month to complete. The bit sets are currently restricted to what 'unsigned can store', but it should be easy to extend it to 'uint64_t' should we need it. * NEWS: Update. * src/tgba/acc.hh: New file. * src/tgbatest/acc.cc, src/tgbatest/acc.test: Test it. * src/tgba/tgbakvcomplement.cc, src/tgba/tgbakvcomplement.hh, src/tgba/tgbasgba.cc, src/tgba/tgbasgba.hh: Delete. The KV complementation is too slow to be used in practice, and I somehow broke it during the conversion to bitsets. The tgba->sgba conversion was only used for the KV complementation, and should be better redone on tgba_digraph_ptr should it be needed again. * src/bin/ltlcross.cc, src/dstarparse/dra2ba.cc, src/dstarparse/nsa2tgba.cc, src/graphtest/tgbagraph.cc, src/graphtest/tgbagraph.test, src/kripke/fairkripke.cc, src/kripke/fairkripke.hh, src/kripke/kripke.cc, src/kripke/kripke.hh, src/kripke/kripkeexplicit.cc, src/kripke/kripkeexplicit.hh, src/misc/hash.hh, src/neverparse/neverclaimparse.yy, src/priv/accmap.hh, src/ta/ta.cc, src/ta/ta.hh, src/ta/taexplicit.cc, src/ta/taexplicit.hh, src/ta/taproduct.cc, src/ta/taproduct.hh, src/ta/tgta.cc, src/ta/tgta.hh, src/ta/tgtaexplicit.cc, src/ta/tgtaexplicit.hh, src/ta/tgtaproduct.cc, src/ta/tgtaproduct.hh, src/taalgos/dotty.cc, src/taalgos/emptinessta.cc, src/taalgos/minimize.cc, src/taalgos/tgba2ta.cc, src/tgba/Makefile.am, src/tgba/fwd.hh, src/tgba/taatgba.cc, src/tgba/taatgba.hh, src/tgba/tgba.cc, src/tgba/tgba.hh, src/tgba/tgbagraph.cc, src/tgba/tgbagraph.hh, src/tgba/tgbamask.cc, src/tgba/tgbamask.hh, src/tgba/tgbaproduct.cc, src/tgba/tgbaproduct.hh, src/tgba/tgbaproxy.cc, src/tgba/tgbaproxy.hh, src/tgba/tgbasafracomplement.cc, src/tgba/tgbasafracomplement.hh, src/tgbaalgos/bfssteps.cc, src/tgbaalgos/complete.cc, src/tgbaalgos/compsusp.cc, src/tgbaalgos/degen.cc, src/tgbaalgos/dotty.cc, src/tgbaalgos/dtbasat.cc, src/tgbaalgos/dtgbacomp.cc, src/tgbaalgos/dtgbasat.cc, src/tgbaalgos/dupexp.cc, src/tgbaalgos/emptiness.cc, src/tgbaalgos/emptiness.hh, src/tgbaalgos/gtec/ce.cc, src/tgbaalgos/gtec/gtec.cc, src/tgbaalgos/gtec/gtec.hh, src/tgbaalgos/gtec/sccstack.cc, src/tgbaalgos/gtec/sccstack.hh, src/tgbaalgos/gv04.cc, src/tgbaalgos/hoaf.cc, src/tgbaalgos/isweakscc.cc, src/tgbaalgos/lbtt.cc, src/tgbaalgos/ltl2tgba_fm.cc, src/tgbaalgos/magic.cc, src/tgbaalgos/ndfs_result.hxx, src/tgbaalgos/neverclaim.cc, src/tgbaalgos/postproc.cc, src/tgbaalgos/powerset.cc, src/tgbaalgos/randomgraph.cc, src/tgbaalgos/randomgraph.hh, src/tgbaalgos/reducerun.cc, src/tgbaalgos/replayrun.cc, src/tgbaalgos/safety.cc, src/tgbaalgos/save.cc, src/tgbaalgos/scc.cc, src/tgbaalgos/scc.hh, src/tgbaalgos/sccfilter.cc, src/tgbaalgos/sccinfo.cc, src/tgbaalgos/sccinfo.hh, src/tgbaalgos/se05.cc, src/tgbaalgos/simulation.cc, src/tgbaalgos/simulation.hh, src/tgbaalgos/stats.cc, src/tgbaalgos/stripacc.cc, src/tgbaalgos/tau03.cc, src/tgbaalgos/tau03opt.cc, src/tgbaalgos/weight.cc, src/tgbaalgos/weight.hh, src/tgbaparse/tgbaparse.yy, src/tgbatest/Makefile.am, src/tgbatest/complementation.cc, src/tgbatest/complementation.test, src/tgbatest/degenlskip.test, src/tgbatest/det.test, src/tgbatest/dstar.test, src/tgbatest/emptchk.cc, src/tgbatest/explpro2.test, src/tgbatest/explpro3.test, src/tgbatest/explpro4.test, src/tgbatest/explprod.test, src/tgbatest/ltl2tgba.cc, src/tgbatest/ltl2tgba.test, src/tgbatest/maskacc.cc, src/tgbatest/maskacc.test, src/tgbatest/neverclaimread.test, src/tgbatest/randtgba.cc, src/tgbatest/readsave.test, src/tgbatest/sim.test, src/tgbatest/sim2.test, src/tgbatest/spotlbtt.test, src/tgbatest/tgbaread.test, src/tgbatest/tripprod.test, iface/dve2/dve2.cc: Adjust or use to the new acceptance interface.
112 lines
2.5 KiB
Bash
Executable file
112 lines
2.5 KiB
Bash
Executable file
#!/bin/sh
|
|
# -*- coding: utf-8 -*-
|
|
# Copyright (C) 2013, 2014 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 <http://www.gnu.org/licenses/>.
|
|
|
|
. ./defs
|
|
set -e
|
|
|
|
ltl2tgba=../../bin/ltl2tgba
|
|
|
|
cat >formulas <<'EOF'
|
|
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,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,11,(Fa W b) R (!a | Fc)
|
|
1,7,X(G(!a M !b) | G(a | G!a))
|
|
1,2,Fa W Gb
|
|
1,3,Ga | GFb
|
|
1,9,G((G!a & ((!b & X!c) | (b & Xc))) | (Fa & ((!b & Xc) | (b & X!c))))
|
|
1,5,a M G(F!b | X!a)
|
|
1,4,G!a R XFb
|
|
1,4,XF(!a | GFb)
|
|
1,6,G(F!a U !a) U Xa
|
|
1,5,(a | G(a M !b)) W Fc
|
|
1,6,Fa W Xb
|
|
1,10,X(a R ((!b & F!c) M X!a))
|
|
1,2,XG!a R Fb
|
|
1,4,GFc | (a & Fb)
|
|
1,6,X(a R (Fb R F!b))
|
|
1,2,G(Xa M Fa)
|
|
1,4,X(Gb | GFa)
|
|
1,9,X(Gc | XG((b & Ga) | (!b & F!a)))
|
|
1,2,Ga R Fb
|
|
1,3,G(a U (b | X((!a & !c) | (a & c))))
|
|
1,5,XG((G!a & F!b) | (Fa & (a | Gb)))
|
|
1,10,(a U X!a) | XG(!b & XFc)
|
|
1,4,X(G!a | GFa)
|
|
1,4,G(G!a | F!c | G!b)
|
|
EOF
|
|
|
|
$ltl2tgba -x tba-det --det --stats '%d,%s,%f' -F formulas/3 > out
|
|
diff formulas out
|
|
|
|
cat >in.tgba <<'EOF'
|
|
acc = "1";
|
|
"1", "2", "a", "1";
|
|
"1", "1", "!a",;
|
|
"2", "3", "a", "1";
|
|
"2", "1", "!a",;
|
|
"3", "3", "a",;
|
|
"3", "1", "!a",;
|
|
EOF
|
|
|
|
# FIXME: we should improve this output
|
|
cat >ex.tgba <<'EOF'
|
|
acc = "0";
|
|
"0", "1", "a",;
|
|
"0", "0", "!a",;
|
|
"0", "3", "!a",;
|
|
"1", "2", "a",;
|
|
"1", "0", "!a",;
|
|
"1", "3", "!a",;
|
|
"3", "3", "!a", "0";
|
|
"2", "2", "a",;
|
|
"2", "0", "!a",;
|
|
"2", "5", "a",;
|
|
"2", "3", "!a",;
|
|
"5", "5", "a", "0";
|
|
"5", "3", "!a", "0";
|
|
EOF
|
|
|
|
|
|
run 0 ../ltl2tgba -b -DC -X in.tgba > out.tgba
|
|
diff out.tgba ex.tgba
|
|
|
|
|
|
run 0 ../ltl2tgba -x -DC 'GFa & XGFb' > out.tgba
|
|
cat >ex.tgba <<EOF
|
|
digraph G {
|
|
0 [label="", style=invis, height=0]
|
|
0 -> 1
|
|
1 [label="0"]
|
|
1 -> 2 [label="1"]
|
|
2 [label="1"]
|
|
2 -> 2 [label="1"]
|
|
2 -> 3 [label="!a"]
|
|
2 -> 4 [label="!b"]
|
|
3 [label="3"]
|
|
3 -> 3 [label="!a\n{0}"]
|
|
4 [label="5"]
|
|
4 -> 4 [label="!b\n{0}"]
|
|
}
|
|
EOF
|
|
diff out.tgba ex.tgba
|