UC Berkeley UC Berkeley Electronic Theses and Dissertations Title Mobile Reactive Systems over Bigraphical Machines - A Programming Model and its Implementation Permalink https://escholarship.org/uc/item/830795dx Author Pereira, Eloi Teixeira Publication Date 2015 Peer reviewed|Thesis/dissertation eScholarship.org Powered by the California Digital Library University of California Mobile Reactive Systems over Bigraphical Machines - A Programming Model and its Implementation by El´oiTeixeira Pereira A dissertation submitted in partial satisfaction of the requirements for the degree of Doctor of Philosophy in Engineering - Civil and Environmental Engineering in the Graduate Division of the University of California, Berkeley Committee in charge: Professor Raja Sengupta, Chair Professor Edward Lee Professor Alexandre Bayen Summer 2015 Mobile Reactive Systems over Bigraphical Machines - A Programming Model and its Implementation Copyright 2015 by El´oiTeixeira Pereira 1 Abstract Mobile Reactive Systems over Bigraphical Machines - A Programming Model and its Implementation by El´oiTeixeira Pereira Doctor of Philosophy in Engineering - Civil and Environmental Engineering University of California, Berkeley Professor Raja Sengupta, Chair In this dissertation we address the problem of bridging reactive programs and mobile computing machinery embedded in physical spaces with dynamic structure. We propose the BigActor Model as a bridging model between programs and logical-space models. The BigActor model [1] combines Hewitt and Agha's Actor model [2] for specifying concurrent reactive programs with Robin Milner's Bigraphical Model [3] for specifying the location and connectivity of the computing machines. The BigActor Model makes location and connectiv- ity first-class citizens in distributed machines. This is analogous to another bridging model, the von Neumann machine, which makes first-class citizens of memory, instructions, and their sequentiality. The BigActor Programming Language (BAL) is an implementation of the BigActor Model. It has a runtime system named the BigActor Runtime System (BARS). The BARS targets an abstract machine (bigraphs). The abstract machine has to be real- ized on a physical space of mobile and distributed computing machines. The realization is produced by the Logical-Space Execution Engine (LSEE), which bridges bigraphs with the physical space. The Logical-Space Runtime System (LSRS) extends BARS with LSEE so that programs written in BAL can seamlessly execute over physical spaces. The second part of this dissertation is concerned with the formalization and implementa- tion of the interactions between logical spaces and physical spaces. First, we approach this problem formally, by introducing the logical-space computing semantics. In logical-space computing, spatial agents operate over logical-space models while the runtime system is in charge of interacting with the physical space. We presented an implementation that follows the logical-space computing semantics. The LSRS uses the LSEE to generate logical-space models using bigraphs. The physical space is modelled using polygons defined using GPS coordinates. The spatial agents are bigActors. Our implementation programs robots and sensors in logical-space to execute an oil-spill monitoring exercise in the Atlantic. BigActor programs execute over BARS, which interacts with physical spaces through the LSEE. LSEE executes over the Robot Operating System (ROS) - an open-source middleware for robotics. The physical machinery used in the demonstration consisted of one Air Force UAV, three 2 ground control stations, four drifters that broadcast their position using AIS, and one Navy vessel equipped with a small speedboat. The Portuguese Navy emulated the oil-spill by releasing 100kg of popcorn in the ocean. i To my parents Lourdes and Artur ii Contents Contents ii List of Figures iv List of Tables vii 1 Introduction 1 1.1 Models bridging programs and machines . 4 1.2 Spatial Models . 5 1.3 Spatial programming models . 7 I Reactive programming on bigraphical machines 10 2 Observing and Controlling Bigraphs 11 2.1 Bigraphical formalism - a review . 11 2.2 Querying for local observations . 20 2.3 Local bigraphical reaction rules . 24 2.4 Final remarks . 25 3 BigActors 27 3.1 Introduction . 27 3.2 Actor model of computation - review . 29 3.3 BigActor Model . 34 3.4 BigActors Operational semantics . 38 3.5 Communication back-channelling . 50 3.6 Correctness of BigActor Model Semantics . 52 3.7 Final remarks . 58 4 BigActor Programming Language 59 4.1 What is an Embedded DSL . 60 4.2 Scala Programming Language . 60 4.3 BARS - The BigActor Runtime System . 63 iii 4.4 A simulation environment for BigActors . 68 4.5 A case study in mobile robotics . 71 4.6 Final remarks . 77 II Bridging logical and physical machines 80 5 Logical-Space Computing 81 5.1 Introduction . 81 5.2 Spatial Structures . 84 5.3 Bigraphs and Polygons . 85 5.4 Consistency of spatial structures . 89 5.5 Logical-Space Computing Semantics . 91 5.6 Correctness of control actions . 95 5.7 Using the semantics to enforce local consistency . 99 5.8 Final remarks . 102 6 Case study: oil-spill monitoring mission 104 6.1 The bilge dumping problem . 104 6.2 Vehicles and Sensors . 109 6.3 Logical-Space Runtime System . 110 6.4 Logical-Space Execution Engine . 111 6.5 Final remarks . 119 7 Conclusions 121 Bibliography 123 iv List of Figures 1.1 A bridging model between programs and machines with dynamic structure. 2 2.1 Example of a bigraph. 12 2.2 Placing and Linking graphs of the bigraph of Figure 2.1. 12 8 2.3 Example of a bigraph from Bg(Kcity). 15 2.4 Composition of the bigraph streetMap with the bigraph networkInf. 17 2.5 Abstract BBRs MOVE that moves a Smart node from its current location to a Street node , and CONNECT that connects the Smart node to a Wlan node. 18 2.6 Example of the application of the MOVE reaction rule. 19 2.7 A bigraph trace resulting from applying the BRRs MOVE(sp,street1), MOVE(sp,street3), and CONNECT(sp,wlan0). .............................. 20 2.8 BigActor observing the street map using query CHILDREN(PARENT(HOST)). 21 3.1 A pictorial representation of a bigActor system. 28 3.2 Specification of the bigActor system for Example 3.1. 29 3.3 Execution trace for the Example 3.1. 30 3.4 The Actor Model. 31 3.5 Grammar for actors syntax. 32 3.6 Actor operational semantics. 32 3.7 app and social actors. 34 3.8 Execution trace of the actor system fapp; socialg. 35 3.9 Actor system for Example 3.2 with new actors app, smartphone, and env. 36 3.10 BigActor system for scenario presented in Example 3.3. 37 3.11 BRRs MOVE HOST TO(Loc) and CONNECT HOST TO(Wlan). 38 3.12 Grammar for bigActors syntax. 39 3.13 BigActors operational semantics. 40 3.14 BigActor system for scenario presented in Example 3.5. 42 3.15 BigActors of Figure 3.14 embedded in the bigraph of Figure 2.3. 42 3.16 Execution trace for the bigActor system of Figure 3.14. 44 3.17 Execution trace over the respective Bigraph Reactive System. 45 3.18 Actor system synthesized to produce the projected trace of Figure 3.16. 49 B0 B0 3.19 Areas of influence Aapp2 and Asocial2......................... 51 v 3.20 BigActor grabberBA.................................. 53 3.21 Example of an execution of grabberBA leading to an unsafe configuration. 53 3.22 BigActors grabberBA0 and grabberBA1....................... 54 3.23 Example of an execution of multiple bigActors leading to an unsafe configuration. 54 4.1 A simple actor class and its instantiation and invocation. 61 4.2 A simple actor instantiated and invoked using the actor method. 62 4.3 Remote actor instantiation. 62 4.4 Remote actor selection and use. 62 4.5 BigActor Runtime System. 63 4.6 Definition of BigActor class. 64 4.7 Instantiation and invocation of a BigActor. .................... 64 4.8 Instantiation and invocation of a BigActor. .................... 65 4.9 Algebraic data type BigActorSchdlAPI that defines a set of messages to interact with BigActorSchdl.................................. 66 4.10 Code skeleton for BigActorSchdl. ......................... 66 4.11 Algebraic data type BigraphManagerAPI that defines a set of messages to interact with BigraphManager................................. 67 4.12 Remote bigActor registering, selection and use. 68 4.13 Remote bigActor instantiation. 68 4.14 BGM grammar. 69 4.15 Term specifying the bigraph of Figure 2.3 . 69 4.16 BigActor Runtime Syste on BigMC. 70 4.17 Example of a bigraph generation for the mobile robotics case study. 72 4.18 BGM term for the bigraph depicted in Figure 4.17. 73 4.19 Abstract BRRs modelling the set of control actions. 74 4.20 Abstract BRRs modelling the set of environment actions. 74 4.21 BigActor specifying the oil-spill monitoring mission. 75 4.22 Definition of track oilSpills............................ 76 4.23 Definition of sample spill.............................. 76 4.24 Definition of ais receiver.............................. 77 4.25 Timeline for an exectuion of the BigActor system that specifies the oil-spill mon- itoring example. 78 4.26 Definition of broadcast command that broadcasts a message to all bigActors hosted at nodes linked to the host of the bigActors executing the command. 79 5.1 Physical-space execution for Example 5.1. 82 5.2 Symbolical-space execution for Example 5.1. 83 5.3 BRRs that generates the symbolic-space execution depicted in Figue 5.2. 83 5.4 Logical space and physical space. 86 5.5 Logical-space execution for Example 5.1. 87 5.6 Logical-space execution for Example 5.5. 89 vi 5.7 Inconsistent structure. 90 5.8 Spatial agent modelled as a bigActor. 96 5.9 Logical-space execution for the spatial agent of Figure 5.8. 96 5.10 Example of a feedback specified as a bigActor. 101 6.1 CleanSeaNet SAR image with evidences of bilge dumping acquired in June 2009 off the coast of Spain.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages144 Page
-
File Size-