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

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)
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.
randaut's short option for specifying edge-density used to be -d:
it has been renamed to -e.
......
......@@ -35,7 +35,7 @@
#include <spot/twaalgos/isunamb.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;
const char* opt_name = nullptr;
static const char* opt_output = nullptr;
......@@ -82,7 +82,7 @@ static const argp_option options[] =
{ 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",
OPTION_ARG_OPTIONAL,
"GraphViz's format (default). Add letters for "
"GraphViz's format. Add letters for "
"(1) force numbered states, "
"(a) acceptance display, (b) acceptance sets as bullets, "
"(B) bullets except for Büchi/co-Büchi automata, "
......@@ -95,7 +95,7 @@ static const argp_option options[] =
"(t) force transition-based acceptance, "
"(+INT) add INT to all set numbers", 0 },
{ "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, "
"(s) prefer state-based acceptance when possible [default], "
"(t) force transition-based acceptance, "
......
......@@ -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
=ltl2dstar='s format.)
The output format can be controlled using [[file:oaut.org][the common output options]]
(like =--spin=, =--lbtt=, =--dot=, =--hoaf=...).
By default the output uses the HOA format. This can be changed using
[[file:oaut.org][the common output options]] like =--spin=, =--lbtt=, =--dot=,
=--hoaf=...
#+BEGIN_SRC sh :results silent :exports both
cat >example.hoa <<EOF
......@@ -53,6 +54,7 @@ SPOT_DOTEXTRA= autfilt example.hoa --dot=
#+RESULTS:
: digraph G {
: rankdir=LR
: node [shape="circle"]
: I [label="", style=invis, width=0]
: I -> 0
: 0 [label="0"]
......@@ -102,7 +104,7 @@ statistics.
#+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'
#+END_SRC
......@@ -127,17 +129,20 @@ autfilt --help | sed -n '/^ %%/,/^$/p' | sed '$d'
#+RESULTS:
#+begin_example
%% a single %
%A, %a number of acceptance pairs or sets
%A, %a number of acceptance sets
%C, %c number of SCCs
%d 1 if the output is deterministic, 0 otherwise
%E, %e number of edges
%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
%p 1 if the output is complete, 0 otherwise
%r conversion time (including post-processings, but
not parsing) in seconds
%r processing time (excluding parsing) in seconds
%S, %s number of states
%T, %t number of transitions
%w one word accepted by the output automaton
#+end_example
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'
--is-complete keep complete automata
--is-deterministic keep deterministic automata
--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
-u, --unique do not output the same automaton twice (same in
the sense that they are isomorphic)
......@@ -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'
#+END_SRC
#+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
: --generic Any acceptance is allowed (default)
: --generic any acceptance is allowed (default)
: -M, --monitor Monitor (accepts all finite prefixes of the given
: property)
: -S, --state-based-acceptance, --sbacc
: 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:
......@@ -251,6 +260,9 @@ autfilt --help | sed -n '/Transformations:/,/^$/p' | sed '1d;$d'
deterministic automata)
--complement-acceptance complement the acceptance condition (without
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
--dnf-acceptance put the acceptance condition in Disjunctive Normal
Form
......@@ -279,8 +291,8 @@ autfilt --help | sed -n '/Transformations:/,/^$/p' | sed '1d;$d'
quantification, or by assigning them 0 or 1
--remove-dead-states remove states that are unreachable, or that cannot
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 states that are unreachable from the
initial state
......
......@@ -4,16 +4,21 @@
#+HTML_LINK_UP: tools.html
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
read automata written in [[http://www.ltl2dstar.de/docs/ltl2dstar.html][the format output by =ltl2dstar=]], hence its
name. However nowadays it can read automata in any of the supported
formats ([[file:hoa.org][HOA]], LBTT's format, ltl2dstar's format, and never claims).
read automata written in [[http://www.ltl2dstar.de/docs/ltl2dstar.html][the format output by =ltl2dstar=]]. However
nowadays it can read automata in any of the supported formats ([[file:hoa.org][HOA]],
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
......@@ -127,7 +132,7 @@ For instance here is the conversion to a Büchi automaton (=-B=):
#+NAME: fagfb2ba
#+BEGIN_SRC sh :results verbatim :exports code
dstar2tgba -B fagfb
dstar2tgba -B fagfb -d
#+END_SRC
#+RESULTS: fagfb2ba
#+begin_example
......@@ -172,18 +177,18 @@ dstar2tgba -s fagfb
never {
T0_init:
if
:: ((b)) -> goto accept_S0
:: (b) -> goto accept_S0
:: ((a) && (!(b))) -> goto T0_init
fi;
accept_S0:
if
:: ((b)) -> goto accept_S0
:: ((!(b))) -> goto T0_S2
:: (b) -> goto accept_S0
:: (!(b)) -> goto T0_S2
fi;
T0_S2:
if
:: ((b)) -> goto accept_S0
:: ((!(b))) -> goto T0_S2
:: (b) -> goto accept_S0
:: (!(b)) -> goto T0_S2
fi;
}
#+end_example
......@@ -252,7 +257,7 @@ the default:
#+NAME: gfagfb2ba
#+BEGIN_SRC sh :results verbatim :exports code
dstar2tgba gfagfb
dstar2tgba gfagfb -d
#+END_SRC
#+RESULTS: gfagfb2ba
#+begin_example
......@@ -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)
4. output the resulting automaton
BTW, the above scenario is also exactly what you can with [[file:autfilt.org][=autfilt=]] if
you run it as =autfilt --tgba --high --small=. (This is true only since version
1.99.4, since both tools can now read the same file formats.)
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 1.99.4, since both tools can now read the same file
formats.)
** Controlling output
......@@ -324,13 +330,13 @@ dstar2tgba --help | sed -n '/Output automaton type:/,/^$/p' | sed '1d;$d'
#+END_SRC
#+RESULTS:
: -B, --ba Büchi Automaton (implies -S)
: -B, --ba Büchi Automaton (implies -S)
: -C, --complete output a complete automaton
: -M, --monitor Monitor (accepts all finite prefixes of the given
: property)
: -S, --state-based-acceptance, --sbacc
: define the acceptance using states
: --tgba Transition-based Generalized Büchi Automaton
: --tgba Transition-based Generalized Büchi Automaton
: (default)
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'
--check[=PROP] test for the additional property PROP and output
the result in the HOA format (implies -H). PROP
may be any prefix of 'all' (default),
'unambiguous', or 'stutter-invariant'.
--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)
force numbered states, (a) acceptance display, (b)
'unambiguous', 'stutter-invariant', or 'strength'.
-d, --dot[=1|a|b|B|c|e|f(FONT)|h|n|N|o|r|R|s|t|v|+INT]
GraphViz's format. Add letters for (1) force
numbered states, (a) acceptance display, (b)
acceptance sets as bullets, (B) bullets except for
Büchi/co-Büchi automata, (c) force circular
nodes, (e) force elliptic nodes, (f(FONT)) use
......@@ -381,14 +388,16 @@ dstar2tgba --help | sed -n '/Output format:/,/^$/p' | sed '1d;$d'
(n) with name, (N) without name, (o) ordered
transitions, (r) rainbow colors for acceptance
sets, (R) color acceptance sets by Inf/Fin, (s)
with SCCs, (t) force transition-based acceptance.
-H, --hoaf[=i|s|t|m|l] Output the automaton in HOA format. Add letters
to select (i) use implicit labels for complete
deterministic automata, (s) prefer state-based
acceptance when possible [default], (t) force
transition-based acceptance, (m) mix state and
transition-based acceptance, (l) single-line
output
with SCCs, (t) force transition-based acceptance,
(+INT) add INT to all set numbers
-H, --hoaf[=i|l|m|s|t|v] Output the automaton in HOA format (default). Add
letters to select (i) use implicit labels for
complete deterministic automata, (s) prefer
state-based acceptance when possible [default],
(t) force transition-based acceptance, (m) mix
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
acceptance even on Büchi automata)
--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
data-structure used by Spot to represent ω-Automata. This structure
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 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
is then printed in the HOA format into =output.hoa=.
......@@ -221,7 +221,7 @@ State: 2
[0] 2 {0 1}
--END--
EOF_HOA
autfilt -H sba.hoa
autfilt sba.hoa
#+END_SRC
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
corresponding to =Rabin 1=.
#+BEGIN_SRC sh :results verbatim :exports both :wrap SRC hoa
autfilt -H <<EOF
autfilt <<EOF
HOA: v1
States: 3
Start: 0
......@@ -499,7 +499,7 @@ actually spot the terms that have been grouped together internally by
looking at the spacing around operators =&= and =|=. For instance:
#+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
#+RESULTS:
......@@ -708,7 +708,7 @@ State: 2 "so am I"
[0] 2 {0 1}
--END--
EOF
autfilt -H hw.hoa
autfilt hw.hoa
#+END_SRC
#+RESULTS: hello-world
......@@ -747,7 +747,7 @@ Here is for instance the result when =autfilt= is instructed to
simplify the automaton:
#+BEGIN_SRC sh :results verbatim :exports both :wrap SRC hoa
autfilt -H --small hw.hoa
autfilt --small hw.hoa
#+END_SRC
#+RESULTS:
......@@ -780,7 +780,7 @@ construct the new name by simply copying the one of the original
automaton.
#+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
#+RESULTS:
......@@ -825,7 +825,7 @@ randomize the order of their transitions and states before printing
them in HOA format.
#+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
#+RESULTS:
......
......@@ -14,25 +14,29 @@ option.
Formulas to translate may be specified using [[file:ioltl.org][common input options for
LTL/PSL formulas]].
#+BEGIN_SRC sh :results verbatim :exports code
#+BEGIN_SRC sh :results verbatim :exports both
ltl2tgba -f 'Fa & GFb'
#+END_SRC
#+BEGIN_SRC sh :results verbatim :exports results
SPOT_DOTEXTRA= ltl2tgba -f 'Fa & GFb' --dot=
#+END_SRC
#+RESULTS:
#+begin_example
digraph G {
rankdir=LR
I [label="", style=invis, width=0]
I -> 1
0 [label="0"]
0 -> 0 [label="b\n{0}"]
0 -> 0 [label="!b"]
1 [label="1"]
1 -> 0 [label="a"]
1 -> 1 [label="!a"]
}
HOA: v1
name: "Fa & GFb"
States: 2
Start: 1
AP: 2 "a" "b"
acc-name: Buchi
Acceptance: 1 Inf(0)
properties: trans-labels explicit-labels trans-acc complete
properties: deterministic stutter-invariant
--BODY--
State: 0
[1] 0 {0}
[!1] 0
State: 1
[0] 0
[!0] 1
--END--
#+end_example
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
where such parameters are assumed to be filenames).
=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
can converted into a picture, or into vectorial format using =dot= or
=dotty=. Typically, you could get a =pdf= of this TGBA using
The default output format, as shown above, is the [[file:hoa.org][HOA]] format, as this
can easily be piped to other tools.
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
ltl2tgba "Fa & GFb" | dot -Tpdf > tgba.pdf
ltl2tgba "Fa & GFb" -d | dot -Tpdf > tgba.pdf
#+END_SRC
#+RESULTS:
......@@ -55,12 +62,13 @@ we use some [[file:oaut.org][environment variables]] to produce a more colorful
output by default)
#+NAME: dotex
#+BEGIN_SRC sh :results verbatim :exports none
ltl2tgba "Fa & GFb"
ltl2tgba "Fa & GFb" -d
#+END_SRC
#+RESULTS: dotex
#+begin_example
digraph G {
rankdir=LR
node [shape="circle"]
fontname="Lato"
node [fontname="Lato"]
edge [fontname="Lato"]
......@@ -99,7 +107,7 @@ Here is a TGBA with multiple acceptance sets (we omit the call to
#+NAME: dotex2
#+BEGIN_SRC sh :results verbatim :exports code
ltl2tgba "GFa & GFb"
ltl2tgba "GFa & GFb" -d
#+END_SRC
#+RESULTS: dotex2
#+begin_example
......@@ -134,7 +142,7 @@ A Büchi automaton for the previous formula can be obtained with the
#+NAME: dotex2ba
#+BEGIN_SRC sh :results verbatim :exports code
ltl2tgba -B 'GFa & GFb'
ltl2tgba -B 'GFa & GFb' -d
#+END_SRC
#+RESULTS: dotex2ba
#+begin_example
......@@ -220,7 +228,7 @@ as above, for comparison.
#+NAME: dotex2gba
#+BEGIN_SRC sh :results verbatim :exports code
ltl2tgba -S 'GFa & GFb'
ltl2tgba -S 'GFa & GFb' -d
#+END_SRC
#+RESULTS: dotex2gba
......@@ -282,27 +290,30 @@ ltl2tgba --help | sed -n '/Output format:/,/^$/p' | sed '1d;$d'
--check[=PROP] test for the additional property PROP and output
the result in the HOA format (implies -H). PROP
may be any prefix of 'all' (default),
'unambiguous', or 'stutter-invariant'.
--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)
force numbered states, (a) acceptance display, (b)
'unambiguous', 'stutter-invariant', or
'strength'.
-d, --dot[=1|a|b|B|c|e|f(FONT)|h|n|N|o|r|R|s|t|v|+INT]
GraphViz's format. Add letters for (1) force
numbered states, (a) acceptance display, (b)
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
FONT, (h) horizontal layout, (v) vertical layout,
(n) with name, (N) without name, (o) ordered
transitions, (r) rainbow colors for acceptance
sets, (R) color acceptance sets by Inf/Fin, (s)
with SCCs, (t) force transition-based acceptance.
-H, --hoaf[=i|s|t|m|l] Output the automaton in HOA format. Add letters
to select (i) use implicit labels for complete
deterministic automata, (s) prefer state-based
acceptance when possible [default], (t) force
transition-based acceptance, (m) mix state and
transition-based acceptance, (l) single-line
output
with SCCs, (t) force transition-based acceptance,
(+INT) add INT to all set numbers
-H, --hoaf[=i|l|m|s|t|v] Output the automaton in HOA format (default). Add
letters to select (i) use implicit labels for
complete deterministic automata, (s) prefer
state-based acceptance when possible [default],
(t) force transition-based acceptance, (m) mix
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
acceptance even on Büchi automata)
acceptance even on Büchi automata)
--name=FORMAT set the name of the output automaton
-o, --output=FORMAT send output to a file named FORMAT instead of
standard output. The first automaton sent to a
......@@ -319,7 +330,7 @@ if your system can display UTF-8 correctly.
#+NAME: dotex2ba8
#+BEGIN_SRC sh :results verbatim :exports code
ltl2tgba -B8 "GFa & GFb"
ltl2tgba -B8 "GFa & GFb" -d
#+END_SRC
#+RESULTS: dotex2ba8
#+begin_example
......@@ -442,7 +453,7 @@ flagrant is =Ga|Gb|Gc=:
#+NAME: gagbgc1
#+BEGIN_SRC sh :results verbatim :exports code
ltl2tgba 'Ga|Gb|Gc'
ltl2tgba 'Ga|Gb|Gc' -d
#+END_SRC
#+RESULTS: gagbgc1
#+begin_example
......@@ -476,7 +487,7 @@ $txt
#+NAME: gagbgc2
#+BEGIN_SRC sh :results verbatim :exports code
ltl2tgba -D 'Ga|Gb|Gc'
ltl2tgba -D 'Ga|Gb|Gc' -d
#+END_SRC
#+RESULTS: gagbgc2
#+begin_example
......@@ -544,7 +555,7 @@ $\bar ab$.
#+NAME: ambig1
#+BEGIN_SRC sh :results verbatim :exports code
ltl2tgba -B 'GFa -> GFb'
ltl2tgba -B 'GFa -> GFb' -d
#+END_SRC
#+RESULTS: ambig1
#+begin_example
......@@ -583,7 +594,7 @@ is only one run that recognizes this example word:
#+NAME: ambig2
#+BEGIN_SRC sh :results verbatim :exports code
ltl2tgba -B -U 'GFa -> GFb'
ltl2tgba -B -U 'GFa -> GFb' -d
#+END_SRC
#+RESULTS: ambig2
......@@ -713,6 +724,7 @@ ltl2tgba --help | sed -n '/^ *%/p'
%e number of edges
%f the formula, in Spot's syntax
%F name of the input file
%g acceptance condition (in HOA syntax)
%L location in the input file
%m name of the automaton
%n number of nondeterministic states in output
......@@ -771,13 +783,14 @@ deterministic monitor for the given formula.
#+NAME: monitor1
#+BEGIN_SRC sh :results verbatim :exports code
ltl2tgba -M '(Xa & Fb) | Gc'
ltl2tgba -M '(Xa & Fb) | Gc' -d
#+END_SRC
#+RESULTS: monitor1
#+begin_example
digraph G {
rankdir=LR
node [shape="circle"]
fontname="Lato"
node [fontname="Lato"]
edge [fontname="Lato"]
......@@ -805,13 +818,14 @@ $txt
#+NAME: monitor2
#+BEGIN_SRC sh :results verbatim :exports code
ltl2tgba -MD '(Xa & Fb) | Gc'
ltl2tgba -MD '(Xa & Fb) | Gc' -d
#+END_SRC
#+RESULTS: monitor2
#+begin_example
digraph G {
rankdir=LR
node [shape="circle"]
fontname="Lato"
node [fontname="Lato"]
edge [fontname="Lato"]
......
......@@ -22,21 +22,26 @@ ltl2tgta --ta --multiple-init 'a U Gb'
#+RESULTS:
#+begin_example
digraph G {
rankdir=LR
fontname="Lato"
node [fontname="Lato"]
edge [fontname="Lato"]
node[style=filled, fillcolor="#ffffa0"] edge[arrowhead=vee, arrowsize=.7]
-1 [label="", style=invis, height=0]
-1 -> 1 [label="!a & b"]
-1 -> 1 [label="a & b"]
-2 [label="", style=invis, height=0]
-2 -> 2 [label="a & b"]
-2 -> 2 [label="a & !b"]
-3 [label="", style=invis, height=0]
-3 -> 3 [label="a & !b"]
1 [label="2\n!a & b",shape=box]
-3 -> 3 [label="!a & b"]
1 [label="2\na & b",shape=box]
1 -> 4 [label="{a}\n"]
2 [label="1\na & b",shape=box]
2 -> 4 [label="{a}\n"]
2 -> 1 [label="{a}\n"]
2 -> 3 [label="{b}\n"]
3 [label="0\na & !b"]
3 -> 2 [label="{b}\n"]
3 -> 1 [label="{a, b}\n"]
1 -> 3 [label="{a}\n"]
1 -> 2 [label="{b}\n"]
2 [label="1\na & !b"]
2 -> 1 [label="{b}\n"]
2 -> 3 [label="{a, b}\n"]
3 [label="0\n!a & b",shape=box]
3 -> 4 [label="{a}\n"]
4 [label="3",peripheries=2,shape=box]
4 -> 4 [label="{a}\n{0}"]
}
......
......@@ -128,10 +128,10 @@ tools:
- '=modella -r12 -g -e %L %O='
- '=/path/to/script4lbtt.py %L %O=' (script supplied by [[http://web.archive.org/web/20070214050826/http://estragon.ti.informatik.uni-kiel.de/~fritz/][ltl2nba]] for
its interface with LBTT)
- '=ltl2tgba -s %s >%O=' (smaller output, Büchi automaton)
- '=ltl2tgba -s -D %s >%O=' (more deterministic output, Büchi automaton)
- '=ltl2tgba -H %s >%O=' (smaller output, TGBA)
- '=ltl2tgba -H -D %s >%O=' (more deterministic output, TGBA)
- '=ltl2tgba -s %f >%O=' (smaller output, Büchi automaton)
- '=ltl2tgba -s -D %f >%O=' (more deterministic output, Büchi automaton)
- '=ltl2tgba -H %f >%O=' (smaller output, TGBA)
- '=ltl2tgba -H -D %f >%O=' (more deterministic output, TGBA)
- '=lbt <%L >%O='
- '~ltl2dstar --ltl2nba=spin:path/to/ltl2tgba@-sD
--output-format=hoa %L %O~' deterministic Rabin output in HOA, as
......
......@@ -129,7 +129,7 @@ the [[http://adl.github.io/hoaf/][HOA format]]. Spin has no support for HOA, bu
converts the never claim produced by =spin= into this format.
#+BEGIN_SRC sh :results verbatim :exports both :wrap SRC hoa
ltldo -f a -f GFa 'spin -f %s>%O' -H
ltldo -f a -f GFa 'spin -f %s>%O'
#+END_SRC
#+RESULTS:
......@@ -167,9 +167,9 @@ State: 1 {0}
Again, using the shorthands defined below, the previous command can be
simplified to just this:
#+BEGIN_SRC sh :results verbatim :exports code
ltldo spin -f a -f GFa -H
#+END_SRC
#+BEGIN_EXAMPLE sh
ltldo spin -f a -f GFa
#+END_EXAMPLE
* Syntax for specifying tools to call
......@@ -303,36 +303,45 @@ the following words, then the string on the right is appended.
lbt <%L>%O
ltl2ba -f %s>%O
ltl2dstar %L %D
ltl2dstar --output-format=hoa %L %O
ltl2tgba -H %f>%O
ltl3ba -f %s>%O
ltl3dra -f %f>%O
ltl3dra -f %s>%O
modella %L %O
spin -f %s>%O
Any {name} and directory component is skipped for the purpose of
matching those prefixes. So for instance
'{DRA} ~/mytools/ltl2dstar-0.5.2'
will changed into
'{DRA} ~/mytools/ltl2dstar-0.5.2 --output-format=hoa %L %O'
#+end_example
So for instance you can type just
Therefore you can type just
#+BEGIN_SRC sh :results verbatim :exports code
ltldo ltl2ba -f a
ltldo ltl2ba -f a -d
#+END_SRC
to obtain a Dot output (this is the default output format for =ltldo=)
for the neverclaim produced by =ltl2ba -f a=.
to obtain a Dot output (as requested with =-d=) for the neverclaim