Integration of Runtime Verification into Metamodeling F. Macias T. Scheffel M. Schmitz R. Wang M. Leucker A. Rutle V. Stolz 28th Nordic Workshop on Programming Theory (NWPT’16), Denmark 1 / 23
Why Runtime Verification? ◮ DSML do not shield the software from design errors ◮ Runtime Verification checks the execution of real system ◮ Consider environmental influences ◮ React to failures ◮ Testing is seldom exhaustive ◮ Model Checking can not always gurantee the correctness of executing system 2 / 23
Runtime Verification ◮ Use runtime monitors to observe the run of systems ◮ Check whether the current execution of such systems violates given correctness properties ◮ Such correctness properties can be formulated in linear-time temporal logic, LTL 3 / 23
Integrating RV into Modeling Goal ⇒ Integrate RV into software engineering process ⇒ Domain experts and verification engineers use same model DSML Simulation RV Model Source Code 4 / 23
Multilevel Metamodeling . . linguistically typed . ontologically typed (Ling. metamodel) DSML ontologically typed ontol. typed LTL System Property Model M Specification ontol. typed ontologically typed State Subformula Snapshot Simulation 5 / 23
Example Scenario Obstacle GoBck TurnL G ( obs → X ( ¬ obs U to )) Timeout GoFwd Start GoBck TurnR Border Task Input Transition ◮ Generate Python code for the robot and monitor 6 / 23
Example Execution Obstacle GoBck TurnL Timeout GoFwd GoBck TurnR Border : GoFwd 7 / 23
Example Execution Obstacle GoBck TurnL Timeout GoFwd GoBck TurnR Border : GoFwd : GoFwd : GoBck : Border 8 / 23
Example Execution Obstacle GoBck TurnL Timeout GoFwd GoBck TurnR Border : GoFwd : GoFwd : GoBck : GoBck : Border 9 / 23
Example Execution Obstacle GoBck TurnL Timeout GoFwd GoBck TurnR Border : GoFwd : GoFwd : GoBck : GoBck : Border : Timeout : GoBck : TurnR 10 / 23
Example Execution Obstacle GoBck TurnL Timeout GoFwd GoBck TurnR Border : GoFwd : GoFwd : GoBck : GoBck : Border : Timeout : TurnR : GoBck : TurnR 11 / 23
Example Execution Obstacle GoBck TurnL Timeout GoFwd GoBck TurnR Border : GoFwd : GoFwd : GoBck : GoBck : Border : GoFwd : Timeout : Timeout : TurnR : TurnR : GoBck : TurnR 12 / 23
Example Execution II Obstacle GoBck TurnL Timeout GoFwd GoBck TurnR Border : GoFwd G ( obs → X ( ¬ obs U to )) 13 / 23
Example Execution II Obstacle GoBck TurnL Timeout GoFwd GoBck TurnR Border : Obstacle : GoBck : GoFwd : GoFwd G ( obs → X ( ¬ obs U to )) G ( obs → X ( ¬ obs U to )) 14 / 23
Example Execution II Obstacle GoBck TurnL Timeout GoFwd GoBck TurnR Border : Obstacle : GoBck : GoFwd : GoBck : GoFwd G ( obs → X ( ¬ obs U to )) G ( obs → X ( ¬ obs U to )) ¬ obs U to 15 / 23
Example Execution II Obstacle GoBck TurnL Timeout GoFwd GoBck TurnR Border : Obstacle : GoBck : GoFwd : GoBck : GoFwd G ( obs → X ( ¬ obs U to )) G ( obs → X ( ¬ obs U to )) ¬ obs U to : Obstacle : GoBck ¬ obs U to 16 / 23
Coupled Model Transformation Rules i: Input x: Task y: Task t: Transition META FROM TO : i : i ⇒ : x : x : y : t 17 / 23
Model Transformation Rules Current Intermediate Next Snapshot Snapshot Snapshot Environment Behavior Rules Rules S i , n S n + 1 S n query query Monitor Rules q n q n + 1 Current Next State State 18 / 23
Example Video 19 / 23
Communication Goal ⇒ Model distributed systems ◮ Current scenario: two robots meet ◮ Client/Server Model ◮ Sockets - send and receive data ◮ UDP (The User Datagram Protocol) ◮ No handshaking dialogues ◮ No guarantee of delivery, ordering, or duplicate protection ◮ Suitable for purposes where error checking and correction are performed in the application ◮ Broadcasting information 20 / 23
Broadcast ◮ Romba/Spinner simple "Found" message ◮ More advanced messages for robots explore area and share updates to a common map ◮ Broadcast Hello messages (ID, timestamp and data) ◮ The number of retransmission, reTx, is counted ◮ Maximum number of transmissions: MaxReTx 21 / 23
Example Scenario for communication Romba GoBack TurnLeft Timeout Border Happy GoFwd Idle GoFwd GoBack TurnLeft Found Bump TurnLeft Obstacle FarObstacle Found Found Spinner Timeout TurnRight Happy TurnLeft GoFwd GoBack Obstacle Bump Idle Found FarObstacle 22 / 23
Conclusion and outlook ◮ Present a metamodel that captures a wider range of aspects of the robots ◮ Sensors ◮ Motors ◮ Communication ◮ Integrate runtime verification into the whole software engineering process ◮ Design ◮ Simulation ◮ Code generation for the robot and monitor ◮ Allow the design of distributed systems in the future ◮ Distribution can be modeled through replication of existing instances on the modeling level ◮ Use models for Model-based testing 23 / 23
Recommend
More recommend