A Computational Model of the Secondary Hemostasis Pathway in Reaction Systems

: Reaction Systems (RSs) are a computational framework inspired by biochemical mechanisms. An RS defines a finite set of reactions over a finite set of entities (molecules, proteins, etc). Starting from an initial set of entities (the initial state), a computation is performed by applying all reactions to a state in order to produce the following state, giving rise to a sequence of sets of entities. RSs have shown to be a general computational framework whose application ranges from the modeling of biological phenomena to molecular chemistry and computer science. In this paper, we contribute to research on the application of RSs for modeling biological systems. We consider the problem of modeling hemostasis, for which several models have been defined, starting from the 1960s. Previous models are based on sets of ordinary differential equations, while we develop a discrete model in RSs for pathways of the secondary hemostasis. Then, we implement our model in BioReSolve, a computational framework for RSs that we have previously defined which provides tools for the specification and verification of properties. By using the tools in BioReSolve we derive important observations on the model behaviour for hemostasis, and in particular, we study the role of three important inhibitors, verifying that their presence or absence leads to phenomena such as thrombophilia, or thromboembolism, or excessive coagulation, etc. We can also study computationally the causality relations between the molecules involved in the reactions showing which entities play a fundamental role, thus contributing to the design of more effective and specialized drugs. Our work can hence help to show how to model complex biological systems in RSs and derive computationally and biologically relevant properties of the systems.


Introduction
Reaction Systems (RSs) [1][2][3] are a computational framework inspired by systems of living cells.Their constituents are a finite set of entities and a finite set of reactions.Each reaction is a triple that consists of a set of entities whose presence is needed to enable the reaction, called reactants; a set of entities whose absence is needed to enable the reaction, called inhibitors; and a set of entities that are produced when the reaction takes place, called products.RSs have shown to be a general computational model whose application ranges from the modeling of biological phenomena [4][5][6][7] to molecular chemistry [8] and computer science [3].The classical semantics of RSs is defined as a reduction system whose states are sets of entities (those produced at the previous step, possibly joined with others provided by an external context, thus modeling the interaction with the environment).Notably, as reactions exploit facilitation and inhibition mechanisms, the behavior of RSs is generally nonmonotonic, i.e., a computational effect, like the production of a given entity, is not necessarily preserved when more entities are present in the source state.

Problem Statement
Several tools are already available to simulate RSs or to verify that certain properties are met.In this paper, we run our in silico experiments by using our own prototype implementation of RSs, called BioReSolve [9] proposed in [10,11].We mention other notable implementations of RSs in Section 7.
The aim of this paper is to contribute to research on the application of RSs for modeling biological systems.In particular, we want to test the BioReSolve [10,11] tools with a classic important problem in Systems Biology.The problem of hemostasis has been widely studied in the literature, and it is still a matter of refinements and additional studies.The research already started in the sixties of the last century, developing an initial model that later on was integrated and modified.A good survey on the computational models for hemostasis is given in [12].The models surveyed in [12] study different characteristics of hemostasis, trying to model them by sets of ordinary differential equations.In this paper, we take a completely different approach that we think might complement the existing ones by developing a computational discrete, rather than continuous, model based on RSs.

The Approach
We start by modeling the classical approach to secondary hemostasis in an RS, and we discuss the recent refinements to the model of secondary hemostasis.We implemented our model in BioReSolve, which is a rather elaborate development environment for Reaction Systems, which provides several tools for verifying properties of RSs and allows to show graphically in the form of a colored connected graph the computations in an RS model.We present and discuss our case study in a detailed way in order to show how to model other systems by following similar lines.

Contribution
In this paper, we define the first (discrete) RS model for secondary hemostasis.Then, we exploit our BioReSolve implementation and the verification tools that are made available in BioReSolve to study hemostasis and to derive important observations on the model behavior.In particular, we study the role of three inhibitors in the biological pathways of secondary hemostasis.We show that the lack of each inhibitor leads to problems correlated with thrombophilia, thromboembolism, excessive coagulation, etc.The in silico experiments with our model show that it can be a quite useful computational tool to understand the role of each molecule and the effects of the changes on the pathway cascade.We show in detail how to model our biological network, which might then be replicated with several other case studies, such as those in the public database on the CellCollective platform [13].Our work can hence help to model complex biological systems by using the RS framework, to study the properties of the modeled systems, and to perform fundamental in silico experiments within the model.

Organization
In Section 2, we summarise the basics of RSs.In Section 3, we recall a process algebra for RSs [14].This process algebra is the basis for the tools that we have previously defined for the analysis of models realized in RSs.In Section 4, we introduce the classical secondary hemostasis mechanism which is composed of the intrinsic and extrinsic biological network ways.Our RS model of the secondary hemostasis is described in Section 5.Then, in Section 6, we analyze several properties of our models, generating graphs of the computations and discussing the role of attractors.In particular, we study the role of inhibitors, showing that the lack of one of them can cause either thrombophilia, thromboembolism, excessive coagulation, etc.We also show the causal analysis based on slicing for some critical molecules.Section 7 discusses the related work.Finally, Section 8 illustrates some future work, together with concluding remarks.In Appendix A, we report a description of the factors involved in our hemostasis model.

Reaction Systems
Reaction Systems (RSs) are a qualitative formalism born in the field of Natural Computing with the aim of proposing a simple and powerful language to describe biological reactions.Here, we briefly remind the reader of the main concepts of RSs; the interested reader can find the classical set-theoretic presentation in [3].The term entities denotes generic molecular substances (e.g., atoms, ions, molecules) that may be present in the states of a biochemical system.
Let S be a (finite) set of entities, a state is any subset W ⊆ S. A reaction in S is a triple r = (R, I, P), where R, I, P ⊆ S are finite, nonempty subsets of S and R ∩ I = ∅.The sets R, I, P are the sets of reactants, inhibitors, and products, respectively; rac(S) denotes the set of all reactions over S.
Given a state W ⊆ S, the result of a reaction r = (R, I, P) ∈ rac(S) on W, denoted by res r (W), is defined as follows, where en r (W) is called the enabling predicate of r: It follows that all reactants have to be present in the current state for the reaction to be fired, while the presence of any of the inhibitors would block the reaction.Products are the outcome of the reaction, to be available in the next state.A Reaction System is a pair A = (S, A) where S is the set of entities, and A ⊆ rac(S) is a finite set of reactions over S. Given W ⊆ S, the result of the reactions A on W, denoted res A (W), is the union of the products of all the reactions in A: res A (W) ≜ ∪ r∈A res r (W).
Biological systems are open systems that react to environmental stimuli, thus the behavior of an RS is formalized in terms of an interactive process.Let A = (S, A) be an RS, and let n ≥ 0. An (n + 1)-steps interactive process in A is a pair π = (γ, δ) s.t.γ = {C i } i∈[0,n] is the context sequence and δ = {D i } i∈[0,n] is the result sequence, where C i , D i ⊆ S for any i ∈ [0, n], D 0 = ∅, and . The context sequence γ represents the environment, while the result sequence δ is entirely determined by γ and the set of reactions A. We call τ = W 0 , . . ., W n the state sequence, with W i ≜ C i ∪ D i for any i ∈ [0, n].Note that each state W i in τ is the union of the context C i at step i and the result set D i = res A (W i−1 ) from step i − 1; see Figure 1.Note also that the result of a computation step does not depend on the order of application of the reactions.

Structural Operational Semantics (SOS) Rules for Reaction Systems
This section is based on a previous work [10], in which some of the authors have introduced an algebraic syntax and semantics for RSs to define a more expressive context behavior by introducing nondeterminism, recursion, and parallelism.BioResolve [9], the tool which we use for our experiments, is based on this new semantics by implementing the rules defined in Figure 2. Despite this section being quite technical, it gives an intuition of the potentiality of our approach.In fact, this semantics can be the basis for future extensions.However, at first reading, this section can be skipped by readers who are more interested in the experiments and using the interpreter.
Here, we consider a Structural Operational Semantics [15] (SOS) inspired by process algebras such as the Calculus of Communicating Systems (CCSs) [16] so that for each operator of the language we associate a simple SOS inference rule defining its behavior.This induces a Label Transition System (LTS) semantics for RSs, where states are terms of the algebra (in the RS version each state is a collection of entities), each transition corresponds to a step of the RS (where all the enabled reactions are fired), and transition labels retain some information on the entities involved at each step (the ones playing as reagents, as inhibitors, and as products).
Definition 1 (RS processes).Let S be a set of entities.An RS process P is any term defined by the following grammar: where R, I, P ⊆ S are nonempty sets of entities, C, D ⊆ S are possibly empty sets of entities, and X is a process variable.
Using this new definition, the reactions, the entities, and the context form the components of an RS process P that interact with each other to execute an RS step.An RS process P embeds a mixture process M composed as the parallel composition of some reactions (R, I, P), some set of current entities D (possibly the empty set), and some context processes K.We write ∏ i∈I M i for the parallel composition of all M i with i ∈ I.
A context process K is a possibly nondeterministic and recursive system: the nil context 0 stops the computation; the prefixed context C.K makes the entities C available to the reactions at the current step, and then leaves K be the context offered at the next step; the nondeterministic choice K 1 + K 2 allows the context to behave as either K 1 or K 2 ; X is a process variable, and rec X.K is the usual recursive operator of process algebras.The ability to compose contexts in parallel simplifies the modeling of different strategies and reduces combinatorial explosion at the specification level.For example, letting K a ≜ rec X. a.X + ∅.X be the context that can recursively offer a or not at any step, the process K a |K b |K c can recursively offer any combination of entities a, b, and c.
P and P ′ are structurally equivalent, written P ≡ P ′ , when they denote the same term up to the laws of commutative monoids (unit, associativity, and commutativity) for parallel composition •|•, with ∅ as the unit, and the laws of idempotent and commutative monoids for choice • + •, with 0 as the unit.We also assume Definition 2 (RSs as RS processes).Let A = (S, A) be an RS and π = (γ, δ) an (n + 1)-steps interactive process in A, with γ = {C i } i∈[0,n] and δ = {D i } i∈[0,n] .For any step i ∈ [0, n], the corresponding RS process A, π i is defined as follows: 0 is the serialisation of the entities offered by γ i (the shifting of γ at the i-th step).We write A, π as a shorthand for A, π 0 .
Example 2. The encoding of the RS A = (S, A), in Example 1, is as follows: The graphical representation of the translation is in Figure 3.
A transition label ℓ is a tuple ⟨W ▷ R, I, P⟩ with W, R, I, P ⊆ S. The sets W record the entities available in the current state of the system, either provided by the context or resulting as product from the previous step; the set R records entities whose presence is assumed (either acting as reactants or as inhibitors); the set I records entities whose absence is assumed (either acting as inhibitors or as missing reactants); and the set P records the products of enabled reactions.The operational semantics of RS processes is defined by the SOS rules in Figure 2 [10].The process 0 has no transition.The rule (Ent) makes available the entities in the (possibly empty) set D, then reduces to ∅.The rule (Cxt) says that a prefixed context process C.K makes available the entities in the set C and then reduces to K. The rule (Rec) is the classical rule for recursion.The rules (Suml) and (Sumr) select a move of either the left or the right component, resp., discarding the other process.The rule (Pro) executes the reaction (R, I, P) (its reactants, inhibitors, and products are recorded in the label), which remains available at the next step together with newly produced entities P. The rule (Inh) applies when the reaction (R, I, P) should not be executed; its label records the causes for which the reaction is disabled: possibly some inhibiting entities (J ⊆ I) are present or some reactants (Q ⊆ R) are missing, with J ∪ Q ̸ = ∅, as at least one cause is needed.The rule (Par) puts two processes in parallel by pooling their labels and joining all the set components of the labels.The sanity check ℓ 1 ⌢ ℓ 2 is required to guarantee that reactants and inhibitors are consistent.
Finally, the rule (Sys) requires that all the processes of the systems have been considered, and also checks that all the needed reactants are actually available in the system (R ⊆ W).In fact this constraint can only be met on top of all processes.The check that inhibitors are absent (I ∩ W = ∅) is embedded in rule (Par).In the following, we assume transitions P ⟨W▷R,I,P⟩ − −−−−− → P ′ guarantee that any instance of the rule (Inh) is applied in a way that maximizes the sets J and Q (see [10]).We implemented the computation in Example 3 in the BioResolve tool and thus obtained the graph in Figure 5.The theoretic dynamics of an RS match the SOS semantics of its RS process, as it is proved by the following: Theorem 1 (see [10]).Let A = (S, A) be an RS and π = (γ, δ) an (n + 1)-steps interactive process in A, with γ = {C i } i∈[0,n] , δ = {D i } i∈[0,n] , and let P i ≜ A, π i for any i ∈ [0, n].Then, for any i ∈ [0, n − 1]: 2. there exists R, I ⊆ S such that P i

Secondary Hemostasis
Hemostasis is a fundamental biological process activated by our body to control and regulate blood loss following a wound or traumatic event.This involves a series of complex mechanisms aimed at maintaining blood in its fluid state and preventing excessive loss in case of injuries.The activation of the coagulation system serves to increase blood viscosity, aiding in preventing the spread of potential pathogens and promoting the rapid repair of vascular lesions associated with inflammation.
Secondary hemostasis, also known as blood coagulation, is the second phase of the hemostatic process activated in response to vascular injury.After the rapid vasoconstriction and platelet plug formation in the primary phase of hemostasis, the secondary phase involves the coagulation cascade, a more complex process involving plasma proteins called coagulation factors.The coagulation cascade is essentially a complex set of biochemical reactions that take place on the surface of platelets activated by vascular wall damage, culminating in the production of thrombin.Thrombin converts fibrinogen into fibrin, stabilizing the platelet aggregate.Calcium (Ca 2+ ), along with vitamin K, is crucial in secondary hemostasis.Vitamin K facilitates the carboxylation of amino acid residues in coagulation factors, enabling them to bind calcium.This interaction is essential for the activation of factors and the formation of the fibrin clot.
In the following, we describe some biological pathways for hemostasis.Hemostasis has been widely investigated, and several computational models have been defined.A good review of these models is given in [12].The classical description from the 1960s delineates this process into two primary pathways: the intrinsic pathway and the extrinsic pathway [17].This classical theory has been developed over time and has been widely taught and used in medical practice [18].However, recent evidence suggests that the role of factor XII may be less significant than initially hypothesized.Some research suggests that factor XII may not be essential for hemostasis in vivo and may not participate in clot formation in certain situations.Furthermore, despite the persistence of a distinction between the two pathways, it is believed that these are not distinctly separated but rather interconnected.It is observed that factors generated in the extrinsic pathway are able to activate factors and complexes of the intrinsic pathway through a mechanism known as cross-over [19,20].Nevertheless, understanding the coagulation cascade through the traditional model remains useful in many clinical scenarios, providing a framework for interpreting laboratory tests and managing hemorrhagic and thrombotic conditions.It is important to consider that ongoing research continues to delve into the complexity of the hemostatic system, and the traditional model may require updates based on new discoveries.From our perspective, it is particularly interesting to observe how Reaction Systems manage feedback actions and the role of inhibitors, offering an easy implementation of the secondary hemostasis model.The role of research in refining the process can be analyzed subsequently.Our initial approach involves modeling within the classical framework and incorporating Factor XII and some cross-over components.
We reported in Figure 6 a network describing the pathways involved in the hemostasis process.
The factors are named with a Roman numeral from I to XIII according to the international nomenclature, indicating the order of discovery rather than activation, while the addition of "a" at the end of the numeral indicates the activation of that factor by another factor in the cascade.The nomenclature has an exception in prekallikrein (PK) and high molecular weight kininogen (HMWK).Other fundamental components for the coagulation process are phospholipids (PL), which constitute an appropriate reaction surface, and calcium ions, which promote interactions between enzymes, cofactors, and phospholipids.

The Intrinsic Pathway
The blood coagulation through the intrinsic pathway starts in damaged vessels, where all the elements necessary for this process are present in the blood itself.The first phase involves the SPAC complex, composed of four proteins: XII (Hageman factor), XI, HMWK, and PK.These factors are primarily serine proteases, except for HMWK, which is a nonenzymatic plasma protein.The intrinsic pathway of the hemostatic cascade begins when there is exposure of the endothelial basement membrane due to endothelial rupture.This membrane contains silicon dioxide and urate crystals capable of initiating the intrinsic pathway, thanks to their high negative charge which attracts coagulation factor XII and allows interaction with high molecular weight kininogen (HMWK).This interaction, in turn, recruits inactive factor XI and prekallikrein (PK), forming a complex called SPAC.This complex converts inactive factor XII into active factor XIIa. Factor XIIa (active), which cleaves prekallikrein (PK) into kallikrein (KK).Kallikrein (KK), in turn, activates inactive factor XII, creating a feedback loop (factor XII activation amplification).Activated factor XII initiates a series of reactions involving various coagulation factors such as XI and IX.Factor IXa detaches from the complex and becomes loaded onto the surface of platelets, which start to aggregate around the endothelial injury, advancing the activation of coagulation.In the secondary hemostasis process, factor VIII plays a pivotal role.Initially inactive and bound with von Willebrand factor (VWF), factor VIII is conveyed by VWF to the injury site.Subsequently, thrombin activates factor VIII, marking the interaction between the intrinsic and extrinsic pathways.Once activated, VWF is released and integrated into the subendothelial matrix, restoring lost components during injury.Factor VIIIa then forms a complex with factor IXa on the platelet surface, creating an intrinsic tenase complex (IXa-VIIIa-Ca 2+ -PL), which activates factor X [21].Factor X acts as the convergence point between the intrinsic and extrinsic pathways, initiating fibrin polymerization, the final event in the coagulation cascade.

The Extrinsic Pathway
The extrinsic pathway of hemostasis begins with tissue factor (TF), a transmembrane protein expressed by fibroblasts near the subendothelial basement membrane.When blood comes into contact with TF in a sufficiently inflammatory environment, the extrinsic pathway is activated [22].The factor involved in this pathway is factor VII, at the moment it interacts with tissue factor (TF) in the presence of membrane phospholipids (PL) and calcium ions (Ca 2+ ) acting as a bridge [23].Factor VII, once activated, forms the extrinsic tenase complex (TF-VIIa-Ca 2+ -PL) on the cell membrane.This complex has a high affinity for factor X and catalyzes its activation to Xa.In turn, factor Xa further amplifies the extrinsic pathway by reactivating the TF-VII-PL complex in a positive feedback mechanism.Additionally, the TF-VIIa-Ca 2+ -PL complex also activates factor IX, representing another point of cross-over between the two coagulation pathways.

The Common Pathway
When factor X transitions from its inactive to active form, a critical point is reached in the coagulation cascade.Factor Xa comes into play, converting prothrombin (factor II) into thrombin (factor IIa), albeit in limited quantities [24].Thrombin, well-known for its ability to convert fibrinogen into fibrin, plays a fundamental role in the feedback mechanisms of the hemostatic system.Initially, thrombin activates factor V, which associates with phospholipids (PL) to form the Va, a process akin to what occurs with factor VIII.The Va can then bind to factor Xa, forming a prothrombinase complex (Xa-Va-Ca 2+ -PL) that enhances thrombin efficiency.Additionally, thrombin activates factor VII, thereby enhancing the extrinsic pathway, and converts factors XI and XIII into their active forms, contributing to the reinforcement of the intrinsic pathway.Coagulation relies on a positive feedback mechanism, where thrombin activation further stimulates coagulation.The primary role of thrombin is the cleavage and activation of fibrinogen, a liver-produced protein that rapidly polymerizes to form fibrin, crucial for repairing vascular damage.Fibrinogen is secreted in an inactive form to prevent blood gelation, but when thrombin acts on it, it becomes available for fibrin mesh formation.This fibrin mesh also traps red blood cells, creating a physical blockage that prevents blood leakage from the vessel.However, further reinforcement of the fibrin molecule bonds is required, provided by factor XIIIa, which stabilizes the fibrin clot, ensuring its solidity [25].
In summary, the hemostatic cascade involves intricate interconnections between the intrinsic and extrinsic pathways, converging onto the common pathway leading to the formation of the fibrin clot.

The Regulation of Coagulation
Coagulation is a critically important system in injury repair, but when activated unnecessarily, it can lead to potentially fatal events.Just to illustrate, a single milliliter of fibrin could induce coagulation of all the blood in a human body within 15 s.This underscores the need for finely regulated coagulation mechanisms.Among these mechanisms, blood flow plays a pivotal role.Coagulation requires a slowing down of blood flow, typically occurring when there is vascular damage.Additionally, the liver produces proteins that reduce the speed of the coagulation cascade, and there's the fibrinolytic system, which dismantles fibrin clots when they are no longer needed, limiting clot extension to the injured area.In the intricate network of the coagulation cascade, inhibitors assume a pivotal role in orchestrating the activation dynamics of coagulation factors, thereby averting the onset of pathological clotting events.These regulatory molecules operate as sophisticated negative feedback mechanisms, meticulously calibrating the coagulation process to ensure its judicious execution without tipping into hyperactivity or uncontrolled thrombosis.
Let us delve into the liver-produced proteins that reduce platelet aggregation.These include antithrombin III, protein C, protein S, and the Tissue Factor Pathway Inhibitor (TFPI).
Antithrombin III: This protein is a well-known regulatory system with significant pharmacological implications.It possesses a specific motif capable of binding thrombin, trapping it within its structure and limiting its interactions at the active site [26].Antithrombin III can also block factors X, IX, XI, XIII, VII, as well as kallikrein, and other factors.It can bind to a repeated polysaccharide structure known as heparin, enhancing its activity by changing its conformation upon interaction, accelerating reactions by 2000-4000 times.Antithrombin deficiency has clinical connections with an increased risk of thrombosis, thromboembolism, and complications associated with a state of hypercoagulability [27].Its primary role is to intervene in the common pathway.Protein C and protein S: These proteins have a more complex role involving thrombomodulin, a protein expressed by endothelial cells capable of recruiting thrombin.When thrombin moves away from the clot site, it automatically deactivates.Thrombomodulin thus reduces the activity of thrombin away from the lesion site.Protein C acts as a negative modulator of coagulation and is normally captured by its receptor, exerting antiapoptotic and anti-inflammatory actions while enhancing the protective action of the endothelial barrier.Protein C has a primarily anticoagulant role [28].Both its circulating form and the one bound to its receptor can interact with thrombomodulin, activating protein C. Once active, protein C can bind to protein S, produced by the liver, acting as a cofactor in protein C's anticoagulant activity [29].The dimer (protein C-protein S) specifically and extensively degrades factors Va and VIIIa bound to phospholipids on endothelial cells and platelet membranes.Tissue Factor Pathway Inhibitor (TFPI): This inhibitor targets the extrinsic pathway of coagulation.It inhibits the direct activation of factor X to factor Xa by the complex (TF-factor VIIa-Ca 2+ -PL).A quaternary complex forms (TFPI-FXa-TF-FVIIa) where the active sites of factors Xa and VIIa are bound to TFPI, thus rendering them inactive.Consequently, thrombin production is inhibited.It also inhibits factor IXa from forming complex (TFPI-IXa).
In sum, the discerning influence of coagulation inhibitors extends beyond mere counteraction of pro-coagulant stimuli; rather, it underscores their indispensable role in orchestrating a finely tuned equilibrium between coagulation and fibrinolysis.Through their concerted efforts, these inhibitors serve as custodians of hemostatic stability, preempting the onset of excessive thrombotic events and preserving vascular integrity.

Converting Biological Interactions into RS Rules: A Comprehensive Qualitative Model
This section elucidates the methodology for encoding the network of interactions within the hemostasis process, as depicted in Figure 6, into Reaction Systems (RSs).Figure 6 is pivotal to our study as it provides a comprehensive visual representation of these interactions, segmented into intrinsic, extrinsic, and common pathways.Each interaction and arrow in this figure is meticulously translated into RS rules, facilitating a qualitative modeling of the underlying biological processes as outlined in Figure 7.
To enhance this qualitative understanding, we incorporate a semiquantitative aspect by considering two quantity levels.This approach provides a more nuanced depiction of process dynamics without relying on precise numerical values.By defining specific quantity levels, such as "low" and "high" (denoted by Xa e Xa2), for key factors, we can model the behavior of the hemostatic process more realistically.For instance, our model represents the feedback loops that lead to varying levels of activation of key factors such as thrombin.Specifically, we illustrate how feedback mechanisms within the cascade result in two states of thrombin concentration.In the initial stages, a low quantity of thrombin is generated, which amplifies through subsequent stages to a high quantity.This representation helps in understanding the impact of these varying levels on the overall hemostatic process.To provide a concrete example, we can examine the interactions within the extrinsic and intrinsic pathways of the coagulation cascade.In the extrinsic pathway, factor X is initially activated by factor Xa by the tissue factor (TF)-VIIa complex (see Reaction 4 of the extrinsic way in Figure 7).This factor Xa then integrates into the intrinsic pathway, where it is further amplified through a series of reactions.The interplay between these pathways involves a positive feedback mechanism wherein factor Xa reactivates the TF-VIIa-PL complex, thereby leading to additional activation of factor Xa (see Reaction 14 of the intrinsic way in Figure 7).Consequently, within the RS, we observe two distinct states of factor Xa: an initial low quantity and a subsequent high quantity.The use of these distinct states allows the model to capture the essential dynamics of the hemostatic process while maintaining computational simplicity.This semiquantitative approach ensures that the model remains tractable and interpretable, offering valuable insights into the mechanisms of blood clotting.
To effectively represent the hemostasis process within the RS framework, we follow a structured step-by-step methodology: • The first step is the representation of each biological molecule as an entity within the RS framework.Each biological molecule involved in the hemostasis process is identified and defined as a distinct entity within the RS framework.This step leverages the SOS (Structural Operational Semantics) rules introduced in Section 3, where the algebraic syntax for RSs is defined.

•
The second step is the encoding of interactions between these entities.Interactions between molecules are mapped based on the biological relations described in Figure 6: Each state is a collection of entities, and transitions correspond to steps where all enabled reactions are fired.

•
Each relation between molecules is translated into an RS rule, represented as triples (Reactants, Inhibitors, Products): reactants promote the reaction, inhibitors prevent it, and products result from it.It is important to note that the inhibitors component of the triple can be empty if there are no inhibitors for that particular reaction.Transition labels provide information on the entities involved at each step.

•
Feedback mechanisms are included in the RS rules to reflect how certain products can enhance their own production or the production of other entities.
The result of this methodology is in Figure 7, which shows a selection of the most important Reaction System rules for the three primary pathways in hemostasis.The full set of rules is available online (Available at https://www3.diism.unisi.it/~falaschi/hemostasisRS.txtaccessed on 27 July 2024).Each pathway is systematically encoded, highlighting the presence and nature of interactions and providing a qualitative understanding of the biological processes involved.The incorporation of feedback-driven states within the RS framework captures the variability and dynamic nature of biological processes.While Figure 6 does not explicitly show low and high values, the RS framework explicitly models these variations to provide a comprehensive depiction of the process dynamics.
The coding of the biological relations depicted in Figure 6 into the RSs can be simply performed thanks to the promoting and inhibitor mechanisms of RSs. Figure 7 shows the Reaction System rules divided into three groups: the extrinsic way, the intrinsic way, and the common way.In Figure 6, the interactions between molecules are described by two types of arrows: the pointed black arrows denoting the production of a molecule, and the dotted red arrow denoting inhibition.Additionally, the dotted blue arrows denote some positive feedback mechanisms, which are critical for amplifying specific reactions within the system.These feedback loops ensure that once a process is initiated, it can be rapidly propagated and reinforced, thereby stabilizing the hemostatic response.We provide a brief description of how we encoded these interactions.
Let us consider the extrinsic pathway in Figure 6 and follow the described relations: • The tissue factor (TF), i.e., the consequence of a trauma, promotes the formation of the complex TF-VII-PL together with the factors VII and the PL; the resulting RS code is (TF FVII PL, TF-VII-PL), where TF FVII PL are the reactants, there are no inhibitors, and the result of the reaction is TF-VII-PL (see Figure 7, Reaction 1 in the extrinsic way); • Then, the complex TF-VII-PL binds to the calcium Ca 2+ forming the complex TF-VII-PL-Ca 2+ ; the resulting RS code is (TF-VII-PL Ca, TF-VIIa-PL-Ca), where TF-VII-PL Ca are the reagents, TF-VIIa-PL-Ca is the product, and TFPI is the inhibitor (see Figure 7, Reaction 2 in the extrinsic way); TFPI consequently also inhibits X and IX (see Figure 7 Reactions 6 and 7 in extrinsic way).Now, we consider the encoding of the activation of factor X; there are two different ways to activate factor X (Reaction 6 in the extrinsic way and Reaction 14 in the intrinsic way): • On the extrinsic way factor X is activated by the complex TF-VIIa-PL-Ca 2+ and it is inhibited by TFPI; the resulting RS code is: (TF-VIIa-PL-Ca 2+ X, TFPI ,Xa) (see Reaction 4 in the extrinsic way); • On the intrinsic way factor X is activated again by the complex IXa-VIIIa-Ca 2+ -PL and it is inhibited by ATIII; as this is a positive feedback of factor X, we keep track of it by denoting the activated factor X as Xa_2: (IXa-VIIIa-Ca 2+ -PL X, ATIII ,Xa_2) (see Reaction 14 in the intrinsic way).Having established the methodology for encoding the intricate network of interactions within the hemostasis process into Reaction Systems (RSs), as we have detailed, we now turn to the validation of this model through computational analyses.The following section examines the RS model's response to the presence and absence of crucial inhibitors, providing empirical validation of its capabilities.

Analyses of the Computations in the RS Model For Secondary Hemostasis
The analyses of the computations in our RS model for secondary hemostasis serve as a critical validation of our model.
All our experiments in this section were performed in BioReSolve [9], an interpreter which has been developed in SWI Prolog [30], version 7, exploiting the libraries lists, ordsets, assoc, and 'dcg/basics'.The software, consisting of about 2000 Prolog rules, is freely available under the MIT license.All experiments were run on a Macbook Pro 14", with an M3 Pro processor, 18Gb of RAM, 1Tb of disk storage, using Mac OS Sonoma 14.5.
To start our experiments, we consider the RS model defined in Section 5 for secondary hemostasis.We execute this model twice: once with crucial inhibitors for regulating coagulation and once without them.This approach will allow us to compare their behaviors and validate our methodology.It is essential to validate this model with RS inhibitors to ensure precise regulation of the coagulation process and to prevent potential dysregulation.Specifically, we introduce antithrombin III, protein C, protein S, and Tissue Factor Pathway Inhibitor (TFPI) simultaneously.Additionally, we use dynamic program slicing to trace the causes of some critical outcomes, further validating the accuracy and consistency of the model.As we already discussed in the previous section, it is worth briefly noting the function of inhibitors: Antithrombin III: It is a natural coagulation inhibitor that primarily acts by directly inactivating factor Xa and thrombin.Its presence is essential for regulating the coagulation cascade, preventing excessive clot formation.Protein C and protein S: They are involved in negative regulation of coagulation.Once activated, protein C inactivates factors Va and VIIIa, thereby reducing thrombin generation and the coagulation process.Tissue Factor Pathway Inhibitor (TFPI): It is another key inhibitor that directly binds to the TF-VIIa complex, thereby preventing the activation of factor X and factor IX. Without natural inhibitors such as antithrombin III, protein C, protein S, and Tissue Factor Pathway Inhibitor (TFPI), the regulation of coagulation would be compromised, potentially leading to excessive fibrin formation.Without proper regulation provided by the inhibitors, the coagulation process could become uncontrolled, resulting in excessive formation of fibrin clots.This phenomenon could have serious consequences, such as the formation of abnormal clots in blood vessels (thrombosis) or the formation of unwanted clots that can lead to blockages and tissue damage (embolism).In summary, the absence of these natural anticoagulant inhibitors would compromise the balance between coagulation and anticoagulation, leading to a state of hypercoagulability with an increased risk of thrombosis, while at the same time potentially increasing the risk of inappropriate bleeding.
Additionally, in the graph without inhibitors, depicted on the upper part of Figure 8, the following factors persist: VIIIa, IXa, IXa-VIIIa, Xa, IIa, Va, Xa-Va, XIIIa and TF-VIIa.In secondary hemostasis, these factors are pivotal in the blood coagulation process.Here, a concise explanation of the role of inhibitors follows:

•
Factor VIIIa: This protein is integral to the coagulation cascade.Activated by thrombin, it forms the tenase complex with factor IXa, catalyzing the conversion of factor X into Xa, a crucial step for thrombin generation.Factor VIIIa remains active, however, in the presence of inhibitors such as protein C and protein S, it is inactivated [31].This is confirmed by both our graph (Figure 8) with all inhibitors and the graph with only protein C, protein S, and TFPI in Figure 9, where VIIIa remains active.• IXa-VIIIa complex: As previously indicated, factor VIII remains active in the absence of inhibitors like protein C and protein S. The active factor IX, forming the complex, is due to the excessive presence of factor Xa.This excessive amount, resulting from a TFPI and antithrombin III deficit, can significantly enhance factor IX activation, further contributing to excessive coagulation.In our Reaction System model, this can also be observed in the graph produced by removing TFPI, as commented below.

•
Factor Xa and Factor IIa: The persistence of activated factor X also explains the continuous activation of factor II (thrombin) in the inhibitor-free branch of the graph in Figure 8.This facilitates the ongoing formation of fibrin and fibrin clots.In the presence of inhibitors such as antithrombin III, the activation of factor X, and subsequently factor II, is impeded [32].This hinders the conversion of prothrombin to thrombin, a crucial step in the coagulation cascade.Thrombin catalyzes the conversion of fibrinogen to fibrin, leading to the formation of a stable fibrin clot.• Xa-Va Complex and Factor Va: Once activated, Factor Xa initiates the assembly of the prothrombinase complex, which is composed of Factor Va, Factor Xa, and calcium.This prothrombinase complex is pivotal in the common pathway.This complex leads to the activation of prothrombin into thrombin, which subsequently activates fibrinogen into fibrin, ultimately forming the fibrin clot.This clot is further stabilized by thrombinactivated Factor XIIIa.One of the key inhibitors that can block these activations is the protein C-protein S system.Activated protein C binds to free protein S as a cofactor, and together they proteolytically degrade Factors Va and VIIIa, thus reducing the activation of the coagulation cascade.This regulatory mechanism is exemplified in the graphical representation featuring three inhibitors (Figure 8).Notably, the presence of protein C and protein S renders the complex inactive, underscoring their crucial role in maintaining hemostatic equilibrium and preventing uncontrolled fibrinolysis.• TF-VIIa: The TF-VIIa complex is the key initiator of the coagulation cascade and activates both IX to IXa and X to Xa.This leads to the formation of small amounts of thrombin [33].The absence of the TFPI inhibitor resulted in excess production of the TF-VIIa complex, leading to a rapid activation of the extrinsic pathway and a subsequent increase in the formation of factor Xa.This increases the generation of large amounts of thrombin, causing excessive coagulation [34].This situation can lead to thrombosis, with the risk of deep vein thrombosis, pulmonary embolism, and other thromboembolic complications.In extreme cases, excessive coagulation can consume coagulation factors.
In summary, the inhibitors play a crucial role in activating the coagulation cascade, ultimately leading to the formation of fibrin clots and promoting wound healing.In extreme cases, excessive coagulation can consume coagulation factors and platelets, increasing the risk of bleeding (consumption coagulopathy).However, if inhibitors fail to function properly, leading to the persistence of secondary hemostasis factors, it can disrupt the delicate balance of the coagulation cascade.This dysregulation may result in excessive clot formation, potentially leading to complications such as thrombosis and embolism.Therefore, proper regulation is essential to maintain the balance between coagulation and anticoagulation processes and to prevent abnormal coagulation-related issues.In our second experiment, we seek to understand how our RS responded to the removal of specific inhibitors.By eliminating one inhibitor at a time, we aim to uncover the precise impact of each inhibitor within our Reaction System (RS).We observe how the absence of each inhibitor influences the behavior of the RS, yielding valuable insights into their specific points of action.Subsequently, this investigation reveals the following:

•
Removal of protein C and protein S (with antithrombin and TFPI present).
While antithrombin and TFPI continue to perform their roles in preventing excessive coagulation, the removal of protein C and protein S leads to insufficient inhibition of coagulation factors Va and VIIIa, as depicted in Figures 9c and 10c.This explains their persistence in the lower part of the coagulation cascade.Specifically, the absence of protein C and protein S results in persistent production of factors XIIIa, IIa, VIIIa, Va, and the (Xa, Va) complex.Indeed, protein C and protein S are necessary for the degradation of factors Va and VIIIa.This increases the risk of developing thrombophilia, a condition that makes patients more prone to developing disseminated intravascular coagulation or venous thromboembolism [35].

•
Removal of antithrombin (with protein C, protein S, and TFPI present).Despite the presence of protein C, protein S, and TFPI, the removal of antithrombin leads to a cycle in the coagulation system, evidenced by the persistence of factors Xa, IIa, VIIIa, (VIIIa-FVW-IIa), as depicted in Figures 9a and 10a.Uncontrolled activation of factor Xa and thrombin promotes continuous activation of factors VIIIa.This process fosters excessive coagulation, leading to the formation of a fibrin clot resistant to degradation by the fibrinolysis mechanism and shows the importance of antithrombin in balancing coagulation and fibrinolysis and the additional risk of thrombosis associated with its deficiency.Antithrombin is crucial in protecting against coagulation [36].Low levels of antithrombin increase the risk of thromboembolism, while excessively high levels do not appear to cause bleeding or have clinical significance.

•
Removal of TFPI (with protein C, protein S, and antithrombin present).While still active in preventing excessive coagulation, antithrombin and proteins C and S failed to effectively counteract a potential uncontrolled activation of the extrinsic coagulation pathway.Without adequate inhibition of the TF-VIIa complex (and consequently Xa) and factor IXa, the coagulation cascade can be excessively activated.This leads to an increase in thrombin generation, promoting the formation of inappropriate clots (thrombi) in blood vessels.This prothrombotic state can increase the risk of deep vein thrombosis, pulmonary embolism, and other thromboembolic conditions.Although less common, in some cases, uncontrolled activation of coagulation can deplete coagulation factors, leading to a paradoxical condition of excessive bleeding due to consumption coagulopathy, known as disseminated intravascular coagulation (DIC), a severe and often fatal condition.This is evidenced in Figures 9b and 10b, where small clots initially form but fail to effectively counteract the wound, leading to hemorrhage.This is demonstrated in the lower part of the graph, where the persistence of factor IXa and the (TF-VIIa-PL-Ca 2+ ) complex and the absence of the fibrin clot are noted.TFPI prevents the initiation of the tissue-factor-mediated coagulation cascade by regulating the initial generation of thrombin.This regulator also prevents inappropriate coagulation that could deplete coagulation factors, thereby preventing hemorrhagic conditions.Comparing this graph with the one without the three inhibitors, it is noted that TFPI is essential for properly initiating and regulating the initial coagulation cascade, preventing both excessive coagulation and hemorrhage.This confirms that TFPI is the primary active inhibitor in coagulation reactions, followed by antithrombin III and then proteins C and S. TFPI is the main key that ensures the balance of factor Xa and thrombin at the beginning of the common pathway.
In summary, these graphs indicate that all three inhibitors (antithrombin III, TFPI, protein C, and protein S) are essential for the proper control of coagulation.The absence of any one of them can lead to significant imbalances, resulting in the risk of thrombosis or hemorrhage.We conclude that these inhibitors work in synergy and interdependence.
The results obtained in our Reaction Systems (RSs) validate the accuracy of the adopted model.The presence of natural coagulation inhibitors allowed us to faithfully replicate the physiological conditions of balanced coagulation.The observation of expected phenomena, such as controlled fibrin formation and gradual clot resolution, confirms that our hemostatic model is reliable and serves as a valuable tool for studying coagulation regulation.
Additionally, analyzing the system under conditions where individual inhibitors were removed one at a time provided crucial insights.The removal of protein C and protein S led to the persistence of coagulation factors Va and VIIIa, highlighting their essential role in degrading these factors and preventing excessive clot formation.The absence of antithrombin caused an uncontrolled activation cycle of coagulation factors, demonstrating its critical function in balancing coagulation and fibrinolysis.Similarly, the deficiency of TFPI resulted in excessive thrombin generation and activation of several coagulation factors, underscoring its importance in regulating the extrinsic pathway of coagulation.
Thus, our RS represents a good experimental model for studying coagulation and its associated disorders.Its ability to faithfully reproduce hemostatic dynamics makes our model a valuable tool for identifying and developing targeted therapies for hemorrhagic and thrombotic disorders, confirming its utility in the field of biomedical research.
The persistence of secondary hemostasis factors in the absence of inhibitors, as observed in our RS, accurately reflects the conditions of coagulation dysregulation, often associated with hemorrhagic and thrombotic disorders in clinical practice.This correspondence between observed results and known pathological conditions further underscores the effectiveness of our model in realistically reproducing hemostatic events.

Analysis of Hemostasis by Dynamic Slicing
Dynamic program slicing is a technique useful for simplifying the debugging process of a model.It was first introduced in [37] for imperative languages.The original basic idea was to try to select a portion of the program containing the faulty code.Dynamic program slicing has then been further developed and applied to several programming paradigms (e.g., [38,39].See [40] for a survey).In BioReSolve we implemented a dynamic slicing algorithm [41] that can derive the causes which lead to the introduction of some entities in a computation state of interest.For example, if we want to focus on the causes of the production of the factor Xa_2 (i.e., the major quantity of Xa), in the computation where all three inhibitors are present (see the lower part of Figure 8), we apply the slicing We can notice that in the sliced trace (a) in the first row, the entity thrombomodulin (TM) appears, whereas in the sliced trace (b), it does not, although in both cases we are recording the causes of the fibrin clot.This is due to the fact that the formation of the fibrin clot in sliced trace in (a) occurs after the inhibitor PCa-PS has been activated by TM, Rows 1-2.Furthermore, PCa-PS has acted by blocking the factor V, Row 3, which has been reactivated, Row 7.This dynamics explains the presence of the entity TM in the sliced trace (a).
By utilizing dynamic slicing, our RS model can isolate and identify specific interactions and pathways critical for the hemostasis process.This technique is valuable for drug development as it allows researchers to pinpoint some molecular interactions that can be targeted by new drugs.For instance, by understanding how different inhibitors affect the production of key factors like Xa and thrombin, the model can help the design of drugs that specifically modulate these pathways.Moreover, the ability to simulate various scenarios, such as the presence or absence of specific inhibitors, enables the testing of potential drug effects and the optimization of therapeutic strategies.This approach aids in the development of more effective and safer medications by providing detailed insights into the hemostatic process and its regulation.

Related Work
RSs have been implemented using different languages and platforms.In this paper, we run our in silico experiments within our own prototype implementation of RSs, called BioReSolve [9], proposed in [10,11].The advantage of BioReSolve is its flexibility for developing extensions of RSs and that it integrates many tools for the verification and specification of RSs.Other notable examples of implementations of RSs from other authors are, e.g., brsim (available at https://github.com/scolobb/brsim/accessed on 26 June 2024) a Basic Reaction System Simulator written in Haskell, distributed under the terms of GNU GPLv3 license [42], and explained in [43], the GPU-based Highly Efficient REaction SYstem simulator HERESY (Available at https://github.com/aresio/HERESY/accessed on 26 June 2024) that exploits the large number of computational units inside GPUs to boost performance [44], the optimised Common Lisp simulator for RSs cl-rs (Available at https://github.com/mnzluca/cl-rsaccessed on 26 June 2024) presented in [45].Previous models of hemostasis are based on systems of Ordinary Differential Equations and Partial Differential Equations, as summarized in [12].We have defined an interactive discrete system modelling hemostasis for providing new insights and model in silico crucial properties of the system, such as the role of inhibitors, as we have shown in previous section.

Conclusions
In this paper, we showed how to build an RS model of the complex network of hemostasis.Then, we described how to exploit our BioReSolve tools to study the hemostasis and to derive important observations on the model behavior.Our RS model complements traditional models based on Ordinary Differential Equations (ODEs) and Partial Differential Equations (PDEs) by offering a qualitative perspective that captures the complex interactions within the hemostatic process using a structured, rule-based approach.
Our RS model contributes to hemostasis modeling.Traditional computational models often focus on quantitative predictions and detailed mechanistic insights through extensive use of ODEs and PDEs.These models excel at providing detailed quantitative analyses and are invaluable for understanding the precise dynamics of blood coagulation under various conditions [12].In contrast, our RS model offers a complementary qualitative perspective.By encoding interactions as triples (Reactants, Inhibitors, Products), the RS model simplifies the representation of biological processes, making it easier to understand and manipulate complex interaction networks.This approach aligns well with the need for models that can provide intuitive insights into biological dynamics without the computational complexity and data associated with ODE/PDE models.Additionally, our model incorporates a semiquantitative aspect by considering different quantity levels for key factors, thereby mitigating the gap between purely qualitative and quantitative models.This feature allows our RS model to reflect dynamic changes and feedback mechanisms within the hemostatic process, providing a more nuanced understanding of blood clotting dynamics.
We defined a constructive guideline to implement a biological network in an RS, which can be replicated with many other case studies, such as the case studies in the public database on the CellCollective platform [13], which we plan to carry out as future work.
Furthermore, our model employs dynamic program slicing to validate its accuracy and consistency.This technique helps isolate specific interactions and pathways crucial for hemostasis, providing insights into how different inhibitors affect the coagulation process.Such insights are valuable for drug development, enabling the identification of potential drug targets, optimization of combined therapies, and evaluation of side effects, thereby aiding in the development of safer and more effective medications.Future work will focus on determining formal specifications for hemostasis properties and verifying them within the RS framework.This analysis can be facilitated by our BioReSolve tool, which provides a logic for property specification and an automated verification framework for RSs.
In summary, our RS model offers a qualitative framework that complements existing quantitative models, enhancing the overall understanding of hemostasis.By integrating this approach into the existing body of literature, we contribute a novel methodology for

Figure 4 .
Figure 4.A graphical representation of an interactive computation in the RS of Example 3 versus its equivalent process execution.

Figure 5 .
Figure 5.The graph, produced by the BioResolve tool and corresponding to the transition system in Example 3. The produced entities are recorded in the nodes, and the entities provided by the context are recorded in the transition labels.

Figure 6 .
Figure 6.The graph reproduces the interactions between the biological entities that have been implemented.It is divided in intrinsic way (in the upper left), extrinsic way (in the upper right), and common way (in the lower part).The black arrows represent reagent activities, the red arrows represent inhibitor activity, and the dotted blue arrows represent positive feedback.

Figure 7 .
Figure 7.This figure shows a selection of the most significant reactions for the three ways of the secondary hemostasis.The reactions in bold implement feedback.

Figure 8 .
Figure 8.The graph shows the evolution of the system with and without the presence of the inhibitors.In both evolutions, in the first three steps, the tissue factor is present (a direct consequence of an injury on the skin).When inhibitors are present, the system is able to stop the production of fibrin clots and restore the initial state; when inhibitors are absent, the production of fibrin clots never stops.

Figure 9 .
Figure 9.The graph shows the evolution of the systems in three different conditions: the three inhibitors appear two at a time.When the active inhibitors are PC, PS and TFPI, the attractor is composed by a nine nodes loop, where the fibrin clot formation is not continuous (a).When the active inhibitors are PPC, PS and ATIII, the formation of fibrin clot appears in two different parts of the computation, and in the single attractor state the fibrin clot formation stops (b).When the active inhibitors are ATIII and FTPI in the single attractor state the fibrin clot formation never stops (c).The red labels denote the fibrin clot formation.

Figure 10 .
Figure 10.The three attractors of the graph in Figure 9: the attractor in (a) corresponds to the presence of inhibitors pc and tfpi; the attractor in (b) corresponds to the presence of inhibitors pc and atiii; and the attractor in (c) corresponds the presence of inhibitors tfpi and atiii.

[Figure 11 .
Figure 11.Eleven steps of the two sliced traces computed for checking the causes of the production of fibrin clots in Figure Subfigures (a,b) correspond respectively to selecting the causes for the introduction of fibrin clot in subcomputation (b) in Figure 9.