02 CBSC4103 Toc

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Table of Contents

Course Guide ix–xiv

Topic Overview on Software Construction 1

1 1.1
1.2
Software Crisis
Software Development Life Cycle
2
5
1.2.1 Waterfall Model 6
1.2.2 Spiral Model 7
1.3 Phases in Software Development 8
1.4 Requirement Analysis and Specification 11
1.4.1 Characteristics of Specifications 12
1.4.2 Types of Specifications 14
1.4.3 The Structured Approach 17
Summary 20
Key Terms 20
References 20

Topic Tools for Software Construction 21

2 2.1 Basic Tools


2.1.1 Editor
22
23
2.1.2 Compiler 24
2.1.3 Debugger 25
2.1.4 Version Control 27
2.2 Integrated Development Environment 28
2.2.1 NetBeans 28
2.2.2 IntelliJ IDEA 29
2.2.3 Eclipse 29
2.3 Case Tools 30
2.4 Software Framework 34
2.4.1 Back-End Web Framework 34
2.4.2 Front-End Frameworks 35
2.4.3 Mobile Development Framework 35
2.5 Code Repository 36
Summary 38
Key Terms 38
References 39

Copyright © Open University Malaysia (OUM)


iv TABLE OF CONTENTS

Topic Programming Languages 40

3 3.1
3.2
Roles of Programming Languages
Introduction to C
41
42
3.2.1 Program Structure in C 43
3.2.2 Functions in C 43
3.2.3 Variable Declaration in C 44
3.2.4 Expressions in C 45
3.2.5 Pointers in C 46
3.3 Introduction to C++ 47
3.3.1 Program Structure in C++ 48
3.3.2 Elements in C++ 50
3.3.3 Inheritance in C++ 52
3.4 Introduction to Java 53
3.4.1 Special Characteristics of Java 54
3.4.2 Program Structure in Java 56
3.5 Introduction to Prolog 58
3.5.1 Program Structure in Prolog 59
3.5.2 Facts and Rules in Prolog 60
Summary 63
Key Terms 63
References 64

Topic Syntax and Semantics of Programming Language 65

4 4.1 Basics of Formal Language


4.1.1 Symbol, String and Alphabet
66
66
4.1.2 Operation on Formal Languages 68
4.2 Grammar 69
4.2.1 Back-Naur Form 70
4.2.2 Device for Generating Language 71
4.3 Regular Grammar 72
4.4 Semantics 73
4.4.1 Operational Semantics 74
4.4.2 Axiomatic Semantics 75
4.5 Regular Expressions and State Diagrams 76
4.5.1 Basic Regular Expression 76
4.5.2 State Diagrams 81
Summary 82
Key Terms 83
References 83

Copyright © Open University Malaysia (OUM)


TABLE OF CONTENTS v

Topic Concurrent Languages 84

5 5.1 Parallel Computers


5.1.1 Multi-core Computing
85
85
5.1.2 Distributed Memory Multiprocessor 86
5.1.3 Cluster Computing 87
5.1.4 Massively Parallel Computing 88
5.1.5 Grid Computing 88
5.1.6 Vector Processor 89
5.2 Dataflow Programming 90
5.2.1 Example of Dataflow Programming 91
5.2.2 Linda 92
5.2.3 Lucid 93
5.3 Distributed Programming Based on Distributed Shared 95
Memory
5.3.1 Mirage 96
5.3.2 Orca 96
5.4 Distributed Programming Based on Actor/Object Model 97
5.4.1 Emerald 98
5.4.2 Argus 98
5.4.3 Erlang 99
Summary 100
Key Terms 100
References 101

Topic Overview of a Compiler 102

6 6.1 The Analysis and Synthesis Model


6.1.1 Analysis Phase
103
105
6.1.2 Synthesis Phase 107
6.1.3 Symbol Table Management 107
6.1.4 Error Handling 107
6.2 The Grouping of Phases 108
6.2.1 Single Pass Compiler 108
6.2.2 Multi Pass Compiler 108
6.3 Supporting Tools 110
6.3.1 Preprocessors 111
6.3.2 Assemblers 112
6.3.3 Loaders and Linkers 112
6.4 Related Tools 113
Summary 115
Key Terms 116
Reference 116

Copyright © Open University Malaysia (OUM)


vi TABLE OF CONTENTS

Topic Lexical Analysis 117

7 7.1
7.2
Scanners
Tokens
118
120
7.3 More Regular Expressions and Transition Networks 124
7.3.1 More Regular Expressions 124
7.3.2 Algebraic Identities for Regular Expressions 126
7.3.3 Transition Networks 127
Summary 132
Key Terms 132
References 133

Topic Syntax Analysis 134

8 8.1 Context-Free Grammars


8.1.1 Definition of Context-Free Grammar
135
135
8.1.2 Language Generated by Grammar 136
8.1.3 Notational Conventions 138
8.1.4 Capabilities of Context-Free Grammar 139
8.2 Parse Trees 143
8.3 LL Parsing 145
8.3.1 Left-to-Right and Deterministic Parsing 146
8.3.2 Top-down Parsing 146
8.4 Ambiguous Grammar 148
8.4.1 Resolving Parsing Conflicts 149
Summary 151
Key Terms 151
References 151

Topic Tools for Generating Scanners and Parsers 152

9 9.1 Tools for Generating Scanners


9.1.1 An Overview of Lex
153
154
9.1.2 Lex Program Structure 155
9.1.3 Lex Usage 158
9.1.4 Flex 159
9.1.5 JLex 159
9.2 Tools for Generating Parsers 161
9.2.1 Overview of Yacc 162
9.2.2 Basic Specifications for Yacc 162
9.3 Other Tools 165
Summary 166
Key Terms 167
References 167

Copyright © Open University Malaysia (OUM)


TABLE OF CONTENTS vii

Topic Code Generation 168

10 10.1 Intermediate Code Generation


10.1.1 Syntax-directed Translation
169
170
10.1.2 Three-Address Code 173
10.1.3 Types of Three-Address Statements 173
10.1.4 Translation into Three-Address Code 175
10.1.5 Implementation of Three-Address Statement 177
10.2 Code Optimisation 178
10.3 Code Generation 179
10.3.1 Absolute Machine Code 179
10.3.2 Relocatable Machine Code 180
10.3.3 Assembly Language Code 180
10.4 Code Generator Generator 180
10.4.1 Graham and Glanville Code Generator 181
10.4.2 Davidson and Fraser Code Generator 181
10.4.3 TWIG 181
10.4.4 BURG 181
Summary 182
Key Terms 183
References 183

Copyright © Open University Malaysia (OUM)


viii TABLE OF CONTENTS

Copyright © Open University Malaysia (OUM)

You might also like