<?xml version="1.0" encoding="UTF-8"?>
<article xmlns:xlink="http://www.w3.org/1999/xlink">
<front><article-meta>
<title-group><article-title>A Note on Situation Calculus</article-title></title-group>
<contrib-group>
<contrib contrib-type="author"><name><surname>Paraskevas</surname><given-names>Antonios</given-names></name><xref ref-type="aff" rid="aff1"/></contrib>
<aff id="aff1">Department of Applied Informatics, School of Information Sciences, University of Macedonia, Information Systems and e Business Laboratory (ISeB),156, Egnatia Str., 54636, Thessaloniki, Greece.</aff>
</contrib-group>
<abstract><p>Situation calculus is a logical language for expressing change. Situations, actions, and fluents are the three core ideas of situation calculus. As agents perform actions, the dynamic environment changes from one situation to another. Fluents are functions that change with the situation and describe the effects of actions. They can be seen as properties of the world that come into existence when an action is initiated and disappear when another action ends. While situation calculus is powerful, it often struggles with complexity and verbosity when modeling dynamic systems, making it challenging to manage and reason about in large-scale settings. We propose using Labelled Transition Systems (LTS) to address these limitations. The LTS model, based on graph models of modal logic, offers a more concise and formal representation of system behaviors. The LTS-based method aims to provide a simpler and more intuitive framework for modeling dynamic settings, thereby improving system representation clarity and efficiency. It allows for higher scalability and more efficient verification and validation processes, which are critical in complex systems. Finally, the LTS model seeks to bridge the theoretical expressiveness of situation calculus with the practical requirements of system design and analysis.</p></abstract>
<kwd-group kwd-group-type="author"><kwd>Situation calculus</kwd><kwd>LTS model</kwd><kwd>Modal logic</kwd><kwd>Knowledge representation</kwd></kwd-group>
</article-meta></front>
<body>
<sec id="sec-1"><label>1</label><title>Introduction</title>
<p>According to McCarthy and Hayes <xref ref-type="bibr" rid="ref-1">[1]</xref>, a situation is &quot;the complete state of the universe at an instance of time&quot;. In situation calculus, describing a dynamic domain involves determining the actions agents can take and the fluents needed to represent the changes that occur in the environment. Fluents are properties of the world that may vary throughout time. They are expressed as predicates, and their truth value depends on the context. For example, at (robot, location) might represent the location of a robot. Actions are atomic operations that can alter the condition of the world. They are expressed as predicate words, with arguments corresponding to the entities participating in the action. For example, move (robot, location) may denote the activity of moving a robot to a specified area. Situations depict the status of the world at various moments in time. They are commonly written as terms with S0 describing the original situation and do (a, s) signifying the situation created by executing action a in situation s.</p>
<p>In the simplest version of the situation calculus, each action is described by two axioms:</p>
<p>I. The possibility axiom: the possibility axiom deals with the notion of whether an action is possible to execute in a given situation. This axiom specifies the conditions under which an action can be performed.</p>
<p>II. The effect axiom: the effect axiom specifies how the state of the world changes after acting. It describes the transition from one situation to another as a result of executing an action.</p>
<p>While situation calculus offers a formal and expressive basis for reasoning about actions and changes in dynamic environments, having found application in a wide variety of both theoretical and practical works <xref ref-type="bibr" rid="ref-2">[2– 10]</xref>, its complexity, scalability concerns, and limits in dealing with uncertainty and constant change can present challenges in practical AI applications. Specifically, traditional situation calculus relies heavily on layered quantification and complex temporal reasoning. It can be time-consuming and inefficient when modeling and analyzing dynamic systems, particularly as their size and complexity grow.</p>
<p>Moreover, the Labeled Transition System (LTS)-based approach facilitates modularity and scalability, allowing complex systems to be broken down into manageable components. This modular nature supports more straightforward integration and modification, enabling the analysis to scale effectively to larger systems without introducing ambiguity. The inherent alignment of LTS models with formal verification techniques, such as model checking, further ensures that properties like safety and liveness can be rigorously verified, providing confidence in the system&apos;s behavior under various conditions.</p>
<p>In this paper, we propose an alternative formalism based on the LTS model to describe the basic axioms of situation calculus, which provides a powerful and versatile framework for modeling, analyzing, and reasoning about dynamic systems. Modal logic graph models inspire this model and offer clarity, formal rigor, and an intuitive graphical representation, making it easier for both humans and machines to reason. The following section provides a summary of the LTS model.</p>
</sec>
<sec id="sec-2"><label>2</label><title>LTS-Model</title>
<p>LTSs are a fundamental concept in theoretical computer science and formal methods. They provide a mathematical framework for modeling and analyzing the behavior of concurrent and reactive systems. LTSs have been successfully applied in epistemic logic <xref ref-type="bibr" rid="ref-12">[11]</xref>, providing a formal and intuitive framework for representing and analyzing the knowledge and beliefs of agents as they evolve through actions and observations. They have also been effectively studied in model checking <xref ref-type="bibr" rid="ref-13">[12]</xref>, <xref ref-type="bibr" rid="ref-14">[13]</xref>. In model checking, LTSs are used to depict the behavior of a system as a collection of states and transitions. These transitions are labeled with actions or events that guide the system from one state to another. By capturing the system&apos;s structure and dynamics, LTSs offer a concise yet comprehensive model for reasoning about system behavior. Let Act be the universal set of observable actions, and let τ denote a local action that is unobservable to a component&apos;s environment. An LTS M is a quadruple 〈 , , δ, 0〉 where <xref ref-type="bibr" rid="ref-15">[14]</xref>:</p>
<p>I. is a finite set of states.</p>
<p>II. ⊆ Act is the communicating alphabet of M.</p>
<p>III. δ ⊆ × ∪ {τ} × is a labeled transition relation.</p>
<p>IV. 0 ∈ is the initial state.</p>
<p>This paper extends the classical notion of an LTS by integrating concepts from modal logic <xref ref-type="bibr" rid="ref-16">[15]</xref>. In this vein, we define the next components <xref ref-type="bibr" rid="ref-17">[16]</xref>:</p>
<p>A proposition, p. A truth function, tr(p, qi), associates the truth value, ti, of p in each state, qi, where ti=Tr(p, qi). If p is a crisp proposition, ti can be either true (1) or false (0).</p>
<p>A target set, T(p), is a collection of &quot;target states.&quot; A target state, qj, is one in which tj equals 1. Thus, T(p) represents the set of all states in which p is true. p defines the target set, or T(p). If qj is the target state, it fulfills T(p). Thus, T(p) ={qj|tr(p, qj) =1} (<xref ref-type="fig" rid="fig1">Fig. 1</xref>).</p>
<fig id="fig1"><label>Figure 1</label><caption><p>Target set and target states.</p></caption><graphic xlink:href="https://uda.reapress.com/public/journals/1/jats-figures/22/fig-1-ce4810db8336.png"/></fig>
<p>Definition 1 (<xref ref-type="bibr" rid="ref-17">[16]</xref>). Each state, qi, is connected with the set of all states, R(qi), that are accessible from qi. R(qi) is known as the reachable set of qi. Specifically, R(qi) ={qj|qj is accessible from qi} (<xref ref-type="fig" rid="fig2">Fig. 2</xref>).</p>
<fig id="fig2"><label>Figure 2</label><caption><p>Reachable set.</p></caption><graphic xlink:href="https://uda.reapress.com/public/journals/1/jats-figures/22/fig-2-1f6242723d8f.png"/></fig>
<p>Definition 2 (<xref ref-type="bibr" rid="ref-17">[16]</xref>). p is possible in state qi, abbreviated as possible p/qi, if the intersection of R(qi) and T(p) is not empty, that is, if there is a target state in T(p) that can be reached from qi.</p>
</sec>
<sec id="sec-3"><label>3</label><title>Axioms of Situation Calculus Using LTS-Model</title>
<sec id="sec-4"><label>3.1</label><title>Possibility Axiom</title>
<p>The possibility axiom relates the existence of transitions labeled with actions to the possibility of performing those actions in the given states. In the context of modal logic, we can now redefine the possibility axiom used in situation calculus (Section 1) as follows:</p>
<p>Axiom 1. For a given proposition p and its associated truth function tr(p, qi), where qi represents a state in the system Poss (a,q) ⟺ exists there qj∈T(p): tr (a,qj) =1,</p>
<p>where poss(a, q) denotes the possibility of action a in state q.</p>
<p>T(p) represents the target set associated with proposition p, consisting of all states where p is true.</p>
<p>tr (a, qj) represents the truth value of action a in state qj.</p>
<p>The axiom asserts that action a is possible in state q if and only if there exists a target state qj where action a is true according to the truth function associated with p.</p>
<p>Alternatively, using definitions 1 and 2 from Section 2, we can reformulate the possibility axiom:</p>
<p>Axiom 2. For a given proposition p and its associated target set T(p), and a state qi in the system</p>
<p>Poss (p, qi) ⟺ R(qi)∩T(p) ≠ 0, (2)</p>
<p>where poss(p, qi) denotes the possibility of proposition p in state qi.</p>
<p>R(qi) represents the set of all states reachable from state qi.</p>
<p>T(p) represents the target set associated with proposition p, consisting of all states where p holds.</p>
<p>Now, the axiom states that proposition p is conceivable in state qi if at least one state in R(qi) is also in T(p). Example 1. To illustrate the expressiveness of our method, consider the following simple example taken from the world of an agent, which states that it is possible to shoot if the agent is alive and has an arrow <xref ref-type="bibr" rid="ref-18">[17]</xref>.</p>
<p>Alive(Agent, q) ∧ Have(Agent, Arrow, q) ⇒ poss(Shoot, q). (3)</p>
<p>In LTS, transitions are labeled with actions, and states represent possible configurations of the system. Here&apos;s the simplified expression utilizing Eq. (1) Alive(q) ∧ Have(q, Arrow) ⟹exists there qj ∈ T(q): tr(Shoot, qj) = 1.</p>
<p>The reformulated phrase asserts that if the agent is alive and possesses an arrow in state q, there exists a transition q → qj in the set of possible transitions from state q, with the label indicating the possibility of shooting (tr(Shoot,qj)=1).</p>
<p>The careful reader should notice that the if statement qj∈T(q): tr(Shoot,qj)=1 of the above expression is equal with the respective statement R(q) ∩ T(Shoot) ≠ ∅ as used in Eq. (2) of our conceptual framework, emphasizing the multiple facets of our approach that strengthen its expressiveness.</p>
<p>It is easy to see from the above that the LTS-model formulation, based on the possibility axiom, offers several advantages over classical situation calculus predicate logic. These benefits include conciseness, modularity, compatibility with formal techniques, reasoning efficiency, and simplicity of formalization.</p>
</sec>
<sec id="sec-5"><label>3.2</label><title>Effect Axiom</title>
<p>According to the effect axiom in situation calculus (see also Section 1), the effect of an action in a given state occurs if at least one state results from the action&apos;s execution and can be reached from the starting state. Using the definitions used in our conceptual framework, we can define the aforementioned axiom as follows: Axiom 2: for a given action a and its associated effect set E(a), and a state qi in the system.</p>
<p>Effect (a, qi) ⟺ exists there qj ∈ R(qi): qj ∈ E(a),</p>
<p>where Effect(a, qi) denotes the effect of action a in state qi.</p>
<p>R(qi) represents the set of all states reachable from state qi.</p>
<p>E(a) represents the effect set associated with action a, consisting of all states resulting from executing action a.</p>
<p>Our formulation of the effect axiom encapsulates the core of situation calculus&apos;s respective axiom, which states that the effect of an action in a given state occurs if there is at least one reachable state to which the action leads.</p>
<p>At this point, a more careful examination of the effect set E(a) is needed.</p>
<p>Definition 3. The effect set E(a) associated with an action is a collection of all states that occur from action a being performed from any state in the system. It can be defined as follows:</p>
<p>E(a) = ⋃q R(qi, a),</p>
<p>i∈Q (6)</p>
<p>where Q represents the set of all states in the system.</p>
<p>R(qi, a) represents the set of all states reachable from state qi through the execution of action a.</p>
<p>To put it simply, the effect set E(a) includes all potential states that might result from performing an action a from any state in the system. This concept defines the effect set E(a) as the potential changes in the system&apos;s state as a result of action a, while accounting for all possible beginning states q .</p>
<p>This idea encompasses the full spectrum of possible outcomes resulting from the execution of an action, regardless of the initial condition. In other words, if we imagine the system as a network of interconnected states, where each state represents a different configuration of the system and an action leads to transitions between these states, the effect set includes all the states that can be reached through the action from any given state. The effect set is crucial for analyzing and verifying dynamic systems because it thoroughly examines all potential state transitions caused by an action.</p>
<p>Example 2. Now, let us consider an example taken from related literature <xref ref-type="bibr" rid="ref-18">[17]</xref> expressed within the terms of the effect axiom in situation calculus and then reformed within our framework to understand the advantages our approach offers.</p>
<p>The relational Holding axiom states that an agent is holding some gold g after performing a possible action if and only if the action was a grab of g, or if the agent was already holding g and the action did not release it:</p>
<p>Poss(a, s) ⇒ (Holding(Agent, g, Result(a, s)) ⇔ a</p>
<p>= Grab(g) ∨ (Holding(Agent, g, s) ∧ a ≠ Release (g))).</p>
<p>Given our terminology (Eq. (5) and Eq. (6)), we can reformulate the above axiom:</p>
<p>Effect(a, Holding(Agent, g)) ⇔ exists there qj ∈ R(Holding(Agent, g)): qj ∈ E(a).</p>
<p>We can observe that Eq. (8) conveys the same meaning as Eq. (7) but more concisely and understandably. It allows for a more compact representation of actions and their effects, reducing the need for complex logical constructs and quantifiers. Thus, our approach offers advantages in modularity and clarity by separating action effects from the domain model. It also promotes ease of formalization and compatibility with formal methods, ultimately improving readability and scalability compared to traditional situation calculus expressions.</p>
</sec>
</sec>
<sec id="sec-6"><label>4</label><title>Conclusion</title>
<p>Based on predicate logic, situation calculus can be difficult to use when describing dynamic system behaviors because it relies on layered quantification and complex temporal reasoning. It leads to challenges in scaling and ambiguity when depicting actions and their outcomes.</p>
<p>On the other hand, employing an LTS model within the situation calculus framework could offer several advantages. Firstly, the LTS model can provide a systematic and formal explanation of action sequences and their consequences, thereby improving the clarity and precision of reasoning about dynamic systems. Secondly, the LTS model allows for a straightforward examination of state transitions and action connections, making tasks like planning and verification easier within the situation calculus framework.</p>
<p>Furthermore, LTS approaches naturally allow for modularity and scalability. LTS facilitates system integration and change by separating complex systems into manageable components and representing them as state-transition diagrams. This modular approach enhances the ability to extend the analysis to larger systems while maintaining cohesion and clarity.</p>
<p>In summary, integrating an LTS model into the situation calculus framework enhances the descriptive, manageable, and verifiable nature of dynamic system behaviors. This integration surpasses the constraints of classical situation calculus by offering a more understandable, scalable, and formal framework for analyzing actions and their outcomes.</p>
</sec>
<sec id="sec-7"><title>Authors&apos; Contributions</title>
<p>M. N. P.: Research design, Conceptualization, and Validation, Methodology, Visualization and Formal Analysis. R. K.: Computing, editing, and Validation. The authors have read and agreed to the published version of the manuscript.</p>
</sec>
<sec id="sec-8"><title>Consent for Publication</title>
<p>Consent for publication has been obtained from the author.</p>
</sec>
<sec id="sec-9"><title>Ethics Approval and Consent to Participate</title>
<p>No studies involving human participants or animals were performed in this research.</p>
</sec>
<sec id="sec-10"><title>Funding</title>
<p>This research received no specific grant from funding agencies in the public, commercial, or not-for-profit sectors.</p>
</sec>
<sec id="sec-11"><title>Data Availability</title>
<p>No new data were created or analyzed in this study. Data sharing does not apply to this article.</p>
</sec>
<sec id="sec-12"><title>Conflicts of Interest</title>
<p>The author has no conflicts of interest to declare relevant to this article&apos;s content.</p>
<p>No new data were created or analyzed in this study. Data sharing does not apply to this article.</p>
</sec>
</body>
<back><ref-list><title>References</title>
<ref id="ref-1"><label>1</label><mixed-citation>McCarthy, j, &amp; Hayes, P. (1969). Some philosophical problems from standpoint of artificial intelligence. In Readings in artificial intelligence (pp. 463–502). Elsevier. <ext-link ext-link-type="uri" xlink:href="https://www-formal.stanford.edu/jmc/mcchay69.pdf">https://www-formal.stanford.edu/jmc/mcchay69.pdf</ext-link></mixed-citation></ref>
<ref id="ref-2"><label>2</label><mixed-citation>Farinelli, A., Finzi, A., &amp; Lukasiewicz, T. (2007). Team programming in golog under partial observability. IJCAI international joint conference on artificial intelligence, 6(12), 2097–2102. <ext-link ext-link-type="uri" xlink:href="https://ora.ox.ac.uk/objects/uuid:223b5f93-19c2-4a74-8e5f-149db676b09d">https://ora.ox.ac.uk/objects/uuid:223b5f93-19c2-4a74-8e5f-149db676b09d</ext-link></mixed-citation></ref>
<ref id="ref-3"><label>3</label><mixed-citation>Ferrein, A., Fritz, C., &amp; Lakemeyer, G. (2005). Using golog for deliberation and team coordination in robotic soccer. AI - artificial intelligence, 19(1), 24–31. <ext-link ext-link-type="uri" xlink:href="https://www.cs.toronto.edu/~fritz/publications/200506061855_Ferrein2005Using.pdf">https://www.cs.toronto.edu/~fritz/publications/200506061855_Ferrein2005Using.pdf</ext-link></mixed-citation></ref>
<ref id="ref-4"><label>4</label><mixed-citation>Ghaderi, H., Levesque, H., &amp; Lespérance, Y. (2007). Towards a logical theory of coordination and joint ability. Proceedings of the international conference on autonomous agents (pp. 544–546). Association for Computing Machinery. <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.1145/1329125.1329223">https://doi.org/10.1145/1329125.1329223</ext-link></mixed-citation></ref>
<ref id="ref-5"><label>5</label><mixed-citation>Reiter, R. (1991). The frame problem in the situation calculus: A simple solution (sometimes) and a completeness result for goal regression. Artificial and mathematical theory of computation, 3, 359–380. <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.1016/b978-0-12-450010-5.50026-8">https://doi.org/10.1016/b978-0-12-450010-5.50026-8</ext-link></mixed-citation></ref>
<ref id="ref-6"><label>6</label><mixed-citation>Sardina, S., De Giacomo, G., Lespérance, Y., &amp; Levesque, H. J. (2004). On the semantics of deliberation in IndiGolog - From theory to implementation. Annals of mathematics and artificial intelligence, 41(2–4), 259–</mixed-citation></ref>
<ref id="ref-7"><label>299</label><mixed-citation><ext-link ext-link-type="uri" xlink:href="https://doi.org/10.1023/B:AMAI.0000031197.13122.aa">https://doi.org/10.1023/B:AMAI.0000031197.13122.aa</ext-link></mixed-citation></ref>
<ref id="ref-8"><label>7</label><mixed-citation>Scherl, R. B. (2022). A situation-calculus model of knowledge and belief based on thinking about justifications. CEUR workshop proceedings, 3197, 104–114. <ext-link ext-link-type="uri" xlink:href="https://ceur-ws.org/Vol-3197/paper10.pdf">https://ceur-ws.org/Vol-3197/paper10.pdf</ext-link></mixed-citation></ref>
<ref id="ref-9"><label>8</label><mixed-citation>De Giacomo, G., Felli, P., Logan, B., Patrizi, F., &amp; Sardiña, S. (2022). Situation calculus for controller synthesis in manufacturing systems with first-order state representation (extended abstract). IJCAI international joint conference on artificial intelligence (pp. 5722–5726). Elsevier. <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.24963/ijcai.2022/798">https://doi.org/10.24963/ijcai.2022/798</ext-link></mixed-citation></ref>
<ref id="ref-10"><label>9</label><mixed-citation>De Giacomo, G., Ternovska, E., &amp; Reiter, R. (2020). Non-terminating processes in the situation calculus. Annals of mathematics and artificial intelligence, 88(5–6), 623–640. <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.1007/s10472-019-09643-">https://doi.org/10.1007/s10472-019-09643-</ext-link></mixed-citation></ref>
<ref id="ref-11"><label>10</label><mixed-citation>Baier, J. A., &amp; McIlraith, S. A. (2022). Knowledge-based programs as building blocks for planning. Artificial intelligence, 303, 103634. <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.1016/j.artint.2021.103634">https://doi.org/10.1016/j.artint.2021.103634</ext-link></mixed-citation></ref>
<ref id="ref-12"><label>11</label><mixed-citation>Knight, S., Mardare, R., &amp; Panangaden, P. (2011). An epistemic logic for labelled transition systems. McGill University. <ext-link ext-link-type="uri" xlink:href="https://www.cs.mcgill.ca/~prakash/Pubs/completeness_paper.pdf">https://www.cs.mcgill.ca/~prakash/Pubs/completeness_paper.pdf</ext-link></mixed-citation></ref>
<ref id="ref-13"><label>12</label><mixed-citation>Tretmans, J. (2008). Model based testing with labelled transition systems. In Lecture notes in computer science (Vol. 4949 LNCS, pp. 1–38). Springer. <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.1007/978-3-540-78917-8_1">https://doi.org/10.1007/978-3-540-78917-8_1</ext-link></mixed-citation></ref>
<ref id="ref-14"><label>13</label><mixed-citation>Baier, C., &amp; Katoen, J. P. (2008). Principles of model checking (Vol. 950). MIT Press.</mixed-citation></ref>
<ref id="ref-15"><label>14</label><mixed-citation>Giannakopoulou, D., &amp; Magee, J. (2003). Fluent model checking for event-based systems. Proceedings of the acm sigsoft symposium on the foundations of software engineering (pp. 257–266). IEEE. <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.1145/940071.940106">https://doi.org/10.1145/940071.940106</ext-link></mixed-citation></ref>
<ref id="ref-16"><label>15</label><mixed-citation>Hughes, G. E., &amp; Cresswell, M. J. (2012). A new introduction to modal logic. Routledge.</mixed-citation></ref>
<ref id="ref-17"><label>16</label><mixed-citation>Zadeh, L. A. (2014). A note on modal logic and possibility theory. Information sciences, 279, 908–913. <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.1016/j.ins.2014.04.002">https://doi.org/10.1016/j.ins.2014.04.002</ext-link></mixed-citation></ref>
<ref id="ref-18"><label>17</label><mixed-citation>Russell, S., &amp; Norvig, P. (2020). Artificial intelligence: A modern approach. Pearson.</mixed-citation></ref>
</ref-list></back>
</article>