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:
Alexandre Duret-Lutz 2019-04-16 21:03:13 +02:00
parent 0c8e6a38a8
commit 8a96828d85
40 changed files with 2193 additions and 2281 deletions

View file

@ -3,6 +3,9 @@
#+DESCRIPTION: Code example for removing alternation in Spot
#+INCLUDE: setup.org
#+HTML_LINK_UP: tut.html
#+PROPERTY: header-args:sh :results verbatim :exports both
#+PROPERTY: header-args:python :results output :exports both
#+PROPERTY: header-args:C+++ :results verbatim :exports both
Consider the following alternating co-Büchi automaton (see [[file:tut23.org][how to
create it]]):
@ -30,7 +33,7 @@ State: 2
#+END_SRC
#+NAME: tut31dot
#+BEGIN_SRC sh :results verbatim :exports none :noweb strip-export
#+BEGIN_SRC sh :exports none :noweb strip-export
cat >tut31.hoa <<EOF
<<tut31in>>
EOF
@ -58,7 +61,7 @@ if the input is [[file:concepts.org::#property-flags][very-weak]].
We simply use =autfilt= with option =--tgba=:
#+BEGIN_SRC sh :results verbatim :exports both :wrap SRC hoa
#+BEGIN_SRC sh :wrap SRC hoa
autfilt --tgba tut31.hoa
#+END_SRC
#+RESULTS:
@ -82,7 +85,7 @@ State: 1
#+END_SRC
#+NAME: tut31out
#+BEGIN_SRC sh :results verbatim :exports none
#+BEGIN_SRC sh :exports none
autfilt --tgba -d tut31.hoa
#+END_SRC
@ -97,13 +100,13 @@ $txt
In the Python version we call =remove_alternation()=
#+BEGIN_SRC python :results output :exports both :wrap SRC hoa
#+BEGIN_SRC python :wrap SRC hoa
import spot
aut = spot.remove_alternation(spot.automaton('tut31.hoa'))
print(aut.to_str('hoa'))
#+END_SRC
#+RESULTS:
#+BEGIN_SRC hoa
#+begin_SRC hoa
HOA: v1
States: 2
Start: 0
@ -115,18 +118,18 @@ properties: deterministic
--BODY--
State: 0
[0] 0 {0}
[!0] 1 {0}
[!0] 1
State: 1
[0] 0 {0}
[!0] 1
--END--
#+END_SRC
#+end_SRC
* C++
The C++ version calls =remove_alternation()= too.
#+BEGIN_SRC C++ :results verbatim :exports both :wrap SRC hoa
#+BEGIN_SRC C++ :wrap SRC hoa
#include <iostream>
#include <spot/parseaut/public.hh>
#include <spot/twaalgos/alternation.hh>
@ -149,7 +152,7 @@ The C++ version calls =remove_alternation()= too.
#+END_SRC
#+RESULTS:
#+BEGIN_SRC hoa
#+begin_SRC hoa
HOA: v1
States: 2
Start: 0
@ -161,13 +164,13 @@ properties: deterministic
--BODY--
State: 0
[0] 0 {0}
[!0] 1 {0}
[!0] 1
State: 1
[0] 0 {0}
[!0] 1
--END--
#+END_SRC
#+end_SRC
#+BEGIN_SRC sh :results silent :exports results
#+BEGIN_SRC sh :results silent
rm -f tut31.hoa
#+END_SRC