randaut: rename -d as -e
This is so that we can have -d as an alias for --dot everywhere. * bin/randaut.cc: Rename -d as -e. * NEWS: Mention the change. * doc/org/autfilt.org, doc/org/oaut.org, doc/org/randaut.org, tests/core/parseaut.test, tests/core/readsave.test: Adjust.
This commit is contained in:
parent
8c04e31a35
commit
ea5f52ddbb
7 changed files with 106 additions and 97 deletions
|
|
@ -73,35 +73,36 @@ The numbers of states can be controlled using the =-Q= option. This
|
|||
option will accept a range as argument, so for instance =-Q3..6= will
|
||||
generate an automaton with 3 to 6 states.
|
||||
|
||||
The number of edges can be controlled using the =-d= (or
|
||||
The number of edges can be controlled using the =-e= (or
|
||||
=--density=) option. The argument should be a number between 0 and 1.
|
||||
In an automaton with $Q$ states and density $d$, the degree of each
|
||||
In an automaton with $Q$ states and density $e$, the degree of each
|
||||
state will follow a normal distribution with mean $1+(Q-1)d$ and
|
||||
variance $(Q-1)d(1-d)$.
|
||||
variance $(Q-1)e(1-e)$.
|
||||
|
||||
In particular =-d0= will cause all states to have 1 successors, and
|
||||
=-d1= will cause all states to be interconnected.
|
||||
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
|
||||
randaut -Q3 -d0 2
|
||||
randaut -Q3 -e0 2
|
||||
#+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"]
|
||||
node[style=filled, fillcolor="#ffffa0"] edge[arrowhead=vee, arrowsize=.7]
|
||||
I [label="", style=invis, width=0]
|
||||
I -> 0
|
||||
0 [label="0"]
|
||||
0 [label=<0>]
|
||||
0 -> 2 [label=<!p0 & !p1>]
|
||||
1 [label="1"]
|
||||
1 [label=<1>]
|
||||
1 -> 1 [label=<!p0 & !p1>]
|
||||
2 [label="2"]
|
||||
2 [label=<2>]
|
||||
2 -> 1 [label=<!p0 & !p1>]
|
||||
}
|
||||
#+end_example
|
||||
|
|
@ -114,28 +115,29 @@ $txt
|
|||
|
||||
#+NAME: randaut3
|
||||
#+BEGIN_SRC sh :results verbatim :exports code
|
||||
randaut -Q3 -d1 2
|
||||
randaut -Q3 -e1 2
|
||||
#+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"]
|
||||
node[style=filled, fillcolor="#ffffa0"] edge[arrowhead=vee, arrowsize=.7]
|
||||
I [label="", style=invis, width=0]
|
||||
I -> 0
|
||||
0 [label="0"]
|
||||
0 [label=<0>]
|
||||
0 -> 2 [label=<!p0 & !p1>]
|
||||
0 -> 0 [label=<!p0 & !p1>]
|
||||
0 -> 1 [label=<!p0 & !p1>]
|
||||
1 [label="1"]
|
||||
1 [label=<1>]
|
||||
1 -> 1 [label=<p0 & p1>]
|
||||
1 -> 2 [label=<p0 & !p1>]
|
||||
1 -> 0 [label=<p0 & !p1>]
|
||||
2 [label="2"]
|
||||
2 [label=<2>]
|
||||
2 -> 1 [label=<!p0 & !p1>]
|
||||
2 -> 0 [label=<p0 & !p1>]
|
||||
2 -> 2 [label=<p0 & !p1>]
|
||||
|
|
@ -209,27 +211,30 @@ ans =-s= (or =--spin=) implies =-B=.
|
|||
|
||||
#+NAME: randaut4
|
||||
#+BEGIN_SRC sh :results verbatim :exports code
|
||||
randaut -Q3 -d0.5 -A3 -a0.5 2
|
||||
randaut -Q3 -e0.5 -A3 -a0.5 2
|
||||
#+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"]
|
||||
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 -> 2 [label=<!p0 & p1<br/><font color="#F17CB0">❶</font><font color="#FAA43A">❷</font>>]
|
||||
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 -> 2 [label=<!p0 & !p1<br/><font color="#5DA5DA">⓿</font>>]
|
||||
2 -> 1 [label=<p0 & !p1<br/><font color="#5DA5DA">⓿</font><font color="#F17CB0">❶</font>>]
|
||||
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
|
||||
|
||||
|
|
@ -242,26 +247,30 @@ $txt
|
|||
|
||||
#+NAME: randaut5
|
||||
#+BEGIN_SRC sh :results verbatim :exports code
|
||||
randaut -Q3 -d0.4 -B -a0.7 2
|
||||
randaut -Q3 -e0.4 -B -a0.7 2
|
||||
#+END_SRC
|
||||
|
||||
#+RESULTS: randaut5
|
||||
#+begin_example
|
||||
digraph G {
|
||||
rankdir=LR
|
||||
node [shape="circle"]
|
||||
fontname="Lato"
|
||||
node [fontname="Lato"]
|
||||
edge [fontname="Lato"]
|
||||
node[style=filled, fillcolor="#ffffa0"]
|
||||
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 -> 2 [label=<!p0 & !p1>]
|
||||
1 [label="1"]
|
||||
1 -> 2 [label=<!p0 & p1>]
|
||||
1 [label="1", peripheries=2]
|
||||
1 -> 1 [label=<!p0 & !p1>]
|
||||
1 -> 0 [label=<p0 & p1>]
|
||||
2 [label="2", peripheries=2]
|
||||
2 -> 0 [label=<p0 & p1>]
|
||||
2 -> 2 [label=<p0 & !p1>]
|
||||
2 -> 1 [label=<!p0 & !p1>]
|
||||
2 -> 0 [label=<p0 & !p1>]
|
||||
}
|
||||
#+end_example
|
||||
|
||||
|
|
@ -273,7 +282,7 @@ $txt
|
|||
|
||||
#+NAME: randaut5b
|
||||
#+BEGIN_SRC sh :results verbatim :exports code
|
||||
randaut -Q6 -d0.4 -S -a.2 -A 'Streett 1..3' 2 --dot=.a
|
||||
randaut -Q6 -e0.4 -S -a.2 -A 'Streett 1..3' 2 --dot=.a
|
||||
#+END_SRC
|
||||
|
||||
#+RESULTS: randaut5b
|
||||
|
|
@ -402,17 +411,18 @@ therefore deterministic and complete.
|
|||
|
||||
#+NAME: randaut6
|
||||
#+BEGIN_SRC sh :results verbatim :exports code
|
||||
randaut -D -Q3 -d0.6 -A2 -a0.5 2
|
||||
randaut -D -Q3 -e0.6 -A2 -a0.5 2
|
||||
#+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"]
|
||||
node[style=filled, fillcolor="#ffffa0"] edge[arrowhead=vee, arrowsize=.7]
|
||||
I [label="", style=invis, width=0]
|
||||
I -> 0
|
||||
0 [label="0"]
|
||||
|
|
@ -437,7 +447,7 @@ $txt
|
|||
|
||||
Note that in a deterministic automaton with $a$ atomic propositions,
|
||||
it is not possible to have states with more than $2^a$ successors. If
|
||||
the combination of =-d= and =-Q= allows the situation where a state
|
||||
the combination of =-e= and =-Q= allows the situation where a state
|
||||
can have more than $2^a$ successors, the degree will be clipped to
|
||||
$2^a$. When working with random deterministic automata over $a$
|
||||
atomic propositions, we suggest you always request more than $2^a$
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue