Commit d0b38156 authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz
Browse files

bin: make HOA the default output

* bin/common_aoutput.cc: Make HOA the default output.
* NEWS: Mention this.
* doc/org/autfilt.org, doc/org/dstar2tgba.org, doc/org/hoa.org,
doc/org/ltl2tgba.org, doc/org/ltl2tgta.org, doc/org/ltlcross.org,
doc/org/ltldo.org, doc/org/oaut.org, doc/org/randaut.org,
doc/org/satmin.org, doc/org/tut02.org, doc/org/tut03.org,
doc/org/tut20.org, doc/org/tut21.org, doc/org/tut30.org,
tests/core/dstar.test, tests/core/ltldo2.test, tests/core/monitor.test,
tests/python/piperead.ipynb: Adjust.
parent 9d6727da
...@@ -2,6 +2,15 @@ New in spot 1.99.6a (not yet released) ...@@ -2,6 +2,15 @@ New in spot 1.99.6a (not yet released)
Command-line tools: Command-line tools:
* BACKWARD INCOMPATIBILE CHANGE: All tools that output automata now
use the HOA format by default instead of the GraphViz output.
This makes it easier to pipe several commands.
If you have an old script that relies on GraphViz being the default
output and that you do not want to update it, use
export SPOT_DEFAULT_FORMAT=dot
to get the old behavior back.
* Tools that output automata now accept -d as a shorthand for --dot. * Tools that output automata now accept -d as a shorthand for --dot.
randaut's short option for specifying edge-density used to be -d: randaut's short option for specifying edge-density used to be -d:
it has been renamed to -e. it has been renamed to -e.
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
#include <spot/twaalgos/isunamb.hh> #include <spot/twaalgos/isunamb.hh>
#include <spot/twaalgos/strength.hh> #include <spot/twaalgos/strength.hh>
automaton_format_t automaton_format = Dot; automaton_format_t automaton_format = Hoa;
static const char* automaton_format_opt = nullptr; static const char* automaton_format_opt = nullptr;
const char* opt_name = nullptr; const char* opt_name = nullptr;
static const char* opt_output = nullptr; static const char* opt_output = nullptr;
...@@ -82,7 +82,7 @@ static const argp_option options[] = ...@@ -82,7 +82,7 @@ static const argp_option options[] =
{ nullptr, 0, nullptr, 0, "Output format:", 3 }, { nullptr, 0, nullptr, 0, "Output format:", 3 },
{ "dot", 'd', "1|a|b|B|c|e|f(FONT)|h|n|N|o|r|R|s|t|v|+INT", { "dot", 'd', "1|a|b|B|c|e|f(FONT)|h|n|N|o|r|R|s|t|v|+INT",
OPTION_ARG_OPTIONAL, OPTION_ARG_OPTIONAL,
"GraphViz's format (default). Add letters for " "GraphViz's format. Add letters for "
"(1) force numbered states, " "(1) force numbered states, "
"(a) acceptance display, (b) acceptance sets as bullets, " "(a) acceptance display, (b) acceptance sets as bullets, "
"(B) bullets except for Büchi/co-Büchi automata, " "(B) bullets except for Büchi/co-Büchi automata, "
...@@ -95,7 +95,7 @@ static const argp_option options[] = ...@@ -95,7 +95,7 @@ static const argp_option options[] =
"(t) force transition-based acceptance, " "(t) force transition-based acceptance, "
"(+INT) add INT to all set numbers", 0 }, "(+INT) add INT to all set numbers", 0 },
{ "hoaf", 'H', "i|l|m|s|t|v", OPTION_ARG_OPTIONAL, { "hoaf", 'H', "i|l|m|s|t|v", OPTION_ARG_OPTIONAL,
"Output the automaton in HOA format. Add letters to select " "Output the automaton in HOA format (default). Add letters to select "
"(i) use implicit labels for complete deterministic automata, " "(i) use implicit labels for complete deterministic automata, "
"(s) prefer state-based acceptance when possible [default], " "(s) prefer state-based acceptance when possible [default], "
"(t) force transition-based acceptance, " "(t) force transition-based acceptance, "
......
...@@ -27,8 +27,9 @@ process them in batch. (The only restriction is that inside a file an ...@@ -27,8 +27,9 @@ process them in batch. (The only restriction is that inside a file an
automaton in LBTT's format may not follow an automaton in automaton in LBTT's format may not follow an automaton in
=ltl2dstar='s format.) =ltl2dstar='s format.)
The output format can be controlled using [[file:oaut.org][the common output options]] By default the output uses the HOA format. This can be changed using
(like =--spin=, =--lbtt=, =--dot=, =--hoaf=...). [[file:oaut.org][the common output options]] like =--spin=, =--lbtt=, =--dot=,
=--hoaf=...
#+BEGIN_SRC sh :results silent :exports both #+BEGIN_SRC sh :results silent :exports both
cat >example.hoa <<EOF cat >example.hoa <<EOF
...@@ -53,6 +54,7 @@ SPOT_DOTEXTRA= autfilt example.hoa --dot= ...@@ -53,6 +54,7 @@ SPOT_DOTEXTRA= autfilt example.hoa --dot=
#+RESULTS: #+RESULTS:
: digraph G { : digraph G {
: rankdir=LR : rankdir=LR
: node [shape="circle"]
: I [label="", style=invis, width=0] : I [label="", style=invis, width=0]
: I -> 0 : I -> 0
: 0 [label="0"] : 0 [label="0"]
...@@ -102,7 +104,7 @@ statistics. ...@@ -102,7 +104,7 @@ statistics.
#+BEGIN_SRC sh :results verbatim :exports both #+BEGIN_SRC sh :results verbatim :exports both
randaut --hoa -n 10 -A0..2 -Q10..20 -e0.05 2 | randaut -n 10 -A0..2 -Q10..20 -e0.05 2 |
autfilt --stats='%s states, %e edges, %a acc-sets, %c SCCs, det=%d' autfilt --stats='%s states, %e edges, %a acc-sets, %c SCCs, det=%d'
#+END_SRC #+END_SRC
...@@ -127,17 +129,20 @@ autfilt --help | sed -n '/^ %%/,/^$/p' | sed '$d' ...@@ -127,17 +129,20 @@ autfilt --help | sed -n '/^ %%/,/^$/p' | sed '$d'
#+RESULTS: #+RESULTS:
#+begin_example #+begin_example
%% a single % %% a single %
%A, %a number of acceptance pairs or sets %A, %a number of acceptance sets
%C, %c number of SCCs %C, %c number of SCCs
%d 1 if the output is deterministic, 0 otherwise %d 1 if the output is deterministic, 0 otherwise
%E, %e number of edges %E, %e number of edges
%F name of the input file %F name of the input file
%G, %g acceptance condition (in HOA syntax)
%L location in the input file
%M, %m name of the automaton
%n number of nondeterministic states in output %n number of nondeterministic states in output
%p 1 if the output is complete, 0 otherwise %p 1 if the output is complete, 0 otherwise
%r conversion time (including post-processings, but %r processing time (excluding parsing) in seconds
not parsing) in seconds
%S, %s number of states %S, %s number of states
%T, %t number of transitions %T, %t number of transitions
%w one word accepted by the output automaton
#+end_example #+end_example
When a letter is available both as uppercase and lowercase, the When a letter is available both as uppercase and lowercase, the
...@@ -166,6 +171,10 @@ autfilt --help | sed -n '/Filtering options.*:/,/^$/p' | sed '1d;$d' ...@@ -166,6 +171,10 @@ autfilt --help | sed -n '/Filtering options.*:/,/^$/p' | sed '1d;$d'
--is-complete keep complete automata --is-complete keep complete automata
--is-deterministic keep deterministic automata --is-deterministic keep deterministic automata
--is-empty keep automata with an empty language --is-empty keep automata with an empty language
--is-inherently-weak keep only inherently weak automata
--is-terminal keep only terminal automata
--is-unambiguous keep only unambiguous automata
--is-weak keep only weak automata
--states=RANGE keep automata whose number of states are in RANGE --states=RANGE keep automata whose number of states are in RANGE
-u, --unique do not output the same automaton twice (same in -u, --unique do not output the same automaton twice (same in
the sense that they are isomorphic) the sense that they are isomorphic)
...@@ -193,14 +202,14 @@ This set of options controls the desired type of output automaton: ...@@ -193,14 +202,14 @@ This set of options controls the desired type of output automaton:
autfilt --help | sed -n '/Output automaton type:/,/^$/p' | sed '1d;$d' autfilt --help | sed -n '/Output automaton type:/,/^$/p' | sed '1d;$d'
#+END_SRC #+END_SRC
#+RESULTS: #+RESULTS:
: -B, --ba Büchi Automaton (with state-based acceptance) : -B, --ba Büchi Automaton (with state-based acceptance)
: -C, --complete output a complete automaton : -C, --complete output a complete automaton
: --generic Any acceptance is allowed (default) : --generic any acceptance is allowed (default)
: -M, --monitor Monitor (accepts all finite prefixes of the given : -M, --monitor Monitor (accepts all finite prefixes of the given
: property) : property)
: -S, --state-based-acceptance, --sbacc : -S, --state-based-acceptance, --sbacc
: define the acceptance using states : define the acceptance using states
: --tgba Transition-based Generalized Büchi Automaton : --tgba Transition-based Generalized Büchi Automaton
These options specify any simplification goal: These options specify any simplification goal:
...@@ -251,6 +260,9 @@ autfilt --help | sed -n '/Transformations:/,/^$/p' | sed '1d;$d' ...@@ -251,6 +260,9 @@ autfilt --help | sed -n '/Transformations:/,/^$/p' | sed '1d;$d'
deterministic automata) deterministic automata)
--complement-acceptance complement the acceptance condition (without --complement-acceptance complement the acceptance condition (without
touching the automaton) touching the automaton)
--decompose-strength=t|w|s extract the (t) terminal, (w) weak, or (s)
strong part of an automaton (letters may be
combined to combine more strengths in the output)
--destut allow less stuttering --destut allow less stuttering
--dnf-acceptance put the acceptance condition in Disjunctive Normal --dnf-acceptance put the acceptance condition in Disjunctive Normal
Form Form
...@@ -279,8 +291,8 @@ autfilt --help | sed -n '/Transformations:/,/^$/p' | sed '1d;$d' ...@@ -279,8 +291,8 @@ autfilt --help | sed -n '/Transformations:/,/^$/p' | sed '1d;$d'
quantification, or by assigning them 0 or 1 quantification, or by assigning them 0 or 1
--remove-dead-states remove states that are unreachable, or that cannot --remove-dead-states remove states that are unreachable, or that cannot
belong to an infinite path belong to an infinite path
--remove-fin rewrite the automaton without using Fin acceptance --remove-fin rewrite the automaton without using Fin
acceptance
--remove-unreachable-states --remove-unreachable-states
remove states that are unreachable from the remove states that are unreachable from the
initial state initial state
......
...@@ -4,16 +4,21 @@ ...@@ -4,16 +4,21 @@
#+HTML_LINK_UP: tools.html #+HTML_LINK_UP: tools.html
This tool converts automata into transition-based generalized Büchi This tool converts automata into transition-based generalized Büchi
automata, a.k.a., TGBA. automata, a.k.a., TGBA. It can also produce Büchi automata on request
(=-B=). It's usage is almost similar to [[file:ltl2tgba.org][=ltl2tgba=]] except that
instead of supplying a formula to translate, you should specify a
filename containing the automaton to convert.
In earlier version (before Spot 1.99.4) =dstar2tgba= was only able to In earlier version (before Spot 1.99.4) =dstar2tgba= was only able to
read automata written in [[http://www.ltl2dstar.de/docs/ltl2dstar.html][the format output by =ltl2dstar=]], hence its read automata written in [[http://www.ltl2dstar.de/docs/ltl2dstar.html][the format output by =ltl2dstar=]]. However
name. However nowadays it can read automata in any of the supported nowadays it can read automata in any of the supported formats ([[file:hoa.org][HOA]],
formats ([[file:hoa.org][HOA]], LBTT's format, ltl2dstar's format, and never claims). LBTT's format, ltl2dstar's format, and never claims). Also
=dstar2tgba= used to be the only tool being able to read ltl2dstar's
format, but today this format can also be read by any of the tool that
read automata. So in practice, running =dstar2tgba some files...=
produces the same result as running =autfilt --tgba --high --small
some files...=.
It's usage is almost similar to [[file:ltl2tgba.org][=ltl2tgba=]] except that instead of
supplying a formula to translate, you should specify a filename
containing the automaton to convert.
* Two quick examples * Two quick examples
...@@ -127,7 +132,7 @@ For instance here is the conversion to a Büchi automaton (=-B=): ...@@ -127,7 +132,7 @@ For instance here is the conversion to a Büchi automaton (=-B=):
#+NAME: fagfb2ba #+NAME: fagfb2ba
#+BEGIN_SRC sh :results verbatim :exports code #+BEGIN_SRC sh :results verbatim :exports code
dstar2tgba -B fagfb dstar2tgba -B fagfb -d
#+END_SRC #+END_SRC
#+RESULTS: fagfb2ba #+RESULTS: fagfb2ba
#+begin_example #+begin_example
...@@ -172,18 +177,18 @@ dstar2tgba -s fagfb ...@@ -172,18 +177,18 @@ dstar2tgba -s fagfb
never { never {
T0_init: T0_init:
if if
:: ((b)) -> goto accept_S0 :: (b) -> goto accept_S0
:: ((a) && (!(b))) -> goto T0_init :: ((a) && (!(b))) -> goto T0_init
fi; fi;
accept_S0: accept_S0:
if if
:: ((b)) -> goto accept_S0 :: (b) -> goto accept_S0
:: ((!(b))) -> goto T0_S2 :: (!(b)) -> goto T0_S2
fi; fi;
T0_S2: T0_S2:
if if
:: ((b)) -> goto accept_S0 :: (b) -> goto accept_S0
:: ((!(b))) -> goto T0_S2 :: (!(b)) -> goto T0_S2
fi; fi;
} }
#+end_example #+end_example
...@@ -252,7 +257,7 @@ the default: ...@@ -252,7 +257,7 @@ the default:
#+NAME: gfagfb2ba #+NAME: gfagfb2ba
#+BEGIN_SRC sh :results verbatim :exports code #+BEGIN_SRC sh :results verbatim :exports code
dstar2tgba gfagfb dstar2tgba gfagfb -d
#+END_SRC #+END_SRC
#+RESULTS: gfagfb2ba #+RESULTS: gfagfb2ba
#+begin_example #+begin_example
...@@ -309,9 +314,10 @@ The =dstar2tgba= tool implements a 4-step process: ...@@ -309,9 +314,10 @@ The =dstar2tgba= tool implements a 4-step process:
3. postprocess the resulting TGBA (simplifying the automaton, a degeneralizing it into a BA or Monitor if requested) 3. postprocess the resulting TGBA (simplifying the automaton, a degeneralizing it into a BA or Monitor if requested)
4. output the resulting automaton 4. output the resulting automaton
BTW, the above scenario is also exactly what you can with [[file:autfilt.org][=autfilt=]] if BTW, the above scenario is also exactly what you get with [[file:autfilt.org][=autfilt=]] if
you run it as =autfilt --tgba --high --small=. (This is true only since version you run it as =autfilt --tgba --high --small=. (This is true only
1.99.4, since both tools can now read the same file formats.) since version 1.99.4, since both tools can now read the same file
formats.)
** Controlling output ** Controlling output
...@@ -324,13 +330,13 @@ dstar2tgba --help | sed -n '/Output automaton type:/,/^$/p' | sed '1d;$d' ...@@ -324,13 +330,13 @@ dstar2tgba --help | sed -n '/Output automaton type:/,/^$/p' | sed '1d;$d'
#+END_SRC #+END_SRC
#+RESULTS: #+RESULTS:
: -B, --ba Büchi Automaton (implies -S) : -B, --ba Büchi Automaton (implies -S)
: -C, --complete output a complete automaton : -C, --complete output a complete automaton
: -M, --monitor Monitor (accepts all finite prefixes of the given : -M, --monitor Monitor (accepts all finite prefixes of the given
: property) : property)
: -S, --state-based-acceptance, --sbacc : -S, --state-based-acceptance, --sbacc
: define the acceptance using states : define the acceptance using states
: --tgba Transition-based Generalized Büchi Automaton : --tgba Transition-based Generalized Büchi Automaton
: (default) : (default)
And these may be refined by a simplification goal, should the And these may be refined by a simplification goal, should the
...@@ -370,10 +376,11 @@ dstar2tgba --help | sed -n '/Output format:/,/^$/p' | sed '1d;$d' ...@@ -370,10 +376,11 @@ dstar2tgba --help | sed -n '/Output format:/,/^$/p' | sed '1d;$d'
--check[=PROP] test for the additional property PROP and output --check[=PROP] test for the additional property PROP and output
the result in the HOA format (implies -H). PROP the result in the HOA format (implies -H). PROP
may be any prefix of 'all' (default), may be any prefix of 'all' (default),
'unambiguous', or 'stutter-invariant'. 'unambiguous', 'stutter-invariant', or 'strength'.
--dot[=1|a|b|B|c|e|f(FONT)|h|n|N|o|r|R|s|t|v]
GraphViz's format (default). Add letters for (1) -d, --dot[=1|a|b|B|c|e|f(FONT)|h|n|N|o|r|R|s|t|v|+INT]
force numbered states, (a) acceptance display, (b) GraphViz's format. Add letters for (1) force
numbered states, (a) acceptance display, (b)
acceptance sets as bullets, (B) bullets except for acceptance sets as bullets, (B) bullets except for
Büchi/co-Büchi automata, (c) force circular Büchi/co-Büchi automata, (c) force circular
nodes, (e) force elliptic nodes, (f(FONT)) use nodes, (e) force elliptic nodes, (f(FONT)) use
...@@ -381,14 +388,16 @@ dstar2tgba --help | sed -n '/Output format:/,/^$/p' | sed '1d;$d' ...@@ -381,14 +388,16 @@ dstar2tgba --help | sed -n '/Output format:/,/^$/p' | sed '1d;$d'
(n) with name, (N) without name, (o) ordered (n) with name, (N) without name, (o) ordered
transitions, (r) rainbow colors for acceptance transitions, (r) rainbow colors for acceptance
sets, (R) color acceptance sets by Inf/Fin, (s) sets, (R) color acceptance sets by Inf/Fin, (s)
with SCCs, (t) force transition-based acceptance. with SCCs, (t) force transition-based acceptance,
-H, --hoaf[=i|s|t|m|l] Output the automaton in HOA format. Add letters (+INT) add INT to all set numbers
to select (i) use implicit labels for complete -H, --hoaf[=i|l|m|s|t|v] Output the automaton in HOA format (default). Add
deterministic automata, (s) prefer state-based letters to select (i) use implicit labels for
acceptance when possible [default], (t) force complete deterministic automata, (s) prefer
transition-based acceptance, (m) mix state and state-based acceptance when possible [default],
transition-based acceptance, (l) single-line (t) force transition-based acceptance, (m) mix
output state and transition-based acceptance, (k) use
state labels when possible, (l) single-line
output, (v) verbose properties
--lbtt[=t] LBTT's format (add =t to force transition-based --lbtt[=t] LBTT's format (add =t to force transition-based
acceptance even on Büchi automata) acceptance even on Büchi automata)
--name=FORMAT set the name of the output automaton --name=FORMAT set the name of the output automaton
......
...@@ -33,7 +33,7 @@ When an HOA file is loaded by Spot, it is stored into the ...@@ -33,7 +33,7 @@ When an HOA file is loaded by Spot, it is stored into the
data-structure used by Spot to represent ω-Automata. This structure data-structure used by Spot to represent ω-Automata. This structure
is called Transition-based ω-Automaton, henceforth abbreviated TωA. is called Transition-based ω-Automaton, henceforth abbreviated TωA.
Such a TωA can be saved back as an HOA file. If you run a command Such a TωA can be saved back as an HOA file. If you run a command
such as =autfilt -H input.hoa >output.hoa= this is exactly what such as =autfilt input.hoa >output.hoa= this is exactly what
happens: the file =input.hoa= is parsed to create a TωA, and this TωA happens: the file =input.hoa= is parsed to create a TωA, and this TωA
is then printed in the HOA format into =output.hoa=. is then printed in the HOA format into =output.hoa=.
...@@ -221,7 +221,7 @@ State: 2 ...@@ -221,7 +221,7 @@ State: 2
[0] 2 {0 1} [0] 2 {0 1}
--END-- --END--
EOF_HOA EOF_HOA
autfilt -H sba.hoa autfilt sba.hoa
#+END_SRC #+END_SRC
so the HOA output of =autfilt= automatically uses state-based acceptance: so the HOA output of =autfilt= automatically uses state-based acceptance:
...@@ -432,7 +432,7 @@ Rabin pair, and reordering the remaining pair to fit the syntax ...@@ -432,7 +432,7 @@ Rabin pair, and reordering the remaining pair to fit the syntax
corresponding to =Rabin 1=. corresponding to =Rabin 1=.
#+BEGIN_SRC sh :results verbatim :exports both :wrap SRC hoa #+BEGIN_SRC sh :results verbatim :exports both :wrap SRC hoa
autfilt -H <<EOF autfilt <<EOF
HOA: v1 HOA: v1
States: 3 States: 3
Start: 0 Start: 0
...@@ -499,7 +499,7 @@ actually spot the terms that have been grouped together internally by ...@@ -499,7 +499,7 @@ actually spot the terms that have been grouped together internally by
looking at the spacing around operators =&= and =|=. For instance: looking at the spacing around operators =&= and =|=. For instance:
#+BEGIN_SRC sh :results verbatim :exports both :wrap SRC hoa #+BEGIN_SRC sh :results verbatim :exports both :wrap SRC hoa
randaut -A"Fin(0)|Fin(1)|Fin(2)&Fin(3)&Inf(4)&Inf(5)" -H 0 | grep Acceptance: randaut -A"Fin(0)|Fin(1)|Fin(2)&Fin(3)&Inf(4)&Inf(5)" 0 | grep Acceptance:
#+END_SRC #+END_SRC
#+RESULTS: #+RESULTS:
...@@ -708,7 +708,7 @@ State: 2 "so am I" ...@@ -708,7 +708,7 @@ State: 2 "so am I"
[0] 2 {0 1} [0] 2 {0 1}
--END-- --END--
EOF EOF
autfilt -H hw.hoa autfilt hw.hoa
#+END_SRC #+END_SRC
#+RESULTS: hello-world #+RESULTS: hello-world
...@@ -747,7 +747,7 @@ Here is for instance the result when =autfilt= is instructed to ...@@ -747,7 +747,7 @@ Here is for instance the result when =autfilt= is instructed to
simplify the automaton: simplify the automaton:
#+BEGIN_SRC sh :results verbatim :exports both :wrap SRC hoa #+BEGIN_SRC sh :results verbatim :exports both :wrap SRC hoa
autfilt -H --small hw.hoa autfilt --small hw.hoa
#+END_SRC #+END_SRC
#+RESULTS: #+RESULTS:
...@@ -780,7 +780,7 @@ construct the new name by simply copying the one of the original ...@@ -780,7 +780,7 @@ construct the new name by simply copying the one of the original
automaton. automaton.
#+BEGIN_SRC sh :results verbatim :exports both :wrap SRC hoa #+BEGIN_SRC sh :results verbatim :exports both :wrap SRC hoa
autfilt -H --small hw.hoa --name=%M autfilt --small hw.hoa --name=%M
#+END_SRC #+END_SRC
#+RESULTS: #+RESULTS:
...@@ -825,7 +825,7 @@ randomize the order of their transitions and states before printing ...@@ -825,7 +825,7 @@ randomize the order of their transitions and states before printing
them in HOA format. them in HOA format.
#+BEGIN_SRC sh :results verbatim :exports both :wrap SRC hoa #+BEGIN_SRC sh :results verbatim :exports both :wrap SRC hoa
genltl --and-gf=1..3 | ltl2tgba -B -F- -H | autfilt --randomize -H genltl --and-gf=1..3 | ltl2tgba -B -F- | autfilt --randomize
#+END_SRC #+END_SRC
#+RESULTS: #+RESULTS:
......
...@@ -14,25 +14,29 @@ option. ...@@ -14,25 +14,29 @@ option.
Formulas to translate may be specified using [[file:ioltl.org][common input options for Formulas to translate may be specified using [[file:ioltl.org][common input options for
LTL/PSL formulas]]. LTL/PSL formulas]].
#+BEGIN_SRC sh :results verbatim :exports code #+BEGIN_SRC sh :results verbatim :exports both
ltl2tgba -f 'Fa & GFb' ltl2tgba -f 'Fa & GFb'
#+END_SRC #+END_SRC
#+BEGIN_SRC sh :results verbatim :exports results
SPOT_DOTEXTRA= ltl2tgba -f 'Fa & GFb' --dot=
#+END_SRC
#+RESULTS: #+RESULTS:
#+begin_example #+begin_example
digraph G { HOA: v1
rankdir=LR name: "Fa & GFb"
I [label="", style=invis, width=0] States: 2
I -> 1 Start: 1
0 [label="0"] AP: 2 "a" "b"
0 -> 0 [label="b\n{0}"] acc-name: Buchi
0 -> 0 [label="!b"] Acceptance: 1 Inf(0)
1 [label="1"] properties: trans-labels explicit-labels trans-acc complete
1 -> 0 [label="a"] properties: deterministic stutter-invariant
1 -> 1 [label="!a"] --BODY--
} State: 0
[1] 0 {0}
[!1] 0
State: 1
[0] 0
[!0] 1
--END--
#+end_example #+end_example
Actually, because =ltl2tgba= is often used with a single formula Actually, because =ltl2tgba= is often used with a single formula
...@@ -42,11 +46,14 @@ assumed to be a formula to translate (this differs from [[file:ltlfilt.org][=ltl ...@@ -42,11 +46,14 @@ assumed to be a formula to translate (this differs from [[file:ltlfilt.org][=ltl
where such parameters are assumed to be filenames). where such parameters are assumed to be filenames).
=ltl2tgba= honors the [[file:oaut.org][common options for selecting the output format]]. =ltl2tgba= honors the [[file:oaut.org][common options for selecting the output format]].
The default output format, as shown above, is [[http://www.graphviz.org/][GraphViz]]'s format. This The default output format, as shown above, is the [[file:hoa.org][HOA]] format, as this
can converted into a picture, or into vectorial format using =dot= or can easily be piped to other tools.
=dotty=. Typically, you could get a =pdf= of this TGBA using
To convert the automaton into a picture, or into vectorial format, use
=--dot= or =-d= to request [[http://www.graphviz.org/][GraphViz output]] and process the result with
=dot= or =dotty=. Typically, you could get a =pdf= of this TGBA using
#+BEGIN_SRC sh :results verbatim :exports code #+BEGIN_SRC sh :results verbatim :exports code
ltl2tgba "Fa & GFb" | dot -Tpdf > tgba.pdf ltl2tgba "Fa & GFb" -d | dot -Tpdf > tgba.pdf
#+END_SRC #+END_SRC
#+RESULTS: #+RESULTS:
...@@ -55,12 +62,13 @@ we use some [[file:oaut.org][environment variables]] to produce a more colorful ...@@ -55,12 +62,13 @@ we use some [[file:oaut.org][environment variables]] to produce a more colorful
output by default) output by default)
#+NAME: dotex #+NAME: dotex
#+BEGIN_SRC sh :results verbatim :exports none #+BEGIN_SRC sh :results verbatim :exports none
ltl2tgba "Fa & GFb" ltl2tgba "Fa & GFb" -d
#+END_SRC #+END_SRC
#+RESULTS: dotex #+RESULTS: dotex
#+begin_example #+begin_example
digraph G { digraph G {
rankdir=LR rankdir=LR
node [shape="circle"]
fontname="Lato" fontname="Lato"
node [fontname="Lato"] node [fontname="Lato"]
edge [fontname="Lato"] edge [fontname="Lato"]
...@@ -99,7 +107,7 @@ Here is a TGBA with multiple acceptance sets (we omit the call to ...@@ -99,7 +107,7 @@ Here is a TGBA with multiple acceptance sets (we omit the call to
#+NAME: dotex2 #+NAME: dotex2
#+BEGIN_SRC sh :results verbatim :exports code #+BEGIN_SRC sh :results verbatim :exports code
ltl2tgba "GFa & GFb" ltl2tgba "GFa & GFb" -d
#+END_SRC #+END_SRC
#+RESULTS: dotex2 #+RESULTS: dotex2
#+begin_example #+begin_example
...@@ -134,7 +142,7 @@ A Büchi automaton for the previous formula can be obtained with the ...@@ -134,7 +142,7 @@ A Büchi automaton for the previous formula can be obtained with the
#+NAME: dotex2ba #+NAME: dotex2ba
#+BEGIN_SRC sh :results verbatim :exports code #+BEGIN_SRC sh :results verbatim :exports code
ltl2tgba -B 'GFa & GFb' ltl2tgba -B 'GFa & GFb' -d
#+END_SRC #+END_SRC
#+RESULTS: dotex2ba #+RESULTS: dotex2ba
#+begin_example #+begin_example
...@@ -220,7 +228,7 @@ as above, for comparison. ...@@ -220,7 +228,7 @@ as above, for comparison.
#+NAME: dotex2gba #+NAME: dotex2gba
#+BEGIN_SRC sh :results verbatim :exports code #+BEGIN_SRC sh :results verbatim :exports code
ltl2tgba -S 'GFa & GFb' ltl2tgba -S 'GFa & GFb' -d
#+END_SRC #+END_SRC
#+RESULTS: dotex2gba #+RESULTS: dotex2gba
...@@ -282,27 +290,30 @@ ltl2tgba --help | sed -n '/Output format:/,/^$/p' | sed '1d;$d' ...@@ -282,27 +290,30 @@ ltl2tgba --help | sed -n '/Output format:/,/^$/p' | sed '1d;$d'
--check[=PROP] test for the additional property PROP and output --check[=PROP] test for the additional property PROP and output
the result in the HOA format (implies -H). PROP the result in the HOA format (implies -H). PROP
may be any prefix of 'all' (default), may be any prefix of 'all' (default),
'unambiguous', or 'stutter-invariant'. 'unambiguous', 'stutter-invariant', or
--dot[=1|a|b|B|c|e|f(FONT)|h|n|N|o|r|R|s|t|v] 'strength'.
GraphViz's format (default). Add letters for (1) -d, --dot[=1|a|b|B|c|e|f(FONT)|h|n|N|o|r|R|s|t|v|+INT]
force numbered states, (a) acceptance display, (b) GraphViz's format. Add letters for (1) force
numbered states, (a) acceptance display, (b)
acceptance sets as bullets, (B) bullets except for acceptance sets as bullets, (B) bullets except for
Büchi/co-Büchi automata, (c) force circular Büchi/co-Büchi automata, (c) force circular