an operational semantics for a fragment of prs
play

An Operational Semantics for a Fragment of PRS IJCAI 2018 - PowerPoint PPT Presentation

An Operational Semantics for a Fragment of PRS IJCAI 2018 Stockholm, Sweden Lavindra de Silva 1 Felipe Meneguzzi 2 Brian Logan 3 1 University of Nottingham, UK lavindra.desilva@nottingham.ac.uk 2 Pontifical Catholic University of Rio Grande do


  1. An Operational Semantics for a Fragment of PRS IJCAI 2018 Stockholm, Sweden Lavindra de Silva 1 Felipe Meneguzzi 2 Brian Logan 3 1 University of Nottingham, UK lavindra.desilva@nottingham.ac.uk 2 Pontifical Catholic University of Rio Grande do Sul, Brazil felipe.meneguzzi@pucrs.br 3 University of Nottingham, Nottingham, UK brian.logan@nottingham.ac.uk July 18, 2018 de Silva, Meneguzzi, and Logan PRS Operational Semantics July 18, 2018 1 / 13

  2. Motivation Motivation 1 Syntax 2 Semantics 3 4 Key Properties Discussion 5 de Silva, Meneguzzi, and Logan PRS Operational Semantics July 18, 2018 2 / 13

  3. Motivation Motivation PRS is a seminal reasoning system: it is one of the first practical implementations of BDI systems; it is widely used in robotics today; it influenced most subsequent agent programming languages; agents community generally believe it to be more expressive; yet no precise formalisation of the language. We aim to fill these gaps to allow comparison of PRS with its successors CAN AgentSpeak Golog X-BDI JACK dMARS de Silva, Meneguzzi, and Logan PRS Operational Semantics July 18, 2018 2 / 13

  4. Motivation Key Contribution We formalise a significant fragment of PRS graph-based plan bodies; language constructs to wait for and preserve maintenance goals, reasoning rules to operationalise such constructs, including: adopt, suspend, resume, and abort possibly nested goals We use the formalisation to prove key properties of PRS most importantly: CAN style plan-rules can be directly translated to PRS graph notation PRS plan-body graphs cannot be directly translated to CAN de Silva, Meneguzzi, and Logan PRS Operational Semantics July 18, 2018 3 / 13

  5. Syntax Agent Structure Belief base ( B ) Action-library ( Λ ) containing actions: v ) : ψ ← Φ + ; Φ − act ( � STRIPS style action-rules with precondition and positive/negative effects Plan-library ( Π ) containing plan-rules e ( � t ) : ϕ ; ψ ← G Plan-rules contain three key parts: an event-goal e ( � t ) – stating when the plan is relevant an optional goal-condition ϕ – describing what the plan achieves a context condition ψ – describing when the plan is applicable a plan-body graph G – what the agent executes de Silva, Meneguzzi, and Logan PRS Operational Semantics July 18, 2018 4 / 13

  6. Syntax Plan-body graphs Plan body-graphs comprise two key structures: user programs, including: actions (from the action-library) belief addition/removal ( + b , − b ) tests ( ? φ ) event-goal or goal-condition programs ( ! ev , or ! φ ) wait ( WT ( φ ) ) passive or active preserve ( PR p (! ev , φ ) , or PR a (! ev , φ ) ) a directed bipartite graph split into: state nodes transition nodes (labelled with programs) ! pw ? At ( d ) s 0 s 1 s 2 s 3 walk ( d ) de Silva, Meneguzzi, and Logan PRS Operational Semantics July 18, 2018 5 / 13

  7. Syntax Example Graphs G walk G walk ! pw ? At ( d ) travelTo ( dest ) : s 0 s 1 s 2 s 3 At ( x ) ∧ WalkDist ( x, dest ) ← G walk walk ( d ) G pw G pw s 4 s 6 Within G walk , event ! pw leads to P 1 pw s 0 s 8 executing the following rule: P 2 ? ⊤ ! ev 2 pw ! pw : ⊤ ← G pw s 5 s 7 de Silva, Meneguzzi, and Logan PRS Operational Semantics July 18, 2018 6 / 13

  8. Syntax Running Example Example The agent has the following plan rules used to address the subgoal travelTo ( dest ) to go from the current location to the destination location dest : travelTo ( dest ) : At ( x ) ∧ WalkDist ( x, dest ) ← G walk travelTo ( dest ) : At ( x ) ∧ ∃ y ( InCity ( x, y ) ∧ InCity ( dest, y )) ← G city travelTo ( dest ) : At ( x ) ∧ ¬∃ y ( InCity ( x, y ) ∧ InCity ( dest, y )) ← G far travelTo ( dest ) : ⊤ ← G home de Silva, Meneguzzi, and Logan PRS Operational Semantics July 18, 2018 7 / 13

  9. Semantics Semantics of Plan-Body Graphs Example Agent receives event: ! travelTo ( Uni ) de Silva, Meneguzzi, and Logan PRS Operational Semantics July 18, 2018 8 / 13

  10. Semantics Semantics of Plan-Body Graphs Example Agent receives event: ! travelTo ( Uni ) Current Plan: ! travelTo ( Uni ) : � ψ 1 : G walk , ψ 2 : G city , ψ 3 : G far � , where: ψ 1 = At ( x ) ∧ WalkDist ( x, Uni ) ψ 2 = At ( x ) ∧ ∃ y ( InCity ( x, y ) ∧ InCity ( Uni, y )) ψ 3 = At ( x ) ∧ ¬∃ y ( InCity ( x, y ) ∧ InCity ( Uni, y )) de Silva, Meneguzzi, and Logan PRS Operational Semantics July 18, 2018 8 / 13

  11. Semantics Semantics of Plan-Body Graphs Example Agent receives event: ! travelTo ( Uni ) Current Plan: ! travelTo ( Uni ) : � ψ 1 : G walk , ψ 2 : G city , ψ 3 : G far � , where: ψ 1 = At ( x ) ∧ WalkDist ( x, Uni ) ψ 2 = At ( x ) ∧ ∃ y ( InCity ( x, y ) ∧ InCity ( Uni, y )) ψ 3 = At ( x ) ∧ ¬∃ y ( InCity ( x, y ) ∧ InCity ( Uni, y )) G walk – as stored in the Plan Library ! pw ? At ( d ) s 0 s 1 s 2 s 3 walk ( d ) de Silva, Meneguzzi, and Logan PRS Operational Semantics July 18, 2018 8 / 13

  12. Semantics Semantics of Plan-Body Graphs Example Agent receives event: ! travelTo ( Uni ) Current Plan: ! travelTo ( Uni ) : � ψ 1 : G walk , ψ 2 : G city , ψ 3 : G far � , where: ψ 1 = At ( x ) ∧ WalkDist ( x, Uni ) ψ 2 = At ( x ) ∧ ∃ y ( InCity ( x, y ) ∧ InCity ( Uni, y )) ψ 3 = At ( x ) ∧ ¬∃ y ( InCity ( x, y ) ∧ InCity ( Uni, y )) G walk – when B ⊢ ψ 1 ! pw ? At ( Uni ) s 0 s 2 s 3 s 4 walk ( Uni ) de Silva, Meneguzzi, and Logan PRS Operational Semantics July 18, 2018 8 / 13

  13. Semantics Semantics of Plan-Body Graphs Example Agent receives event: ! travelTo ( Uni ) Current Plan: ! travelTo ( Uni ) : � ψ 1 : G walk , ψ 2 : G city , ψ 3 : G far � , where: ψ 1 = At ( x ) ∧ WalkDist ( x, Uni ) ψ 2 = At ( x ) ∧ ∃ y ( InCity ( x, y ) ∧ InCity ( Uni, y )) ψ 3 = At ( x ) ∧ ¬∃ y ( InCity ( x, y ) ∧ InCity ( Uni, y )) G walk – transitioning to the ! pw node ! pw ? At ( Uni ) s 0 s 2 s 3 s 4 walk ( Uni ) de Silva, Meneguzzi, and Logan PRS Operational Semantics July 18, 2018 8 / 13

  14. Semantics Semantics of Plan-Body Graphs Example Agent receives event: ! travelTo ( Uni ) Current Plan: ! travelTo ( Uni ) : � ψ 1 : G walk , ψ 2 : G city , ψ 3 : G far � , where: ψ 1 = At ( x ) ∧ WalkDist ( x, Uni ) ψ 2 = At ( x ) ∧ ∃ y ( InCity ( x, y ) ∧ InCity ( Uni, y )) ψ 3 = At ( x ) ∧ ¬∃ y ( InCity ( x, y ) ∧ InCity ( Uni, y )) G walk – executing sub-graph G pw G pw ⊲ prepareWalk : � ∆ pw � ? At ( Uni ) s 0 s 2 s 3 s 4 walk ( Uni ) de Silva, Meneguzzi, and Logan PRS Operational Semantics July 18, 2018 8 / 13

  15. Semantics Semantics of Plan-Body Graphs Example Agent receives event: ! travelTo ( Uni ) Current Plan: ! travelTo ( Uni ) : � ψ 1 : G walk , ψ 2 : G city , ψ 3 : G far � , where: ψ 1 = At ( x ) ∧ WalkDist ( x, Uni ) ψ 2 = At ( x ) ∧ ∃ y ( InCity ( x, y ) ∧ InCity ( Uni, y )) ψ 3 = At ( x ) ∧ ¬∃ y ( InCity ( x, y ) ∧ InCity ( Uni, y )) G walk – after executing G pw η ? At ( Uni ) s 0 s 2 s 3 s 4 walk ( Uni ) de Silva, Meneguzzi, and Logan PRS Operational Semantics July 18, 2018 8 / 13

  16. Key Properties Soundness and Completeness of the Semantics Theorems 1-4 ensure that our fragment of PRS works, in summary: The semantics is sound: all valid transitions from valid states result in valid states Wait and preserve programs are complete: They are only removed under the right conditions de Silva, Meneguzzi, and Logan PRS Operational Semantics July 18, 2018 9 / 13

  17. Key Properties Expressivity: CAN to PRS Theorem If Π − c is a CAN library and Λ an action-library, there exists a PRS library Π p s.t. for any event-goal ! e and beliefs B : SOL (Λ , Π − c , B , { ! e } ) = SOL (Λ , Π p , B , { ! e } ) . Key result: a CAN plan-library Π − c not mentioning Goal ( φ s , P, φ f ) programs (as there is no corresponding program in PRS) can be translated into an equivalent PRS plan-library. de Silva, Meneguzzi, and Logan PRS Operational Semantics July 18, 2018 10 / 13

  18. Key Properties Expressivity: PRS to CAN Theorem There exists a PRS library Π − p , an action-library Λ , and event-goal ! e , s.t. for any CAN library Π c ∈ CAN (Π − p ) and beliefs B : SOL (Λ , Π − p , B , { ! e } ) � = SOL (Λ , Π c , B , { ! e } ) . Key result: the converse does not hold: even if we ignore programs that have no counterparts in CAN, some PRS plan-libraries cannot be ‘directly mapped’ to CAN libraries. de Silva, Meneguzzi, and Logan PRS Operational Semantics July 18, 2018 11 / 13

  19. Key Properties Example of unconvertible PRS Plan The following non-series-parallel plan-body graph cannot be converted into a single CAN plan-body graph: !ev1 1 3 !ev2 0 2 4 6 !ev4 !ev0 8 !ev6 5 7 !ev5 ev 0 1 → ev 0 2 → ev 1 1 → ev 2 1 → ev 2 2 → ev 5 1 → ev 1 2 → ev 4 1 → ev 4 2 → ev 5 2 → ev 6 1 → ev 6 2 de Silva, Meneguzzi, and Logan PRS Operational Semantics July 18, 2018 12 / 13

  20. Discussion Future Work Translations of constructs from related work into PRS van Riemsdijk et al. 2009 Dastani et al. 2011 Thangarajah et al. 2014 Proofs to account for translating graph plan-bodies to sets of CAN or AgentSpeak plan-rules Extend the semantics to account for further PRS features: Meta-level reasoning Overlapping plan steps de Silva, Meneguzzi, and Logan PRS Operational Semantics July 18, 2018 13 / 13

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend