org: simplify babel blocks using #+PROPERTY: header-args
This feature is in Org 9, which is already required. * doc/org/autcross.org, doc/org/autfilt.org, doc/org/compile.org, doc/org/concepts.org, doc/org/csv.org, doc/org/dstar2tgba.org, doc/org/genaut.org, doc/org/genltl.org, doc/org/hierarchy.org, doc/org/hoa.org, doc/org/ioltl.org, doc/org/ltl2tgba.org, doc/org/ltl2tgta.org, doc/org/ltlcross.org, doc/org/ltldo.org, doc/org/ltlfilt.org, doc/org/ltlgrind.org, doc/org/ltlsynt.org, doc/org/oaut.org, doc/org/randaut.org, doc/org/randltl.org, doc/org/satmin.org, doc/org/setup.org, doc/org/tools.org, doc/org/tut01.org, doc/org/tut02.org, doc/org/tut03.org, doc/org/tut04.org, doc/org/tut10.org, doc/org/tut11.org, doc/org/tut12.org, doc/org/tut20.org, doc/org/tut21.org, doc/org/tut22.org, doc/org/tut23.org, doc/org/tut24.org, doc/org/tut30.org, doc/org/tut31.org, doc/org/tut50.org, doc/org/upgrade2.org: Simplify SRC block setups for sh, python and C++. Also fix a few typos and examples along the way.
This commit is contained in:
parent
0c8e6a38a8
commit
8a96828d85
40 changed files with 2193 additions and 2281 deletions
|
|
@ -3,6 +3,7 @@
|
|||
#+DESCRIPTION: Spot command-line tool for generating random ω-automata.
|
||||
#+INCLUDE: setup.org
|
||||
#+HTML_LINK_UP: tools.html
|
||||
#+PROPERTY: header-args:sh :results verbatim :exports code
|
||||
|
||||
The =randaut= tool generates random (connected) automata.
|
||||
|
||||
|
|
@ -11,64 +12,9 @@ acceptance sets, and using a set of atomic propositions you have to
|
|||
supply.
|
||||
|
||||
#+NAME: randaut1
|
||||
#+BEGIN_SRC sh :results verbatim :exports code
|
||||
#+BEGIN_SRC sh
|
||||
randaut a b --dot
|
||||
#+END_SRC
|
||||
#+RESULTS: randaut1
|
||||
#+begin_example
|
||||
digraph G {
|
||||
rankdir=LR
|
||||
node [shape="circle"]
|
||||
fontname="Lato"
|
||||
node [fontname="Lato"]
|
||||
edge [fontname="Lato"]
|
||||
node[style=filled, fillcolor="#ffffa0"] edge[arrowhead=vee, arrowsize=.7]
|
||||
I [label="", style=invis, width=0]
|
||||
I -> 0
|
||||
0 [label=<0>]
|
||||
0 -> 8 [label=<!a & !b>]
|
||||
0 -> 3 [label=<!a & !b>]
|
||||
0 -> 4 [label=<!a & !b>]
|
||||
1 [label=<1>]
|
||||
1 -> 7 [label=<a & b>]
|
||||
1 -> 0 [label=<a & b>]
|
||||
1 -> 6 [label=<a & !b>]
|
||||
2 [label=<2>]
|
||||
2 -> 4 [label=<!a & !b>]
|
||||
2 -> 0 [label=<a & !b>]
|
||||
2 -> 5 [label=<a & !b>]
|
||||
2 -> 9 [label=<!a & b>]
|
||||
3 [label=<3>]
|
||||
3 -> 2 [label=<a & b>]
|
||||
3 -> 9 [label=<a & !b>]
|
||||
3 -> 3 [label=<a & !b>]
|
||||
4 [label=<4>]
|
||||
4 -> 0 [label=<!a & !b>]
|
||||
4 -> 7 [label=<!a & b>]
|
||||
5 [label=<5>]
|
||||
5 -> 3 [label=<a & !b>]
|
||||
5 -> 1 [label=<!a & b>]
|
||||
5 -> 7 [label=<!a & !b>]
|
||||
5 -> 9 [label=<!a & b>]
|
||||
5 -> 5 [label=<!a & !b>]
|
||||
6 [label=<6>]
|
||||
6 -> 8 [label=<a & b>]
|
||||
6 -> 5 [label=<a & !b>]
|
||||
6 -> 2 [label=<a & !b>]
|
||||
7 [label=<7>]
|
||||
7 -> 8 [label=<!a & !b>]
|
||||
7 -> 9 [label=<a & b>]
|
||||
7 -> 0 [label=<!a & b>]
|
||||
7 -> 1 [label=<!a & !b>]
|
||||
7 -> 4 [label=<a & b>]
|
||||
8 [label=<8>]
|
||||
8 -> 1 [label=<a & b>]
|
||||
8 -> 3 [label=<!a & b>]
|
||||
9 [label=<9>]
|
||||
9 -> 1 [label=<!a & b>]
|
||||
9 -> 3 [label=<a & !b>]
|
||||
}
|
||||
#+end_example
|
||||
|
||||
#+BEGIN_SRC dot :file randaut1.svg :var txt=randaut1 :exports results
|
||||
$txt
|
||||
|
|
@ -95,30 +41,10 @@ In particular =-e0= will cause all states to have 1 successors, and
|
|||
=-e1= will cause all states to be interconnected.
|
||||
|
||||
#+NAME: randaut2
|
||||
#+BEGIN_SRC sh :results verbatim :exports code
|
||||
#+BEGIN_SRC sh
|
||||
randaut -Q3 -e0 2 --dot
|
||||
#+END_SRC
|
||||
|
||||
#+RESULTS: randaut2
|
||||
#+begin_example
|
||||
digraph G {
|
||||
rankdir=LR
|
||||
node [shape="circle"]
|
||||
fontname="Lato"
|
||||
node [fontname="Lato"]
|
||||
edge [fontname="Lato"]
|
||||
node[style=filled, fillcolor="#ffffa0"] edge[arrowhead=vee, arrowsize=.7]
|
||||
I [label="", style=invis, width=0]
|
||||
I -> 0
|
||||
0 [label=<0>]
|
||||
0 -> 2 [label=<!p0 & !p1>]
|
||||
1 [label=<1>]
|
||||
1 -> 1 [label=<!p0 & !p1>]
|
||||
2 [label=<2>]
|
||||
2 -> 1 [label=<!p0 & !p1>]
|
||||
}
|
||||
#+end_example
|
||||
|
||||
#+BEGIN_SRC dot :file randaut2.svg :var txt=randaut2 :exports results
|
||||
$txt
|
||||
#+END_SRC
|
||||
|
|
@ -126,36 +52,10 @@ $txt
|
|||
[[file:randaut2.svg]]
|
||||
|
||||
#+NAME: randaut3
|
||||
#+BEGIN_SRC sh :results verbatim :exports code
|
||||
#+BEGIN_SRC sh
|
||||
randaut -Q3 -e1 2 --dot
|
||||
#+END_SRC
|
||||
|
||||
#+RESULTS: randaut3
|
||||
#+begin_example
|
||||
digraph G {
|
||||
rankdir=LR
|
||||
node [shape="circle"]
|
||||
fontname="Lato"
|
||||
node [fontname="Lato"]
|
||||
edge [fontname="Lato"]
|
||||
node[style=filled, fillcolor="#ffffa0"] edge[arrowhead=vee, arrowsize=.7]
|
||||
I [label="", style=invis, width=0]
|
||||
I -> 0
|
||||
0 [label=<0>]
|
||||
0 -> 2 [label=<!p0 & !p1>]
|
||||
0 -> 0 [label=<!p0 & !p1>]
|
||||
0 -> 1 [label=<!p0 & !p1>]
|
||||
1 [label=<1>]
|
||||
1 -> 1 [label=<p0 & p1>]
|
||||
1 -> 2 [label=<p0 & !p1>]
|
||||
1 -> 0 [label=<p0 & !p1>]
|
||||
2 [label=<2>]
|
||||
2 -> 1 [label=<!p0 & !p1>]
|
||||
2 -> 0 [label=<p0 & !p1>]
|
||||
2 -> 2 [label=<p0 & !p1>]
|
||||
}
|
||||
#+end_example
|
||||
|
||||
#+BEGIN_SRC dot :file randaut3.svg :var txt=randaut3 :exports results
|
||||
$txt
|
||||
#+END_SRC
|
||||
|
|
@ -170,7 +70,7 @@ The generation of the acceptance sets abn is controlled with the following four
|
|||
- =-A ACCEPTANCE= (or =--acceptance=ACCEPTANCE=) controls both the acceptance condition,
|
||||
and the number of associated acceptance sets. The =ACCEPTANCE= argument is documented
|
||||
in =--help= as follows:
|
||||
#+BEGIN_SRC sh :results verbatim :exports results
|
||||
#+BEGIN_SRC sh :exports results
|
||||
randaut --help | sed -n '/^ \(ACCEPTANCE\|RANGE\)/,/^$/p'
|
||||
#+END_SRC
|
||||
|
||||
|
|
@ -221,34 +121,10 @@ ans =-s= (or =--spin=) implies =-B=.
|
|||
|
||||
|
||||
#+NAME: randaut4
|
||||
#+BEGIN_SRC sh :results verbatim :exports code
|
||||
#+BEGIN_SRC sh
|
||||
randaut -Q3 -e0.5 -A3 -a0.5 2 --dot
|
||||
#+END_SRC
|
||||
|
||||
#+RESULTS: randaut4
|
||||
#+begin_example
|
||||
digraph G {
|
||||
rankdir=LR
|
||||
node [shape="circle"]
|
||||
fontname="Lato"
|
||||
node [fontname="Lato"]
|
||||
edge [fontname="Lato"]
|
||||
node[style=filled, fillcolor="#ffffa0"] edge[arrowhead=vee, arrowsize=.7]
|
||||
I [label="", style=invis, width=0]
|
||||
I -> 0
|
||||
0 [label="0"]
|
||||
0 -> 1 [label=<!p0 & !p1>]
|
||||
0 -> 0 [label=<!p0 & !p1<br/><font color="#FAA43A">❷</font>>]
|
||||
1 [label="1"]
|
||||
1 -> 1 [label=<!p0 & p1<br/><font color="#5DA5DA">⓿</font><font color="#F17CB0">❶</font>>]
|
||||
1 -> 2 [label=<!p0 & p1<br/><font color="#F17CB0">❶</font>>]
|
||||
2 [label="2"]
|
||||
2 -> 1 [label=<!p0 & p1<br/><font color="#5DA5DA">⓿</font>>]
|
||||
2 -> 0 [label=<p0 & p1<br/><font color="#5DA5DA">⓿</font>>]
|
||||
2 -> 2 [label=<!p0 & p1<br/><font color="#5DA5DA">⓿</font>>]
|
||||
}
|
||||
#+end_example
|
||||
|
||||
#+BEGIN_SRC dot :file randaut4.svg :var txt=randaut4 :exports results
|
||||
$txt
|
||||
#+END_SRC
|
||||
|
|
@ -257,7 +133,7 @@ $txt
|
|||
|
||||
|
||||
#+NAME: randaut5
|
||||
#+BEGIN_SRC sh :results verbatim :exports code
|
||||
#+BEGIN_SRC sh
|
||||
randaut -Q3 -e0.4 -B -a0.7 2 --dot
|
||||
#+END_SRC
|
||||
|
||||
|
|
@ -292,46 +168,10 @@ $txt
|
|||
[[file:randaut5.svg]]
|
||||
|
||||
#+NAME: randaut5b
|
||||
#+BEGIN_SRC sh :results verbatim :exports code
|
||||
#+BEGIN_SRC sh
|
||||
randaut -Q6 -e0.4 -S -a.2 -A 'Streett 1..3' 2 --dot
|
||||
#+END_SRC
|
||||
|
||||
#+RESULTS: randaut5b
|
||||
#+begin_example
|
||||
digraph G {
|
||||
rankdir=LR
|
||||
label=<(Fin(<font color="#5DA5DA">⓿</font>) | Inf(<font color="#F17CB0">❶</font>)) & (Fin(<font color="#FAA43A">❷</font>) | Inf(<font color="#B276B2">❸</font>))>
|
||||
labelloc="t"
|
||||
node [shape="circle"]
|
||||
fontname="Lato"
|
||||
node [fontname="Lato"]
|
||||
edge [fontname="Lato"]
|
||||
node[style=filled, fillcolor="#ffffa0"] edge[arrowhead=vee, arrowsize=.7]
|
||||
I [label="", style=invis, width=0]
|
||||
I -> 0
|
||||
0 [label=<0>]
|
||||
0 -> 2 [label=<!p0 & !p1>]
|
||||
0 -> 1 [label=<!p0 & !p1>]
|
||||
0 -> 3 [label=<!p0 & !p1>]
|
||||
1 [label=<1>]
|
||||
1 -> 5 [label=<!p0 & p1>]
|
||||
2 [label=<2<br/><font color="#5DA5DA">⓿</font><font color="#FAA43A">❷</font>>]
|
||||
2 -> 1 [label=<!p0 & p1>]
|
||||
2 -> 2 [label=<!p0 & !p1>]
|
||||
2 -> 4 [label=<p0 & p1>]
|
||||
3 [label=<3>]
|
||||
3 -> 2 [label=<!p0 & !p1>]
|
||||
3 -> 3 [label=<!p0 & p1>]
|
||||
4 [label=<4>]
|
||||
4 -> 0 [label=<!p0 & !p1>]
|
||||
4 -> 5 [label=<!p0 & p1>]
|
||||
5 [label=<5<br/><font color="#F17CB0">❶</font><font color="#FAA43A">❷</font>>]
|
||||
5 -> 1 [label=<p0 & p1>]
|
||||
5 -> 2 [label=<!p0 & !p1>]
|
||||
5 -> 3 [label=<p0 & p1>]
|
||||
}
|
||||
#+end_example
|
||||
|
||||
#+BEGIN_SRC dot :file randaut5b.svg :var txt=randaut5b :exports results
|
||||
$txt
|
||||
#+END_SRC
|
||||
|
|
@ -345,61 +185,10 @@ specify a precise parity acceptance such as =parity min even 3=, or
|
|||
give =randaut= some freedom, as in this example.
|
||||
|
||||
#+NAME: randaut5c
|
||||
#+BEGIN_SRC sh :results verbatim :exports code
|
||||
#+BEGIN_SRC sh
|
||||
randaut -Q10 -S --colored -A 'parity rand rand 3..4' 2 --dot
|
||||
#+END_SRC
|
||||
|
||||
#+RESULTS: randaut5c
|
||||
#+begin_example
|
||||
digraph G {
|
||||
rankdir=LR
|
||||
label=<Inf(<font color="#5DA5DA">⓿</font>) | (Fin(<font color="#F17CB0">❶</font>) & (Inf(<font color="#FAA43A">❷</font>) | Fin(<font color="#B276B2">❸</font>)))>
|
||||
labelloc="t"
|
||||
node [shape="circle"]
|
||||
fontname="Lato"
|
||||
node [fontname="Lato"]
|
||||
edge [fontname="Lato"]
|
||||
node[style=filled, fillcolor="#ffffa0"] edge[arrowhead=vee, arrowsize=.7]
|
||||
I [label="", style=invis, width=0]
|
||||
I -> 0
|
||||
0 [label=<0<br/><font color="#F17CB0">❶</font>>]
|
||||
0 -> 2 [label=<!p0 & !p1>]
|
||||
0 -> 8 [label=<!p0 & !p1>]
|
||||
0 -> 0 [label=<p0 & !p1>]
|
||||
0 -> 6 [label=<!p0 & p1>]
|
||||
1 [label=<1<br/><font color="#B276B2">❸</font>>]
|
||||
1 -> 5 [label=<!p0 & !p1>]
|
||||
1 -> 9 [label=<!p0 & p1>]
|
||||
2 [label=<2<br/><font color="#FAA43A">❷</font>>]
|
||||
2 -> 4 [label=<p0 & p1>]
|
||||
2 -> 5 [label=<!p0 & !p1>]
|
||||
3 [label=<3<br/><font color="#5DA5DA">⓿</font>>]
|
||||
3 -> 6 [label=<p0 & !p1>]
|
||||
3 -> 1 [label=<!p0 & p1>]
|
||||
4 [label=<4<br/><font color="#5DA5DA">⓿</font>>]
|
||||
4 -> 6 [label=<!p0 & !p1>]
|
||||
4 -> 1 [label=<p0 & p1>]
|
||||
5 [label=<5<br/><font color="#5DA5DA">⓿</font>>]
|
||||
5 -> 0 [label=<!p0 & !p1>]
|
||||
5 -> 8 [label=<p0 & !p1>]
|
||||
5 -> 7 [label=<!p0 & !p1>]
|
||||
6 [label=<6<br/><font color="#5DA5DA">⓿</font>>]
|
||||
6 -> 2 [label=<!p0 & !p1>]
|
||||
6 -> 3 [label=<!p0 & !p1>]
|
||||
7 [label=<7<br/><font color="#FAA43A">❷</font>>]
|
||||
7 -> 3 [label=<!p0 & p1>]
|
||||
7 -> 1 [label=<!p0 & p1>]
|
||||
8 [label=<8<br/><font color="#5DA5DA">⓿</font>>]
|
||||
8 -> 3 [label=<!p0 & p1>]
|
||||
8 -> 4 [label=<p0 & !p1>]
|
||||
8 -> 2 [label=<p0 & !p1>]
|
||||
8 -> 0 [label=<!p0 & p1>]
|
||||
9 [label=<9<br/><font color="#F17CB0">❶</font>>]
|
||||
9 -> 0 [label=<p0 & p1>]
|
||||
9 -> 6 [label=<p0 & !p1>]
|
||||
}
|
||||
#+end_example
|
||||
|
||||
#+BEGIN_SRC dot :file randaut5c.svg :var txt=randaut5c :exports results
|
||||
$txt
|
||||
#+END_SRC
|
||||
|
|
@ -421,34 +210,10 @@ sum of all these formulas is $\top$. The resulting automaton is
|
|||
therefore deterministic and complete.
|
||||
|
||||
#+NAME: randaut6
|
||||
#+BEGIN_SRC sh :results verbatim :exports code
|
||||
#+BEGIN_SRC sh
|
||||
randaut -D -Q3 -e0.6 -A2 -a0.5 2 --dot
|
||||
#+END_SRC
|
||||
|
||||
#+RESULTS: randaut6
|
||||
#+begin_example
|
||||
digraph G {
|
||||
rankdir=LR
|
||||
node [shape="circle"]
|
||||
fontname="Lato"
|
||||
node [fontname="Lato"]
|
||||
edge [fontname="Lato"]
|
||||
node[style=filled, fillcolor="#ffffa0"] edge[arrowhead=vee, arrowsize=.7]
|
||||
I [label="", style=invis, width=0]
|
||||
I -> 0
|
||||
0 [label="0"]
|
||||
0 -> 1 [label=<p0>]
|
||||
0 -> 2 [label=<!p0>]
|
||||
1 [label="1"]
|
||||
1 -> 2 [label=<p0<br/><font color="#F17CB0">❶</font>>]
|
||||
1 -> 0 [label=<!p0<br/><font color="#5DA5DA">⓿</font>>]
|
||||
2 [label="2"]
|
||||
2 -> 2 [label=<!p0 & p1<br/><font color="#5DA5DA">⓿</font>>]
|
||||
2 -> 0 [label=<!p0 & !p1<br/><font color="#F17CB0">❶</font>>]
|
||||
2 -> 1 [label=<p0<br/><font color="#5DA5DA">⓿</font>>]
|
||||
}
|
||||
#+end_example
|
||||
|
||||
#+BEGIN_SRC dot :file randaut6.svg :var txt=randaut6 :exports results
|
||||
$txt
|
||||
#+END_SRC
|
||||
|
|
@ -476,19 +241,24 @@ following generates 20 automatas, but store them in different files
|
|||
according to the acceptance condition. The format =%g= represent the
|
||||
formula for the acceptance condition and would not make a nice
|
||||
filename, but =%[s]g= is a short name for that acceptance condition
|
||||
(its is replaced by "other" if Spot does not know better).
|
||||
(its is replaced by "other" if Spot does not know better). We use
|
||||
=-Hl= to output one automaton per line, so that =wc -l= will count
|
||||
automata.
|
||||
|
||||
#+BEGIN_SRC sh :results verbatim :exports both
|
||||
randaut -n20 -Q10 -A 'random 3' 2 -o 'randaut-%[s]g.hoa'
|
||||
#+BEGIN_SRC sh :exports both
|
||||
randaut -n20 -Q10 -A 'random 3' 2 -Hl -o 'randaut-%[s]g.hoa'
|
||||
wc -l randaut-*.hoa
|
||||
#+END_SRC
|
||||
|
||||
#+RESULTS:
|
||||
: 222 randaut-Rabin-like.hoa
|
||||
: 380 randaut-Streett-like.hoa
|
||||
: 100 randaut-generalized-Buchi.hoa
|
||||
: 249 randaut-other.hoa
|
||||
: 951 total
|
||||
: 1 randaut-Fin-less.hoa
|
||||
: 4 randaut-Rabin-like.hoa
|
||||
: 7 randaut-Streett-like.hoa
|
||||
: 2 randaut-generalized-Buchi.hoa
|
||||
: 1 randaut-generalized-Rabin.hoa
|
||||
: 1 randaut-generalized-Streett.hoa
|
||||
: 4 randaut-other.hoa
|
||||
: 20 total
|
||||
|
||||
#+BEGIN_SRC sh :results silent :exports results
|
||||
rm -f rautaut-*.hoa
|
||||
|
|
@ -515,7 +285,7 @@ options discussed [[file:oaut.org::#default-dot][on another page]], while '=s='
|
|||
displayed.)
|
||||
|
||||
#+NAME: randaut7
|
||||
#+BEGIN_SRC sh :results verbatim :exports code
|
||||
#+BEGIN_SRC sh
|
||||
randaut -n -1 --colored -A'parity min odd 4' a b |
|
||||
autfilt --sccs=5 --trivial-sccs=1 --rejecting-sccs=1 \
|
||||
--inherently-weak-sccs=2 --weak-sccs=1 -n 1 --dot=.s
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue