A Formal Component-Based Software Engineering Approach for Developing Trustworthy Systems
Total Page:16
File Type:pdf, Size:1020Kb
A FORMAL COMPONENT-BASED SOFTWARE ENGINEERING APPROACH FOR DEVELOPING TRUSTWORTHY SYSTEMS MUBARAK SAMI MOHAMMAD A THESIS IN THE DEPARTMENT OF COMPUTER SCIENCE AND SOFTWARE ENGINEERING PRESENTED IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FOR THE DEGREE OF DOCTOR OF PHILOSOPHY (COMPUTER SCIENCE) CONCORDIA UNIVERSITY MONTREAL´ ,QUEBEC´ ,CANADA APRIL 2009 °c MUBARAK SAMI MOHAMMAD, 2009 CONCORDIA UNIVERSITY School of Graduate Studies This is to certify that the thesis prepared By: Mr. Mubarak Sami Mohammad Entitled: A Formal Component-Based Software Engineering Approach for Developing Trustworthy Systems and submitted in partial fulfillment of the requirements for the degree of Doctor of Philosophy (Computer Science) (Computer Science) complies with the regulations of this University and meets the accepted standards with re- spect to originality and quality. Signed by the final examining committee: Chair Dr. External Examiner Dr. Nicholas Graham External to Program Dr. Jamal Bentahar Examiner Dr. Joey Paquet Examiner Dr. Juergen Rilling Supervisor Dr. Vasu Alagar Co-supervisor Dr. Olga Ormandjieva Approved Chair of Department or Graduate Program Director 20 Dr. Robin A.L. Drew, Dean Faculty of Engineering and Computer Science Abstract A Formal Component-Based Software Engineering Approach for Developing Trustworthy Systems Mubarak Sami Mohammad, Ph.D. Concordia University, 2009 Software systems are increasingly becoming ubiquitous, affecting the way we experience the world. Embedded software systems, especially those used in smart devices, have be- come an essential constituent of the technological infrastructure of modern societies. Such systems, in order to be trusted in society, must be proved to be trustworthy. Trustworthiness is a composite non-functional property that implies safety, timeliness, security, availability, and reliability. This thesis is a contribution to a rigorous development of systems in which trustworthiness property can be specified and formally verified. Developing trustworthy software systems that are complex and used by a large het- erogenous population of users is a challenging task. The component-based software en- gineering (CBSE) paradigm can provide an effective solution to address these challenges. However, none of the current component-based approaches can be used as is, because all of them lack the essential requirements for constructing trustworthy systems. The three con- tributions made in this thesis are intended to add to the expressive power needed to raise CBSE practices to a rigorous level for constructing formally verifiable trustworthy systems. The first contribution of the thesis is a formal definition of the trustworthy compo- nent model. The trustworthiness quality attributes are introduced as first class structural elements. The behavior of a component is automatically generated as an extended timed automata. A model checking technique is used to verify the properties of trustworthiness. A composition theory that preserves the properties of trustworthiness in a composition is presented. Conventional software engineering development processes are not suitable either for developing component-based systems or for developing trustworthy systems. In order to develop a component-based trustworthy system, the development process must be reuse- oriented, component-oriented, and must integrate formal languages and rigorous methods iii in all phases of system life-cycle. The second contribution of the thesis is a software engi- neering process model that consists of several parallel tracks of activities including compo- nent development, component assessment, component reuse, and component-based system development. The central concern in all activities of this process is ensuring trustworthi- ness. The third and final contribution of the thesis is a development framework with a com- prehensive set of tools supporting the spectrum of formal development activity from mod- eling to deployment. The proposed approach has been applied to several case studies in the domains of component-based development and safety-critical systems. The experience from the case studies confirms that the approach is suitable for developing large and complex trustworthy systems. iv To Allah, He who nurtured me and taught me all that which I know. v Acknowledgments When I met Professor Vasu Alagar for the first time five years ago, I had no knowledge about scientific research. He taught me the alphabet of research, and throughout the past years he taught me how to be a good researcher not only by words but also by the quality of work, thoughts, and the discussions that he provides. He worked very hard, even at times work extends to early hours of the morning where he reviews my articles and gives advices and guidance. I’m profoundly thankful and grateful for his teachings. Although my work is positioned humbly in front of his teachings, it gives glimpses of what I learned from him. He has a great personality that kept me attracted to him. His spirituality, sincerity, quality of work, and alignment to the Truth are only a few traits, among so many others, that I admire a lot in him. I feel very fortunate for being his student and working under his supervision. Also, I would like to thank my co-supervisor Dr. Olga Ormandjieva for her continuous support throughout the work of my Masters and PhD. Finally, I would like to acknowledge with love the great emotional and spiritual support of my parents, my brothers, and my sisters. Although I lived most of my life away from them, they have been always in my heart and near my soul. I’m deeply grateful for their love and prayers. vi Contents List of Figures xi List of Tables xiii 1 Introduction 1 1.1 Trustworthiness . 2 1.2 Component-Based Software Engineering (CBSE) . 5 1.2.1 Component Model . 5 1.2.2 Component-based Development Process Model . 6 1.3 Research Motivation . 6 1.3.1 Analyzing Component Models . 7 1.3.2 Analyzing Component-Based Development Process Models . 7 1.3.3 Evaluation . 8 1.4 Thesis Goals . 8 1.5 Thesis Outline . 9 2 Literature Survey 11 2.1 Component Models . 12 2.1.1 Koala . 12 2.1.2 PIN . 13 2.1.3 PECOS . 14 2.1.4 KobrA . 16 2.1.5 Fractal . 16 2.1.6 SOFA 2.0 . 18 2.1.7 SaveCCM . 20 2.2 Analyzing Current Component Models . 22 vii 2.2.1 Comparison . 22 2.2.2 Services . 24 2.2.3 Component Contract . 24 2.2.4 Encapsulation and Composition Theory . 27 2.3 ADL Related Work . 28 2.3.1 Acme . 28 2.3.2 Secure-xADL . 29 2.3.3 AADL . 29 2.4 Specifying Trustworthiness Properties . 30 2.4.1 Combining Safety and Security Properties . 31 2.4.2 Reliability . 32 2.5 Process Models for Component-based Development . 32 2.5.1 Discussion . 34 2.6 Summary . 37 3 Research Methodology 39 3.1 Research Objectives . 39 3.2 Research Methodology . 39 3.2.1 Phase 1: Defining A Formal Component Model for Trustworthy Systems . 40 3.2.2 Phase 2: Defining A Process Model for Developing Trustworthy Component-Based Systems . 45 3.2.3 Phase 3: Developing a framework with comprehensive tool support 46 3.3 Summary . 48 4 Trustworthy Component Model 49 4.1 Event and Data Parameters . 49 4.2 Services and Contracts . 52 4.3 Component Architecture . 57 4.4 Security Mechanism . 64 4.5 Behavior . 70 4.6 System Definition . 72 4.7 Composition . 73 4.8 Summary . 78 viii 5 TADL: Trustworthy Architecture Description Language 80 5.1 Meta-Architecture . 80 5.2 TADL . 82 5.2.1 Event and data parameter . 83 5.2.2 Contract . 84 5.2.3 Component architecture . 85 5.2.4 Security mechanism . 88 5.2.5 System definition . 88 5.3 Summary . 90 6 Model Transformation and Formal Verification 94 6.1 Verifying Safety and Security . 95 6.1.1 UPPAAL . 95 6.1.2 Transformation Rules . 96 6.1.3 Example . 100 6.1.4 Preserving the requirements of safety and security . 101 6.2 Real-Time Analysis . 105 6.3 TADL Semantics . 106 6.4 Summary . 107 7 Reliability and Availability 108 7.1 Service Failures and Repairs . 108 7.2 Defining Reliability and Availability . 110 7.3 Verifying Reliability and Availability . 111 7.4 Steam Boiler Controller Case Study . 112 7.4.1 System specification . 112 7.4.2 System operation . 113 7.4.3 Failure and repair operations . 113 7.5 Summary . 118 8 Process Model for Developing Trustworthy Systems 119 8.1 Domain Engineering . 119 8.2 Component Development . 128 8.3 Component Assessment . 129 8.4 Component Reuse . 130 ix 8.5 System Development . 131 8.6 Traceability . 133 8.7 Certification . 134 8.8 Automated Component Testing . 135 8.9 Run-Time Monitoring . 136 8.10 Accomplishments . 136 9 Framework Architecture 138 9.1 Design-Time Tools . 138 9.1.1 Visual modeling tool . 138 9.1.2 Compiler and model transformation . 139 9.1.3 Transformation analysis . ..