org: syntax-highlight the HOA outputs
* elisp/hoa-mode.el, elisp/Makefile.am, elisp/README: New files. * debian/copyright, configure.ac, README, Makefile.am: Adjust. * doc/org/init.el.in: Adjust to load hoa-mode.el. * doc/org/spot.css: Add entries for HOA mode. * doc/org/hoa.org, doc/org/ltldo.org, doc/org/oaut.org, doc/org/tut20.org, doc/org/tut21.org, doc/org/tut22.org, doc/org/tut30.org: Make the HOA outputs as HOA.
This commit is contained in:
parent
d46da963d5
commit
5aba246ff0
16 changed files with 449 additions and 132 deletions
|
|
@ -71,11 +71,11 @@ format can be found on a [[file:hoa.org][separate page]].)
|
|||
Here is an example where [[file:ltl2tgba.org][=ltl2tgba=]] is used to construct two automata:
|
||||
one for =a U b= and one for =(Ga -> Gb) W c=.
|
||||
|
||||
#+BEGIN_SRC sh :results verbatim :exports both
|
||||
#+BEGIN_SRC sh :results verbatim :exports both :wrap SRC hoa
|
||||
ltl2tgba -H 'a U b' '(Ga -> Gb) W c'
|
||||
#+END_SRC
|
||||
#+RESULTS:
|
||||
#+begin_example
|
||||
#+BEGIN_SRC hoa
|
||||
HOA: v1
|
||||
name: "a U b"
|
||||
States: 2
|
||||
|
|
@ -84,6 +84,7 @@ AP: 2 "a" "b"
|
|||
acc-name: Buchi
|
||||
Acceptance: 1 Inf(0)
|
||||
properties: trans-labels explicit-labels state-acc deterministic
|
||||
properties: stutter-invariant terminal
|
||||
--BODY--
|
||||
State: 0 {0}
|
||||
[t] 0
|
||||
|
|
@ -98,7 +99,7 @@ Start: 1
|
|||
AP: 3 "b" "a" "c"
|
||||
acc-name: Buchi
|
||||
Acceptance: 1 Inf(0)
|
||||
properties: trans-labels explicit-labels trans-acc
|
||||
properties: trans-labels explicit-labels trans-acc stutter-invariant
|
||||
--BODY--
|
||||
State: 0
|
||||
[0] 0 {0}
|
||||
|
|
@ -118,7 +119,7 @@ State: 4
|
|||
[!1] 3
|
||||
[1] 4
|
||||
--END--
|
||||
#+end_example
|
||||
#+END_SRC
|
||||
|
||||
The above output contains two automata, named after the formulas they
|
||||
represent. Here is a picture of these two automata:
|
||||
|
|
@ -301,36 +302,37 @@ to use state-based acceptance whenever possible. Option =t= forces
|
|||
transition-based acceptance. For instance compare this output to the
|
||||
previous one:
|
||||
|
||||
#+BEGIN_SRC sh :results verbatim :exports both
|
||||
#+BEGIN_SRC sh :results verbatim :exports both :wrap SRC hoa
|
||||
ltl2tgba -Ht 'a U b'
|
||||
#+END_SRC
|
||||
#+RESULTS:
|
||||
#+begin_example
|
||||
#+BEGIN_SRC hoa
|
||||
HOA: v1
|
||||
name: "a U b"
|
||||
States: 2
|
||||
Start: 0
|
||||
Start: 1
|
||||
AP: 2 "a" "b"
|
||||
acc-name: Buchi
|
||||
Acceptance: 1 Inf(0)
|
||||
properties: trans-labels explicit-labels trans-acc deterministic
|
||||
properties: stutter-invariant terminal
|
||||
--BODY--
|
||||
State: 0
|
||||
[1] 1
|
||||
[0&!1] 0
|
||||
[t] 0 {0}
|
||||
State: 1
|
||||
[t] 1 {0}
|
||||
[1] 0
|
||||
[0&!1] 1
|
||||
--END--
|
||||
#+end_example
|
||||
#+END_SRC
|
||||
|
||||
Option =m= uses mixed acceptance, i.e, some states might use
|
||||
state-based acceptance while other will not:
|
||||
|
||||
#+BEGIN_SRC sh :results verbatim :exports both
|
||||
#+BEGIN_SRC sh :results verbatim :exports both :wrap SRC hoa
|
||||
ltl2tgba -Hm '(Ga -> Gb) W c'
|
||||
#+END_SRC
|
||||
#+RESULTS:
|
||||
#+begin_example
|
||||
#+BEGIN_SRC hoa
|
||||
HOA: v1
|
||||
name: "(Gb | F!a) W c"
|
||||
States: 5
|
||||
|
|
@ -338,7 +340,7 @@ Start: 1
|
|||
AP: 3 "b" "a" "c"
|
||||
acc-name: Buchi
|
||||
Acceptance: 1 Inf(0)
|
||||
properties: trans-labels explicit-labels
|
||||
properties: trans-labels explicit-labels stutter-invariant
|
||||
--BODY--
|
||||
State: 0 {0}
|
||||
[0] 0
|
||||
|
|
@ -358,7 +360,7 @@ State: 4
|
|||
[!1] 3
|
||||
[1] 4
|
||||
--END--
|
||||
#+end_example
|
||||
#+END_SRC
|
||||
|
||||
|
||||
It is also possible to output each automaton on a single line, in case
|
||||
|
|
@ -366,12 +368,14 @@ the result should be used with line-based tools or embedded into a CSV
|
|||
file... Here is an example using both transition-based acceptance,
|
||||
and single-line output:
|
||||
|
||||
#+BEGIN_SRC sh :results verbatim :exports both
|
||||
#+BEGIN_SRC sh :results verbatim :exports both :wrap SRC hoa
|
||||
ltl2tgba -Htl 'a U b' '(Ga -> Gb) W c'
|
||||
#+END_SRC
|
||||
#+RESULTS:
|
||||
: HOA: v1 name: "a U b" States: 2 Start: 1 AP: 2 "a" "b" acc-name: Buchi Acceptance: 1 Inf(0) properties: trans-labels explicit-labels trans-acc deterministic --BODY-- State: 0 [t] 0 {0} State: 1 [1] 0 [0&!1] 1 --END--
|
||||
: HOA: v1 name: "(Gb | F!a) W c" States: 5 Start: 1 AP: 3 "b" "a" "c" acc-name: Buchi Acceptance: 1 Inf(0) properties: trans-labels explicit-labels trans-acc --BODY-- State: 0 [0] 0 {0} State: 1 [0&1&!2] 0 [!1&!2] 1 {0} [1&!2] 2 [2] 3 State: 2 [!1&!2] 1 {0} [1&!2] 2 [!1&2] 3 [1&2] 4 State: 3 [t] 3 {0} State: 4 [!1] 3 [1] 4 --END--
|
||||
#+BEGIN_SRC hoa
|
||||
HOA: v1 name: "a U b" States: 2 Start: 1 AP: 2 "a" "b" acc-name: Buchi Acceptance: 1 Inf(0) properties: trans-labels explicit-labels trans-acc deterministic stutter-invariant terminal --BODY-- State: 0 [t] 0 {0} State: 1 [1] 0 [0&!1] 1 --END--
|
||||
HOA: v1 name: "(Gb | F!a) W c" States: 5 Start: 1 AP: 3 "b" "a" "c" acc-name: Buchi Acceptance: 1 Inf(0) properties: trans-labels explicit-labels trans-acc stutter-invariant --BODY-- State: 0 [0] 0 {0} State: 1 [0&1&!2] 0 [!1&!2] 1 {0} [1&!2] 2 [2] 3 State: 2 [!1&!2] 1 {0} [1&!2] 2 [!1&2] 3 [1&2] 4 State: 3 [t] 3 {0} State: 4 [!1] 3 [1] 4 --END--
|
||||
#+END_SRC
|
||||
|
||||
* LBTT output
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue