Fixes
This commit is contained in:
@ -49,7 +49,7 @@
|
||||
|
||||
Note that \(C_i\) and \(D_i\) do not have to be disjointed.
|
||||
|
||||
\(W_0 = C_0\)is called the initial state of \(\pi\). If \(C_i \subseteq D_i\) for all \(i \in [1, n]\) then \(\pi\) is called context-independent. For context-independent interactive process, we can take \(C_i = \emptyset\) for all \(i = [1, n]\) without changing the state sequence.
|
||||
\(W_0 = C_0\) is called the initial state of \(\pi\). If \(C_i \subseteq D_i\) for all \(i \in [1, n]\) then \(\pi\) is called context-independent. For context-independent interactive process, we can take \(C_i = \emptyset\) for all \(i = [1, n]\) without changing the state sequence.
|
||||
|
||||
In a context-independent state sequence \(\tau = W_0, \ldots, W_i, W_{i+1}, \ldots, W_n \), during the transition from \(W_i\) to \(W_{i+1}\) all entities from \(W_i -res_{\mathcal{A}}(W_i)\) will not persist. This reflects the assumption of no permanency \hyperref[first_assumption]{(1)}. Thus, if \(\tau\) is not context-independent, an entity from a current state can also be sustained by the context \(C_{i+1}\).
|
||||
|
||||
@ -62,20 +62,33 @@
|
||||
|
||||
Five sets of reactions describe a binary counter-like behavior:
|
||||
|
||||
\begin{tblr}{colspec={Q[l,m]Q[l,m]Q[l,m]}, colsep=2pt}
|
||||
\(a_j\) &= \((\{p_j\}, {dec, inc}, {p_j})\), &\(\forall j \in [0, n]\)\\
|
||||
\(b_j\) &= \((\{inc, p_0, p_1, \ldots, p_{j-1}\}, {dec, p_j}, {p_j})\), &\(\forall j \in [0, n]\)\\
|
||||
\(c_{j,k}\) &= \((\{inc, p_k\}, {dec, p_j}, {p_k})\), &\(\forall j, k \text{s.t.} 0 \leq j < k < n\)\\
|
||||
\(d_j\) &= \((\{dec\}, {inc, p_0, p_1, \ldots, p_j}, {p_j})\), &\(\forall j \in [0, n]\)\\
|
||||
\(e_{j,k}\) &= \((\{dec, p_j, p_k\}, {inc}, {p_k})\), &\(\forall j, k \text{s.t.} 0 \leq j < k < n\)\\
|
||||
\end{tblr}
|
||||
% \begin{center}
|
||||
% \begin{tblr}{colspec={Q[l,m]Q[l,m]Q[l,m]}, colsep=2pt}
|
||||
% \(a_j\) &= \((\{p_j\}, \{dec, inc\}, \{p_j\})\), &\(\forall j \in [0, n]\)\\
|
||||
% \(b_j\) &= \((\{inc, p_0, p_1, \ldots, p_{j-1}\}, \{dec, p_j\}, \{p_j\})\), &\(\forall j \in [0, n]\)\\
|
||||
% \(c_{j,k}\) &= \((\{inc, p_k\}, \{dec, p_j\}, \{p_k\})\), &\(\forall j, k \text{s.t.} 0 \leq j < k < n\)\\
|
||||
% \(d_j\) &= \((\{dec\}, \{inc, p_0, p_1, \ldots, p_j\}, \{p_j\})\), &\(\forall j \in [0, n]\)\\
|
||||
% \(e_{j,k}\) &= \((\{dec, p_j, p_k\}, \{inc\}, \{p_k\})\), &\(\forall j, k \text{s.t.} 0 \leq j < k < n\)\\
|
||||
% \end{tblr}
|
||||
% \end{center}
|
||||
|
||||
\begin{center}
|
||||
\begin{tblr}{colspec={Q[l,m]Q[l,m]Q[r,m]Q[c,m]Q[l,m]Q[l,m]}, colsep=2pt}
|
||||
\(a_j\) &= & \((\{p_j\}, \)& \(\{dec, inc\}, \)& \(\{p_j\})\), &\(\forall j \in [0, n]\)\\
|
||||
\(b_j\) &= & \((\{inc, p_0, p_1, \ldots, p_{j-1}\}, \)& \(\{dec, p_j\}, \)& \(\{p_j\})\), &\(\forall j \in [0, n]\)\\
|
||||
\(c_{j,k}\) &= & \((\{inc, p_k\}, \)& \(\{dec, p_j\}, \)& \(\{p_k\})\), &\(\forall j, k \text{ s.t. } 0 \leq j < k < n\)\\
|
||||
\(d_j\) &= & \((\{dec\}, \)& \(\{inc, p_0, p_1, \ldots, p_j\}, \)& \(\{p_j\})\), &\(\forall j \in [0, n]\)\\
|
||||
\(e_{j,k}\) &= & \((\{dec, p_j, p_k\}, \)& \(\{inc\}, \)& \(\{p_k\})\), &\(\forall j, k \text{ s.t. } 0 \leq j < k < n\)\\
|
||||
\end{tblr}
|
||||
\end{center}
|
||||
|
||||
|
||||
where reactions \(a\) cause the bits to be restrained in the next state if there is no operation, reactions \(b\) implement the increment operation by flipping the least significant zero to one, reactions \(c\) let the more significant bits remain, reactions \(d\) implements the decrement operation by flipping to one the bits when there is no one at a lower position, and reactions \(e\) let the more significant bits remain.
|
||||
|
||||
The complete RS \(\mathcal{B}_n\) is defined as follows: \(\mathcal{B}_n = \left(S_n, B_n\right)\) where\[S_n = \{p_0, p_1, \ldots, p_{n-1}\} \cup \{dec, inc\}\] and \[B_n = \{a_j, b_j, d_j | 0 \leq k < n\} \cup \{c_{j, k}, e_{j, k} | 0 \leq l < k < n\}\]
|
||||
|
||||
To illustrate the system in action consider the sequence of contexts:
|
||||
\(C_0 = \{p1, p3\},\\C_1 = \emptyset, C_2 = \{inc\}, C_3 = \{inc\}, C_4 = \{dec\}, C_5 = \{dec, inc\}\). This gives the result sequence \(\delta = \emptyset.\{p1, p3\}.\{p1, p3\}.\{p0, p1, p3\}.\{p2, p3\}.\{p0, p1, p3\}.\emptyset\) and state sequence\\\(\tau = \{p1, p3\}.\{p1, p3\}.\{p1, p3, inc\}.\{p0, p1, p3, inc\}.\{p2, p3, dec\}.\{p0, p1, p3, dec, inc\}.\emptyset\)\\that in binary representation is \(\{1010\}.\{1010\}.\{1010\}.\{1011\}.\{1100\}.\{1011\}.\{0000\}\) by ignoring \(inc\) and \(dec\).
|
||||
\(C_0 = \{p1, p3\},\\C_1 = \emptyset, C_2 = \{inc\}, C_3 = \{inc\}, C_4 = \{dec\}, C_5 = \{dec, inc\}\). This gives the result sequence \(\delta = \emptyset.\{p1, p3\}.\{p1, p3\}.\{p0, p1, p3\}.\{p2, p3\}.\{p0, p1, p3\}.\emptyset\) and state sequence\\\(\tau = \{p1, p3\}.\{p1, p3\}.\{p1, p3, inc\}.\{p0, p1, p3, inc\}.\{p2, p3, dec\}.\{p0, p1, p3, dec, inc\}.\emptyset\)\\that in binary representation is \(\{1010_2\}.\{1010_2\}.\{1010_2\}.\{1011_2\}.\{1100_2\}.\{1011_2\}.\{0000_2\}\) by ignoring \(inc\) and \(dec\).
|
||||
\end{subsection}
|
||||
|
||||
\begin{subsection}{Simple loops}
|
||||
@ -206,7 +219,7 @@
|
||||
|
||||
|
||||
\begin{section}{Positive Reaction Systems}
|
||||
A particular kind of Reaction Systems are those without inhibitors. Such reactions are called positive and can be simply written as pairs \((R, P)\) and are equivalent to \((R, \emptyset, P)\). One can always encode any standard RS \(\mathcal{A} = (S, A)\) into an equivalent one without inhibitors. In order to track the absence of entities, a new ``negative'' entity is added for each original one. In any meaningful state \(W = D \cup C\) there will always be either one between \(a\) and \(\bar{a}\), but never both. As a consequence, for any entity \(a \in S_C\), we must assume that the context will provide either \(a\) or \(\bar{a}\).
|
||||
A particular kind of Reaction Systems, first seen in\ \cite{Brodo_Bruni_Falaschi_Gori_Milazzo_Montagna_Pulieri_2024}, are those without inhibitors. Such reactions are called positive and can be simply written as pairs \((R, P)\) and are equivalent to \((R, \emptyset, P)\). One can always encode any standard RS \(\mathcal{A} = (S, A)\) into an equivalent one without inhibitors. In order to track the absence of entities, a new ``negative'' entity is added for each original one. In any meaningful state \(W = D \cup C\) there will always be either one between \(a\) and \(\bar{a}\), but never both. As a consequence, for any entity \(a \in S_C\), we must assume that the context will provide either \(a\) or \(\bar{a}\).
|
||||
Define \(\textbf{S} \defeq S \uplus \bar{S} \) and \( \bar{S} \defeq \{ \bar{a} \vert a \in S\}\). A subscript \(D\) or \(C\) will be used to differentiate between entities related to reaction products and related to the context.
|
||||
|
||||
\begin{definition}[State consistency]
|
||||
|
||||
207
design.tex
207
design.tex
@ -1,8 +1,10 @@
|
||||
\begin{chapter}{Design}
|
||||
Two sub-problems where identified during the design: simulating the behavior of Reaction Systems, RS processes and other operations on LTS, and interacting with the user in a intuitive manner. The programming language chosen was Rust\cite{rust_2025}, since it offered good performance and ease of development.
|
||||
Two main problems where targeted during the design: simulating the behavior of Reaction Systems, RS processes and other operations on LTS, and interacting with the user in a intuitive manner. The programming language chosen was Rust\cite{rust_2025}, since it offered good performance and ease of development.
|
||||
Two Git repositories are provided: ReactionSystems\cite{ReactionSystemsGit} and ReactionSystemsGUI\cite{ReactionSystemsGUIGit}.
|
||||
|
||||
The ReactionSystems project follows a modular architecture and clear design principles to mirror the theoretical model; it implements procedures over RS as pure rust functions and is structured as a library. It also provides a crude Command Line Interface for some of the functions provided.
|
||||
The ReactionSystems project follows a modular architecture and clear design principles to mirror the theoretical model; it implements procedures over RS as pure rust functions and is structured as a library. It also provides a crude Command Line Interface (CLI) for some of the functions provided.
|
||||
The CLI expects a path to a file with a RS definition and some instructions to execute.
|
||||
|
||||
The code is organized in workspaces in order to reduce compilation time and aid code reuse.
|
||||
In the second Git repository a native and web application is implemented in Rust and in WebAssembly\cite{WebAssemblyCoreSpecification2} generated from Rust code. The web application consists of only static files and as such may be served by a simple HTTP server.
|
||||
|
||||
@ -14,7 +16,7 @@
|
||||
Since the language Rust supports object-oriented programming via traits, but lacks generic inheritance, the design of the basic building blocks of RSs are designed around this limitation.
|
||||
Usually a basic trait is provided for each of them and an extension of the trait is implemented for all structures that implement the basic trait.
|
||||
|
||||
Since it is not practical for a user to specify the structures in Rust, a syntax for the basic structures has been specified. This syntax tries to remain as much as possible compatible with ones from previous software. To develop the parser, LALRPOP\cite{Burgener2025} was chosen as the parser generator framework. LALRPOP code is transpiled to Rust code via macros and then compiled to machine code.
|
||||
Since it is not practical for a user to specify the structures in Rust, a syntax for the basic structures has been specified. This syntax tries to remain compatible, as much as possible, with ones from previous software. To develop the parser, LALRPOP\cite{Burgener2025} was chosen as the parser generator framework. LALRPOP code is transpiled to Rust code via macros and then compiled to machine code.
|
||||
|
||||
\begin{figure}[!h]
|
||||
\centering
|
||||
@ -22,14 +24,14 @@
|
||||
place/.style={rectangle,draw=blue!50,fill=blue!20,thick},
|
||||
>=Stealth, thick, every node/.style={font=\sffamily}]
|
||||
|
||||
\node[place] (set) at (0,3) {Set};
|
||||
\node[place] (reaction)at (4,3) {Reaction};
|
||||
\node[place] (set) at (0,3) {Set};
|
||||
\node[place] (reaction)at (4,3) {Reaction};
|
||||
\node[place] (choices) at (8,3) {Choices};
|
||||
\node[place] (label) at (-2,1.5) {Label};
|
||||
\node[place] (env) at (2,1.5) {Environment};
|
||||
\node[place] (process) at (6,1.5) {Process};
|
||||
\node[place] (system) at (4,0) {System};
|
||||
\node[place] (graph) at (0,0) {Graph};
|
||||
\node[place] (graph) at (0,0) {Graph};
|
||||
|
||||
% Set
|
||||
\draw[->] (set) -- (reaction);
|
||||
@ -223,7 +225,7 @@
|
||||
\begin{itemize}
|
||||
\item \(\texttt{concat}(a, b) \to \texttt{process}\), which returns a new process \(a \vert b\) flattened with regards to parallel composition;
|
||||
\item \(\texttt{all\_elements}(a) \to \texttt{set}\), which returns all the entities used in the process;
|
||||
\item \(\texttt{filter\_delta}(a, \mathit{id}: \texttt{entity}) \to \texttt{set}^{?}\), which returns the first rule \(X = Q. rec(X)\) for any symbol \(X\).
|
||||
\item \(\texttt{filter\_delta}(a, \mathit{id}: \texttt{entity}) \to \texttt{set}^{?}\), which returns the first rule \(X = Q.X\) for any symbol \(X\) and any set \(Q\).
|
||||
\end{itemize}
|
||||
|
||||
\begin{minipage}{\textwidth}
|
||||
@ -291,7 +293,7 @@
|
||||
;; % chktex 26
|
||||
Where \\ & \(ps\) -> {is a positive set,\\ see\ \ref{bnf_positive_set}} ==
|
||||
;; % chktex 26
|
||||
\(pr\) -> {is a positive reaction,\\ see\ \ref{bnf_positive_reaction}} ==
|
||||
\(pr\) -> {is a positive\\reaction, see\ \ref{bnf_positive_reaction}} ==
|
||||
;; % chktex 26
|
||||
\(i\) :in: \(\mathbb{N}\) == % chktex 26
|
||||
;; % chktex 26
|
||||
@ -308,7 +310,8 @@
|
||||
\begin{subsection}{Choices}
|
||||
Since one RS process may have more than one possible next system when evaluating, there is a need to express all possible choices for next states.
|
||||
The structure choices represents all those possible continuations, associating a set with a process. The set signifies all the entities that are provided by the context by choosing that context.
|
||||
One particular operation called \texttt{shuffle} is needed: given two choices structures \( c_1 \) and \( c_2 \) where \(c_i : \texttt{set} \rightharpoonup \texttt{process}, i \in \{1, 2\}\), it generates a new choices structure \(c'\) such that \(\forall s_1 \in \mathit{domain}(c_1) . (\forall s_2 \in \mathit{domain}(c_2) . \mathit{domain}(c') \ni (s_1 \cup s_2) \land c'(s_1 \cup s_2) = \texttt{concat}(c_1(s_1), c_2(s_2)) ) \). Intuitively it is all the possible combinations of two parallel processes.
|
||||
One particular operation called \texttt{shuffle} is needed: given two choices structures \( c_1 \) and \( c_2 \) where \(c_i : \texttt{set} \rightharpoonup \texttt{process}, i \in \{1, 2\}\), it generates a new choices structure \(c'\) such that \(\forall s_1 \in \mathit{domain}(c_1) . (\forall s_2 \in \mathit{domain}(c_2) . \mathit{domain}(c') \ni (s_1 \cup s_2) \land c'(s_1 \cup s_2) = \texttt{concat}(c_1(s_1), c_2(s_2)) ) \), where \(\rightharpoonup\) symbolizes a partial function.
|
||||
Intuitively it is all the possible combinations of two parallel processes.
|
||||
\end{subsection}
|
||||
|
||||
|
||||
@ -351,7 +354,7 @@
|
||||
| $\texttt{[} E \texttt{]}$ == % chktex 9
|
||||
;; % chktex 26
|
||||
$E$ == ::= % chktex 26
|
||||
| $ x = c \texttt{,} E $ ==
|
||||
| $ x = c \texttt{,}\ E $ ==
|
||||
| $ x = c $ ==
|
||||
| $ \epsilon $ ==
|
||||
;; % chktex 26
|
||||
@ -379,7 +382,7 @@
|
||||
| $\texttt{[} E \texttt{]}$ == % chktex 9
|
||||
;; % chktex 26
|
||||
$E$ == ::= % chktex 26
|
||||
| $ x = pc \texttt{,} E $ ==
|
||||
| $ x = pc \texttt{,}\ E $ ==
|
||||
| $ x = pc $ ==
|
||||
| $ \epsilon $ ==
|
||||
;; % chktex 26
|
||||
@ -453,8 +456,8 @@
|
||||
;; % chktex 26
|
||||
\end{bnf}
|
||||
\captionsetup{type=table, name=\textbf{Syntax}}
|
||||
\caption{Syntax for System}
|
||||
\end{minipage}
|
||||
\caption{Syntax for System}\label{bnf_system}
|
||||
\end{minipage}\vspace{1em}
|
||||
|
||||
While writing systems, occurs often to forget an element or swap elements names. This type of user error is particularly difficult to spot since most element names are not easily recognizable and the system grammar is particularly dense in information. A useful method to mitigate these problems is provided: \(\texttt{statistics}\). For the structure \(\texttt{System}\) a static analysis of the entities of the system is run and various parameters are checked and reported.
|
||||
\end{subsection}
|
||||
@ -474,15 +477,18 @@
|
||||
{:in:} = {\ensuremath{\in}},
|
||||
},)
|
||||
$Label$ == ::= % chktex 26
|
||||
| {$\texttt{[Entities:} s\texttt{,}$\\$\texttt{Context:} s\texttt{,}$\\$\texttt{Reactants:} s\texttt{,}$\\$\texttt{ReactantsAbsent:} s\texttt{,}$\\$\texttt{Inhibitors:} s\texttt{,}$\\$\texttt{InhibitorsPresent:} s\texttt{,}$\\$\texttt{Products:} s \texttt{]}$} == % chktex 9
|
||||
| {$\texttt{[ Entities:} s\texttt{,}$\\$\texttt{Context:} s\texttt{,}$\\$\texttt{Reactants:} s\texttt{,}$\\$\texttt{ReactantsAbsent:} s\texttt{,}$\\$\texttt{Inhibitors:} s\texttt{,}$\\$\texttt{InhibitorsPresent:} s\texttt{,}$\\$\texttt{Products:} s \texttt{ ]}$} == % chktex 9
|
||||
;; % chktex 26
|
||||
Where \\ & \(s\) -> {is a set, see\ \ref{bnf_set}} ==
|
||||
;; % chktex 26
|
||||
\end{bnf}
|
||||
\captionsetup{type=table, name=\textbf{Syntax}}
|
||||
\caption{Syntax for Label}\label{bnf_label}
|
||||
\end{minipage}\vspace{1em}
|
||||
\end{minipage}
|
||||
\end{minipage}\vspace{1em}
|
||||
|
||||
\begin{minipage}{\textwidth}
|
||||
\centering
|
||||
\begin{minipage}{.9\textwidth}
|
||||
\begin{bnf} (relation = {::=|:in:|->},
|
||||
comment = {==},
|
||||
@ -492,14 +498,14 @@
|
||||
{->} = {},
|
||||
{:in:} = {\ensuremath{\in}},
|
||||
},)
|
||||
$Label$ == ::= % chktex 26
|
||||
| {$\texttt{[Entities:} ps\texttt{,}$\\$\texttt{Context:} ps\texttt{,}$\\$\texttt{Reactants:} ps\texttt{,}$\\$\texttt{ReactantsAbsent:} ps\texttt{,}$\\$\texttt{Inhibitors:} ps\texttt{,}$\\$\texttt{InhibitorsPresent:} ps\texttt{,}$\\$\texttt{Products:} ps \texttt{]}$} == % chktex 9
|
||||
$Positive Label$ == ::= % chktex 26
|
||||
| {$\texttt{[ Entities:} ps\texttt{,}$\\$\texttt{Context:} ps\texttt{,}$\\$\texttt{Reactants:} ps\texttt{,}$\\$\texttt{ReactantsAbsent:} ps\texttt{,}$\\$\texttt{Inhibitors:} ps\texttt{,}$\\$\texttt{InhibitorsPresent:} ps\texttt{,}$\\$\texttt{Products:} ps \texttt{ ]}$} == % chktex 9
|
||||
;; % chktex 26
|
||||
Where \\ & \(ps\) -> {is a positive set, see\ \ref{bnf_positive_set}} ==
|
||||
;; % chktex 26
|
||||
\end{bnf}
|
||||
\captionsetup{type=table, name=\textbf{Syntax}}
|
||||
\caption{Syntax for Positive Environment}\label{bnf_positive_label}
|
||||
\caption{Syntax for Positive Label}\label{bnf_positive_label}
|
||||
\end{minipage}
|
||||
\end{minipage}
|
||||
\end{subsection}
|
||||
@ -549,7 +555,7 @@
|
||||
\caption{Syntax for \(\texttt{NodeDisplay}\)}\label{bnf_node_display}
|
||||
\end{minipage}\vspace{1em}
|
||||
|
||||
$\texttt{Hide}$ ignores the content of the node and prints the empty string, $\texttt{Entities}$ prints the list of entities currently available in the system, $\texttt{MaskEntities}\ S$ prints the list of entities masked by a specified set \(S\), $\texttt{ExcludeEntities}\ S$ prints the list of entities except for the entities specified by the set \(S\), $\texttt{Context}$ prints the context of the system, $\texttt{UncommonEntities}$ prints only the entities that are not shared between all the nodes in the graph, $\texttt{MaskUncommonEntities}\ S$ prints the entities not shared between all the nodes in the graph and masked by a specified set \(S\).
|
||||
$\texttt{Hide}$ ignores the content of the node and prints the empty string, $\texttt{Entities}$ prints the list of entities currently available in the system, $\texttt{MaskEntities}\ S$ prints the list of entities masked by a specified set \(S\), $\texttt{ExcludeEntities}\ S$ prints the list of entities except for the entities specified by the set \(S\), $\texttt{Context}$ prints the context of the system, $\texttt{UncommonEntities}$ prints only the entities that are not shared between all the nodes in the graph, $\texttt{MaskUncommonEntities}\ S$ prints the entities not shared between all the nodes in the graph and masked by a specified set \(S\).\vspace*{\fill}
|
||||
|
||||
\begin{minipage}{\textwidth}
|
||||
\begin{bnf}(relation-sym-map = % chktex 36
|
||||
@ -602,7 +608,7 @@
|
||||
\caption{Syntax for \(\texttt{EdgeDisplay}\)}\label{bnf_edge_display}
|
||||
\end{minipage}\vspace{1em}
|
||||
|
||||
Four version of each base option is available: normal, \(\texttt{Mask}\) which masks the normal set of entities with a specified set, \(\texttt{Uncommon}\) which considers only the entities that are not shared between all edges of the graph, and \(\texttt{UncommonMask}\) which combines the two functionalities. The base options return the corresponding entities available in the label.
|
||||
Four version of each base option is available: normal, \(\texttt{Mask}\) which masks the normal set of entities with a specified set, \(\texttt{Uncommon}\) which considers only the entities that are not shared between all edges of the graph, and \(\texttt{UncommonMask}\) which combines the two functionalities. The base options return the corresponding entities available in the label.\vspace{1em}
|
||||
|
||||
\begin{minipage}{\textwidth}
|
||||
\begin{bnf}(relation-sym-map = % chktex 36
|
||||
@ -697,7 +703,7 @@
|
||||
|
||||
One key feature was the ability to control via a domain specific language the labels on the edges of the graphs. The developed language is able to also specify values over nodes such that nodes with equal value may be collapsed into one node with outgoing and incoming edges inherited from the original nodes. The code for the typechecking and execution is available in the library \(\texttt{assert}\).
|
||||
|
||||
The language has way to define subroutines or functions, has no while loop and limited for loop construction, so that the execution always terminates.
|
||||
The language has way to define subroutines or functions, has no while loop and limited for loop construction, so that the execution always terminates.\vspace{1em}
|
||||
|
||||
\begin{minipage}{\textwidth}
|
||||
\begin{bnf}(relation-sym-map = % chktex 36
|
||||
@ -764,6 +770,8 @@
|
||||
|
||||
Continues on the next page.
|
||||
|
||||
\newpage
|
||||
|
||||
\begin{minipage}{\textwidth}
|
||||
\begin{bnf}(relation-sym-map = % chktex 36
|
||||
{
|
||||
@ -820,7 +828,22 @@
|
||||
| $\texttt{max}$ == % chktex 35
|
||||
| $\texttt{commonsubstr}$ ==
|
||||
;; % chktex 26
|
||||
\end{bnf}
|
||||
\captionsetup{type=table, name=\textbf{Syntax}}
|
||||
\ContinuedFloat{}
|
||||
\caption{Syntax for \(\texttt{Assert}\) (Continued)}
|
||||
\end{minipage}
|
||||
|
||||
\newpage
|
||||
|
||||
\begin{minipage}{\textwidth}
|
||||
\begin{bnf}(relation-sym-map = % chktex 36
|
||||
{
|
||||
{::=} = {\ensuremath{\Coloneqq}},
|
||||
{->} = {},
|
||||
{:in:} = {\ensuremath{\in}},
|
||||
},
|
||||
comment = {==})
|
||||
$unaryS$ == ::= % chktex 26
|
||||
| $\texttt{Entities}$ ==
|
||||
| $\texttt{length}$ ==
|
||||
@ -841,11 +864,12 @@
|
||||
\item \(\texttt{positive\_grouping}\)
|
||||
\end{itemize}
|
||||
|
||||
\(\texttt{relabel}\) has, in its syntax, the first token equal to \(\texttt{label}\), has as special variables \(\texttt{label}\) and \(\texttt{edge}\) that function as input, with \(\texttt{edge.label} == \texttt{label}\). It's used for grouping labels before calculating bisimilarity. \(\texttt{grouping}\) has, in its syntax, the first token equal to \(\texttt{node}\), has as special variables \(\texttt{entities}\) and \(\texttt{node}\) that function as input, with \(\texttt{node.system.SystemEntities} == \texttt{entities}\). It's used for grouping nodes. \(\texttt{positive\_relabel}\) and \(\texttt{positive\_grouping}\) have as first token \(\texttt{label}\) and \(\texttt{node}\) respectively and behave in a similar manner compared to their respective functions over RS.%
|
||||
\(\texttt{relabel}\) has, in its syntax, the first token equal to \(\texttt{label}\); it also has as special variables \(\texttt{label}\) and \(\texttt{edge}\) that function as input, with \(\texttt{edge.label} == \texttt{label}\). It's used for grouping labels before calculating bisimilarity. \(\texttt{grouping}\) has, in its syntax, the first token equal to \(\texttt{node}\) and has as special variables \(\texttt{entities}\) and \(\texttt{node}\) that function as input, with \(\texttt{node.system.SystemEntities} == \texttt{entities}\). It's used for grouping nodes.
|
||||
\(\texttt{positive\_relabel}\) and \(\texttt{positive\_grouping}\) have as first token \(\texttt{label}\) and \(\texttt{node}\) respectively and behave in a similar manner compared to their respective functions over RS.%
|
||||
|
||||
The template language requires two structures to function relating to the input of the language: a type structure and a value structure. The trait \(\texttt{SpecialVariables}\) holds all the necessary functions that need to be implemented for the special variables to function. Finally the generic language can have the two functions \(\texttt{typecheck}\) and \(\texttt{execute}\) implemented.
|
||||
|
||||
The language is very limited and is only designed for simple algorithms since there is no scoping. Typechecking consists in only asserting acceptable types for unary and binary functions, range declaration and for all return statements to return the same type.
|
||||
The language is very limited and is only designed for simple algorithms since there is no scoping. Typechecking consists in only asserting acceptable types for unary and binary functions, correct type in range declarations and for all return statements to have the same type.
|
||||
|
||||
A version for Positive RS is also provided and reflects the previous grammar with basic types replaced with their positive versions.
|
||||
\end{subsection}
|
||||
@ -918,81 +942,88 @@
|
||||
| $ I $ ==
|
||||
| $ \epsilon $ ==
|
||||
;; % chktex 26
|
||||
|
||||
Where \\ & \(\epsilon\) -> is the empty string ==
|
||||
;; % chktex 26
|
||||
\end{bnf}
|
||||
\captionsetup{type=table, name=\textbf{Syntax}}
|
||||
\caption{Syntax for Instructions}
|
||||
\end{minipage}
|
||||
|
||||
\begin{minipage}{\textwidth}
|
||||
\begin{bnf}(relation-sym-map = % chktex 36
|
||||
{
|
||||
{::=} = {\ensuremath{\Coloneqq}},
|
||||
{->} = {},
|
||||
{:in:} = {\ensuremath{\in}},
|
||||
},
|
||||
comment = {==})
|
||||
\newpage
|
||||
|
||||
$I$ == ::= % chktex 26
|
||||
| $ \texttt{Stats > } so $ ==
|
||||
| $ \texttt{Target > } so $ ==
|
||||
| $ \texttt{Target ( Limit :} i \texttt{ ) > } so $ == % chktex 9
|
||||
| $ \texttt{Run > } so $ ==
|
||||
| $ \texttt{Run ( Limit :} i \texttt{ ) > } so $ == % chktex 9
|
||||
| $ \texttt{Loop (} el \texttt{) > } so $ == % chktex 9
|
||||
| $ \texttt{Frequency > } so $ ==
|
||||
| $ \texttt{LimitFrequency ("} path \texttt{") > } so $ == % chktex 9 chktex 18
|
||||
| $ \texttt{FastFrequency ("} path \texttt{") > } so $ == % chktex 9 chktex 18
|
||||
| $ \texttt{Digraph > } gso $ ==
|
||||
| $ \texttt{Digraph } group \texttt{ > } \mathit{gso} $ ==
|
||||
| $ \texttt{Bisimilarity ("} path \texttt{") relabel } relabel \texttt{ > } so $ == % chktex 9 chktex 18
|
||||
;; % chktex 26
|
||||
\scalebox{.01}{
|
||||
\begin{minipage}{\textwidth}
|
||||
\begin{bnf}(relation-sym-map = % chktex 36
|
||||
{
|
||||
{::=} = {\ensuremath{\Coloneqq}},
|
||||
{->} = {},
|
||||
{:in:} = {\ensuremath{\in}},
|
||||
},
|
||||
comment = {==})
|
||||
|
||||
$\mathit{gso}$ == ::= % chktex 26
|
||||
| $g\ \texttt{\textbar}\ \mathit{gso}$ ==
|
||||
| $g$ ==
|
||||
;; % chktex 26
|
||||
$I$ == ::= % chktex 26
|
||||
| $ \texttt{Stats > } so $ ==
|
||||
| $ \texttt{Target > } so $ ==
|
||||
| $ \texttt{Target ( Limit: } i \texttt{ ) > } so $ == % chktex 9
|
||||
| $ \texttt{Run > } so $ ==
|
||||
| $ \texttt{Run ( Limit: } i \texttt{ ) > } so $ == % chktex 9
|
||||
| $ \texttt{Loop (} el \texttt{) > } so $ == % chktex 9
|
||||
| $ \texttt{Frequency > } so $ ==
|
||||
| $ \texttt{LimitFrequency ("} path \texttt{") > } so $ == % chktex 9 chktex 18
|
||||
| $ \texttt{FastFrequency ("} path \texttt{") > } so $ == % chktex 9 chktex 18
|
||||
| $ \texttt{Digraph > } gso $ ==
|
||||
| $ \texttt{Digraph } group \texttt{ > } \mathit{gso} $ ==
|
||||
| $ \texttt{Bisimilarity ("} path \texttt{") relabel } relabel \texttt{ > } so $ == % chktex 9 chktex 18
|
||||
;; % chktex 26
|
||||
|
||||
$g$ == ::= % chktex 26
|
||||
| { $\texttt{Dot}$\\ $\texttt{\textbar}\ NodeDisplay$\\ $\texttt{\textbar}\ EdgeDisplay$\\ $\texttt{\textbar}\ NodeColor$\\ $\texttt{\textbar}\ EdgeColor$\\ $\texttt{>}\ so$ } ==
|
||||
| { $\texttt{GraphML}$\\ $\texttt{\textbar}\ NodeDisplay$\\ $\texttt{\textbar}\ EdgeDisplay$\\ $\texttt{>}\ so$ } ==
|
||||
| $\texttt{Serialize("} path \texttt{")}$ == % chktex 9 chktex 18
|
||||
;; % chktex 26
|
||||
$\mathit{gso}$ == ::= % chktex 26
|
||||
| $g\ \texttt{\textbar}\ \mathit{gso}$ ==
|
||||
| $g$ ==
|
||||
;; % chktex 26
|
||||
|
||||
$so$ == ::= % chktex 26
|
||||
| $\texttt{Print}; so$ ==
|
||||
| $\texttt{Print}$ ==
|
||||
| $\texttt{Save ("} path \texttt{")}; so$ == % chktex 9 chktex 18
|
||||
| $\texttt{Save ("} path \texttt{")}$ == % chktex 9 chktex 18
|
||||
;; % chktex 26
|
||||
$g$ == ::= % chktex 26
|
||||
| { $\texttt{Dot}$\\ $\texttt{\textbar}\ NodeDisplay$\\ $\texttt{\textbar}\ EdgeDisplay$\\ $\texttt{\textbar}\ NodeColor$\\ $\texttt{\textbar}\ EdgeColor$\\ $\texttt{>}\ so$ } ==
|
||||
| { $\texttt{GraphML}$\\ $\texttt{\textbar}\ NodeDisplay$\\ $\texttt{\textbar}\ EdgeDisplay$\\ $\texttt{>}\ so$ } ==
|
||||
| $\texttt{Serialize("} path \texttt{")}$ == % chktex 9 chktex 18
|
||||
;; % chktex 26
|
||||
|
||||
Where \\ & \(path\) -> is a path to a file ==
|
||||
;; % chktex 26
|
||||
\(NodeDisplay\) -> follows the syntax from\ \ref{bnf_node_display} ==
|
||||
;; % chktex 26
|
||||
\(EdgeDisplay\) -> follows the syntax from\ \ref{bnf_edge_display} ==
|
||||
;; % chktex 26
|
||||
\(NodeColor\) -> follows the syntax from\ \ref{bnf_node_color} ==
|
||||
;; % chktex 26
|
||||
\(EdgeColor\) -> follows the syntax from\ \ref{bnf_edge_color} ==
|
||||
;; % chktex 26
|
||||
\(group\) -> is a group function with syntax from\ \ref{bnf_assert} ==
|
||||
;; % chktex 26
|
||||
\(relabel\) -> is a relabel function with syntax from\ \ref{bnf_assert} ==
|
||||
;; % chktex 26
|
||||
\(i\) :in: $\mathbb{N}$ == % chktex 26
|
||||
;; % chktex 26
|
||||
\(el\) -> is a string that symbolizes an element ==
|
||||
;; % chktex 26
|
||||
\(path\) -> is a path to a file ==
|
||||
;; % chktex 26
|
||||
\end{bnf}
|
||||
\captionsetup{type=table, name=\textbf{Syntax}}
|
||||
\ContinuedFloat{}
|
||||
\caption{Syntax for Instructions (Continued)}
|
||||
\end{minipage}
|
||||
$so$ == ::= % chktex 26
|
||||
| $\texttt{Print}; so$ ==
|
||||
| $\texttt{Print}$ ==
|
||||
| $\texttt{Save ("} path \texttt{")};\ so$ == % chktex 9 chktex 18
|
||||
| $\texttt{Save ("} path \texttt{")}$ == % chktex 9 chktex 18
|
||||
;; % chktex 26
|
||||
|
||||
Where \\ & \(path\) -> is a path to a file ==
|
||||
;; % chktex 26
|
||||
\(NodeDisplay\) -> follows the syntax from\ \ref{bnf_node_display} ==
|
||||
;; % chktex 26
|
||||
\(EdgeDisplay\) -> follows the syntax from\ \ref{bnf_edge_display} ==
|
||||
;; % chktex 26
|
||||
\(NodeColor\) -> follows the syntax from\ \ref{bnf_node_color} ==
|
||||
;; % chktex 26
|
||||
\(EdgeColor\) -> follows the syntax from\ \ref{bnf_edge_color} ==
|
||||
;; % chktex 26
|
||||
\(group\) -> is a group function with syntax from\ \ref{bnf_assert} ==
|
||||
;; % chktex 26
|
||||
\(relabel\) -> is a relabel function with syntax from\ \ref{bnf_assert} ==
|
||||
;; % chktex 26
|
||||
\(i\) :in: $\mathbb{N}$ == % chktex 26
|
||||
;; % chktex 26
|
||||
\(el\) -> is a string that symbolizes an element ==
|
||||
;; % chktex 26
|
||||
\(path\) -> is a path to a file ==
|
||||
;; % chktex 26
|
||||
\(\epsilon\) -> is the empty string ==
|
||||
;; % chktex 26
|
||||
\(System\) -> is a system, see\ \ref{bnf_system} ==
|
||||
;; % chktex 26
|
||||
\end{bnf}
|
||||
\captionsetup{type=table, name=\textbf{Syntax}}
|
||||
\ContinuedFloat{}
|
||||
\caption{Syntax for Instructions (Continued)}
|
||||
\end{minipage}
|
||||
}
|
||||
|
||||
\newpage
|
||||
|
||||
The instruction \(\texttt{Stats}\) returns static information and statistics about the system. \(\texttt{Target}\) and \(\texttt{Run}\) return the results of the function with the same name defined in section\ \ref{function_target}. \(\texttt{Loop}\) returns the result of the function \(\texttt{lollipops\_only\_loop\_named}\) described in the same section. \(\texttt{Frequency}\) returns the results of \(\texttt{naive\_frequency}\) as described in section\ \ref{function_naive_frequency}. \(\texttt{LimitFrequency}\) and \(\texttt{FastFrequency}\) require a path to an experiment, with syntax described in\ \ref{experiment}, and they return the result of \(\texttt{limit\_frequency}\) and \(\texttt{fast\_frequency}\) respectively. \(\texttt{Digraph}\) may take a function \(group\) that groups together nodes that have the same output, described in section\ \ref{bisimilarity_design}. The graphs can be either saved as a Dot or GraphML file or serialized directly. \(\texttt{Bisimilarity}\) takes a path to another instruction file, whose instructions are ignored, and returns if the two systems are bisimilar. The results can be saved to a file or print to screen or both.
|
||||
\end{subsection}
|
||||
|
||||
15
document.bib
15
document.bib
@ -257,3 +257,18 @@
|
||||
howpublished = {\url{https://pages.di.unipi.it/bruni/LTSRS/}},
|
||||
year = 2025,
|
||||
}
|
||||
|
||||
@article{Brodo_Bruni_Falaschi_Gori_Milazzo_Montagna_Pulieri_2024,
|
||||
title = {Causal analysis of positive reaction systems},
|
||||
volume = 26,
|
||||
DOI = {10.1007/s10009-024-00757-y},
|
||||
number = 4,
|
||||
journal = {International Journal on Software Tools for
|
||||
Technology Transfer},
|
||||
author = {Brodo, Linda and Bruni, Roberto and Falaschi, Moreno
|
||||
and Gori, Roberta and Milazzo, Paolo and Montagna,
|
||||
Valeria and Pulieri, Pasquale},
|
||||
year = 2024,
|
||||
month = {6},
|
||||
pages = {509–526}
|
||||
}
|
||||
|
||||
BIN
document.pdf
BIN
document.pdf
Binary file not shown.
16
document.tex
16
document.tex
@ -258,8 +258,24 @@
|
||||
|
||||
\begin{document}
|
||||
|
||||
\pagenumbering{roman}
|
||||
|
||||
\input{title_page}
|
||||
|
||||
\newpage
|
||||
\null % chktex 1
|
||||
\vspace*{\fill}
|
||||
\begin{center}
|
||||
\color{black!30}\pgfornament[width=2cm]{123}
|
||||
\end{center}
|
||||
\newpage
|
||||
|
||||
\tableofcontents
|
||||
|
||||
\newpage
|
||||
\pagenumbering{arabic}
|
||||
\setcounter{page}{1}
|
||||
|
||||
\input{introduction}
|
||||
\input{background}
|
||||
\input{design}
|
||||
|
||||
1
figures/cherubino.eps
Normal file
1
figures/cherubino.eps
Normal file
File diff suppressed because one or more lines are too long
32
title_page.tex
Normal file
32
title_page.tex
Normal file
@ -0,0 +1,32 @@
|
||||
\begin{titlepage}
|
||||
\begin{figure}[!htb]
|
||||
\centering
|
||||
\includegraphics[keepaspectratio=true,scale=0.5]{figures/cherubino.eps}
|
||||
\end{figure}
|
||||
|
||||
\begin{center}
|
||||
\LARGE{UNIVERSITY OF PISA}
|
||||
\vspace{5mm}
|
||||
\\ \Large{Department of Computer Science}
|
||||
\vspace{5mm}
|
||||
\\ \LARGE{Master Degree in Computer Science}
|
||||
\end{center}
|
||||
\centering
|
||||
\vspace{15mm}
|
||||
{\Large{\bf Modeling Reaction Systems}}
|
||||
\vspace{40mm}
|
||||
|
||||
\begin{tblr}{colspec={Q[c,l]X[1,m]Q[c,l]}}
|
||||
\large{Supervisor:} & & \large{Candidate:} \\
|
||||
\textbf{\large{Prof. Roberto Bruni}} & & \textbf{\large{Elvis Rossi}} \\
|
||||
\textbf{\large{Prof. Roberta Gori}} \\
|
||||
\textbf{\large{Prof. Paolo Milazzo}} \\
|
||||
\end{tblr}
|
||||
|
||||
\vspace*{\fill}
|
||||
|
||||
\hrulefill%
|
||||
|
||||
\centering{\large{ACADEMIC YEAR 2025/2026}}
|
||||
|
||||
\end{titlepage}
|
||||
Reference in New Issue
Block a user