example: Illustrate build-reduced-state-graph.

This commit is contained in:
Sergiu Ivanov 2020-11-11 00:37:12 +01:00
parent 3b8ce5eb84
commit af581f91df

View file

@ -1283,9 +1283,28 @@ tab
[[file:dots/examplevvXFaI.svg]]
:end:
Note that we need to keep the full context sequence in the name of
each state to avoid merging states with the same result and
contexts, but which occur at different steps of the evolution.
Note that this graph includes the full context sequence in the name
of each state, which is how the states are represented in the
dynamics of reaction systems. You can use
=build-reduced-state-graph= to construct a similar graph, but
without the context sequences.
#+NAME: rs1-sgr-no-ctx
#+HEADER: :var input-rs=munch-sexp(rs1) :var input-ctx=munch-sexp(ctx1)
#+BEGIN_SRC racket :results silent drawer
(dotit (pretty-print-reduced-state-graph
(build-reduced-state-graph (read-org-rs input-rs)
(read-context-sequence input-ctx))))
#+END_SRC
#+BEGIN_SRC dot :file dots/exampleLGKcXp.svg :results raw drawer :cmd sfdp :noweb yes
<<rs1-sgr-no-ctx()>>
#+END_SRC
#+RESULTS:
:results:
[[file:dots/exampleLGKcXp.svg]]
:end:
The graphical presentation for interactive processes is arguably
less readable than just listing the contexts and the results