## 4 Event-Based Programming Model With Geometric Spatial Semantics
### Semantic
#### 4.3.2 **ea** Execution Semantic in GeFB
As shown in Figure 1(a), the proposed \(Ge\) event prototype is implemented by adding additional parameters (i.e., \(Exp\), \(\Delta M\), and \(obj\)) to the original event model. When the event output set \(EO\) is generated, the corresponding parameters in the \(Ge\) model are also passed along with \(EO\) to the downstream FB. When the event input set \(EI\) is triggered, the above parameters are also received by the FB. More details on the delivery of the rest of the parameters of \(Ge\) can be found in [16]. As 4 diac does not use the time stamp event model [16], we use the method of time parameter binding events instead in actual implementation. In this prototype, runtime environments are running on the same computer, so the time is synchronized. The time parameter is the deadline for the processing of the correspond event, representing the worst-case execution time. When the function block generates a \(Ge\) event, it will output the time parameter of processing the event together. When the downstream function block is triggered by a \(Ge\) event, it will record the current time stamp. As mentioned earlier in this paper, two new elements are added to each action primitive, \(ap\): the guard function \(g\) and the boundary function \(\pi\). An EC action, \(ea\), is shown in the left part of Figure 1(b). In the action primitive prototype, the state \(es_{1}^{-}\) is added before \(es_{1}\) to execute the guard function and an EC transition related to the guard function, \(et(g)\), as shown in the right part of Figure 1(b). The boundary function acts in parallel to the algorithm that performs the action primitive. ### Implementation Based on Case Studies

Added: In this section, a design process of robot assembly line is used to show how a robot domain expert develop the GeFB, and a reconfiguration process to show the how system designer to build the system with GeFBs in \"plug-and-play\" way by comparing programming methods that do not contain geometric semantics. #### 5.2.1 Scenarios

This paper verifies the practicability of GePro through the design stage and reconfiguration stage of the assembly line. The first scenario is an assembly line consists of a robot and two workbenches. Moreover, a two-robot collaborative test scenario by adding a robot to the previous assembly scenario. The assembly task is to hold the bricks together. One robot assembly scenario requires the robot to complete the assembly task alone before reconfiguration, as shown in Figure 2(a). A new robot, Robot 2, is added into the assembly line after reconfiguration. As shown in Figure 2(b), each robot can assemble the objects into desired target products on its own, which fetches the object from Table x.1 and places it on Table x.2. Now two robots are needed to collaborate on this assembly task. They fetch the object from Table x.1 and place it on Table 3 in world coordinate system, which means the Tables 1.2 and 2.2 are the same table. The set-up of our implementation is as follows. Two configuration files for Franka Emika Panda robots, Ubuntu 18.04 with ROS-Melodic, MoveIt with Rviz, 4 diac IDE, and FORTE. Revision: The control system architecture has two layers: the GeFB network running in the FORTE runtime environment is to achieve logical control of the robots, and the basic action primitives are executed in Rviz simulator. These two control layers are associated through robot operating system (ROS) framework. The action primitives algorithms to control robot are realized based on MoveIt. Figure 2: The prototype of \(GeFB\): (**a**) \(Ge\) event and (**b**) action primitives. #### 5.2.2 Design Stage of Robot Assembly Line

(a) Robot actions

The basic actions of robot are _Fetch_ and _Place_. To implement the guard function, a virtual action is defined, named _Check_. All actions are triggered by GeFB via ROS topic protocol. The _Fetch_ has two input parameters from GeFB and one from low-level ROS control, as shown in Algorithm 5.