diff --git a/.gitignore b/.gitignore index 2d2676ed4..92e041696 100644 --- a/.gitignore +++ b/.gitignore @@ -69,6 +69,7 @@ dt*a-sat.dbg *.dstar *.satlog *.png +*.svg GPATH GRTAGS GSYMS diff --git a/HACKING b/HACKING index 9dae74a74..e40590478 100644 --- a/HACKING +++ b/HACKING @@ -39,6 +39,7 @@ since the generated files they produce are distributed.) GraphViz Java >= 1.7 (needed to run PlantUML while generating the doc) wget or curl (needed to download PlantUML) + pdf2svg The following additional tools are used if they are present, or only for certain operations (like releases): diff --git a/doc/Makefile.am b/doc/Makefile.am index 4502787b1..a1297a6f3 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -77,7 +77,7 @@ ORG_FILES = \ org/init.el.in \ org/spot.css \ org/arch.tex \ - $(srcdir)/org/arch.png \ + $(srcdir)/org/arch.svg \ org/autcross.org \ org/autfilt.org \ org/csv.org \ @@ -90,7 +90,7 @@ ORG_FILES = \ org/hoa.org \ org/hierarchy.org \ org/hierarchy.tex \ - $(srcdir)/org/hierarchy.png \ + $(srcdir)/org/hierarchy.svg \ org/index.org \ org/install.org \ org/ioltl.org \ @@ -125,21 +125,24 @@ ORG_FILES = \ org/satmin.org \ org/satmin.tex \ org/setup.org \ - $(srcdir)/org/satmin.png + $(srcdir)/org/satmin.svg -$(srcdir)/org/satmin.png: org/satmin.tex +$(srcdir)/org/satmin.svg: org/satmin.tex cd $(srcdir)/org && \ - pdflatex -shell-escape satmin.tex && \ + pdflatex satmin.tex && \ + pdf2svg satmin.pdf satmin.svg && \ rm -f satmin.pdf satmin.aux satmin.log -$(srcdir)/org/arch.png: org/arch.tex +$(srcdir)/org/arch.svg: org/arch.tex cd $(srcdir)/org && \ - pdflatex -shell-escape arch.tex && \ + pdflatex arch.tex && \ + pdf2svg arch.pdf arch.svg && \ rm -f arch.pdf arch.aux arch.log -$(srcdir)/org/hierarchy.png: org/hierarchy.tex +$(srcdir)/org/hierarchy.svg: org/hierarchy.tex cd $(srcdir)/org && \ - pdflatex -shell-escape hierarchy.tex && \ + pdflatex hierarchy.tex && \ + pdf2svg hierarchy.pdf hierarchy.svg && \ rm -f hierarchy.pdf hierarchy.aux hierarchy.log $(srcdir)/org-stamp: $(ORG_FILES) $(configure_ac) diff --git a/doc/org/.dir-locals.el.in b/doc/org/.dir-locals.el.in index 62d969e67..4b1f6327c 100644 --- a/doc/org/.dir-locals.el.in +++ b/doc/org/.dir-locals.el.in @@ -23,7 +23,7 @@ (concat "@abs_top_builddir@/python/.libs:@abs_top_builddir@/spot/.libs:@abs_top_builddir@/buddy/src/.libs:" (getenv "DYLD_LIBRARY_PATH"))) (setenv "SPOT_DOTDEFAULT" "Brf(Lato)C(#ffffa0)") - (setenv "SPOT_DOTEXTRA" "edge[arrowhead=vee, arrowsize=.7]") + (setenv "SPOT_DOTEXTRA" "node[fontsize=12] fontsize=12 stylesheet=\"spot.css\" edge[arrowhead=vee, arrowsize=.7, fontsize=12]") (setq org-babel-temporary-directory "@abs_top_builddir@/doc/org/tmp") (make-directory org-babel-temporary-directory t) (org-babel-do-load-languages 'org-babel-load-languages @@ -62,7 +62,7 @@ :auto-preamble t) ("spot-static" :base-directory "." - :base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf" + :base-extension "css\\|js\\|png\\|svg\\|jpg\\|gif\\|pdf" :publishing-directory "../userdoc/" :recursive t :publishing-function org-publish-attachment) diff --git a/doc/org/arch.tex b/doc/org/arch.tex index 90306b998..4c346efbd 100644 --- a/doc/org/arch.tex +++ b/doc/org/arch.tex @@ -1,4 +1,4 @@ -\documentclass[convert={size=640}]{standalone} +\documentclass{standalone} \usepackage{tikz} \usetikzlibrary{arrows} \usetikzlibrary{arrows.meta} @@ -9,6 +9,7 @@ \begin{document} +\scalebox{1.2}{ \begin{tikzpicture} \tikzset{node distance=2mm, basicbox/.style={minimum width=#1,minimum height=8mm}, @@ -81,7 +82,7 @@ ($(libspot.south east)+(1mm,-1mm)$) -- ($(libspot.south west)+(-1mm,-1mm)$) -- cycle; \end{pgfonlayer} -\end{tikzpicture} +\end{tikzpicture}} \end{document} %%% Local Variables: %%% mode: latex diff --git a/doc/org/autfilt.org b/doc/org/autfilt.org index 20ba7b268..05e4d717f 100644 --- a/doc/org/autfilt.org +++ b/doc/org/autfilt.org @@ -493,12 +493,12 @@ digraph G { } #+end_example -#+BEGIN_SRC dot :file autfilt-ex1.png :cmdline -Tpng :var txt=autfilt-ex1 :exports results -$txt +#+BEGIN_SRC dot :file autfilt-ex1.svg :var txt=autfilt-ex1 :exports results + $txt #+END_SRC #+RESULTS: -[[file:autfilt-ex1.png]] +[[file:autfilt-ex1.svgz]] Using =-S= will "push" the acceptance membership of the transitions to the states: @@ -555,12 +555,12 @@ digraph G { } #+end_example -#+BEGIN_SRC dot :file autfilt-ex2.png :cmdline -Tpng :var txt=autfilt-ex2 :exports results +#+BEGIN_SRC dot :file autfilt-ex2.svg :var txt=autfilt-ex2 :exports results $txt #+END_SRC #+RESULTS: -[[file:autfilt-ex2.png]] +[[file:autfilt-ex2.svg]] Using =--cnf-acceptance= simply rewrites the acceptance condition in Conjunctive Normal Form: @@ -596,12 +596,12 @@ digraph G { } #+end_example -#+BEGIN_SRC dot :file autfilt-ex3.png :cmdline -Tpng :var txt=autfilt-ex3 :exports results +#+BEGIN_SRC dot :file autfilt-ex3.svg :var txt=autfilt-ex3 :exports results $txt #+END_SRC #+RESULTS: -[[file:autfilt-ex3.png]] +[[file:autfilt-ex3.svg]] Using =--remove-fin= transforms the automaton to remove all traces @@ -643,12 +643,12 @@ digraph G { } #+end_example -#+BEGIN_SRC dot :file autfilt-ex4.png :cmdline -Tpng :var txt=autfilt-ex4 :exports results +#+BEGIN_SRC dot :file autfilt-ex4.svg :var txt=autfilt-ex4 :exports results $txt #+END_SRC #+RESULTS: -[[file:autfilt-ex4.png]] +[[file:autfilt-ex4.svg]] Use =--mask-acc=NUM= to remove some acceptances sets and all transitions they contain. The acceptance condition will be updated to @@ -684,12 +684,12 @@ digraph G { } #+end_example -#+BEGIN_SRC dot :file autfilt-ex5.png :cmdline -Tpng :var txt=autfilt-ex5 :exports results +#+BEGIN_SRC dot :file autfilt-ex5.svg :var txt=autfilt-ex5 :exports results $txt #+END_SRC #+RESULTS: -[[file:autfilt-ex5.png]] +[[file:autfilt-ex5.svg]] ** Atomic proposition removal @@ -733,12 +733,12 @@ digraph G { } #+end_example -#+BEGIN_SRC dot :file autfilt-ex6a.png :cmdline -Tpng :var txt=autfilt-ex6a :exports results +#+BEGIN_SRC dot :file autfilt-ex6a.svg :var txt=autfilt-ex6a :exports results $txt #+END_SRC #+RESULTS: -[[file:autfilt-ex6a.png]] +[[file:autfilt-ex6a.svg]] #+NAME: autfilt-ex6b #+BEGIN_SRC sh :results verbatim :exports code @@ -766,12 +766,12 @@ digraph G { } #+end_example -#+BEGIN_SRC dot :file autfilt-ex6b.png :cmdline -Tpng :var txt=autfilt-ex6b :exports results +#+BEGIN_SRC dot :file autfilt-ex6b.svg :var txt=autfilt-ex6b :exports results $txt #+END_SRC #+RESULTS: -[[file:autfilt-ex6b.png]] +[[file:autfilt-ex6b.svg]] #+NAME: autfilt-ex6c #+BEGIN_SRC sh :results verbatim :exports code @@ -780,12 +780,12 @@ autfilt --remove-ap=a=1 aut-ex1.hoa --dot=.a #+RESULTS: autfilt-ex6c -#+BEGIN_SRC dot :file autfilt-ex6c.png :cmdline -Tpng :var txt=autfilt-ex6c :exports results +#+BEGIN_SRC dot :file autfilt-ex6c.svg :var txt=autfilt-ex6c :exports results $txt #+END_SRC #+RESULTS: -[[file:autfilt-ex6c.png]] +[[file:autfilt-ex6c.svg]] ** Testing word acceptance @@ -886,12 +886,12 @@ digraph G { } #+end_example -#+BEGIN_SRC dot :file autfilt-hlword.png :cmdline -Tpng :var txt=highlight-word :exports results +#+BEGIN_SRC dot :file autfilt-hlword.svg :var txt=highlight-word :exports results $txt #+END_SRC #+RESULTS: -[[file:autfilt-hlword.png]] +[[file:autfilt-hlword.svg]] We can change the color by prefixing the word with a number and a @@ -930,12 +930,12 @@ digraph G { } #+end_example -#+BEGIN_SRC dot :file autfilt-hlword2.png :cmdline -Tpng :var txt=highlight-word2 :exports results +#+BEGIN_SRC dot :file autfilt-hlword2.svg :var txt=highlight-word2 :exports results $txt #+END_SRC #+RESULTS: -[[file:autfilt-hlword2.png]] +[[file:autfilt-hlword2.svg]] @@ -978,12 +978,12 @@ digraph G { } #+end_example -#+BEGIN_SRC dot :file autfilt-hlnondet.png :cmdline -Tpng :var txt=highlight-nondet :exports results +#+BEGIN_SRC dot :file autfilt-hlnondet.svg :var txt=highlight-nondet :exports results $txt #+END_SRC #+RESULTS: -[[file:autfilt-hlnondet.png]] +[[file:autfilt-hlnondet.svg]] #+BEGIN_SRC sh :results silent :exports results diff --git a/doc/org/concepts.org b/doc/org/concepts.org index 22933274d..9f79718a8 100644 --- a/doc/org/concepts.org +++ b/doc/org/concepts.org @@ -132,12 +132,12 @@ which $a$ is always true, and $b$ is true infinitely often. ltl2tgba 'G(a) & GF(b)' -B -d #+END_SRC -#+BEGIN_SRC dot :file concept-buchi1.png :cmdline -Tpng :var txt=buchi-example1 :exports results +#+BEGIN_SRC dot :file concept-buchi1.svg :var txt=buchi-example1 :exports results $txt #+END_SRC #+RESULTS: -[[file:concept-buchi1.png]] +[[file:concept-buchi1.svg]] The above automaton would accept the [[#word][ω-word we used previously as an @@ -153,12 +153,12 @@ the [[#ltl][LTL formula]] =G(door_open -> light_on)= that specifies that ltl2tgba 'G(door_open -> light_on)' -d -C #+END_SRC -#+BEGIN_SRC dot :file concept-buchi2.png :cmdline -Tpng :var txt=buchi-example2 :exports results +#+BEGIN_SRC dot :file concept-buchi2.svg :var txt=buchi-example2 :exports results $txt #+END_SRC #+RESULTS: -[[file:concept-buchi.png]] +[[file:concept-buchi.svg]] The =1= displayed on the edge that loops on state =1= should be read as /true/, i.e., the Boolean formula that accepts @@ -186,12 +186,12 @@ instant. #+BEGIN_SRC sh :results verbatim :exports none ltl2tgba 'G(a <-> Xb)' -B -d #+END_SRC -#+BEGIN_SRC dot :file concept-buchi3.png :cmdline -Tpng :var txt=buchi-example3 :exports results +#+BEGIN_SRC dot :file concept-buchi3.svg :var txt=buchi-example3 :exports results $txt #+END_SRC #+RESULTS: -[[file:concept-buchi3.png]] +[[file:concept-buchi3.svg]] * Transitions vs. Edges :PROPERTIES: @@ -224,12 +224,12 @@ State: 1 1 0 0 0 EOF autfilt --merge concept-te.hoa -d #+END_SRC -#+BEGIN_SRC dot :file concept-te1.png :cmdline -Tpng :var txt=te1 :exports results +#+BEGIN_SRC dot :file concept-te1.svg :var txt=te1 :exports results $txt #+END_SRC #+RESULTS: -[[file:concept-te1.png]] +[[file:concept-te1.svg]] #+NAME: size #+BEGIN_SRC sh :exports none @@ -246,12 +246,12 @@ following transition structure: #+BEGIN_SRC sh :results verbatim :exports none autfilt concept-te.hoa -d #+END_SRC -#+BEGIN_SRC dot :file concept-te2.png :cmdline -Tpng :var txt=te2 :exports results +#+BEGIN_SRC dot :file concept-te2.svg :var txt=te2 :exports results $txt #+END_SRC #+RESULTS: -[[file:concept-te2.png]] +[[file:concept-te2.svg]] The above is actually a different automaton from the point of view of Spot: it is an automaton with call_size(arg="%t")[:results raw] edges @@ -300,12 +300,12 @@ contains a single state. ltl2tgba 'GFa & GFb' | autfilt -S --sat-minimize -d #+END_SRC -#+BEGIN_SRC dot :file concept-gba1.png :cmdline -Tpng :var txt=gen-buchi-example1 :exports results +#+BEGIN_SRC dot :file concept-gba1.svg :var txt=gen-buchi-example1 :exports results $txt #+END_SRC #+RESULTS: -[[file:concept-gba1.png]] +[[file:concept-gba1.svg]] The accepting runs are only those that visit infinitely often both states, so that means this automaton accepts all words in which $a$ @@ -321,12 +321,12 @@ its more complex look). ltl2tgba 'GFa & GFb' -S -d #+END_SRC -#+BEGIN_SRC dot :file concept-gba2.png :cmdline -Tpng :var txt=gen-buchi-example2 :exports results +#+BEGIN_SRC dot :file concept-gba2.svg :var txt=gen-buchi-example2 :exports results $txt #+END_SRC #+RESULTS: -[[file:concept-gba2.png]] +[[file:concept-gba2.svg]] Speaking of size... Let us note that using a generalized Büchi @@ -341,12 +341,12 @@ equivalent Büchi automaton has three state: ltl2tgba 'GFa & GFb' -B -d #+END_SRC -#+BEGIN_SRC dot :file concept-gba-vs-ba.png :cmdline -Tpng :var txt=gen-buchi-example-ba :exports results +#+BEGIN_SRC dot :file concept-gba-vs-ba.svg :var txt=gen-buchi-example-ba :exports results $txt #+END_SRC #+RESULTS: -[[file:concept-gba-vs-ba.png]] +[[file:concept-gba-vs-ba.svg]] Finally, let us point the obvious fact that a Büchi automaton is a particular case of generalized-Büchi acceptance with a single @@ -360,12 +360,12 @@ both. ltl2tgba 'GFa & GFb' -B -d.b #+END_SRC -#+BEGIN_SRC dot :file concept-gba-vs-ba2.png :cmdline -Tpng :var txt=gen-buchi-example-ba2 :exports results +#+BEGIN_SRC dot :file concept-gba-vs-ba2.svg :var txt=gen-buchi-example-ba2 :exports results $txt #+END_SRC #+RESULTS: -[[file:concept-gba-vs-ba2.png]] +[[file:concept-gba-vs-ba2.svg]] * Transition-based, vs. State-based acceptance :PROPERTIES: @@ -387,12 +387,12 @@ Here is an example of Transition-based Generalized Büchi Automaton #+BEGIN_SRC sh :results verbatim :exports none ltl2tgba 'GF(a & X(a U b))' -d #+END_SRC -#+BEGIN_SRC dot :file concept-tgba1.png :cmdline -Tpng :var txt=tgba-example1 :exports results +#+BEGIN_SRC dot :file concept-tgba1.svg :var txt=tgba-example1 :exports results $txt #+END_SRC #+RESULTS: -[[file:concept-tgba1.png]] +[[file:concept-tgba1.svg]] This automaton accept all ω-words that infinitely often match the pattern $a^+;b$ (that is: a positive number of letters where $a$ is @@ -406,12 +406,12 @@ automaton: #+BEGIN_SRC sh :results verbatim :exports none ltl2tgba 'GFa' -d #+END_SRC -#+BEGIN_SRC dot :file concept-tgba2.png :cmdline -Tpng :var txt=tgba-example2 :exports results +#+BEGIN_SRC dot :file concept-tgba2.svg :var txt=tgba-example2 :exports results $txt #+END_SRC #+RESULTS: -[[file:concept-tgba2.png]] +[[file:concept-tgba2.svg]] While the same property require a 2-state Büchi automaton using state-based acceptance: @@ -420,12 +420,12 @@ state-based acceptance: #+BEGIN_SRC sh :results verbatim :exports none ltl2tgba 'GFa' -B -d #+END_SRC -#+BEGIN_SRC dot :file concept-tba-vs-ba.png :cmdline -Tpng :var txt=tgba-example3 :exports results +#+BEGIN_SRC dot :file concept-tba-vs-ba.svg :var txt=tgba-example3 :exports results $txt #+END_SRC #+RESULTS: -[[file:concept-tba-vs-ba.png]] +[[file:concept-tba-vs-ba.svg]] #+BEGIN_implem @@ -547,12 +547,12 @@ by Spot: #+BEGIN_SRC sh :results verbatim :exports none ltlfilt -l -f 'GFa | FGb' | ltl2dstar --output-format=hoa - - | autfilt --merge -d.a #+END_SRC -#+BEGIN_SRC dot :file concept-twa1.png :cmdline -Tpng :var txt=twa-example1 :exports results +#+BEGIN_SRC dot :file concept-twa1.svg :var txt=twa-example1 :exports results $txt #+END_SRC #+RESULTS: -[[file:concept-twa1.png]] +[[file:concept-twa1.svg]] * Alternating ω-automata @@ -600,12 +600,12 @@ State: 4 "t" EOF #+END_SRC -#+BEGIN_SRC dot :file concepts-alt.png :cmdline -Tpng :var txt=concepts-alt :exports results +#+BEGIN_SRC dot :file concepts-alt.svg :var txt=concepts-alt :exports results $txt #+END_SRC #+RESULTS: -[[file:concepts-alt.png]] +[[file:concepts-alt.svg]] In this picture, the universal edges appear as arrows with a white tip going to a small dot, from which additional arrows connect to the @@ -668,12 +668,12 @@ accept_all: accept_all: #+BEGIN_SRC sh :results verbatim :exports none ltl2tgba -Bd 'p0 | GFp1' #+END_SRC -#+BEGIN_SRC dot :file concept-never1.png :cmdline -Tpng :var txt=never-ex1 :exports results +#+BEGIN_SRC dot :file concept-never1.svg :var txt=never-ex1 :exports results $txt #+END_SRC #+RESULTS: -[[file:concept-never1.png]] +[[file:concept-never1.svg]] The two different types of never claims differ only in a few syntactic elements: =do..od= instead of =if..fi=, =assert= instead of =goto @@ -721,7 +721,7 @@ ltl2tgba --ba --lbtt 'p0 | GFp1' -1 #+end_example -[[file:concept-never1.png]] +[[file:concept-never1.svg]] The format has been extended in two ways. First, LBTT extended it to support transition-based acceptance. This is indicated by a =t= on @@ -751,12 +751,12 @@ ltl2tgba --lbtt 'p0 | GFp1' #+BEGIN_SRC sh :results verbatim :exports none ltl2tgba -d 'p0 | GFp1' #+END_SRC -#+BEGIN_SRC dot :file concept-lbtt2.png :cmdline -Tpng :var txt=lbtt-ex2 :exports results +#+BEGIN_SRC dot :file concept-lbtt2.svg :var txt=lbtt-ex2 :exports results $txt #+END_SRC #+RESULTS: -[[file:concept-lbtt2.png]] +[[file:concept-lbtt2.svg]] We call this format the LBTT format because of this extension. @@ -824,12 +824,12 @@ Acc-Sig: +0 +1 #+BEGIN_SRC sh :results verbatim :exports none echo '| F G p0 G F p1' | ltl2dstar --output-format=native - - | autfilt -d.a #+END_SRC -#+BEGIN_SRC dot :file concept-dstar.png :cmdline -Tpng :var txt=dstar-example1 :exports results +#+BEGIN_SRC dot :file concept-dstar.svg :var txt=dstar-example1 :exports results $txt #+END_SRC #+RESULTS: -[[file:concept-dstar.png]] +[[file:concept-dstar.svg]] * Hanoi Omega-Automaton format (HOA) :PROPERTIES: @@ -883,12 +883,12 @@ State: 3 {1 3} #+BEGIN_SRC sh :results verbatim :exports none ltldo ltl2dstar -f 'FGp0 | GFp1' -d.a #+END_SRC -#+BEGIN_SRC dot :file concept-hoa.png :cmdline -Tpng :var txt=hoa1 :exports results +#+BEGIN_SRC dot :file concept-hoa.svg :var txt=hoa1 :exports results $txt #+END_SRC #+RESULTS: -[[file:concept-hoa.png]] +[[file:concept-hoa.svg]] Since this file format is the only one able to represent the range of @@ -997,12 +997,12 @@ Here is for instance a translation of ={(1;1)[*]}[]->a= discussed [[#psl][above] #+BEGIN_SRC sh :results verbatim :exports code ltl2tgba '{(1;1)[*]}[]->a' -d #+END_SRC -#+BEGIN_SRC dot :file concept-ltl2tgba.png :cmdline -Tpng :var txt=ltl2tgba1 :exports results +#+BEGIN_SRC dot :file concept-ltl2tgba.svg :var txt=ltl2tgba1 :exports results $txt #+END_SRC #+RESULTS: -[[file:concept-ltl2tgba.png]] +[[file:concept-ltl2tgba.svg]] [[file:tut10.org][Another page shows how to translate an LTL formula into a never claim]] @@ -1013,7 +1013,7 @@ from the command-line, Python, or C++. :CUSTOM_ID: architecture :END: -[[file:arch.png]] +[[file:arch.svg]] The Spot project can be broken down into several parts, as shown above. Orange boxes are C/C++ libraries. Red boxes are command-line diff --git a/doc/org/dstar2tgba.org b/doc/org/dstar2tgba.org index 9c69cd49e..3ea005063 100644 --- a/doc/org/dstar2tgba.org +++ b/doc/org/dstar2tgba.org @@ -114,12 +114,12 @@ digraph G { } #+end_example -#+BEGIN_SRC dot :file fagfb.png :cmdline -Tpng :var txt=fagfb :exports results +#+BEGIN_SRC dot :file fagfb.svg :var txt=fagfb :exports results $txt #+END_SRC #+RESULTS: -[[file:fagfb.png]] +[[file:fagfb.svg]] We used =--dot=a= to display Spot's representation of the acceptance condition (which uses the same convention as in the [[file:hoa.org][HOA format]]). The @@ -158,11 +158,11 @@ digraph G { } #+end_example -#+BEGIN_SRC dot :file fagfb2ba.png :cmdline -Tpng :var txt=fagfb2ba :exports results +#+BEGIN_SRC dot :file fagfb2ba.svg :var txt=fagfb2ba :exports results $txt #+END_SRC #+RESULTS: -[[file:fagfb2ba.png]] +[[file:fagfb2ba.svg]] Note that by default the output is not complete. Use =-C= if you want @@ -243,12 +243,12 @@ digraph G { } #+end_example -#+BEGIN_SRC dot :file gfafgb.png :cmdline -Tpng :var txt=gfafgb :exports results +#+BEGIN_SRC dot :file gfafgb.svg :var txt=gfafgb :exports results $txt #+END_SRC #+RESULTS: -[[file:gfafgb.png]] +[[file:gfafgb.svg]] @@ -294,11 +294,11 @@ digraph G { } #+end_example -#+BEGIN_SRC dot :file gfagfb2ba.png :cmdline -Tpng :var txt=gfagfb2ba :exports results +#+BEGIN_SRC dot :file gfagfb2ba.svg :var txt=gfagfb2ba :exports results $txt #+END_SRC #+RESULTS: -[[file:gfagfb2ba.png]] +[[file:gfagfb2ba.svg]] Obviously the resulting automaton could be simplified further, as the minimal TGBA for this formula has a single state. (Patches diff --git a/doc/org/genaut.org b/doc/org/genaut.org index 3bb4045dc..74d8fad99 100644 --- a/doc/org/genaut.org +++ b/doc/org/genaut.org @@ -34,12 +34,12 @@ For instance: genaut --ks-nca=2 --dot #+END_SRC -#+BEGIN_SRC dot :file kscobuchi2.png :cmdline -Tpng :var txt=kscobuchi2 :exports results +#+BEGIN_SRC dot :file kscobuchi2.svg :var txt=kscobuchi2 :exports results $txt #+END_SRC #+RESULTS: -[[file:kscobuchi2.png]] +[[file:kscobuchi2.svg]] The patterns can be specified using a range of the form =N= (a single value), =N..M= (all values between N and M included), or =..M= (all diff --git a/doc/org/hierarchy.org b/doc/org/hierarchy.org index 5d942eef8..b92b00921 100644 --- a/doc/org/hierarchy.org +++ b/doc/org/hierarchy.org @@ -18,7 +18,7 @@ the /recurrence/ class includes the /obligation/ class which also includes the /safety/ and /guarantee/ classes, as well as the unnamed intersection of /safety/ and /guarantee/ (=B= in the picture). -[[file:hierarchy.png]] +[[file:hierarchy.svg]] Forget about the LTL properties and about the red letters displayed in this picture for a moment. @@ -307,12 +307,12 @@ non-determinism occurs): ltl2tgba 'Fa R b' | autfilt --highlight-nondet -d #+END_SRC -#+BEGIN_SRC dot :file hier-oblig-1.png :cmdline -Tpng :var txt=hier-oblig-1 :exports results +#+BEGIN_SRC dot :file hier-oblig-1.svg :var txt=hier-oblig-1 :exports results $txt #+END_SRC #+RESULTS: -[[file:hier-oblig-1.png]] +[[file:hier-oblig-1.svg]] Note that the above automaton uses transition-based acceptance, but since it is an obligation, using transition-based acceptance will not @@ -324,12 +324,12 @@ improve anything, so we might as well require a Büchi automaton with ltl2tgba -B 'Fa R b' | autfilt --highlight-nondet -d #+END_SRC -#+BEGIN_SRC dot :file hier-oblig-1b.png :cmdline -Tpng :var txt=hier-oblig-1b :exports results +#+BEGIN_SRC dot :file hier-oblig-1b.svg :var txt=hier-oblig-1b :exports results $txt #+END_SRC #+RESULTS: -[[file:hier-oblig-1b.png]] +[[file:hier-oblig-1b.svg]] With =ltl2tgba -D= we get a (minimal) deterministic weak Büchi @@ -340,12 +340,12 @@ automaton instead. ltl2tgba -D 'Fa R b' -d #+END_SRC -#+BEGIN_SRC dot :file hier-oblig-2.png :cmdline -Tpng :var txt=hier-oblig-2 :exports results +#+BEGIN_SRC dot :file hier-oblig-2.svg :var txt=hier-oblig-2 :exports results $txt #+END_SRC #+RESULTS: -[[file:hier-oblig-2.png]] +[[file:hier-oblig-2.svg]] When we called =ltl2tgba=, without the option =-D=, the two automata @@ -364,12 +364,12 @@ for the obligation property =a <-> GXa=: #+BEGIN_SRC sh :results verbatim :exports code ltldo 'ltl2dstar --automata=streett' -f 'a <-> GXa' -d.a #+END_SRC -#+BEGIN_SRC dot :file hier-oblig-3.png :cmdline -Tpng :var txt=hier-oblig-3 :exports results +#+BEGIN_SRC dot :file hier-oblig-3.svg :var txt=hier-oblig-3 :exports results $txt #+END_SRC #+RESULTS: -[[file:hier-oblig-3.png]] +[[file:hier-oblig-3.svg]] We can now minimize this automaton with: @@ -377,11 +377,11 @@ We can now minimize this automaton with: #+BEGIN_SRC sh :results verbatim :exports code ltldo 'ltl2dstar --automata=streett' -f 'a <-> GXa' | autfilt -D -C -d #+END_SRC -#+BEGIN_SRC dot :file hier-oblig-4.png :cmdline -Tpng :var txt=hier-oblig-4 :exports results +#+BEGIN_SRC dot :file hier-oblig-4.svg :var txt=hier-oblig-4 :exports results $txt #+END_SRC #+RESULTS: -[[file:hier-oblig-4.png]] +[[file:hier-oblig-4.svg]] Here we have used option =-C= to keep the automaton complete, so that the comparison with =ltl2dstar= is fair, since =ltl2dstar= always @@ -411,23 +411,23 @@ ltlfilt -f 'a U Xb' --format='%[v]h' #+BEGIN_SRC sh :results verbatim :exports code ltl2tgba 'a U Xb' | autfilt --highlight-nondet -d #+END_SRC -#+BEGIN_SRC dot :file hier-guarantee-1.png :cmdline -Tpng :var txt=hier-guarantee-1 :exports results +#+BEGIN_SRC dot :file hier-guarantee-1.svg :var txt=hier-guarantee-1 :exports results $txt #+END_SRC #+RESULTS: -[[file:hier-guarantee-1.png]] +[[file:hier-guarantee-1.svg]] #+NAME: hier-guarantee-2 #+BEGIN_SRC sh :results verbatim :exports code ltl2tgba -D 'a U Xb' -d #+END_SRC -#+BEGIN_SRC dot :file hier-guarantee-2.png :cmdline -Tpng :var txt=hier-guarantee-2 :exports results +#+BEGIN_SRC dot :file hier-guarantee-2.svg :var txt=hier-guarantee-2 :exports results $txt #+END_SRC #+RESULTS: -[[file:hier-guarantee-2.png]] +[[file:hier-guarantee-2.svg]] ** Safety :PROPERTIES: @@ -461,12 +461,12 @@ ltlfilt -f '(a W Gb) M b' --format='%[v]h' #+BEGIN_SRC sh :results verbatim :exports code ltl2tgba '(a W Gb) M b' | autfilt --highlight-nondet -d #+END_SRC -#+BEGIN_SRC dot :file hier-safety-1.png :cmdline -Tpng :var txt=hier-safety-1 :exports results +#+BEGIN_SRC dot :file hier-safety-1.svg :var txt=hier-safety-1 :exports results $txt #+END_SRC #+RESULTS: -[[file:hier-safety-1.png]] +[[file:hier-safety-1.svg]] Actually, marking all states of this automaton as accepting would not be wrong, the translator simply does not know it. @@ -478,12 +478,12 @@ that is guaranteed to be minimal, and where all runs are accepting. #+BEGIN_SRC sh :results verbatim :exports code ltl2tgba -D '(a W Gb) M b' -d #+END_SRC -#+BEGIN_SRC dot :file hier-safety-2.png :cmdline -Tpng :var txt=hier-safety-2 :exports results +#+BEGIN_SRC dot :file hier-safety-2.svg :var txt=hier-safety-2 :exports results $txt #+END_SRC #+RESULTS: -[[file:hier-safety-2.png]] +[[file:hier-safety-2.svg]] If you are working with safety formula, and know you want to work with @@ -497,23 +497,23 @@ extended into valid ω-words). #+BEGIN_SRC sh :results verbatim :exports code ltl2tgba -M '(a W Gb) M b' | autfilt --highlight-nondet -d #+END_SRC -#+BEGIN_SRC dot :file hier-safety-1m.png :cmdline -Tpng :var txt=hier-safety-1m :exports results +#+BEGIN_SRC dot :file hier-safety-1m.svg :var txt=hier-safety-1m :exports results $txt #+END_SRC #+RESULTS: -[[file:hier-safety-1m.png]] +[[file:hier-safety-1m.svg]] #+NAME: hier-safety-2m #+BEGIN_SRC sh :results verbatim :exports code ltl2tgba -M -D '(a W Gb) M b' -d #+END_SRC -#+BEGIN_SRC dot :file hier-safety-2m.png :cmdline -Tpng :var txt=hier-safety-2m :exports results +#+BEGIN_SRC dot :file hier-safety-2m.svg :var txt=hier-safety-2m :exports results $txt #+END_SRC #+RESULTS: -[[file:hier-safety-2m.png]] +[[file:hier-safety-2m.svg]] Note that the =-M= option can be used with formulas that are not @@ -550,12 +550,12 @@ ltlfilt -f 'GFa' --format='%[v]h' #+BEGIN_SRC sh :results verbatim :exports code ltl2tgba 'GFa' -d #+END_SRC -#+BEGIN_SRC dot :file hier-recurrence-1.png :cmdline -Tpng :var txt=hier-recurrence-1 :exports results +#+BEGIN_SRC dot :file hier-recurrence-1.svg :var txt=hier-recurrence-1 :exports results $txt #+END_SRC #+RESULTS: -[[file:hier-recurrence-1.png]] +[[file:hier-recurrence-1.svg]] Using state-based acceptance, at least two states are required. For instance: @@ -563,12 +563,12 @@ Using state-based acceptance, at least two states are required. For instance: #+BEGIN_SRC sh :results verbatim :exports code ltl2tgba -S 'GFa' -d #+END_SRC -#+BEGIN_SRC dot :file hier-recurrence-2.png :cmdline -Tpng :var txt=hier-recurrence-2 :exports results +#+BEGIN_SRC dot :file hier-recurrence-2.svg :var txt=hier-recurrence-2 :exports results $txt #+END_SRC #+RESULTS: -[[file:hier-recurrence-2.png]] +[[file:hier-recurrence-2.svg]] Here is an example of a formula for which =ltl2tgba= does not produce a @@ -585,12 +585,12 @@ ltlfilt -f 'G(Gb | Fa)' --format='%[v]h' #+BEGIN_SRC sh :results verbatim :exports code ltl2tgba -D 'G(Gb | Fa)' | autfilt --highlight-nondet -d #+END_SRC -#+BEGIN_SRC dot :file hier-recurrence-3.png :cmdline -Tpng :var txt=hier-recurrence-3 :exports results +#+BEGIN_SRC dot :file hier-recurrence-3.svg :var txt=hier-recurrence-3 :exports results $txt #+END_SRC #+RESULTS: -[[file:hier-recurrence-3.png]] +[[file:hier-recurrence-3.svg]] One way to obtain a deterministic Büchi automaton (it has to exist, since this is a /recurrence/ property), is to chain a few algorithms implemented in Spot: @@ -604,11 +604,11 @@ a /recurrence/ property), is to chain a few algorithms implemented in Spot: #+BEGIN_SRC sh :results verbatim :exports code ltl2tgba -G -D 'G(Gb | Fa)' -d.a #+END_SRC - #+BEGIN_SRC dot :file hier-recurrence-4.png :cmdline -Tpng :var txt=hier-recurrence-4 :exports results + #+BEGIN_SRC dot :file hier-recurrence-4.svg :var txt=hier-recurrence-4 :exports results $txt #+END_SRC #+RESULTS: - [[file:hier-recurrence-4.png]] + [[file:hier-recurrence-4.svg]] 2. Transform the parity acceptance into Rabin acceptance: this is done with =autfilt --generalized-rabin=. Because of the type of @@ -620,12 +620,12 @@ a /recurrence/ property), is to chain a few algorithms implemented in Spot: ltl2tgba -G -D 'G(Gb | Fa)' | autfilt --generalized-rabin -d.a #+END_SRC - #+BEGIN_SRC dot :file hier-recurrence-5.png :cmdline -Tpng :var txt=hier-recurrence-5 :exports results + #+BEGIN_SRC dot :file hier-recurrence-5.svg :var txt=hier-recurrence-5 :exports results $txt #+END_SRC #+RESULTS: - [[file:hier-recurrence-5.png]] + [[file:hier-recurrence-5.svg]] (The only change here is in the acceptance condition.) @@ -640,12 +640,12 @@ a /recurrence/ property), is to chain a few algorithms implemented in Spot: autfilt -S --generalized-rabin -d.a #+END_SRC - #+BEGIN_SRC dot :file hier-recurrence-6.png :cmdline -Tpng :var txt=hier-recurrence-6 :exports results + #+BEGIN_SRC dot :file hier-recurrence-6.svg :var txt=hier-recurrence-6 :exports results $txt #+END_SRC #+RESULTS: - [[file:hier-recurrence-6.png]] + [[file:hier-recurrence-6.svg]] 4. Finally, convert the resulting automaton to BA, using =autfilt -B=. Spot can convert automata with any acceptance condition to @@ -664,12 +664,12 @@ a /recurrence/ property), is to chain a few algorithms implemented in Spot: autfilt -B -D -d.a #+END_SRC - #+BEGIN_SRC dot :file hier-recurrence-7.png :cmdline -Tpng :var txt=hier-recurrence-7 :exports results + #+BEGIN_SRC dot :file hier-recurrence-7.svg :var txt=hier-recurrence-7 :exports results $txt #+END_SRC #+RESULTS: - [[file:hier-recurrence-7.png]] + [[file:hier-recurrence-7.svg]] Here we are lucky that the deterministic Büchi automaton is even smaller than the original non-deterministic version. As said earlier, @@ -683,12 +683,12 @@ ltl2tgba -G -D 'G(Gb | Fa)' | autfilt -B -D -d.a #+END_SRC -#+BEGIN_SRC dot :file hier-recurrence-8.png :cmdline -Tpng :var txt=hier-recurrence-8 :exports results +#+BEGIN_SRC dot :file hier-recurrence-8.svg :var txt=hier-recurrence-8 :exports results $txt #+END_SRC #+RESULTS: -[[file:hier-recurrence-8.png]] +[[file:hier-recurrence-8.svg]] It is likely that =ltl2tgba= will implement all this processing chain in the future. @@ -703,12 +703,12 @@ persistence formula is =FGa=, and using =-D= on this is hopeless. #+BEGIN_SRC sh :results verbatim :exports code ltl2tgba -D FGa -d.a #+END_SRC -#+BEGIN_SRC dot :file hier-persistence-1.png :cmdline -Tpng :var txt=hier-persistence-1 :exports results +#+BEGIN_SRC dot :file hier-persistence-1.svg :var txt=hier-persistence-1 :exports results $txt #+END_SRC #+RESULTS: -[[file:hier-persistence-1.png]] +[[file:hier-persistence-1.svg]] However since the *negation* of =FGa= is a /recurrence/, this negation @@ -723,12 +723,12 @@ ltlfilt --negate -f FGa | ltl2tgba -D | autfilt --complement -d.a #+END_SRC -#+BEGIN_SRC dot :file hier-persistence-2.png :cmdline -Tpng :var txt=hier-persistence-2 :exports results +#+BEGIN_SRC dot :file hier-persistence-2.svg :var txt=hier-persistence-2 :exports results $txt #+END_SRC #+RESULTS: -[[file:hier-persistence-2.png]] +[[file:hier-persistence-2.svg]] Note that in this example, we know that =GFa= is trivial enough that =ltl2tgba -D GFa= will generate a deterministic automaton. In the @@ -765,12 +765,12 @@ Unfortunately the default output of the translation is not weak: #+BEGIN_SRC sh :results verbatim :exports code ltl2tgba 'F(G!a | G(b U a))' -d #+END_SRC -#+BEGIN_SRC dot :file hier-persistence-3.png :cmdline -Tpng :var txt=hier-persistence-3 :exports results +#+BEGIN_SRC dot :file hier-persistence-3.svg :var txt=hier-persistence-3 :exports results $txt #+END_SRC #+RESULTS: -[[file:hier-persistence-3.png]] +[[file:hier-persistence-3.svg]] Furthermore it appears that =ltl2tgba= does generate a deterministic Büchi automaton for the complement, instead we get a non-deterministic @@ -782,12 +782,12 @@ ltlfilt --negate -f 'F(G!a | G(b U a))' | ltl2tgba -D | autfilt --highlight-nondet=5 -d.a #+END_SRC -#+BEGIN_SRC dot :file hier-persistence-4.png :cmdline -Tpng :var txt=hier-persistence-4 :exports results +#+BEGIN_SRC dot :file hier-persistence-4.svg :var txt=hier-persistence-4 :exports results $txt #+END_SRC #+RESULTS: -[[file:hier-persistence-4.png]] +[[file:hier-persistence-4.svg]] So let us use the same tricks as in the previous section, determinizing this automaton into a Rabin automaton, and then back to @@ -800,12 +800,12 @@ ltlfilt --negate -f 'F(G!a | G(b U a))' | autfilt --generalized-rabin | autfilt --tgba -D -d.a #+END_SRC -#+BEGIN_SRC dot :file hier-persistence-5.png :cmdline -Tpng :var txt=hier-persistence-5 :exports results +#+BEGIN_SRC dot :file hier-persistence-5.svg :var txt=hier-persistence-5 :exports results $txt #+END_SRC #+RESULTS: -[[file:hier-persistence-5.png]] +[[file:hier-persistence-5.svg]] This is a deterministic Büchi automaton for the negation of our formula. Now we can complement it to obtain a deterministic co-Büchi automaton for =F(G!a | G(b U a))=: @@ -818,12 +818,12 @@ ltlfilt --negate -f 'F(G!a | G(b U a))' | autfilt --tgba -D | autfilt --complement -d.ab #+END_SRC -#+BEGIN_SRC dot :file hier-persistence-6.png :cmdline -Tpng :var txt=hier-persistence-6 :exports results +#+BEGIN_SRC dot :file hier-persistence-6.svg :var txt=hier-persistence-6 :exports results $txt #+END_SRC #+RESULTS: -[[file:hier-persistence-6.png]] +[[file:hier-persistence-6.svg]] And finally we convert the result back to Büchi: @@ -836,10 +836,10 @@ ltlfilt --negate -f 'F(G!a | G(b U a))' | autfilt --complement -B -d #+END_SRC -#+BEGIN_SRC dot :file hier-persistence-7.png :cmdline -Tpng :var txt=hier-persistence-7 :exports results +#+BEGIN_SRC dot :file hier-persistence-7.svg :var txt=hier-persistence-7 :exports results $txt #+END_SRC #+RESULTS: -[[file:hier-persistence-7.png]] +[[file:hier-persistence-7.svg]] That is indeed, a weak automaton. diff --git a/doc/org/hierarchy.tex b/doc/org/hierarchy.tex index 502910daf..71607fea4 100644 --- a/doc/org/hierarchy.tex +++ b/doc/org/hierarchy.tex @@ -1,4 +1,4 @@ -\documentclass[convert={size=360}]{standalone} +\documentclass{standalone} \usepackage{tikz} \usetikzlibrary{shadows} \def\F{\mathsf{F}} % in future @@ -8,6 +8,7 @@ \def\mycyan{cyan!30} \def\mypink{magenta!30} +\scalebox{1.2}{ \begin{tikzpicture}[scale=.9] \draw[drop shadow,fill=white] (0,0) rectangle (6,7); @@ -36,7 +37,7 @@ \node[above,red] at (saf.north) {\tt S}; \node[above,red] at (gua.north) {\tt G}; \node[above,red] at (3,0.3) {\tt B}; - \end{tikzpicture} + \end{tikzpicture}} \end{document} %%% Local Variables: %%% mode: latex diff --git a/doc/org/hoa.org b/doc/org/hoa.org index 728024199..f86a27fda 100644 --- a/doc/org/hoa.org +++ b/doc/org/hoa.org @@ -1014,12 +1014,12 @@ digraph G { } #+end_example -#+BEGIN_SRC dot :file decorate.png :cmdline -Tpng :var txt=decorate :exports results +#+BEGIN_SRC dot :file decorate.svg :var txt=decorate :exports results $txt #+END_SRC #+RESULTS: -[[file:decorate.png]] +[[file:decorate.svg]] On the above example, we call =autfilt= with option =-d#= to display diff --git a/doc/org/init.el.in b/doc/org/init.el.in index 19e922c26..10714af1e 100644 --- a/doc/org/init.el.in +++ b/doc/org/init.el.in @@ -57,7 +57,7 @@ (concat "@abs_top_builddir@/python/.libs:@abs_top_builddir@/spot/.libs:@abs_top_builddir@/buddy/src/.libs:" (getenv "DYLD_LIBRARY_PATH"))) (setenv "SPOT_DOTDEFAULT" "Brf(Lato)C(#ffffa0)") -(setenv "SPOT_DOTEXTRA" "edge[arrowhead=vee, arrowsize=.7]") +(setenv "SPOT_DOTEXTRA" "node[fontsize=12] fontsize=12 stylesheet=\"spot.css\" edge[arrowhead=vee, arrowsize=.7, fontsize=12]") (setq org-export-html-home/up-format "