Representing Flexible Temporal Behaviors in the Situation Calculus Alberto Finzi and Fiora Pirri DIS- Universit` a di Roma “La Sapienza” Via Salaria 113, I-00198 Rome, Italy {finzi,pirri}@dis.uniroma1.it Abstract In this paper we present an approach to represent- ing and managing temporally-flexible behaviors in the Situation Calculus based on a model of time and concurrent situations. We define a new hybrid framework combining temporal constraint reason- ing and reasoning about actions. We show that the Constraint Based Interval Planning approach can be imported into the Situation Calculus by defin- ing a temporal and concurrent extension of the ba- sic action theory. Finally, we provide a version of the Golog interpreter suitable for managing flexible plans on multiple timelines. 1 Introduction In real-world domains robots have to perform multiple tasks either simultaneously or in rapid alternation, employing di- verse sensing and actuating tools, like motion, navigation, visual exploration, mapping, and several modes of percep- tion. To ensure a suitable multiple-task performance, some approaches (e.g. [14; 23]) have recommended that executive control processes supervise the selection, initiation, execu- tion, and termination of actions. From these ideas, a new paradigm has been proposed, called the Constraint Based In- terval Planning (CBI), which essentially amalgamates plan- ning, scheduling and resources optimization for reasoning about all the competing activities involved in a flexible con- current plan (see [10; 4; 7]). The CBI approach, and simi- lar approaches emerged from the planning community, have shown a strong practical impact when it comes to real world applications (see e.g. RAX [10], IxTeT [7], INOVA [21], and RMPL [23]). However, from the standpoint of cognitive robotics it is important to ensure both optimal performance, in practical applications, and to provide a logical framework for ensuring coherence of actions preconditions and effects. The system coherence emerges as a core issue also when con- trol processes negotiate resources allocation with individual perceptual-motor and cognitive processes; indeed, the exec- utive has to establish priorities among individual processes to allot resources for multiple-task performance (see the dis- cussion in [8; 11; 3]). Therefore, different, concurrent, and interleaving behaviors, subject to switching-time criteria and current situation needs, lead to a new integration paradigm. In this paper we suggest that the reactive aspects that have to cope with flexible behaviors and the cognitive capabilities enabling reasoning about these processes, can be combined in the Temporal Flexible Situation Calculus. We present a new approach to flexible behaviors, that exploits the full ex- pressiveness of the Situation Calculus (SC) [19; 12], where computational concerns related to time can be monitored by a temporal network, obtained via a transformation of added constraints. To embed many concepts elaborated in the CBI framework we extend the SC with concurrency and time (ex- tensions of SC with time was already explored in [15; 17; 16]), deploying Allen’s interval relations [1], and further con- straining the language to represent concurrent timelines. In this framework we can conjugate the advantages of the SC with the expressive power of the CBI paradigm. Our aim here is twofold: on the one hand, it is made possible to intro- duce a separated timeline for each component of the dynamic system (i.e. each entity, which is part of an autonomous system, such as a robot), so that concurrency and flexibility can be clearly addressed; on the other hand the causal rela- tionships among processes can be dealt with in the SC lan- guage, which provides a clear framework for preconditions and postconditions of actions and a simple solution to the frame problem. We show that the CBI perspective, with all its arsenal of specifications in terms of flexible time, al- ternation constraints, resources optimization, failure recover- ing, and tasks scheduling, can be imported into the SC ([19; 12]), defining a temporal and concurrent extension of the ba- sic action theory (related approaches are [15; 17; 16; 8; 20; 6]). Finally, we provide a version of the Golog language and interpreter for manipulating flexible plans on multiple time- lines. 2 Preliminaries 2.1 Situation Calculus and Golog The Situation Calculus [12; 19] is a sorted first order lan- guage for representing dynamic domains by means of ac- tions, situations, and fluents. Actions and situations are first order terms, and situation-terms stand for history of actions, compound with the binary symbol do: do(a,s) is the situation obtained by executing the action a after the sequence s. The dynamic domain is described by a Basic Action Theory BAT = (Σ, D S0 , D ssa , D una , D ap ). We refer the reader to [19] for a complete introduction to the SC. Temporal Concurrent Sit- uation Calculus (TCSC ) has been earlier introduced in [15; 18; 17]; actions are instantaneous, and their time is selected