On modularity in reactive control architectures, with an application to formal verification

Modularity is a central principle throughout the design process for cyber-physical systems. Modularity reduces complexity and increases reuse of behavior. In this paper we pose and answer the following question: how can we identify independent `modules' within the structure of reactive control architectures? To this end, we propose a graph-structured control architecture we call a decision structure, and show how it generalises some reactive control architectures which are popular in Artificial Intelligence (AI) and robotics, specifically Teleo-Reactive programs (TRs), Decision Trees (DTs), Behavior Trees (BTs) and Generalised Behavior Trees ($k$-BTs). Inspired by the definition of a module in graph theory, we define modules in decision structures and show how each decision structure possesses a canonical decomposition into its modules. We can naturally characterise each of the BTs, $k$-BTs, DTs and TRs by properties of their module decomposition. This allows us to recognise which decision structures are equivalent to each of these architectures in quadratic time. Our proposed concept of modules extends to formal verification, under any verification scheme capable of verifying a decision structure. Namely, we prove that a modification to a module within a decision structure has no greater flow-on effects than a modification to an individual action within that structure. This enables verification on modules to be done locally and hierarchically, where structures can be verified and then repeatedly locally modified, with modules replaced by modules while preserving correctness. To illustrate the findings, we present an example of a solar-powered drone controlled by a decision structure. We use a Linear Temporal Logic-based verification scheme to verify the correctness of this structure, and then show how one can modify modules while preserving its correctness.

[1]  Petter Ögren,et al.  Increasing Modularity of UAV Control Systems using Computer Game Behavior Trees , 2012 .

[2]  S. Rao Kosaraju Analysis of Structured Programs , 1974, J. Comput. Syst. Sci..

[3]  T. Gallai Transitiv orientierbare Graphen , 1967 .

[4]  W DijkstraEdsger Letters to the editor: go to statement considered harmful , 1968 .

[5]  Petter Ögren,et al.  A Survey of Behavior Trees in Robotics and AI , 2020, Robotics Auton. Syst..

[6]  Joseph Cavanagh Sequential Logic: Analysis and Synthesis , 2006 .

[7]  Oliver Biggar,et al.  A Framework for Formal Verification of Behavior Trees With Linear Temporal Logic , 2020, IEEE Robotics and Automation Letters.

[8]  N. Falconer Structured Programming , 1973, Nature.

[9]  Jeremy P. Spinrad,et al.  Modular decomposition and transitive orientation , 1999, Discret. Math..

[10]  Corrado Böhm,et al.  Flow diagrams, turing machines and languages with only two formation rules , 1966, CACM.

[11]  Anas N. Al-Rabadi,et al.  A comparison of modified reconstructability analysis and Ashenhurst‐Curtis decomposition of Boolean functions , 2004 .

[12]  Edsger W. Dijkstra,et al.  Notes on structured programming , 1970 .

[13]  Christel Baier,et al.  Principles of model checking , 2008 .

[14]  Jeffrey D. Ullman,et al.  Introduction to Automata Theory, Languages and Computation , 1979 .

[15]  Petter Ögren,et al.  Behavior Trees in Robotics and AI: An Introduction , 2017, ArXiv.

[16]  J. Willems The Behavioral Approach to Open and Interconnected Systems , 2007, IEEE Control Systems.

[17]  Blake Hannaford Hidden Markov Models derived from Behavior Trees , 2019, ArXiv.

[18]  Iman Shames,et al.  A principled analysis of Behavior Trees and their generalisations , 2020, ArXiv.

[19]  Nils J. Nilsson,et al.  Teleo-Reactive Programs for Agent Control , 1993, J. Artif. Intell. Res..

[20]  Andreas Klöckner Behavior Trees for Mission Management of High-Altitude Pseudo-Satellites , 2016 .

[21]  Lorenzo Natale,et al.  Improving the Parallel Execution of Behavior Trees , 2018, 2018 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS).

[22]  Petter Ögren,et al.  How Behavior Trees Modularize Hybrid Control Systems and Generalize Sequential Behavior Compositions, the Subsumption Architecture, and Decision Trees , 2017, IEEE Transactions on Robotics.

[23]  Amir Pnueli,et al.  The temporal logic of programs , 1977, 18th Annual Symposium on Foundations of Computer Science (sfcs 1977).

[24]  Chris Martens,et al.  A Resourceful Reframing of Behavior Trees , 2018, ArXiv.

[25]  Martial Hebert,et al.  An integrated system for autonomous robotics manipulation , 2012, 2012 IEEE/RSJ International Conference on Intelligent Robots and Systems.

[26]  Edsger W. Dijkstra,et al.  Letters to the editor: go to statement considered harmful , 1968, CACM.

[27]  Dolores R. Wallace,et al.  Structured Testing: A Testing Methodology Using the Cyclomatic Complexity Metric , 1996 .

[28]  Paulo Tabuada,et al.  Verification and Control of Hybrid Systems - A Symbolic Approach , 2009 .

[29]  Alexandre Duret-Lutz,et al.  Spot 2 . 0 — a framework for LTL and ω-automata manipulation , 2016 .

[30]  Petter Ögren,et al.  Towards a unified behavior trees framework for robot control , 2014, 2014 IEEE International Conference on Robotics and Automation (ICRA).