This book introduces SpecDB, an intelligent database created to represent and host software specifications in a machine-readable format, based on the principles of artificial intelligence and unit testing database operations. SpecDB is demonstrated via two automated intelligent tools. The first automatically generates database constraints from a rule-base in SpecDB. The second is a reverse engineering tool that logs the actual execution of the program from the code.
Author(s): Rana Rarid Mikhail, Donald Berndt, Abraham Kandel
Series: Series in Machine Perception and Artifical Intelligence
Publisher: World Scientific Publishing Company
Year: 2010
Language: English
Pages: 210
Preface......Page 8
Contents......Page 12
Acknowledgments......Page 10
1.1 The Need for Testing .......Page 16
1.2 Why Does Software have Errors?......Page 17
1.3.2 Software Testing......Page 18
1.4 When Should Testing Start in the Software Lifecycle?......Page 20
1.5 Types of Testing Techniques......Page 21
1.6 UML......Page 22
1.8.1 Types of Automated Testing Tools......Page 23
1.8.2.2 Oracle Designer......Page 24
1.8.3 Automated Testing Tools......Page 25
1.8.4 Disadvantage of Record and Playback Test Au- tomation Tools .......Page 27
1.9 Related Literature......Page 28
1.9.2 Executable Software Specifications......Page 29
1.10 Objectives of this Book......Page 30
2.1 Introduction......Page 36
2.2 The Advantages of a Database Representation of Specifications......Page 37
2.3 The Specification Database Design: SpecDB......Page 38
2.4.1 Operator and Valid Operands......Page 39
2.4.2 List of Tables and Table Descriptions......Page 43
2.4.3.1 List of Valid Values (LOV)......Page 44
2.4.3.2 Other Restrictions......Page 45
2.4.4 Variables and Restrictions on Variable Values......Page 47
2.4.5 Procedure, Function, and Subroutine Descriptions......Page 51
2.4.6 Subroutine Parameters and Post-Conditions......Page 53
2.4.7 Dataow, Triggers and Input/Output Definitions......Page 57
2.4.8 Assignment and Calculation......Page 60
2.4.9 Predicate......Page 63
2.4.10 Database Operations......Page 65
2.4.11 Classes, Objects and Class Relations......Page 69
2.5 Conclusion......Page 70
2.5.1 Other SpecDB Entities......Page 72
3.1 A Translation Algorithm from Formal Speci cations to SpecDB......Page 78
3.2 Assumptions and Restrictions......Page 79
3.4.1 Defining Schema Names and Operations......Page 80
3.4.2 Types of Schemas......Page 81
3.4.4 Specifying Values for a User-Defined Type......Page 82
3.4.5 Defining Sets or Tables......Page 83
3.4.7 Subroutine Input Restriction......Page 84
3.4.8 Variable Definition and Subroutine Inputs......Page 85
3.4.9 Output Definition......Page 86
3.4.10 Setting Variable Restrictions......Page 87
3.4.11 Assignment Operation......Page 88
3.4.12 Assignment Operation and Function Call......Page 89
3.4.13 Assignment Operation for Sets......Page 90
3.4.15 Inserting Records in the Database......Page 91
3.4.16 Output Table De nition......Page 92
3.4.17 Assigning a Variable to a Calculation......Page 93
3.4.18 Constraining the Values Populating a Table or Set......Page 94
3.5 Conclusion......Page 96
4. An Automated Constraint Generator......Page 98
4.1 The Design of Additional Tables in SpecDB......Page 99
4.1.1 Using List of Tables and Table Description......Page 100
4.1.2 Adding the Constraints Table to SpecDB and Us- ing the Predicate Table......Page 102
4.1.3.1 Representing List of Values (LOV) Restrictions......Page 105
4.2.1 Generating Simple Static Constraints: The Algo- rithm......Page 106
4.2.2 Enforcing Complex Dynamic Business Rules......Page 110
4.2.2.1 Complex Business Rules Generation Algorithm......Page 111
4.3 Conclusion......Page 112
5. A Reverse Engineering Testing Tool......Page 114
5.1 Technique......Page 115
5.1.1 Input and Pre-Condition Classification and Cate- gorization......Page 116
5.1.1.1 Examples of Inputs from the Database Displayed by the RE Testing Tool......Page 118
5.1.2 Output and Post-Condition Classi cation and Categorization......Page 119
5.2 Case Study......Page 121
5.2.2 Implementation......Page 122
5.2.4 DD-Path Graph for the Salesman Commission Problem......Page 125
5.3 Examples......Page 126
5.3.1.1 Scenario......Page 128
5.3.1.4 The RE Tool Display of the Inputs for Test Case 1......Page 129
5.3.1.5 Process and Actual Output......Page 130
5.3.1.6 Comparing Expected to Actual Output......Page 131
5.3.2.1 Process and Actual Output......Page 135
5.3.3 Test Case 3......Page 137
5.4 Conclusion......Page 139
6.1 Using the SpecDB Database to Expand the Testing Domain......Page 140
6.2 Enhancing State Validation Tools......Page 143
6.4 Testing Different Operation Types......Page 144
6.5 Conclusion......Page 145
7.1 A Comparison Between Testing Tools......Page 146
7.1.1.3 Test Case 3......Page 147
7.1.1.5 Test Case 5......Page 148
7.1.2 Comparing the Ability of Testing Tools to Identify Errors......Page 149
7.2 Book Concepts at a Glance......Page 150
7.3 Conclusion and Recommendations......Page 151
7.4 Future Work at a Glance......Page 153
Appendix A SQL Scripts for SpecDB Constraints......Page 158
Appendix B PL/SQL Constraint Generator Code......Page 188
Bibliography......Page 200
Index......Page 208