graph: store the source indices in the transition vector
... and use it to sort transitions. * src/graph/graph.hh: Adjust storage of source index. Provide remove_dead_transitions_(), sort_transitions_() and chain_transitions_() methods. * src/tgba/tgbagraph.cc (merge_transitions): Rewrite using above methods. * src/tgba/tgbagraph.hh: Add a comparison operator for transitions. * src/tgbatest/degenlskip.test, src/tgbatest/det.test, src/tgbatest/ltl2ta.test, src/tgbatest/neverclaimread.test, src/tgbatest/readsave.test: Adjust expected transition order in test cases.
This commit is contained in:
parent
80ce0e2129
commit
0db0eca14e
8 changed files with 201 additions and 80 deletions
|
|
@ -72,23 +72,24 @@ EOF
|
|||
# FIXME: we should improve this output
|
||||
cat >ex.tgba <<'EOF'
|
||||
acc = "0";
|
||||
"0", "1", "a",;
|
||||
"0", "0", "!a",;
|
||||
"0", "1", "a",;
|
||||
"0", "3", "!a",;
|
||||
"1", "2", "a",;
|
||||
"1", "0", "!a",;
|
||||
"1", "2", "a",;
|
||||
"1", "3", "!a",;
|
||||
"3", "3", "!a", "0";
|
||||
"2", "2", "a",;
|
||||
"2", "0", "!a",;
|
||||
"2", "5", "a",;
|
||||
"2", "2", "a",;
|
||||
"2", "3", "!a",;
|
||||
"5", "5", "a", "0";
|
||||
"2", "5", "a",;
|
||||
"5", "3", "!a", "0";
|
||||
"5", "5", "a", "0";
|
||||
EOF
|
||||
|
||||
|
||||
run 0 ../ltl2tgba -b -DC -X in.tgba > out.tgba
|
||||
# FIXME: use are-isomorphic once it is available
|
||||
diff out.tgba ex.tgba
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue