Open Sustersic Thesis.Pdf
Total Page:16
File Type:pdf, Size:1020Kb
The Pennsylvania State University The Graduate School Department of Computer Science and Engineering THE CONTROL, COMMUNICATION, AND COMPUTATION LANGUAGE (C3L): COMPLETING THE DESIGN CYCLE IN COMPLEX DISTRIBUTED SYSTEM DEVELOPMENT A Dissertation in Computer Science and Engineering by John Phillip Sustersic 2009 John Phillip Sustersic Submitted in Partial Fulfillment of the Requirements for the Degree of Doctor of Philosophy May 2009 ii The dissertation of John Phillip Sustersic was reviewed and approved* by the following: Mahmut Kandemir Associate Professor of Computer Science and Engineering Dissertation Co-advisor Chair of Committee Shashi Phoha Professor of Electrical Engineering Dissertation Co-advisor Mary Jane Irwin Robert E. Noll Professor of Computer Science and Engineering Robert Nickel Adjunct Professor of Electrical Engineering Raj Acharya Professor of Computer Science and Engineering Head of the Department of Computer Science and Engineering *Signatures are on file in the Graduate School iii ABSTRACT Innovations in computing and communications have enabled autonomous electromechanical devices that change their internal states in response to real-time interactions with other devices, software agents, or smart sensors. Ad-hoc wireless networks of such devices may be engineered to perform autonomous missions like battlefield surveillance using sensor networks or multi-robot air campaigns. A critical research challenge is to harness the capabilities of these devices via ad-hoc wireless networks to invoke deliberate processes in response to operational dynamics and perform collaborative missions effectively. The Control, Communication and Computation Language (C3L) is a language designed to capture the semantics of the dynamic architectures of such distributed systems and concisely express complex, time-critical and mission-critical operations within the system. The alphabet of C3L consists of atomic events and actions that may be either controllable or uncontrollable. Atomic events and actions are combined in various ways to represent composite behaviors as event/action sequences. This programming paradigm enables heterogeneous, independently-developed devices plug-n-play compatibility in ad-hoc networked applications with either independent or coordinated strategies. By embedding the operational dynamics of the system in the higher-level semantics of the language, this framework permits multi-level fusion of distributed data in an intuitive manner. The revised syntax and a complete operational semantic description of C3L are presented and detailed. To more fully explore the value of C3L as a tool for rapid development and testing of scalable distributed programs for autonomous devices, a iv compiler has been developed for the language. The compiler exploits the implicit task- level parallelism inherent in C3L programs to automatically generate multi-threaded executable programs. Based on the Microsoft Phoenix framework for compiler development and optimization, the C3L compiler can target any architecture supported by the framework; consequently a C3L program may be compiled for a particular architecture for simulation studies and verifications, and then the same program and compiler may be used to create executable programs for the actual hardware implementation of real devices using a different architecture. The compiler design and implementation are described, and the compiler is shown to generate deadlock-free multithreaded applications for any legal C3L program. Initial benchmarking tests show that the executables generated by the C3L compiler achieve near-linear speedups in standard, multiprocessing desktop systems in ordinary operating environments when sufficient concurrency exists to offset the inter-processor messaging costs of the application. Simulation studies are generally conducted early in the development cycle for most real systems; distributed system development of large-scale heterogeneous sets of autonomous devices operating in real-world environments imposes stringent demands on such simulations. The C3L compiler was integrated with the Visualization Tool Kit to enable native support for sophisticated presentations of either simulation or real-world behaviors. This compiler support for high-performance visualizations and the language extensions needed to exploit this functionality is presented. Finally, to illustrate the utility of the C3L language, its compiler and visualization support, an application study in the domain of the marine mine countermeasure mission is presented. v TABLE OF CONTENTS LIST OF FIGURES ..................................................................................................... ix LIST OF TABLES ....................................................................................................... xi ACKNOWLEDGEMENTS ......................................................................................... xii Chapter 1 Introduction ................................................................................................ 1 Roadmap ............................................................................................................... 5 Chapter 2 Background ................................................................................................ 7 Languages for Real-time Embedded Control ....................................................... 7 Formal Language Descriptions ............................................................................. 11 Grammar ........................................................................................................ 11 Semantics ....................................................................................................... 11 Operational Semantics ............................................................................ 13 Concurrency in Formal Language Descriptions ............................................ 14 Process Calculi ....................................................................................... 15 The Actor Model .................................................................................... 19 Petri Nets ................................................................................................ 20 Lightweight Formal Methods ........................................................................ 21 Type Systems ......................................................................................... 22 Semantics of Real Time, Reactive Systems .................................................. 23 Temporal Logic-based Formal Methods ................................................ 24 Duration Calculus ................................................................................... 25 Compiler Design and Optimization ...................................................................... 26 Compilers for Parallel, Concurrent Languages ............................................. 28 Chapter 3 C3L Description and Syntax ...................................................................... 30 Introduction ........................................................................................................... 30 Contributions to C3L Syntax ......................................................................... 32 Chapter Roadmap .......................................................................................... 34 Description of C3L ............................................................................................... 34 The Plant Model ............................................................................................ 36 The Controller Model .................................................................................... 39 C3L Memory Variables .......................................................................... 39 C3L Sets .......................................................................................... 40 C3L Control Events ................................................................................ 41 Raise Statements ............................................................................. 42 If Statements.................................................................................... 43 Assignment Statements ................................................................... 44 vi Repetition Statements...................................................................... 44 C3L Syntax ........................................................................................................... 45 Summary ............................................................................................................... 48 Chapter 4 C3L Operational Semantics and Formal Language Properties .................. 50 Introduction ........................................................................................................... 50 Contributions to C3L Semantics ................................................................... 51 Concurrency in C3L Semantics .............................................................. 52 Chapter Roadmap .......................................................................................... 53 C3L Operational Semantics .................................................................................. 53 Notations ........................................................................................................ 54 The Device Context ....................................................................................... 56 Operational Semantics of