Robotic code needs to be verified to ensure its safety and functional correctness, especially when the robot is interacting with people. Testing the real code in simulation is a viable option. It reduces the costs of experiments and provides detail that is lost when using formal methods. However, generating tests that cover interesting scenarios, while executing most of the code, is a challenge amplified by the complexity of the interactions between the environment and the software. Model-based test generation methods can automate otherwise manual processes and facilitate reaching rare scenarios during testing. In this paper, we compare the use of Belief-Desire-Intention (BDI) agents as models for test generation, with more conventional, model-based test generation, that exploits automata and model checking techniques, and random test generation methods, in terms of practicality, performance, scalability, and exploration ( coverage'). Simulators and automated testbenches were implemented in Robot Operating System (ROS) and Gazebo, for testing the code of two robots, BERT2 in a cooperative manufacture (table assembly) task, and Tiago as a home care assistant. The results highlight the clear advantages of using BDI agents for test generation, compared to random and conventional automata-based approaches. BDI agents naturally emulate the agency present in Human-Robot Interaction (HRI). They are thus more expressive and scale well in HRI applications.
Many languages and formalisms have been proposed for generic software model-based test generation @cite_28 , e.g. UML and process algebras for concurrency @cite_21 , or Lustre and MATLAB Simulink for data flow @cite_13 . Their suitability for the HRI domain, in terms of capturing realistic and uncertain environments with people, is yet to be determined @cite_14 . Also, deriving models automatically from generic code (e.g. Python and C++ in ROS), or from user requirements, remains a challenge. BDI agents @cite_0 have been used successfully to model decision making in autonomous robots @cite_27 . Because BDI agents naturally reflect agency, they are also ideal to model the agency present in the robot's environment (e.g. people). @cite_20 , we have shown how to use BDI agents for model-based test generation.
@cite_14 @cite_28 @cite_21 @cite_0 @cite_27 @cite_13 @cite_20
156561816 1594775721 1497120980 2119296494 2949647627
The seminal works of Wilf and Nijenhuis in the late 70s have led to efficient algorithms for counting and generating uniformly at random a variety of combinatorial structures. In 1994, Flajolet, Zimmermann and Van Cutsem have widely generalised and systematised the approach. This paper presents several applications of these powerful results to software random testing, and random model exploration. The use of autonomous systems, including cooperating agents, is indispensable in certain fields of application. Nevertheless, the verification of autonomous systems still represents a challenge due to lack of suitable modelling languages and verification techniques. To address these difficulties, different modelling languages allowing concurrency are compared. Coloured Petri Nets (CPNs) are further analysed and illustrated by means of an example modelling autonomous systems. Finally, some existing structural coverage concepts for Petri Nets are presented and extended by further criteria tailored to the characteristics of CPNs. Preface. 1 Introduction. 1.1 Autonomous Agents. 1.2 Characteristics of Agents. 1.3 Multi-Agent Systems. 1.4 Hello World! 2 The BDI Agent Model. 2.1 Agent-Oriented Programming. 2.2 Practical Reasoning. 2.3 A Computational Model of BDI Practical Reasoning. 2.4 The Procedural Reasoning System. 2.5 Agent Communication. 3 The Jason Agent Programming Language. 3.1 Beliefs. 3.2 Goals. 3.3 Plans. 3.4 Example: A Complete Agent Program. 3.5 Exercises. 4 Jason Interpreter. 4.1 The Reasoning Cycle. 4.2 Plan Failure. 4.3 Interpreter Configuration and Execution Modes. 4.4 Pre-Defined Plan Annotations. 4.5 Exercises. 5 Environments. 5.1 Support for Defining Simulated Environments. 5.2 Example: Running a System of Multiple Situated Agents. 5.3 Exercises. 6 Communication and Interaction. 6.1 Available Performatives. 6.2 Informal Semantics of Receiving Messages. 6.3 Example: Contract Net Protocol. 6.4 Exercises. 7 User-Defined Components. 7.1 Defining New Internal Actions. 7.2 Customising the Agent Class. 7.3 Customising the Overall Architecture. 7.4 Customising the Belief Base. 7.5 Pre-Processing Directives. 7.6 Exercises. 8 Advanced Goal-Based Programming. 8.1 BDI Programming. 8.2 Declarative (Achievement) Goal Patterns. 8.3 Commitment Strategy Patterns. 8.4 Other Useful Patterns. 8.5 Pre-Processing Directives for Plan Patterns. 9 Case Studies. 9.1 Case Study I: Gold Miners. 9.2 Case Study II: Electronic Bookstore. 10 Formal Semantics. 10.1 Semantic Rules. 10.2 Semantics of Message Exchange in a Multi-Agent System. 10.3 Semantic Rules for Receiving Messages. 10.4 Semantics of the BDI Modalities for AgentSpeak. 11 Conclusions. 11.1 Jason and Agent-Oriented Programming. 11.2 Ongoing Work and Related Research. 11.3 General Advice on Programming Style and Practice. A Reference Guide. A.1 EBNF for the Agent Language. A.2 EBNF for the Multi-Agent Systems Language. A.3 Standard Internal Actions. A.4 Pre-Defined Annotations. A.5 Pre-Processing Directives. A.6 Interpreter Configuration. Bibliography. Model-based testing (MBT) relies on models of a system under test and or its environment to derive test cases for the system. This paper discusses the process of MBT and defines a taxonomy that covers the key aspects of MBT approaches. It is intended to help with understanding the characteristics, similarities and differences of those approaches, and with classifying the approach used in a particular MBT tool. To illustrate the taxonomy, a description of how three different examples of MBT tools fit into the taxonomy is provided. Copyright © 2011 John Wiley & Sons, Ltd. The challenges of robotic software testing extend beyond conventional software testing. Valid, realistic and interesting tests need to be generated for multiple programs and hardware running concurrently, deployed into dynamic environments with people. We investigate the use of BeliefDesire-Intention (BDI) agents as models for test generation, in the domain of human-robot interaction (HRI) in simulations. These models provide rational agency, causality, and a reasoning mechanism for planning, which emulate both intelligent and adaptive robots, as well as smart testing environments directed by humans. We introduce reinforcement learning (RL) to automate the exploration of the BDI models using a reward function based on coverage feedback. Our approach is evaluated using a collaborative manufacture example, where the robotic software under test is stimulated indirectly via a simulated human co-worker. We conclude that BDI agents provide intuitive models for test generation in the HRI domain. Our results demonstrate that RL can fully automate BDI model exploration, leading to very effective coverage-directed test generation.