ebook img

Safe and Secure Software - An Invitation to Ada 2012 PDF

160 Pages·2013·3.44 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Safe and Secure Software - An Invitation to Ada 2012

John Barnes Ben Brosgol With contributions by Safe and Secure Software An invitation to Courtesy of © 2013 AdaCore www.adacore.com First printed 2008. Reprinted with revisions 2009, 2013. V.20130212 Foreword The aim of this booklet is to show how the study of Ada in general, and the features introduced by Ada 2005 and Ada 2012 in particular, can help anyone designing safe and secure software regardless of the programming language in which the software is eventually written. After all, successful implementers of safe and secure software write in the spirit of Ada in any language! Thank you John for showing this throughout your papers, Ada rationales, books, and this booklet. AdaCore dedicates this booklet to the memory of Dr. Jean Ichbiah (1940- 2007), the principal designer of the original Ada language, who established the safe and secure foundations on which succeeding versions of the language have built. Franco Gasperoni Chief Executive Officer, AdaCore Paris, January 2013 iii Preface This revised version of the “Safe and Secure Software” booklet updates the content to take into account the important new facilities introduced in Ada 2012 which include support for contract-based programming. Ada 2012 marks the most significant advance in Ada since 1995 and is especially relevant for software that needs to meet safety and/or security certification standards. I am very grateful for the assistance of Ben Brosgol of AdaCore in the preparation of the new content in this version of the booklet. Not only did Ben draft the new sections but he also ironed out several vague, misleading or plain incorrect bits in the original, and moreover has added a comprehensive index which I am sure will be of great value to all readers. John Barnes Caversham, England January 2013 v Contents Introduction 1 1 Safe Syntax 5 Equality and assignment 5 Statement groups 7 Named notation 8 Integer literals 10 2 Safe Typing 11 Using distinct types 11 Enumerations and integers 13 Constraints and subtypes 15 Subtype predicates 16 Arrays and constraints 18 Default initialization 20 Real errors 22 3 Safe Pointers 25 References, pointers and addresses 25 Access types and strong typing 27 Access types and accessibility 29 References to subprograms 30 Nested subprograms as parameters 33 4 Safe Architecture 37 Package specifications and bodies 37 Private types 41 Generic contract model 43 Child units 45 Unit testing 46 Mutually dependent types 47 Contract-based programming 49 vii Safe and Secure Software: An invitation to Ada 2012 5 Safe Object-Oriented Programming 53 Object-Orientation versus Function-Orientation 53 Overriding indicators 58 Dispatchless programming 59 Interfaces and multiple inheritance 60 Substitutability 65 6 Safe Object Construction 69 Variables and constants 69 Constant and variable views 71 Constructor functions 72 Limited types 72 Controlled types 76 7 Safe Memory Management 81 Buffer overflow 81 Heap control 82 Storage pools 85 Restrictions 89 8 Safe Startup 91 Elaboration 91 Elaboration pragmas 93 Dynamic loading 95 9 Safe Communication 97 Representation of data 97 Validity of data 99 Communication with other languages 100 Streams 102 Object factories 104 v i i i Contents 10 Safe Concurrency 107 Operating systems and tasks 107 Protected objects 109 The rendezvous 114 Restrictions 117 Ravenscar 118 Safe shutdown 119 Timing and scheduling 124 11 Certified Safe with SPARK 127 Contracts 128 Correctness by construction 128 The kernel language 131 Tool support 132 Examples 134 Certification 136 Work in progress 136 Conclusion 137 Bibliography 141 Index 143 ix

Description:
features introduced by Ada 2005 and Ada 2012 in particular, can help anyone designing safe and secure software regardless of the programming language in.
See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.