tgbaexplicit: speed up merge_transitions()
* src/tgba/tgbaexplicit.hh (merge_transitions): Use a hash table to merge compatible transitions. * src/tgbatest/readsave.test: Add a test case.
This commit is contained in:
parent
0bdfd9c72c
commit
31fb3d9d15
2 changed files with 60 additions and 19 deletions
|
|
@ -1,5 +1,5 @@
|
|||
#!/bin/sh
|
||||
# Copyright (C) 2009, 2010 Laboratoire de Recherche et Développement
|
||||
# Copyright (C) 2009, 2010, 2012 Laboratoire de Recherche et Développement
|
||||
# de l'Epita (LRDE).
|
||||
# Copyright (C) 2003, 2004 Laboratoire d'Informatique de Paris 6 (LIP6),
|
||||
# département Systèmes Répartis Coopératifs (SRC), Université Pierre
|
||||
|
|
@ -58,6 +58,27 @@ diff input stdout
|
|||
|
||||
rm -f input stdout expected
|
||||
|
||||
# Transition merging
|
||||
cat >input <<\EOF
|
||||
acc = c;
|
||||
s1, s2, "a&!b", c;
|
||||
s1, s2, "b&a", c;
|
||||
s1, s2, "!b", ;
|
||||
s2, s1, "!b", ;
|
||||
s2, s1, "a&!b", c;
|
||||
s2, s1, "b&a", c;
|
||||
EOF
|
||||
|
||||
cat >expected <<\EOF
|
||||
acc = "c";
|
||||
"s1", "s2", "a", "c";
|
||||
"s1", "s2", "!b",;
|
||||
"s2", "s1", "!b",;
|
||||
"s2", "s1", "a", "c";
|
||||
EOF
|
||||
|
||||
run 0 ../ltl2tgba -b -X input > stdout
|
||||
diff stdout expected
|
||||
|
||||
# Likewise, with a randomly generated TGBA.
|
||||
run 0 ../randtgba -t 1 -n 20 -d 0.2 a b -a 2 0.1 >input
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue