@phdthesis{oai:sucra.repo.nii.ac.jp:00017925, author = {王, 博}, month = {}, note = {ix, 371 p., Programming language Ada is the only ISO standard, object-oriented, concurrent, real-time programming language. It is intended for use in large, long-lived applications where reliability and efficiency are essential and they are almost concurrent systems. Ada has gone through Ada 83, Ada 95, Ada 2005, and the last version of Ada, known as Ada 2012, is the world's premier programming language for engineering safe, secure and reliable software. Ada 2012 has a giant changes and extensions from Ada 2005, which can support many new features, such as contract-based programming, increased expressiveness, multicore support, container enhancements. In general, Ada is always used to manipulate safety-critical systems, such as commercial and military aircraft avionics, air traffic control systems, railroad systems, medical devices, and so on. The systems are almost concurrent systems and they are vital to personal life safety, such that they are allowed any malfunction, otherwise personal life and assets might suffer catastrophic consequences. However, it is quite difficult to design, understand, test, debug, and maintain concurrent programs, the reason is that multiple control flow and data flow can exist simultaneously in concurrent systems, and execution or evaluation of statements are unpredictable and non-deterministic. For solving the difficulties, only one tool cannot resolve all of difficulties, but rather we should have a set of software tools. Usually, in the set of software tools, they are not independent on each other. An engineering environment could integrate them together. Software Engineering Environment (SEE) is an engineering environment that integrates various tools and provides comprehensive facilities to designing, understanding, testing, debugging and maintaining software systems. So far, some software engineering tools were developed for Ada programs, however, because Ada 2012 has large changes and extensions, they hardly support for software engineering activities of Ada 2012. Therefore, the development of supporting tools that can deal with Ada 2012 is an urgent study. In order to support software development activities using Ada 2012, we proposed a software engineering environment for Ada 2012 programs. For development of SEE for Ada 2012 programs, we analyzed requirements for developing SEE of Ada 2012. Based on requirements, we designed an SEE for Ada 2012 programs. And then we confirmed core components of the SEE for Ada 2012 programs. Finally, we proposed methods to develop core components and gave implementations of them. This work has following contributions. We proposed a software engineer environment for Ada 2012 programs and implemented its core components. We designed and implemented a denition-use net generator for Ada 2012 programs, which can automatically generate DUNs of target Ada 2012 programs. And then we designed and implemented a system dependence net generator for Ada 2012 programs, which can automatically generate SDNs of the target Ada 2012 programs including new types of program dependences and one interprocedural relation that we found and formally defined. We also designed and developed a run-time tasking deadlock detector for Ada 2012 programs, which can detect tasking deadlocks raised by all types of synchronization waiting relations in Ada 2012 programs, and we found some types of queue operation related tasking deadlocks in Ada 2012 programs. We also showed how to utilize Contract-based Programming (CBP) with Ada 2012 to solve challenges of future advanced software engineering. We proposed methods and solutions from five areas, such as security, continuity, reactive-ability, predictability, and anticipatable-ability. By CBP, we gave algorithms to develop an SSB-based system as a persistent computing system and an ARRS as an anticipatory system. Structure of this thesis is as follows. Chapter 1 presents background, motivation, and purpose of this research. Chapter 2 presents a software engineering environment for Ada 2012 programs and gives the core components of software engineering environment. Chapter 3 presents definition-use nets of Ada 2012 programs. Chapter 4 presents a definition-use net generator for Ada 2012 programs. Chapter 5 elaborates system dependence nets of Ada 2012 programs. Chapter 6 shows the implementation of system dependence nets generator for Ada 2012 programs. Chapter 7 presents a tasking deadlock detector for Ada 2012 programs. Chapter 8 discusses contract-based programming for future computing with Ada 2012. Finally, concluding remarks is given in Chapter 9., Abstract i Acknowledgments iii List of figures viii List of tables ix 1 Introduction 1 1.1 Background and Motivation . . . . . . . . . . . . . . . . . . . . . . 1 1.2 Purposes and Objectives . . . . . . . . . . . . . . . . . . . . . . . . 2 1.3 Structure of the Thesis . . . . . . . . . . . . . . . . . . . . . . . . . 2 2 A Software Engineering Environment for Ada 2012 Programs 3 2.1 An Overview of the Software Engineering Environment . . . . . . . 3 2.2 Requirement Analyses for SEE of Ada 2012 Programs . . . . . . . . 4 2.3 Designing an SEE for Ada 2012 Programs . . . . . . . . . . . . . . 5 2.4 Confirming the Core Components of SEE of Ada 2012 . . . . . . . . 6 3 Definition-Use Nets of Ada 2012 Programs 7 3.1 Previous Researches . . . . . . . . . . . . . . . . . . . . . . . . . . 7 3.2 Definition-Use Nets of Ada 2012 Programs . . . . . . . . . . . . . . 9 3.2.1 Vertices of DUNs of Ada 2012 Programs . . . . . . . . . . . 9 3.2.2 Types of Vertices of DUNs of Ada 2012 Programs . . . . . . 9 3.2.3 Types of Labels of Vertices of DUNs of Ada 2012 Programs 13 3.2.4 Arcs of DUNs of Ada 2012 Programs . . . . . . . . . . . . . 15 3.2.5 Types of Arcs of DUNs of Ada 2012 Programs . . . . . . . . 15 3.2.6 New Concurrent Facilities of DUNs of Ada 2012 Programs . 20 4 A Definition-Use Net Generator for Ada 2012 Programs 25 4.1 Generation Method of DUNs of Ada 2012 Programs . . . . . . . . . 25 4.1.1 Requirement Analyses of DUNs of Ada 2012 Programs . . . 25 4.1.2 Generation Algorithms of DUNs of Ada 2012 Programs . . . 26 4.2 Implementation of a DUN Generator for Ada 2012 Programs . . . . 27 4.3 Examples of a DUN Generator for Ada 2012 Programs . . . . . . . 29 4.4 Applications of the DUN Generator . . . . . . . . . . . . . . . . . . 32 5 System Dependence Nets of Ada 2012 Programs 34 5.1 Previous Researches . . . . . . . . . . . . . . . . . . . . . . . . . . 34 5.2 Program Dependences and Interprocedural Relations . . . . . . . . 34 5.2.1 Program Dependences . . . . . . . . . . . . . . . . . . . . . 34 5.2.2 Interprocedural Relations . . . . . . . . . . . . . . . . . . . 37 5.2.3 New Types of Program Dependences in Ada 2012 Programs 37 5.3 System Dependence Nets of Ada 2012 Programs . . . . . . . . . . . 39 6 A System Dependence Net Generator for Ada 2012 Programs 42 6.1 Generation Method of SDNs for Ada 2012 Programs . . . . . . . . 42 6.2 Examples of an SDN Generator for Ada 2012 Programs . . . . . . . 42 6.3 Applications of the SDN . . . . . . . . . . . . . . . . . . . . . . . . 46 6.3.1 Slicing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 6.3.2 Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 6.3.3 Understanding and Maintenance . . . . . . . . . . . . . . . . 46 6.3.4 Complexity Measurement . . . . . . . . . . . . . . . . . . . 47 7 A Tasking Deadlock Detector for Ada 2012 Programs 48 7.1 Tasking Deadlock Issues . . . . . . . . . . . . . . . . . . . . . . . . 48 7.2 Previous Researches . . . . . . . . . . . . . . . . . . . . . . . . . . 48 7.3 Queue Operation Related Tasking Deadlocks in Ada 2012 Programs 50 7.3.1 Queue Operations . . . . . . . . . . . . . . . . . . . . . . . . 51 7.3.2 Examples of Queue Operation Related Tasking Deadlocks in Ada 2012 Programs . . . . . . . . . . . . . . . . . . . . . . . 52 7.4 Principle of Detecting Tasking Deadlocks . . . . . . . . . . . . . . . 67 7.5 Run-Time Detection of Tasking Deadlocks in Ada 2012 Programs . 68 8 Contract-Based Programming for Future Computing with Ada 2012 71 8.1 An Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 8.2 Future Advanced Software Engineering and Its Challenges . . . . . 72 8.3 Contract-Based Programming with Ada 2012 . . . . . . . . . . . . . 74 8.4 Contract-Based Programming for Future Advanced Software Engineering with Ada 2012 . . . . . . . . . . . . . . . . . . . . . . . . . 74 8.4.1 An Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 74 8.4.2 Methods of Developing Persistent Computing Systems with Contract-Based Programming . . . . . . . . . . . . . . . . . 75 8.4.3 Methods of Developing Anticipatory Reasoning Reacting Systems with Contract-Based Programming . . . . 76 8.4.4 Disscussion . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 9 Conclusions 81 9.1 Contributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 9.2 Future Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 Publications 83 References 85 Appendixes Source Programs 89 A A Definition-Use Net Generator for Ada 2012 Programs 90 A.1 Definition-Use Net Generator . . . . . . . . . . . . . . . . . . . . . 90 A.1.1 Actuals_For_Traversing Package . . . . . . . . . . . . . . . . 90 A.1.2 Actuals_For_Traversing-Pre_Op Package . . . . . . . . . . . . 96 A.1.3 Actuals_For_Traversing-Post_Op Package . . . . . . . . . . . 116 A.1.4 Ada2DUN Package . . . . . . . . . . . . . . . . . . . . . . . 126 A.1.5 Asis_Application_Driver_1 Package . . . . . . . . . . . . . . . 156 A.1.6 Context_Processing Package . . . . . . . . . . . . . . . . . . 158 A.1.7 Dun_Handler Package . . . . . . . . . . . . . . . . . . . . . . 161 A.1.8 Element_Processing Package . . . . . . . . . . . . . . . . . . 189 A.1.9 Gela_Ids Package . . . . . . . . . . . . . . . . . . . . . . . . 190 A.1.10 Id_List Package . . . . . . . . . . . . . . . . . . . . . . . . . 194 A.1.11 Metrics_Utilities Package . . . . . . . . . . . . . . . . . . . . 195 A.1.12 Stacks Package . . . . . . . . . . . . . . . . . . . . . . . . . 197 A.1.13 Unit_Processing Package . . . . . . . . . . . . . . . . . . . . 197 A.1.14 V_Strings Package . . . . . . . . . . . . . . . . . . . . . . . 199 B A System Dependence Net Generator for Ada 2012 Programs 201 B.1 System Dependence Net Generator . . . . . . . . . . . . . . . . . . 201 B.1.1 DUN2SDN Package . . . . . . . . . . . . . . . . . . . . . . . 201 B.1.2 Control Package . . . . . . . . . . . . . . . . . . . . . . . . . 205 B.1.3 Data Package . . . . . . . . . . . . . . . . . . . . . . . . . . 208 B.1.4 Sync Package . . . . . . . . . . . . . . . . . . . . . . . . . . 209 B.1.5 Select Package . . . . . . . . . . . . . . . . . . . . . . . . . . 210 B.1.6 Comm Package . . . . . . . . . . . . . . . . . . . . . . . . . 211 B.1.7 Call Package . . . . . . . . . . . . . . . . . . . . . . . . . . . 213 B.1.8 Expandnode Package . . . . . . . . . . . . . . . . . . . . . . 215 B.1.9 Prepost Package . . . . . . . . . . . . . . . . . . . . . . . . 218 C A Tasking Deadlock Detector for Ada 2012 Programs 219 C.1 Source Transformation Tool . . . . . . . . . . . . . . . . . . . . . . 219 C.1.1 Asis_Utils Package . . . . . . . . . . . . . . . . . . . . . . . 219 C.1.2 Call_Analyzer Package . . . . . . . . . . . . . . . . . . . . . 222 C.1.3 Comp_Measure Package . . . . . . . . . . . . . . . . . . . . 227 C.1.4 Designations Package . . . . . . . . . . . . . . . . . . . . . . 229 C.1.5 Function_Analyzer Package . . . . . . . . . . . . . . . . . . . 229 C.1.6 Gela_Ids Package . . . . . . . . . . . . . . . . . . . . . . . . 234 C.1.7 Global_Info Package . . . . . . . . . . . . . . . . . . . . . . 238 C.1.8 Global_Types Package . . . . . . . . . . . . . . . . . . . . . 239 C.1.9 ID_List Package . . . . . . . . . . . . . . . . . . . . . . . . . 240 C.1.10 List Package . . . . . . . . . . . . . . . . . . . . . . . . . . . 241 C.1.11 Measure_Types Package . . . . . . . . . . . . . . . . . . . . 242 C.1.12 Measurement_Analyzer Package . . . . . . . . . . . . . . . . 243 C.1.13 Mh_Spec Package . . . . . . . . . . . . . . . . . . . . . . . . 250 C.1.14 Name_Handler Package . . . . . . . . . . . . . . . . . . . . . 250 C.1.15 Pid Package . . . . . . . . . . . . . . . . . . . . . . . . . . . 252 C.1.16 Source_Trav Package . . . . . . . . . . . . . . . . . . . . . . 253 C.1.17 Spec Package . . . . . . . . . . . . . . . . . . . . . . . . . . 298 C.1.18 Spec_Reader Package . . . . . . . . . . . . . . . . . . . . . . 300 C.1.19 Stacks Package . . . . . . . . . . . . . . . . . . . . . . . . . 315 C.1.20 String_Handler Package . . . . . . . . . . . . . . . . . . . . . 317 C.1.21 Task_Indexed_List Package . . . . . . . . . . . . . . . . . . . 317 C.1.22 V_Strings Package . . . . . . . . . . . . . . . . . . . . . . . 318 C.1.23 Variable_Analyzer Package . . . . . . . . . . . . . . . . . . . 320 C.2 Run-Time Detection Tool . . . . . . . . . . . . . . . . . . . . . . . 325 C.2.1 Dd_Spec Package . . . . . . . . . . . . . . . . . . . . . . . . 325 C.2.2 Event_Driven_Execution_Monitor3 Package . . . . . . . . . . 327 C.2.3 Global_Types Package . . . . . . . . . . . . . . . . . . . . . 328 C.2.4 Pid Package . . . . . . . . . . . . . . . . . . . . . . . . . . . 333 C.2.5 Task_Indexed_List Package . . . . . . . . . . . . . . . . . . . 333 C.2.6 Task_Information_Collector Package . . . . . . . . . . . . . . 334 C.2.7 Task_Wait_For_Graph_Manager Package . . . . . . . . . . . 339 C.2.8 V_Strings Package . . . . . . . . . . . . . . . . . . . . . . . 369, 指導教員 : 程京德, text, application/pdf}, school = {埼玉大学}, title = {A Software Engineering Environment for Ada 2012 Programs}, year = {2017}, yomi = {オウ, ハク} }