
The Thirty-Fourth AAAI Conference on Artificial Intelligence (AAAI-20) An Operational Semantics for True Concurrency in BDI Agent Systems Lavindra de Silva Department of Engineering University of Cambridge, UK [email protected] Abstract (Nunes, Lucena, and Luck 2011), PRS, and JACK.1 JACK gives four (programmer selectable) definitions for the suc- Agent programming languages have proved useful for for- cess of a concurrent program: (1) it immediately succeeds mally modelling implemented systems such as PRS and JACK, and for reasoning about their behaviour. Over the past on the successful termination of a branch; (2) it allows all decades, many agent programming languages and extensions branches to terminate but only succeeds if at least one of have been developed. A key feature in some of them is their them succeeds; (3) it succeeds iff all branches terminate suc- support for the specification of ‘concurrent’ actions and pro- cessfully, and immediately fails on the failure of a branch; or grams. However, their notion of concurrency is still limited, (4) it allows all branches to terminate but only succeeds if all as it amounts to a nondeterministic choice between (sequen- branches succeed. We follow this last definition. tial) action interleavings. Thus, the notion does not represent There is also related work in concurrent distributed sys- ‘true concurrency’, which can more naturally exploit multi- tems, particularly three strands of work that define behaviour core computers and multi-robot manufacturing cells. This pa- per provides a true concurrency operational semantics for a in terms of transitions between configurations, using a struc- BDI agent programming language, allowing actions to over- tural operational semantics (Plotkin 1981). In the first strand lap in execution. We prove key properties of the semantics, (Boudol and Castellani 1988b; 1989), every transition is relating to true concurrency and to its link with interleaving. labelled with a representation of its ‘proof’, i.e., informa- tion comprising the inference rules that were used when de- riving the transition. This information enables the extrac- 1 Introduction tion of a transition labelled with a partially ordered multi- Agent programming languages have proved useful for for- set (pomset) of actions, representing the sequential and con- mally modelling implemented systems such as Jason (Bor- current actions performed. A similar transition is extracted dini and Hubner¨ 2010), PRS (Georgeff and Ingrand 1989), in (Degano, De Nicola, and Montanari 1985; 1990), but and JACK (Busetta et al. 1999), and for reasoning about their from information stored in configurations rather than transi- behaviour. Over the past decades, many agent programming tion labels. In the third strand (Boudol and Castellani 1987; languages and extensions have emerged, e.g. (Rao 1996; 1988a), transitions are labelled with ‘composite actions’, Hindriks et al. 2001; Dastani 2008; Winikoff et al. 2002; which represent pomsets. This avoids the need to extract a Morley and Myers 2004; Sardina, de Silva, and Padgham pomset-labelled transition ‘a posteriori’ from a sequence of 2006; Chaouche et al. 2014; de Silva, Meneguzzi, and Lo- transitions, as done above. gan 2018; de Giacomo, Lesperance,´ and Levesque 2000). A Our work was inspired by the last two strands: our transi- key feature in some of them is their support for the specifica- tions represent composite actions, which are stored in con- tion of ‘concurrent’ actions and programs. However, while figurations. However, unlike the above strands, we account their notion of concurrency is useful in some applications, for concerns specific to agent programming languages, e.g. it is still limited as it amounts to a nondeterministic choice goal refinement, plan failure, and constructs beyond actions. between (sequential) action interleavings. Thus, the notion Our proposal, called Concurrent CAN (CCAN), is based on does not represent ‘true concurrency’, which can more natu- the work in (Sardina and Padgham 2011), which refines and rally exploit multi-core computers and multi-robot manufac- extends the CAN agent programming language (Winikoff et turing cells, e.g. a cell comprising two robot arms that work al. 2002). We discuss the syntax of CCAN (sec. 2) and its on a part simultaneously. This paper provides a true concur- semantics (secs. 3 and 4), and we prove key properties of rency operational semantics for a BDI agent programming CCAN, in relation to true concurrency and to its link with language, allowing actions to overlap in execution. interleaving (sec. 5); e.g., we show that if a concurrent pro- From the implemented BDI agent systems, there are some gram’s branches are interleaved as in CAN, Jason, etc., any that support some form of true concurrency, e.g. SPARK resulting behaviour can also be produced by the concurrent (Morley and Myers 2004), JAM (Huber 1999), BDI4JADE Copyright c 2020, Association for the Advancement of Artificial 1There are also implemented BDI systems that do not support Intelligence (www.aaai.org). All rights reserved. true concurrency but support action interleaving, e.g. Jason. 7119 program. We then conclude and discuss future work (sec. 6). To formalise the assumption that the branches of a con- current program are unrelated, we define some auxiliary no- 2 CCAN Syntax tions. Let Π and Λ be a plan- and an action-library, respec- tively. First, given any expression E, we use ATS(E) to de- In this paper, we use a first-order language with a vocabu- note the set of atoms occurring in E. Second, given an event- lary comprising mutually disjoint and infinite sets of vari- goal e,weuseREL(e, Π) = {ψθ : Pbθ | e : ψ ← Pb ∈ able, function, predicate, event-goal, and action symbols. Π,θ= mgu(e, e)} to denote the relevant plan-rules for Like (Sardina and Padgham 2011), we define a CCAN e, i.e., rules with ‘heads’ e that match e via a most general agent by a plan-library Π, an action-library Λ, and a belief unifier (mgu). Third, given a plan-body Pb, we recursively base B.Abelief base is a set of ground atoms, and an ac- define the set of atoms that are possibly checked by Pb as tion-library is a set of action-rules representing actions the follows: CHK(Pb, Π, Λ) = agent can perform. An action, denoted by a, is of the form ⎧ act(t), where act is an n-ary action symbol representing a ∅ P ∈{+b, −b}, ⎪ if b t = ⎪ (φ) P =?φ, function that may affect the external environment, and ⎨⎪ ATS if b t ,...,t ATS(pre(a, Λ)) if Pb = a, 1 n is a list of (possibly ground) terms. An action- + − ⎪ ψ:P ∈ (e,Π) ATS(ψ) ∪ CHK(Pb, Π, Λ) if Pb =!e, rule, as in STRIPS, is of the form act(v):ψ ← Φ ;Φ , ⎪ b REL ⎪ (P 1, Π, Λ) ∪ (P 2, Π, Λ) P ∈{P 1 | P 2 v = v ,...,v ψ ⎩⎪ CHK b CHK b if b b b , where 1 n is a list of distinct variables; , the P 1 P 2,P1; P 2}. precondition, is a formula; and Φ+ and Φ−, respectively the b b b b add-list and delete-list, are each a set of atoms representing Similarly, we define the set of atoms that are possibly as- + − the action’s effects. Any variable occurring in ψ, Φ , or Φ serted by Pb as follows: ASS(Pb, Π, Λ) = also occurs in v. For any action a that occurs in Π, there ⎧ ⎪ {b} if Pb ∈{+b, −b}, is exactly one action-rule a : ψ ← Φ+;Φ− ∈ Λ such that ⎪ ⎪ ∅ if Pb =?φ, a = a θ for some substitution θ; we define pre(a, Λ) = ψθ ⎨ + − ATS(eff (a, Λ)) if Pb = a, and eff (a, Λ) = Φ θ, Φ θ. ⎪ ψ:P ∈ (e,Π) ASS(Pb, Π, Λ) if Pb =!e, Π ⎪ b REL A plan-library is a set of plan-rules of the form ⎪ (P 1, Π, Λ) ∪ (P 2, Π, Λ) P ∈{P 1 | P 2 ev(t) ψ ← P ev(t) e ⎩⎪ ASS b ASS b if b b b , : b, where , denoted by ,isanevent- P 1 P 2,P1; P 2}. goal and ev is an n-ary event-goal symbol; ψ, the context b b b b P 1 n condition, is a formula; and b, the plan-body is a ‘standard Finally, for any concurrent program Pb ... Pb occur- operating procedure’ for achieving e when ψ holds in B. For- ring in Π, we assume that for any i, j ∈ [1,n], with i = j, i mally, a plan-body is a formula in the language defined by there does not exist a (i) variable that occurs in both Pb and the grammar Pb ::= j Pb , and (ii) unifier for any pair of atoms {l, l }, where l ∈ 1 2 1 2 1 2 (P i, Π, Λ) ∪ (P i, Π, Λ) l ∈ (P j, Π, Λ) 3 a | +b |−b | ?φ | !e | Pb ; Pb | Pb “|”Pb | Pb Pb CHK b ASS b and ASS b . where +b is a belief addition, which adds the atom b to 3 Single-Intention CCAN Semantics B; −b is a belief removal, which removes b from B; ?φ is [Π , Λ, B, A, Γ ] φ B We define an agent configuration as a tuple , a test condition, which tests whether formula holds in ; where Π is a plan-library; Λ is an action-library; B is a belief !e is an event-goal program, which states that e needs to be 1 2 base; and A is an action history representing the sequential achieved; and Pb ; Pb is a sequential program, which states P 1 P 2 P 1|P 2 and concurrent actions executed so far.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages8 Page
-
File Size-