Missing conclusion

This commit is contained in:
elvis
2025-11-18 15:37:25 +01:00
parent e298bac6cd
commit 4c0b8d55d2
7 changed files with 245 additions and 21 deletions

View File

@ -213,7 +213,7 @@
A set \(\textbf{W} \subseteq \textbf{S}\) is non-contradictory if for all entities \(a \in S\) it holds that \(\{a, \bar{a}\} \nsubseteq \textbf{W}\). A non-contradictory state \(\textbf{W} \subseteq \textbf{S}\) is consistent if, for any entity \(a \in S\), either \(a \in \textbf{W}\) or \(\bar{a} \in \textbf{W}\) holds.
\end{definition}
\begin{definition}[Positive RS]\label{positive_rs}
\begin{definition}[Positive RS\cite{Brodo_Bruni_Falaschi_Gori_Milazzo_2025}]\label{positive_rs}
A Positive RS is a Reaction System \(\mathcal{A}^+ = (\textbf{S}, A)\) that satisfies the following conditions:
\begin{enumerate}
\item Each reaction \(r\) in \(A\) is positive, i.e., \(r = (\textbf{R}, \emptyset, \textbf{P})\) for some non-contradictory sets \(\textbf{R}\) and \(\textbf{P}\).
@ -287,7 +287,7 @@
Starting from the pair \(\frac{D_{\sigma}}{C_m}\) denoting the user's marking and proceeding backwards, apply iteratively a slicing step that deletes from the partial computation all information not related to \(D_{\sigma}\). The sliced trace will contain only the subsets of entities and reactions which are necessary for deriving the marked entities.
Since the algorithm\ \ref{slicing_algorithm} can only capture dependencies related to reactants, but ignores the ones related to inhibitors, converting the RS into a Positive RS makes possible the tracking of the absence of entities via negative entities. Minimizing the Positive RS reduces the noise in the output and is thus desirable.
Since the algorithm\ \ref{slicing_algorithm}\cite{Brodo_Bruni_Falaschi_Gori_Milazzo_2025} can only capture dependencies related to reactants, but ignores the ones related to inhibitors, converting the RS into a Positive RS makes possible the tracking of the absence of entities via negative entities. Minimizing the Positive RS reduces the noise in the output and is thus desirable.
\end{subsection}
\end{section}

View File

@ -60,7 +60,7 @@
\caption{Basic structures and relationships between them}\label{basic_structures}
\end{figure}
\begin{subsection}{Entities and Translator}
\begin{subsection}{Entities and Translator}\label{design_entities}
Entities are the most basic data structure that a RS need to keep track of. They don't have a specified interface and are instead treated only in sets.
Positive elements are also defined and have a state, either \texttt{Positive} or \texttt{Negative}.
@ -68,7 +68,7 @@
Since internally entities are represented as integers, a structure that keeps track of assignment between strings and integer is provided (\(\texttt{Translator}\)). This poses a problem with the default methods for formatting available in Rust, since for the trait \(\texttt{Display}\) and \(\texttt{Debug}\) only the structure itself can be used to generate the string. The trait \(\texttt{PrintableWithTranslator}\) and the structure \(\texttt{Formatter}\) solve this issue by incorporating the \(\texttt{Translator}\) into the struct. \(\texttt{Display}\) is then implemented on the generic structure \(\texttt{Translator}\).
\end{subsection}
\begin{subsection}{Set}
\begin{subsection}{Set}\label{design_set}
The common procedures required for all sets are:
\begin{itemize}
\item \(\texttt{is\_subset}(a, b) \to \texttt{bool}\), which should return true if \(a \subseteq b\);
@ -156,7 +156,7 @@
\end{subsection}
\begin{subsection}{Reaction}
\begin{subsection}{Reaction}\label{design_reaction}
The methods required for all reactions are:
\begin{itemize}
@ -218,7 +218,7 @@
\end{subsection}
\begin{subsection}{Process}
\begin{subsection}{Process}\label{design_process}
Process structures mirror the structure of RS processes as described in Section\ \ref{SOS_rules_section}. Since there is not much behavior that is shared between implementations and since usually they are used with pattern matching, the trait that describe a basic process is very simple.
\begin{itemize}
\item \(\texttt{concat}(a, b) \to \texttt{process}\), which returns a new process \(a \vert b\) flattened with regards to parallel composition;
@ -312,7 +312,7 @@
\end{subsection}
\begin{subsection}{Environment}
\begin{subsection}{Environment}\label{design_environment}
An environment can be thought as an association between variable names and processes.
The basic interface requires the following methods:
@ -324,12 +324,12 @@
These methods are automatically implemented for all \(\texttt{BasicEnvironment}\):
\begin{itemize}
\item \(\texttt{lollipops\_decomposed}\),
\item \(\texttt{lollipops\_decomposed\_named}\),
\item \(\texttt{lollipops\_prefix\_len\_loop\_decomposed}\),
\item \(\texttt{lollipops\_prefix\_len\_loop\_decomposed\_named}\),
\item \(\texttt{lollipops\_only\_loop\_decomposed}\),
\item \(\texttt{lollipops\_only\_loop\_decomposed\_named}\).
\item \(\texttt{lollipops\_decomposed}\),
\item \(\texttt{lollipops\_decomposed\_named}\),
\item \(\texttt{lollipops\_prefix\_len\_loop\_decomposed}\),
\item \(\texttt{lollipops\_prefix\_len\_loop\_decomposed\_named}\),
\item \(\texttt{lollipops\_only\_loop\_decomposed}\),
\item \(\texttt{lollipops\_only\_loop\_decomposed\_named}\).
\end{itemize}
They all try to find a loop and return some information about the found loop. The \(\texttt{\_named}\) variants require a variable symbol for which in the environment there is an association to a process with the form \( X = Q.\texttt{rec}(X) = Q.X\), where \(Q\) is a set and \(X\) is a variable name. The others instead finds all the symbols that satisfy the constraint and uses them all.
Function \(\texttt{lollipops\_decomposed}\) returns the trace of sets for the prefix and the trace of sets for the loop for each recursive variable.\\
@ -688,7 +688,7 @@
\(\texttt{EdgeColor}\) behaves in a similar manner as \(\texttt{NodeColor}\), except the base structure is a \(\texttt{Label}\), so every field is a \(\texttt{Set}\).
\end{subsection}
\begin{subsection}{Slicing Trace}
\begin{subsection}{Slicing Trace}\label{design_trace}
Only one structure for slicing trace is provided, but is made to work with both RS and Positive RS with generics. The only method they have is \(\texttt{slice}(\mathit{trace}, \mathit{marking}: \texttt{set}) \to \texttt{trace}^{?}\) which returns, if successful, a new sliced trace.
\end{subsection}
@ -999,7 +999,7 @@
\end{section}
\begin{section}{ReactionSystemsGUI}
During development of ReactionSystems, a need for a more intuitive interaction with the structures presented itself. Since the all the operations on the types where already limited and
During development of ReactionSystems, a need for a more intuitive interaction with the structures presented itself. Since all the operations on the types where already limited and
structured, a visual programming language was chosen as the best fit.
The library {\(\texttt{egui\_node\_graph2}\)}\cite{egui_node_graph22024} was chosen since it offered customizability, performance and ease of programming. The library unfortunately lacked compatibility with the most recent version of {\(\texttt{egui}\)}\cite{Ernerfeldt2025}, so it is included as a workspace and modified to fit better the need of the project.
@ -1024,7 +1024,7 @@
\item Windows: \(\texttt{C:\textbackslash{}Users\textbackslash{}UserName\textbackslash{}AppData\textbackslash{}Roaming\textbackslash{}Reaction-Systems\textbackslash{}data}\)
\end{itemize}
The native application also has the ability to save and load the state from a file. The files have by default the extension ``\(\texttt{.ron}\)''. The web version has no ability to interact with the file system due to a limitation of \(\texttt{webassembly}\).
The native application also has the ability to save and load the state from a file. The files have by default the extension ``\(\texttt{.ron}\)''. The web version has no ability to interact with the file system due to a limitation of webassembly.
\begin{figure}
\centering
@ -1046,8 +1046,154 @@
The file structure can be seen in figure\ \ref{save_file_structure}, where ``state'' refers to the state of the GUI, ``translator'' refers to the \(\texttt{Translator}\) structure used to encode entities names into fixed sized integers, and ``cache'' refers to the cache structure for the GUI.\ Version number is a little-endian \(\texttt{u64}\) that encodes the version number of the application; if different from the version of the application, a warning will be issued, but the application will try and load the state anyway. Each ``length'' field is a little-endian \(\texttt{u64}\) and indicates the length in bytes of the corresponding field.
The user can request the result of a computation by interacting with the button ``\textit{Set active}'' under most of the windows. A panel on the right of the screen appears with the computed result. The nodes ``Save string to file'' and ``Save SVG'' instead have a button ``\textit{Write}'' that writes to file the result. The node ``Read a file'' has an extra button ``\textit{Update file}'' that reads again the file from disk since a filewatcher has not been implemented.
The user can request the result of a computation by interacting with the button ``\textit{Set active}'' under most of the windows. A panel on the right of the screen appears with the computed result. The nodes ``Save string to file'', ``Save SVG'' and ``Save Rasterized SVG'' instead have a button ``\textit{Write}'' that writes to file the result. The node ``Read a file'' has an extra button ``\textit{Update file}'' that reads again the file from disk since a filewatcher has not been implemented.
Since the generated graphs were often times immediately converted to DOT files and rendered to SVG, a native renderer is included that can create PNG images of the supplied graph. They are then rendered to screen. This reduces greatly the time switching between software to achieve the same result.
\begin{table}
\centering
\fboxrule=0.25mm
\begin{tblr}{colspec={Q[c, m]Q[c, l]Q[c, l]}, colsep=3pt}
\fcolorbox{black}{color_Error}{\makebox[2mm][l]{\strut}} & \(\texttt{Error}\) & Structure that holds error messages \\
\fcolorbox{black}{color_String}{\makebox[2mm][l]{\strut}} & \(\texttt{String}\) & A string \\
\fcolorbox{black}{color_Path}{\makebox[2mm][l]{\strut}} & \(\texttt{Path}\) & A path to a file \\
\fcolorbox{black}{color_Svg}{\makebox[2mm][l]{\strut}} & \(\texttt{Svg}\) & A structure for creating and rendering SVG \\
\fcolorbox{black}{color_PositiveInt}{\makebox[2mm][l]{\strut}} & \(\texttt{PositiveInt}\) & Integer in \(\mathbb{N}\) \\
\fcolorbox{black}{color_Symbol}{\makebox[2mm][l]{\strut}} & \(\texttt{Symbol}\) & A single symbol, see section\ \ref{design_entities} \\
\fcolorbox{black}{color_System}{\makebox[2mm][l]{\strut}} & \(\texttt{System}\) & see section\ \ref{design_system} \\
\fcolorbox{black}{color_Environment}{\makebox[2mm][l]{\strut}} & \(\texttt{Environment}\) & see section\ \ref{design_environment} \\
\fcolorbox{black}{color_Set}{\makebox[2mm][l]{\strut}} & \(\texttt{Set}\) & see section\ \ref{design_set} \\
\fcolorbox{black}{color_Context}{\makebox[2mm][l]{\strut}} & \(\texttt{Context}\) & see section\ \ref{design_process} \\
\fcolorbox{black}{color_Reactions}{\makebox[2mm][l]{\strut}} & \(\texttt{Reactions}\) & see section\ \ref{design_reaction} \\
\fcolorbox{black}{color_Experiment}{\makebox[2mm][l]{\strut}} & \(\texttt{Experiment}\) & see section\ \ref{experiment} \\
\fcolorbox{black}{color_PositiveSystem}{\makebox[2mm][l]{\strut}} & \(\texttt{PositiveSystem}\) & see section\ \ref{design_system} \\
\fcolorbox{black}{color_PositiveEnvironment}{\makebox[2mm][l]{\strut}} & \(\texttt{PositiveEnvironment}\) & see section\ \ref{design_environment} \\
\fcolorbox{black}{color_PositiveSet}{\makebox[2mm][l]{\strut}} & \(\texttt{PositiveSet}\) & see section\ \ref{design_set} \\
\fcolorbox{black}{color_PositiveContext}{\makebox[2mm][l]{\strut}} & \(\texttt{PositiveContext}\) & see section\ \ref{design_process} \\
\fcolorbox{black}{color_PositiveReactions}{\makebox[2mm][l]{\strut}} & \(\texttt{PositiveReactions}\) & see section\ \ref{design_reaction} \\
\fcolorbox{black}{color_Trace}{\makebox[2mm][l]{\strut}} & \(\texttt{Trace}\) & see section\ \ref{design_trace} \\
\fcolorbox{black}{color_PositiveTrace}{\makebox[2mm][l]{\strut}} & \(\texttt{PositiveTrace}\) & see section\ \ref{design_trace} \\
\fcolorbox{black}{color_Graph}{\makebox[2mm][l]{\strut}} & \(\texttt{Graph}\) & see section\ \ref{design_graph} \\
\fcolorbox{black}{color_PositiveGraph}{\makebox[2mm][l]{\strut}} & \(\texttt{PositiveGraph}\) & see section\ \ref{design_graph} \\
\fcolorbox{black}{color_DisplayNode}{\makebox[2mm][l]{\strut}} & \(\texttt{DisplayNode}\) & see section\ \ref{design_graph} \\
\fcolorbox{black}{color_DisplayEdge}{\makebox[2mm][l]{\strut}} & \(\texttt{DisplayEdge}\) & see section\ \ref{design_graph} \\
\fcolorbox{black}{color_ColorNode}{\makebox[2mm][l]{\strut}} & \(\texttt{ColorNode}\) & see section\ \ref{design_graph} \\
\fcolorbox{black}{color_ColorEdge}{\makebox[2mm][l]{\strut}} & \(\texttt{ColorEdge}\) & see section\ \ref{design_graph} \\
\fcolorbox{black}{color_AssertFunction}{\makebox[2mm][l]{\strut}} & \(\texttt{AssertFunction}\) & see section\ \ref{bisimilarity_design} \\
\fcolorbox{black}{color_GroupFunction}{\makebox[2mm][l]{\strut}} & \(\texttt{GroupFunction}\) & see section\ \ref{bisimilarity_design} \\
\fcolorbox{black}{color_PositiveAssertFunction}{\makebox[2mm][l]{\strut}} & \(\texttt{PositiveAssertFunction}\) & see section\ \ref{bisimilarity_design} \\
\fcolorbox{black}{color_PositiveGroupFunction}{\makebox[2mm][l]{\strut}} & \(\texttt{PositiveGroupFunction}\) & see section\ \ref{bisimilarity_design} \\
\end{tblr}
\caption{Types in ReactionSystemsGUI with associated color.}\label{types_gui}
\end{table}
\fboxrule=0.25mm
\begin{longtblr}[
caption={Available nodes in ReactionSystemsGUI with inputs and outputs in color.},
label={node_in_out},
]{
colspec={Q[b, r]|Q[c, m]|Q[c, m]|Q[b, l]},
colsep=2pt,}
\(\texttt{String}\) & \fcolorbox{black}{color_String}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_String}{\makebox[2mm][l]{\strut}} & Creates a string \\
\(\texttt{Path}\) & \fcolorbox{black}{color_String}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_Path}{\makebox[2mm][l]{\strut}} & Creates a path from a string \\
\(\texttt{Read file}\) & \fcolorbox{black}{color_Path}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_String}{\makebox[2mm][l]{\strut}} & Reads a file into a string \\
\(\texttt{Save string to file}\) & \fcolorbox{black}{color_Path}{\makebox[2mm][l]{\strut}}\fcolorbox{black}{color_String}{\makebox[2mm][l]{\strut}} & & Save a string to a file \\
\(\texttt{Symbol}\) & \fcolorbox{black}{color_String}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_Symbol}{\makebox[2mm][l]{\strut}} & Creates a symbol from a string \\
\(\texttt{Sleep}\) & \fcolorbox{black}{color_PositiveInt}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_PositiveInt}{\makebox[2mm][l]{\strut}} & Waits for selected number of seconds \\
\(\texttt{Dot file to SVG}\) & \fcolorbox{black}{color_String}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_Svg}{\makebox[2mm][l]{\strut}} & Parses a Dot file string into an SVG \\
\(\texttt{Save SVG}\) & \fcolorbox{black}{color_Path}{\makebox[2mm][l]{\strut}}\fcolorbox{black}{color_Svg}{\makebox[2mm][l]{\strut}} & & Saves an SVG \\
\(\texttt{Save Rasterized SVG}\) & \fcolorbox{black}{color_Path}{\makebox[2mm][l]{\strut}}\fcolorbox{black}{color_Svg}{\makebox[2mm][l]{\strut}} & & Saves an SVG as a picture \\
\(\texttt{Create System}\) & \fcolorbox{black}{color_String}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_System}{\makebox[2mm][l]{\strut}} & Creates system from string \\
\(\texttt{Create Positive System}\) & \fcolorbox{black}{color_System}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_PositiveSystem}{\makebox[2mm][l]{\strut}} & Creates positive system from system \\
\(\texttt{Compose System}\) & \fcolorbox{black}{color_Environment}{\makebox[2mm][l]{\strut}}\fcolorbox{black}{color_Set}{\makebox[2mm][l]{\strut}}\fcolorbox{black}{color_Context}{\makebox[2mm][l]{\strut}}\fcolorbox{black}{color_Reactions}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_System}{\makebox[2mm][l]{\strut}} & {Composes system from\\individual structures} \\
\(\texttt{Compose Positive System}\) & \fcolorbox{black}{color_PositiveEnvironment}{\makebox[2mm][l]{\strut}}\fcolorbox{black}{color_PositiveSet}{\makebox[2mm][l]{\strut}}\fcolorbox{black}{color_PositiveContext}{\makebox[2mm][l]{\strut}}\fcolorbox{black}{color_PositiveReactions}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_PositiveSystem}{\makebox[2mm][l]{\strut}} & \\
\(\texttt{Decompose System}\) & \fcolorbox{black}{color_System}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_Environment}{\makebox[2mm][l]{\strut}}\fcolorbox{black}{color_Set}{\makebox[2mm][l]{\strut}}\fcolorbox{black}{color_Context}{\makebox[2mm][l]{\strut}}\fcolorbox{black}{color_Reactions}{\makebox[2mm][l]{\strut}} & {Decomposes system\\into individual structures} \\
\(\texttt{Decompose Positive System}\) & \fcolorbox{black}{color_PositiveSystem}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_PositiveEnvironment}{\makebox[2mm][l]{\strut}}\fcolorbox{black}{color_PositiveSet}{\makebox[2mm][l]{\strut}}\fcolorbox{black}{color_PositiveContext}{\makebox[2mm][l]{\strut}}\fcolorbox{black}{color_PositiveReactions}{\makebox[2mm][l]{\strut}} & \\
\(\texttt{Environment}\) & \fcolorbox{black}{color_String}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_Environment}{\makebox[2mm][l]{\strut}} & \\
\(\texttt{Positive Environment}\) & \fcolorbox{black}{color_String}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_PositiveEnvironment}{\makebox[2mm][l]{\strut}} & \\
\(\texttt{Set}\) & \fcolorbox{black}{color_String}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_Set}{\makebox[2mm][l]{\strut}} & \\
\(\texttt{Positive Set}\) & \fcolorbox{black}{color_String}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_PositiveSet}{\makebox[2mm][l]{\strut}} & \\
\(\texttt{Context}\) & \fcolorbox{black}{color_String}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_Context}{\makebox[2mm][l]{\strut}} & \\
\(\texttt{Positive Context}\) & \fcolorbox{black}{color_String}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_PositiveContext}{\makebox[2mm][l]{\strut}} & \\
\(\texttt{Reactions}\) & \fcolorbox{black}{color_String}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_Reactions}{\makebox[2mm][l]{\strut}} & \\
\(\texttt{Positive Reactions}\) & \fcolorbox{black}{color_String}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_PositiveReactions}{\makebox[2mm][l]{\strut}} & \\
\(\texttt{Convert to Positive Environment}\) & \fcolorbox{black}{color_Environment}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_PositiveEnvironment}{\makebox[2mm][l]{\strut}} & \\
\(\texttt{Convert to Positive Set}\) & \fcolorbox{black}{color_Set}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_PositiveSet}{\makebox[2mm][l]{\strut}} & \\
\(\texttt{Convert to Positive Context}\) & \fcolorbox{black}{color_Context}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_PositiveContext}{\makebox[2mm][l]{\strut}} & \\
\(\texttt{Convert to Positive Reactions}\) & \fcolorbox{black}{color_Reactions}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_PositiveReactions}{\makebox[2mm][l]{\strut}} & \\
\(\texttt{Statistics}\) & \fcolorbox{black}{color_System}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_String}{\makebox[2mm][l]{\strut}} & \\
\(\texttt{Target}\) & \fcolorbox{black}{color_System}{\makebox[2mm][l]{\strut}}\fcolorbox{black}{color_PositiveInt}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_String}{\makebox[2mm][l]{\strut}} & \\
\(\texttt{Target of Positive RS}\) & \fcolorbox{black}{color_PositiveSystem}{\makebox[2mm][l]{\strut}}\fcolorbox{black}{color_PositiveInt}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_String}{\makebox[2mm][l]{\strut}} & \\
\(\texttt{Run}\) & \fcolorbox{black}{color_System}{\makebox[2mm][l]{\strut}}\fcolorbox{black}{color_PositiveInt}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_String}{\makebox[2mm][l]{\strut}} & \\
\(\texttt{Run of Positive RS}\) & \fcolorbox{black}{color_PositiveSystem}{\makebox[2mm][l]{\strut}}\fcolorbox{black}{color_PositiveInt}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_String}{\makebox[2mm][l]{\strut}} & \\
\(\texttt{Loop}\) & \fcolorbox{black}{color_System}{\makebox[2mm][l]{\strut}}\fcolorbox{black}{color_Symbol}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_String}{\makebox[2mm][l]{\strut}} & {Applies function\\\(\texttt{lollipops\_only\_loop\_named}\) to RS} \\
\(\texttt{Loop of Positive RS}\) & \fcolorbox{black}{color_PositiveSystem}{\makebox[2mm][l]{\strut}}\fcolorbox{black}{color_Symbol}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_String}{\makebox[2mm][l]{\strut}} & \\
\(\texttt{Create Experiment}\) & \fcolorbox{black}{color_String}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_Experiment}{\makebox[2mm][l]{\strut}} & Creates experiment from string \\
\(\texttt{Frequency}\) & \fcolorbox{black}{color_System}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_String}{\makebox[2mm][l]{\strut}} & \\
\(\texttt{Frequency of Positive RS}\) & \fcolorbox{black}{color_PositiveSystem}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_String}{\makebox[2mm][l]{\strut}} & \\
\(\texttt{Limit Frequency}\) & \fcolorbox{black}{color_System}{\makebox[2mm][l]{\strut}}\fcolorbox{black}{color_Experiment}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_String}{\makebox[2mm][l]{\strut}} & \\
\(\texttt{Limit Frequency of Positive RS}\) & \fcolorbox{black}{color_PositiveSystem}{\makebox[2mm][l]{\strut}}\fcolorbox{black}{color_Experiment}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_String}{\makebox[2mm][l]{\strut}} & \\
\(\texttt{Fast Frequency}\) & \fcolorbox{black}{color_System}{\makebox[2mm][l]{\strut}}\fcolorbox{black}{color_Experiment}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_String}{\makebox[2mm][l]{\strut}} & \\
\(\texttt{Fast Frequency of Positive RS}\) & \fcolorbox{black}{color_PositiveSystem}{\makebox[2mm][l]{\strut}}\fcolorbox{black}{color_Experiment}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_String}{\makebox[2mm][l]{\strut}} & \\
\(\texttt{Graph System}\) & \fcolorbox{black}{color_System}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_Graph}{\makebox[2mm][l]{\strut}} & Creates digraph of RS \\
\(\texttt{Graph Positive System}\) & \fcolorbox{black}{color_PositiveSystem}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_PositiveGraph}{\makebox[2mm][l]{\strut}} & \\
\(\texttt{Create Dot file}\) & \fcolorbox{black}{color_Graph}{\makebox[2mm][l]{\strut}}\fcolorbox{black}{color_DisplayNode}{\makebox[2mm][l]{\strut}}\fcolorbox{black}{color_DisplayEdge}{\makebox[2mm][l]{\strut}}\fcolorbox{black}{color_ColorNode}{\makebox[2mm][l]{\strut}}\fcolorbox{black}{color_ColorEdge}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_String}{\makebox[2mm][l]{\strut}} & Creates Dot file from a graph \\
{\(\texttt{Create Dot file}\)\\\(\texttt{of Positive System}\)} & \fcolorbox{black}{color_PositiveGraph}{\makebox[2mm][l]{\strut}}\fcolorbox{black}{color_DisplayNode}{\makebox[2mm][l]{\strut}}\fcolorbox{black}{color_DisplayEdge}{\makebox[2mm][l]{\strut}}\fcolorbox{black}{color_ColorNode}{\makebox[2mm][l]{\strut}}\fcolorbox{black}{color_ColorEdge}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_String}{\makebox[2mm][l]{\strut}} & \\
\(\texttt{Create GraphML file}\) & \fcolorbox{black}{color_Graph}{\makebox[2mm][l]{\strut}}\fcolorbox{black}{color_DisplayNode}{\makebox[2mm][l]{\strut}}\fcolorbox{black}{color_DisplayEdge}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_String}{\makebox[2mm][l]{\strut}} & Creates GraphML file from a graph \\
{\(\texttt{Create GraphML file}\)\\\(\texttt{of Positive System}\)} & \fcolorbox{black}{color_PositiveGraph}{\makebox[2mm][l]{\strut}}\fcolorbox{black}{color_DisplayNode}{\makebox[2mm][l]{\strut}}\fcolorbox{black}{color_DisplayEdge}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_String}{\makebox[2mm][l]{\strut}} & \\
\(\texttt{Display node function}\) & \fcolorbox{black}{color_String}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_DisplayNode}{\makebox[2mm][l]{\strut}} & \\
\(\texttt{Display edge function}\) & \fcolorbox{black}{color_String}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_DisplayEdge}{\makebox[2mm][l]{\strut}} & \\
\(\texttt{Color node function}\) & \fcolorbox{black}{color_String}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_ColorNode}{\makebox[2mm][l]{\strut}} & \\
\(\texttt{Color edge function}\) & \fcolorbox{black}{color_String}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_ColorEdge}{\makebox[2mm][l]{\strut}} & \\
\(\texttt{Bisimilarity Kanellakis \& Smolka}\) & \fcolorbox{black}{color_Graph}{\makebox[2mm][l]{\strut}}\fcolorbox{black}{color_Graph}{\makebox[2mm][l]{\strut}}\fcolorbox{black}{color_AssertFunction}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_String}{\makebox[2mm][l]{\strut}} & \\
{\(\texttt{Bisimilarity Kanellakis \& Smolka}\)\\\(\texttt{for Positive RS}\)} & \fcolorbox{black}{color_PositiveGraph}{\makebox[2mm][l]{\strut}}\fcolorbox{black}{color_PositiveGraph}{\makebox[2mm][l]{\strut}}\fcolorbox{black}{color_PositiveAssertFunction}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_String}{\makebox[2mm][l]{\strut}} & \\
\(\texttt{Bisimilarity Paige \& Tarjan}\) & \fcolorbox{black}{color_Graph}{\makebox[2mm][l]{\strut}}\fcolorbox{black}{color_Graph}{\makebox[2mm][l]{\strut}}\fcolorbox{black}{color_AssertFunction}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_String}{\makebox[2mm][l]{\strut}} & \\
{\(\texttt{Bisimilarity Paige \& Torjan}\)\\\(\texttt{for Positive RS}\)} & \fcolorbox{black}{color_PositiveGraph}{\makebox[2mm][l]{\strut}}\fcolorbox{black}{color_PositiveGraph}{\makebox[2mm][l]{\strut}}\fcolorbox{black}{color_PositiveAssertFunction}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_String}{\makebox[2mm][l]{\strut}} & \\
{\(\texttt{Bisimilarity Paige \& Tarjan}\)\\\(\texttt{(ignore labels)}\)} & \fcolorbox{black}{color_Graph}{\makebox[2mm][l]{\strut}}\fcolorbox{black}{color_Graph}{\makebox[2mm][l]{\strut}}\fcolorbox{black}{color_AssertFunction}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_String}{\makebox[2mm][l]{\strut}} & \\
{\(\texttt{Bisimilarity Paige \& Torjan}\)\\\(\texttt{(ignore labels) for Positive RS}\)} & \fcolorbox{black}{color_PositiveGraph}{\makebox[2mm][l]{\strut}}\fcolorbox{black}{color_PositiveGraph}{\makebox[2mm][l]{\strut}}\fcolorbox{black}{color_PositiveAssertFunction}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_String}{\makebox[2mm][l]{\strut}} & \\
\(\texttt{Create relabeling edge function}\) & \fcolorbox{black}{color_String}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_AssertFunction}{\makebox[2mm][l]{\strut}} & \\
{\(\texttt{Create relabeling edge function}\)\\\(\texttt{for Positive RS}\)} & \fcolorbox{black}{color_String}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_PositiveAssertFunction}{\makebox[2mm][l]{\strut}} & \\
\(\texttt{Trace}\) & \fcolorbox{black}{color_System}{\makebox[2mm][l]{\strut}}\fcolorbox{black}{color_PositiveInt}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_Trace}{\makebox[2mm][l]{\strut}} & \\
\(\texttt{Positive Trace}\) & \fcolorbox{black}{color_PositiveSystem}{\makebox[2mm][l]{\strut}}\fcolorbox{black}{color_PositiveInt}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_PositiveTrace}{\makebox[2mm][l]{\strut}} & \\
\(\texttt{Slice Trace}\) & \fcolorbox{black}{color_Trace}{\makebox[2mm][l]{\strut}}\fcolorbox{black}{color_Set}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_Trace}{\makebox[2mm][l]{\strut}} & \\
\(\texttt{Positive Slice Trace}\) & \fcolorbox{black}{color_PositiveTrace}{\makebox[2mm][l]{\strut}}\fcolorbox{black}{color_PositiveSet}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_PositiveTrace}{\makebox[2mm][l]{\strut}} & \\
\(\texttt{Trace to string}\) & \fcolorbox{black}{color_Trace}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_String}{\makebox[2mm][l]{\strut}} & \\
\(\texttt{Positive trace to string}\) & \fcolorbox{black}{color_PositiveTrace}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_String}{\makebox[2mm][l]{\strut}} & \\
\(\texttt{Overwrite context entities}\) & \fcolorbox{black}{color_System}{\makebox[2mm][l]{\strut}}\fcolorbox{black}{color_Set}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_System}{\makebox[2mm][l]{\strut}} & \\
\(\texttt{Overwirite reaction entities}\) & \fcolorbox{black}{color_System}{\makebox[2mm][l]{\strut}}\fcolorbox{black}{color_Set}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_System}{\makebox[2mm][l]{\strut}} & \\
{\(\texttt{Overwrite context entities}\)\\\(\texttt{of Positive System}\)} & \fcolorbox{black}{color_PositiveSystem}{\makebox[2mm][l]{\strut}}\fcolorbox{black}{color_PositiveSet}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_PositiveSystem}{\makebox[2mm][l]{\strut}} & \\
{\(\texttt{Overwrite reaction entities}\)\\\(\texttt{of Positive System}\)} & \fcolorbox{black}{color_PositiveSystem}{\makebox[2mm][l]{\strut}}\fcolorbox{black}{color_PositiveSet}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_PositiveSystem}{\makebox[2mm][l]{\strut}} & \\
\(\texttt{Create Grouping Function}\) & \fcolorbox{black}{color_String}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_GroupFunction}{\makebox[2mm][l]{\strut}} & \\
\(\texttt{Group Nodes}\) & \fcolorbox{black}{color_Graph}{\makebox[2mm][l]{\strut}}\fcolorbox{black}{color_GroupFunction}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_Graph}{\makebox[2mm][l]{\strut}} & \\
{\(\texttt{Create Grouping Function}\)\\\(\texttt{for Positive System}\)} & \fcolorbox{black}{color_String}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_PositiveGroupFunction}{\makebox[2mm][l]{\strut}} & \\
\(\texttt{Group Nodes of Positive System}\) & \fcolorbox{black}{color_PositiveGraph}{\makebox[2mm][l]{\strut}}\fcolorbox{black}{color_PositiveGroupFunction}{\makebox[2mm][l]{\strut}} & \fcolorbox{black}{color_PositiveGraph}{\makebox[2mm][l]{\strut}} & \\
\end{longtblr}
All the types can be seen in table\ \ref{types_gui} that are used for the node's input and output. Each type has a distinct color associated that is used to color the connectors between nodes. All nodes can be seen in table\ \ref{node_in_out}. The second column holds the color of the inputs types used; the third column holds the color of the outputs types.
Since the generated graphs were often times immediately converted to DOT files and rendered to SVG, a native renderer is included that can create PNG images of the supplied graph. This reduces greatly the time switching between software to achieve the same result.
\end{section}
\end{chapter}

View File

@ -198,3 +198,14 @@
version = {0.6.10},
license = {MIT OR Apache-2.0},
}
@article{Brodo_Bruni_Falaschi_Gori_Milazzo_2025,
title = {Slicing analyses for negative dependencies in
Reaction Systems Modeling Gene Regulatory Networks},
DOI = {10.1007/s11047-025-10046-5},
journal = {Natural Computing},
author = {Brodo, Linda and Bruni, Roberto and Falaschi, Moreno
and Gori, Roberta and Milazzo, Paolo},
year = 2025,
month = {Sep}
}

Binary file not shown.

View File

@ -47,6 +47,7 @@
\usepackage{amsmath} %% math matrix etc
\usepackage{minted} %% code block
\usepackage{tabularray} %% better tables
\usepackage{tblr-extras}
\usepackage{booktabs} %% rules for tables
\usepackage{mathrsfs}
\usepackage{mathtools}
@ -69,8 +70,9 @@
%% design packages
\usepackage{enumitem} %% for lists and enumerating
\usepackage{color}
\usepackage{xcolor,colortbl} % xcolor for defining colors, colortbl for table colors
\usepackage{luacolor}
\usepackage{xcolor} % xcolor for defining colors, colortbl for table colors
\usepackage{colortbl} % xcolor for defining colors, colortbl for table colors
\usepackage{makecell} %% for multiple lines in cell of table
\usepackage{cancel}
\usepackage{pgfornament} %% ornaments
@ -132,6 +134,8 @@
%% PACKAGE tabularray
\UseTblrLibrary{amsmath}
\UseTblrLibrary{caption}
\TblrCaptionBelow%
%% PACKAGE color
@ -197,6 +201,46 @@
\DeclarePairedDelimiter\abs{\lvert}{\rvert}%
\DeclarePairedDelimiter\doublesq{\llbracket}{\rrbracket}%
\definecolor{color_Error}{HTML}{FC2836}
\definecolor{color_String}{HTML}{0E7AFF}
\definecolor{color_Path}{HTML}{1AC9D8}
\definecolor{color_Svg}{HTML}{86868B}
\definecolor{color_PositiveInt}{HTML}{1BD5B6}
\definecolor{color_Symbol}{HTML}{5A61FF}
\definecolor{color_System}{HTML}{FECF0A}
\definecolor{color_Environment}{HTML}{FFEDA4}
\definecolor{color_Set}{HTML}{FFE370}
\definecolor{color_Context}{HTML}{D9AF00}
\definecolor{color_Reactions}{HTML}{A78700}
\definecolor{color_Experiment}{HTML}{FD7E25}
\definecolor{color_PositiveSystem}{HTML}{A77753}
\definecolor{color_PositiveEnvironment}{HTML}{F3D2BA}
\definecolor{color_PositiveSet}{HTML}{C99D7D}
\definecolor{color_PositiveContext}{HTML}{875733}
\definecolor{color_PositiveReactions}{HTML}{683A18}
\definecolor{color_Trace}{HTML}{FC577D}
\definecolor{color_PositiveTrace}{HTML}{FB003B}
\definecolor{color_Graph}{HTML}{2ECC46}
\definecolor{color_PositiveGraph}{HTML}{00961A}
\definecolor{color_DisplayNode}{HTML}{B2F4BD}
\definecolor{color_DisplayEdge}{HTML}{81E793}
\definecolor{color_ColorNode}{HTML}{3BC553}
\definecolor{color_ColorEdge}{HTML}{1CB236}
\definecolor{color_AssertFunction}{HTML}{CF00EE}
\definecolor{color_GroupFunction}{HTML}{750086}
\definecolor{color_PositiveAssertFunction}{HTML}{35C9FD}
\definecolor{color_PositiveGroupFunction}{HTML}{02B7F3}
%% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - %%
\title{Document}

View File

@ -8,6 +8,28 @@
The use of inhibitors induces non-monotonic behaviors that are difficult to analyze.
Entities can also be provided by an external context sequence to simulate \textit{in silico} biological experiment, expanded by structural operational semantics (SOS) rules to account for several biological experiments. In addition Positive RS, trace slicing, graph generation, bisimulation and more is available through an intuitive visual language with a graphical interface.
Despite the rich theoretical development of Reaction Systems, practival tools for working with RS models have lagged behind. Numerous versions of Prolog and Python programs have been developed, but have problems regarding performance and usability. Future developments may be hindered by this lack of software by this technological barrier.
This thesis aims to bridge the gab between the theoretical foundations of Reaction Systems and their practical application. To achieve this a new software platform for modeling, analyzing and designing Reaction Systems is proposed.
\begin{section}{Software Design and Key Features}
The core contribution here presented is a new software tool built from the ground up to support Reaction Systems modeling and analysis. Equal emphasis has been placed on performance and user experience. The software is implemented in Rust\cite{rust_2025}, a modern systems programming language chosen for its efficency and reliability.
Rusts strong performance characteristics (memory safety, speed, and concurrency support) help ensure that even larger Reaction System models can be analyzed quickly, while its emphasis on code safety and clarity makes the tool more maintainable in the long term.
The platform provides two user interfaces to accommodate different user needs. A command-line interface (CLI) is available for quick integration in already existing pipelines. The CLI allows specification of Reaction Systems and instructions over them and is easily expandable to meed the need of the programmer.
A graphical user interface (GUI) is also available both as standalone native application and as a static web application running on WebAssembly\cite{WebAssemblyCoreSpecification2}. The GUI lowers the learning curve for new users: instead of writing code or scripts, one can construct reactions, run simulations and view results through the same interface through interactive diagrams and controls. By providing both CLI and graphical native/web interfaces, the tool caters to a wide audience.
Key capabilities of the developed Reaction Systems software include:
\begin{itemize}
\item Graphical interface for modeling and simulation: An interactive GUI that allows users to graphically define RS components and simulate their behavior.
\item Trace slicing: tools for examining execution traces in detail. Trace slicing allows a user to isolate and inspect specific segments of a reaction sequence, exploring causality between produced elements or inhibited reactions.
\item Bisimulation analysis: support for formal bisimulation analysis, which enables comparing different Reaction Systems models for behavioral equivalence. The methods are not restricted to just analyzing RS, but are available for any graph-like structure.
\item Conversion between Reaction Systems and Positive Reactions Systems: to better explore traces and causality, a more suitable model is provided. Conversion between systems is handled automatically and the dafaults can be fine tuned or overridden.
\end{itemize}
Together, these features make the software a comprehensive environment for working with Reaction Systems. The user can construct, simulate and analyze the results through multiple lenses: from observing cyclic behaviors to checking formal equivalences and visualizing interaction networks.
\end{section}
\end{chapter}

View File

@ -200,5 +200,6 @@ Digraph > Dot
During development key issues identified from previous projects where performance and usability. The biggest problem with prolog software is exceeding the stack limit and thus running out of memory. This problem is completely solved by using Rust. Another problem was that of performance. On dot file generation a 2 to 7 times performance improvement is seen, depending on the model simulated.
Usability has been taken into account both for an end user and for a programmer that intend to expand the system: grammar follows general rules largely compatible with previous projects; the grammar is decoupled from the internal representation and thus permits greater maintainability and expandability; the use of traits permits more modularity and the coexistence of multiple types of RS in the same project; domain specific languages allow more efficient and intuitive instruction specification; the graphical user interface presents instructions and methods over reaction systems in a more intuitive way that with just a command line interface; the node system allows greater modularity and for easy additions of new instructions; easy SVG generation reduce the time spent between different software and speeds up the end user's tasks; saving the state of the application allows for lower friction when switching between projects; the web GUI provides a platform agnostic interface for quick development.
Thus the original goal to develop a more user-friendly and developer-friendly reaction system modeler has been met.
\end{section}
\end{chapter}