example: Show what happens when multiple modalities cause the same state transition.
This commit is contained in:
parent
9143f6f9fc
commit
007c5b96bf
3 changed files with 120 additions and 27 deletions
75
example/dots/examplehsuRqc.svg
Normal file
75
example/dots/examplehsuRqc.svg
Normal file
|
@ -0,0 +1,75 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
||||
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<!-- Generated by graphviz version 2.43.0 (0)
|
||||
-->
|
||||
<!-- Title: G Pages: 1 -->
|
||||
<svg width="338pt" height="131pt"
|
||||
viewBox="0.00 0.00 338.49 131.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 127)">
|
||||
<title>G</title>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-127 334.49,-127 334.49,4 -4,4"/>
|
||||
<!-- node0 -->
|
||||
<g id="node1" class="node">
|
||||
<title>node0</title>
|
||||
<ellipse fill="none" stroke="black" cx="42.25" cy="-105" rx="42.49" ry="18"/>
|
||||
<text text-anchor="middle" x="42.25" y="-101.3" font-family="Times-Roman" font-size="14.00">a:1 b:1</text>
|
||||
</g>
|
||||
<!-- node0->node0 -->
|
||||
<g id="edge1" class="edge">
|
||||
<title>node0->node0</title>
|
||||
<path fill="none" stroke="black" d="M80.49,-112.87C92.76,-112.79 102.49,-110.17 102.49,-105 102.49,-99.83 92.76,-97.21 80.49,-97.13"/>
|
||||
<text text-anchor="middle" x="116.49" y="-101.3" font-family="Times-Roman" font-size="14.00">{b}</text>
|
||||
</g>
|
||||
<!-- node2 -->
|
||||
<g id="node3" class="node">
|
||||
<title>node2</title>
|
||||
<ellipse fill="none" stroke="black" cx="42.25" cy="-18" rx="42.49" ry="18"/>
|
||||
<text text-anchor="middle" x="42.25" y="-14.3" font-family="Times-Roman" font-size="14.00">a:0 b:1</text>
|
||||
</g>
|
||||
<!-- node0->node2 -->
|
||||
<g id="edge5" class="edge">
|
||||
<title>node0->node2</title>
|
||||
<path fill="none" stroke="black" d="M42.25,-86.8C42.25,-75.16 42.25,-59.55 42.25,-46.24"/>
|
||||
<polygon fill="black" stroke="black" points="45.75,-46.18 42.25,-36.18 38.75,-46.18 45.75,-46.18"/>
|
||||
<text text-anchor="middle" x="55.75" y="-57.8" font-family="Times-Roman" font-size="14.00">{a}</text>
|
||||
</g>
|
||||
<!-- node1 -->
|
||||
<g id="node2" class="node">
|
||||
<title>node1</title>
|
||||
<ellipse fill="none" stroke="black" cx="216.25" cy="-18" rx="42.49" ry="18"/>
|
||||
<text text-anchor="middle" x="216.25" y="-14.3" font-family="Times-Roman" font-size="14.00">a:1 b:0</text>
|
||||
</g>
|
||||
<!-- node1->node1 -->
|
||||
<g id="edge2" class="edge">
|
||||
<title>node1->node1</title>
|
||||
<path fill="none" stroke="black" d="M254.49,-25.87C266.76,-25.79 276.49,-23.17 276.49,-18 276.49,-12.83 266.76,-10.21 254.49,-10.13"/>
|
||||
<text text-anchor="middle" x="303.49" y="-14.3" font-family="Times-Roman" font-size="14.00">{a}{b}</text>
|
||||
</g>
|
||||
<!-- node2->node2 -->
|
||||
<g id="edge3" class="edge">
|
||||
<title>node2->node2</title>
|
||||
<path fill="none" stroke="black" d="M80.49,-25.87C92.76,-25.79 102.49,-23.17 102.49,-18 102.49,-12.83 92.76,-10.21 80.49,-10.13"/>
|
||||
<text text-anchor="middle" x="129.49" y="-14.3" font-family="Times-Roman" font-size="14.00">{a}{b}</text>
|
||||
</g>
|
||||
<!-- node3 -->
|
||||
<g id="node4" class="node">
|
||||
<title>node3</title>
|
||||
<ellipse fill="none" stroke="black" cx="216.25" cy="-105" rx="42.49" ry="18"/>
|
||||
<text text-anchor="middle" x="216.25" y="-101.3" font-family="Times-Roman" font-size="14.00">a:0 b:0</text>
|
||||
</g>
|
||||
<!-- node3->node1 -->
|
||||
<g id="edge6" class="edge">
|
||||
<title>node3->node1</title>
|
||||
<path fill="none" stroke="black" d="M216.25,-86.8C216.25,-75.16 216.25,-59.55 216.25,-46.24"/>
|
||||
<polygon fill="black" stroke="black" points="219.75,-46.18 216.25,-36.18 212.75,-46.18 219.75,-46.18"/>
|
||||
<text text-anchor="middle" x="229.75" y="-57.8" font-family="Times-Roman" font-size="14.00">{a}</text>
|
||||
</g>
|
||||
<!-- node3->node3 -->
|
||||
<g id="edge4" class="edge">
|
||||
<title>node3->node3</title>
|
||||
<path fill="none" stroke="black" d="M254.49,-112.87C266.76,-112.79 276.49,-110.17 276.49,-105 276.49,-99.83 266.76,-97.21 254.49,-97.13"/>
|
||||
<text text-anchor="middle" x="290.49" y="-101.3" font-family="Times-Roman" font-size="14.00">{b}</text>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 3.6 KiB |
|
@ -4,11 +4,11 @@
|
|||
<!-- Generated by graphviz version 2.43.0 (0)
|
||||
-->
|
||||
<!-- Title: G Pages: 1 -->
|
||||
<svg width="843pt" height="558pt"
|
||||
viewBox="0.00 0.00 843.47 557.73" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<svg width="861pt" height="558pt"
|
||||
viewBox="0.00 0.00 861.47 557.73" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 553.73)">
|
||||
<title>G</title>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-553.73 839.47,-553.73 839.47,4 -4,4"/>
|
||||
<polygon fill="white" stroke="transparent" points="-4,4 -4,-553.73 857.47,-553.73 857.47,4 -4,4"/>
|
||||
<!-- node0 -->
|
||||
<g id="node1" class="node">
|
||||
<title>node0</title>
|
||||
|
@ -19,7 +19,7 @@
|
|||
<g id="edge1" class="edge">
|
||||
<title>node0->node0</title>
|
||||
<path fill="none" stroke="black" d="M114.27,-280.29C126.97,-279.72 136.29,-277.52 136.29,-273.69 136.29,-269.86 126.97,-267.66 114.27,-267.09"/>
|
||||
<text text-anchor="middle" x="140.79" y="-269.99" font-family="Times-Roman" font-size="14.00">a</text>
|
||||
<text text-anchor="middle" x="149.79" y="-269.99" font-family="Times-Roman" font-size="14.00">{a}</text>
|
||||
</g>
|
||||
<!-- node2 -->
|
||||
<g id="node3" class="node">
|
||||
|
@ -32,7 +32,7 @@
|
|||
<title>node0->node2</title>
|
||||
<path fill="none" stroke="black" d="M73.02,-291.37C107.95,-335.9 199.66,-452.79 240.68,-505.07"/>
|
||||
<polygon fill="black" stroke="black" points="238.11,-507.47 247.04,-513.18 243.62,-503.15 238.11,-507.47"/>
|
||||
<text text-anchor="middle" x="151.85" y="-402.02" font-family="Times-Roman" font-size="14.00">b</text>
|
||||
<text text-anchor="middle" x="142.85" y="-402.02" font-family="Times-Roman" font-size="14.00">{b}</text>
|
||||
</g>
|
||||
<!-- node4 -->
|
||||
<g id="node5" class="node">
|
||||
|
@ -44,7 +44,7 @@
|
|||
<g id="edge2" class="edge">
|
||||
<title>node0->node4</title>
|
||||
<path fill="none" stroke="black" d="M73.19,-256.11C110.53,-209.4 211.93,-82.55 249.38,-35.7"/>
|
||||
<text text-anchor="middle" x="157.29" y="-149.71" font-family="Times-Roman" font-size="14.00">c</text>
|
||||
<text text-anchor="middle" x="148.29" y="-149.71" font-family="Times-Roman" font-size="14.00">{c}</text>
|
||||
</g>
|
||||
<!-- node1 -->
|
||||
<g id="node2" class="node">
|
||||
|
@ -57,13 +57,13 @@
|
|||
<title>node1->node0</title>
|
||||
<path fill="none" stroke="black" d="M259.25,-273.79C220.4,-273.77 169.41,-273.74 128.63,-273.72"/>
|
||||
<polygon fill="black" stroke="black" points="128.5,-270.22 118.49,-273.72 128.49,-277.22 128.5,-270.22"/>
|
||||
<text text-anchor="middle" x="189.44" y="-277.56" font-family="Times-Roman" font-size="14.00">a</text>
|
||||
<text text-anchor="middle" x="180.44" y="-277.56" font-family="Times-Roman" font-size="14.00">{a}</text>
|
||||
</g>
|
||||
<!-- node1->node1 -->
|
||||
<g id="edge4" class="edge">
|
||||
<title>node1->node1</title>
|
||||
<path fill="none" stroke="black" d="M373.53,-280.42C386.23,-279.85 395.55,-277.65 395.55,-273.82 395.55,-269.99 386.23,-267.79 373.53,-267.22"/>
|
||||
<text text-anchor="middle" x="400.55" y="-270.12" font-family="Times-Roman" font-size="14.00">b</text>
|
||||
<text text-anchor="middle" x="409.55" y="-270.12" font-family="Times-Roman" font-size="14.00">{b}</text>
|
||||
</g>
|
||||
<!-- node7 -->
|
||||
<g id="node8" class="node">
|
||||
|
@ -75,13 +75,13 @@
|
|||
<g id="edge3" class="edge">
|
||||
<title>node1->node7</title>
|
||||
<path fill="none" stroke="black" d="M334.18,-256.3C376.11,-209.73 489.99,-83.25 532.05,-36.54"/>
|
||||
<text text-anchor="middle" x="429.12" y="-150.22" font-family="Times-Roman" font-size="14.00">c</text>
|
||||
<text text-anchor="middle" x="420.12" y="-150.22" font-family="Times-Roman" font-size="14.00">{c}</text>
|
||||
</g>
|
||||
<!-- node2->node2 -->
|
||||
<g id="edge6" class="edge">
|
||||
<title>node2->node2</title>
|
||||
<path fill="none" stroke="black" d="M316.14,-537.59C328.83,-537.02 338.16,-534.82 338.16,-530.99 338.16,-527.15 328.83,-524.95 316.14,-524.38"/>
|
||||
<text text-anchor="middle" x="343.16" y="-527.29" font-family="Times-Roman" font-size="14.00">b</text>
|
||||
<text text-anchor="middle" x="352.16" y="-527.29" font-family="Times-Roman" font-size="14.00">{b}</text>
|
||||
</g>
|
||||
<!-- node5 -->
|
||||
<g id="node6" class="node">
|
||||
|
@ -93,7 +93,7 @@
|
|||
<g id="edge5" class="edge">
|
||||
<title>node2->node5</title>
|
||||
<path fill="none" stroke="black" d="M276.77,-513.45C318.65,-466.83 432.38,-340.22 474.38,-293.47"/>
|
||||
<text text-anchor="middle" x="371.57" y="-407.26" font-family="Times-Roman" font-size="14.00">c</text>
|
||||
<text text-anchor="middle" x="362.57" y="-407.26" font-family="Times-Roman" font-size="14.00">{c}</text>
|
||||
</g>
|
||||
<!-- node6 -->
|
||||
<g id="node7" class="node">
|
||||
|
@ -106,7 +106,7 @@
|
|||
<title>node2->node6</title>
|
||||
<path fill="none" stroke="black" d="M320.26,-531.14C365.59,-531.26 428.21,-531.42 475.88,-531.55"/>
|
||||
<polygon fill="black" stroke="black" points="476.11,-535.05 486.12,-531.57 476.13,-528.05 476.11,-535.05"/>
|
||||
<text text-anchor="middle" x="393.57" y="-535.14" font-family="Times-Roman" font-size="14.00">a</text>
|
||||
<text text-anchor="middle" x="384.57" y="-535.14" font-family="Times-Roman" font-size="14.00">{a}</text>
|
||||
</g>
|
||||
<!-- node3 -->
|
||||
<g id="node4" class="node">
|
||||
|
@ -118,66 +118,66 @@
|
|||
<g id="edge8" class="edge">
|
||||
<title>node3->node3</title>
|
||||
<path fill="none" stroke="black" d="M804.45,-282.95C817.15,-282.38 826.47,-280.18 826.47,-276.35 826.47,-272.52 817.15,-270.32 804.45,-269.75"/>
|
||||
<text text-anchor="middle" x="830.97" y="-272.65" font-family="Times-Roman" font-size="14.00">a</text>
|
||||
<text text-anchor="middle" x="839.97" y="-272.65" font-family="Times-Roman" font-size="14.00">{a}</text>
|
||||
</g>
|
||||
<!-- node3->node6 -->
|
||||
<g id="edge7" class="edge">
|
||||
<title>node3->node6</title>
|
||||
<path fill="none" stroke="black" d="M735.3,-293.9C698.03,-340.56 596.8,-467.26 559.42,-514.05"/>
|
||||
<text text-anchor="middle" x="643.36" y="-407.78" font-family="Times-Roman" font-size="14.00">c</text>
|
||||
<text text-anchor="middle" x="634.36" y="-407.78" font-family="Times-Roman" font-size="14.00">{c}</text>
|
||||
</g>
|
||||
<!-- node3->node7 -->
|
||||
<g id="edge15" class="edge">
|
||||
<title>node3->node7</title>
|
||||
<path fill="none" stroke="black" d="M735.48,-258.66C700.63,-214.1 609.14,-97.14 568.22,-44.83"/>
|
||||
<polygon fill="black" stroke="black" points="570.79,-42.43 561.87,-36.71 565.28,-46.75 570.79,-42.43"/>
|
||||
<text text-anchor="middle" x="646.85" y="-155.54" font-family="Times-Roman" font-size="14.00">b</text>
|
||||
<text text-anchor="middle" x="637.85" y="-155.54" font-family="Times-Roman" font-size="14.00">{b}</text>
|
||||
</g>
|
||||
<!-- node4->node4 -->
|
||||
<g id="edge9" class="edge">
|
||||
<title>node4->node4</title>
|
||||
<path fill="none" stroke="black" d="M318.66,-24.6C331.35,-24.03 340.67,-21.83 340.67,-18 340.67,-14.17 331.35,-11.97 318.66,-11.4"/>
|
||||
<text text-anchor="middle" x="345.67" y="-14.3" font-family="Times-Roman" font-size="14.00">b</text>
|
||||
<text text-anchor="middle" x="367.67" y="-14.3" font-family="Times-Roman" font-size="14.00">{b}{a}</text>
|
||||
</g>
|
||||
<!-- node5->node3 -->
|
||||
<g id="edge17" class="edge">
|
||||
<title>node5->node3</title>
|
||||
<path fill="none" stroke="black" d="M549.68,-275.93C588.52,-276.01 639.39,-276.12 680.06,-276.2"/>
|
||||
<polygon fill="black" stroke="black" points="680.16,-279.7 690.16,-276.23 680.17,-272.7 680.16,-279.7"/>
|
||||
<text text-anchor="middle" x="610.37" y="-279.87" font-family="Times-Roman" font-size="14.00">a</text>
|
||||
<text text-anchor="middle" x="601.37" y="-279.87" font-family="Times-Roman" font-size="14.00">{a}</text>
|
||||
</g>
|
||||
<!-- node5->node4 -->
|
||||
<g id="edge16" class="edge">
|
||||
<title>node5->node4</title>
|
||||
<path fill="none" stroke="black" d="M474.66,-258.08C435.25,-213.27 331.5,-95.3 285.75,-43.27"/>
|
||||
<polygon fill="black" stroke="black" points="288.15,-40.7 278.92,-35.5 282.9,-45.32 288.15,-40.7"/>
|
||||
<text text-anchor="middle" x="375.21" y="-154.47" font-family="Times-Roman" font-size="14.00">b</text>
|
||||
<text text-anchor="middle" x="366.21" y="-154.47" font-family="Times-Roman" font-size="14.00">{b}</text>
|
||||
</g>
|
||||
<!-- node6->node1 -->
|
||||
<g id="edge18" class="edge">
|
||||
<title>node6->node1</title>
|
||||
<path fill="none" stroke="black" d="M529.7,-514C490.26,-469.17 386.43,-351.15 340.64,-299.1"/>
|
||||
<polygon fill="black" stroke="black" points="343.04,-296.53 333.81,-291.33 337.79,-301.15 343.04,-296.53"/>
|
||||
<text text-anchor="middle" x="430.17" y="-410.35" font-family="Times-Roman" font-size="14.00">b</text>
|
||||
<text text-anchor="middle" x="421.17" y="-410.35" font-family="Times-Roman" font-size="14.00">{b}</text>
|
||||
</g>
|
||||
<!-- node6->node6 -->
|
||||
<g id="edge10" class="edge">
|
||||
<title>node6->node6</title>
|
||||
<path fill="none" stroke="black" d="M600.42,-538.33C613.11,-537.76 622.44,-535.56 622.44,-531.73 622.44,-527.9 613.11,-525.7 600.42,-525.13"/>
|
||||
<text text-anchor="middle" x="626.94" y="-528.03" font-family="Times-Roman" font-size="14.00">a</text>
|
||||
<text text-anchor="middle" x="635.94" y="-528.03" font-family="Times-Roman" font-size="14.00">{a}</text>
|
||||
</g>
|
||||
<!-- node7->node4 -->
|
||||
<g id="edge19" class="edge">
|
||||
<title>node7->node4</title>
|
||||
<path fill="none" stroke="black" d="M488.66,-18.71C443.31,-18.57 380.67,-18.37 332.97,-18.22"/>
|
||||
<polygon fill="black" stroke="black" points="332.74,-14.72 322.73,-18.19 332.71,-21.72 332.74,-14.72"/>
|
||||
<text text-anchor="middle" x="406.31" y="-22.26" font-family="Times-Roman" font-size="14.00">a</text>
|
||||
<text text-anchor="middle" x="424.31" y="-22.26" font-family="Times-Roman" font-size="14.00">{a}</text>
|
||||
</g>
|
||||
<!-- node7->node7 -->
|
||||
<g id="edge11" class="edge">
|
||||
<title>node7->node7</title>
|
||||
<path fill="none" stroke="black" d="M603.06,-25.5C615.76,-24.93 625.08,-22.73 625.08,-18.89 625.08,-15.06 615.76,-12.86 603.06,-12.29"/>
|
||||
<text text-anchor="middle" x="630.08" y="-15.19" font-family="Times-Roman" font-size="14.00">b</text>
|
||||
<text text-anchor="middle" x="639.08" y="-15.19" font-family="Times-Roman" font-size="14.00">{b}</text>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
|
Before Width: | Height: | Size: 9.3 KiB After Width: | Height: | Size: 9.3 KiB |
|
@ -370,6 +370,7 @@ tab
|
|||
(dotit (ppsg (build-full-boolean-state-graph bn-asyn))))
|
||||
#+END_SRC
|
||||
|
||||
|
||||
#+BEGIN_SRC dot :file dots/examplem7LpTs.svg :results raw drawer :cmd sfdp :noweb yes
|
||||
<<simple-bn-sg()>>
|
||||
#+END_SRC
|
||||
|
@ -444,11 +445,28 @@ tab
|
|||
[[file:dots/examplei4we6j.svg]]
|
||||
:END:
|
||||
|
||||
* Roadmap
|
||||
- [ ] fix the pretty printing of labelled graphs
|
||||
- [ ] commend fallback-dds-build-state-graph-edges
|
||||
- [ ] check what happens if two different modalities should be
|
||||
attached to the same edge
|
||||
For some networks, a single transition between two states may be
|
||||
due to different modalities. Consider the following network:
|
||||
#+NAME: bn2
|
||||
| a | (not b) |
|
||||
| b | b |
|
||||
|
||||
#+NAME: bn2-sgr
|
||||
#+BEGIN_SRC racket :results silent :var input-bn=munch-table(bn2)
|
||||
(let* ([bn (nn (unorg input-bn))]
|
||||
[bn-asyn (make-asyn-dynamics bn)])
|
||||
(dotit (ppsgb (build-full-boolean-state-graph-annotated bn-asyn))))
|
||||
#+END_SRC
|
||||
|
||||
#+BEGIN_SRC dot :file dots/examplehsuRqc.svg :results raw drawer :cmd dot :noweb yes
|
||||
<<bn2-sgr()>>
|
||||
#+END_SRC
|
||||
|
||||
#+RESULTS:
|
||||
:RESULTS:
|
||||
[[file:dots/examplehsuRqc.svg]]
|
||||
:END:
|
||||
|
||||
|
||||
* Local Variables :noexport:
|
||||
# Local Variables:
|
||||
|
|
Loading…
Reference in a new issue