notes…instruct.uwo.ca/engin-sc/se352b/notes/hg-se352lect-w01...se352-w03 19-jan-06 (c) hamada...
TRANSCRIPT
SE352-W03 19-Jan-06
(c) Hamada Ghenniwa, ECE, UWO 1
Fri., Jan. 20, 2006 SE352b, ECE,UWO, Hamada Ghenniwa 1
SE352b Software Engineering SE352b Software Engineering Design ToolsDesign Tools
W1: Software Engineering Tools Environment
Fri., Jan. 20, 2006 SE352b, ECE,UWO, Hamada Ghenniwa 2
Notes…Notes…
SE352b Web page:http://instruct.uwo.ca/engin-sc/se352b/
SE352-W03 19-Jan-06
(c) Hamada Ghenniwa, ECE, UWO 2
Fri., Jan. 20, 2006 SE352b, ECE,UWO, Hamada Ghenniwa 3
SE352b: RoadmapSE352b: Roadmap
CASE Tools: Introduction
System Programming Tools
Programming Paradigms
Database Technology
Middleware and Connectivity Tools
Web Development Tools
Software Tools: Special Topics
Fri., Jan. 20, 2006 SE352b, ECE,UWO, Hamada Ghenniwa 4
ReferencesReferencesSoftware Engineering: A Practitioner's Approach, 6th Ed, Roger Pressman, McGraw-Hill, 2005
SE352-W03 19-Jan-06
(c) Hamada Ghenniwa, ECE, UWO 3
Fri., Jan. 20, 2006 SE352b, ECE,UWO, Hamada Ghenniwa 5
Software Engineering EnvironmentSoftware Engineering Environment
a “Quality” Focus
Process Model
Methods
Tools
A Layered Approach
a “Quality” Focus
Process Model
Methods
Tools
SE352 FocusSE352 Focus
Fri., Jan. 20, 2006 SE352b, ECE,UWO, Hamada Ghenniwa 6
ComputerComputer--Aided Software Engineering (CASE)Aided Software Engineering (CASE)
A software to support software development and evolution processes
Activity automationGraphical editors for system model development
Graphical UI builder for user interface construction
Data dictionary to manage design entities
Debuggers to support program fault finding
Automated translators to generate new versions of a program
SE352-W03 19-Jan-06
(c) Hamada Ghenniwa, ECE, UWO 4
Fri., Jan. 20, 2006 SE352b, ECE,UWO, Hamada Ghenniwa 7
Why Tools!Why Tools!Sometimes, tools are strictly necessary to support SE activity
e.g., programming languages and their compilers/interpreters
Other times, tools just help in making some jobs easier or more efficiente.g., design and text editors
The more complex the software development becamethe more tools were developed to support it and the more sophisticatedthose tools became
integrating these tools becomes an important issueConsider debugging, editing (remove errors), re-compiling, and re-linking programs
Fri., Jan. 20, 2006 SE352b, ECE,UWO, Hamada Ghenniwa 8
Automated Process SupportAutomated Process Support... the tools address each important step in the software engineering process ...
... the tools
increase insight thereby improving quality
reduce labor-work, thereby improving productivity, and
enhance control, thereby leading to on-time projects ...
SE352-W03 19-Jan-06
(c) Hamada Ghenniwa, ECE, UWO 5
COCOMO:COCOMO:Multiplier Effect of Multiplier Effect of Using Software ToolsUsing Software Tools
0
0.2
0.4
0.6
0.8
1
1.2
1.4
1.6
1 2 3 4Requirements andArchitecture design
Detaileddesign
Code andunit test
Integrationand test
Effo
rt m
ult
iplie
rVery low
LowLow
Nominal
High
Very highVery high
Fri., Jan. 20, 2006 SE352b, ECE,UWO, Hamada Ghenniwa 10
CASE Technology:CASE Technology:Not a Silver BulletNot a Silver Bullet
CASE technology
has led to significant improvements in the software process
HoweverHoweverSoftware engineering require
creative thought
this is not readily automatable
team activity
for large projects, much time is spent in team interactions
CASE technology does not (to some extend) guarantee them!
SE352-W03 19-Jan-06
(c) Hamada Ghenniwa, ECE, UWO 6
Fri., Jan. 20, 2006 SE352b, ECE,UWO, Hamada Ghenniwa 11
CASE ClassificationCASE Classification
To help understand the different types of CASE tools
their support for process activities
Several ClassificationsFunctional perspective
Tools are classified according to their specific function
Process perspectiveTools are classified according to process activities that are supported
Integration perspectiveTools are classified according to their organization into integrated units
Fri., Jan. 20, 2006 SE352b, ECE,UWO, Hamada Ghenniwa 12
Functional Tool Classification: ExamplesFunctional Tool Classification: ExamplesTool type ExamplesPlanning tools PERT tools, estimation tools,
spreadsheetsEditing tools Text editors, diagram editors, word
processorsChange management tools Requirements traceability tools, change
control systemsConfiguration management tools Version management systems, system
building toolsPrototyping tools Very high-level languages,
user interface generatorsMethod-support tools Design editors, data dictionaries, code
generatorsLanguage-processing tools Compilers, interpretersProgram analysis tools Cross reference generators, static
analysers, dynamic analysersTesting tools Test data generators, file comparatorsDebugging tools Interactive debugging systemsDocumentation tools Page layout programs, image editorsRe-engineering tools Cross-reference systems, program re-
structuring systems
SE352-W03 19-Jan-06
(c) Hamada Ghenniwa, ECE, UWO 7
Fri., Jan. 20, 2006 SE352b, ECE,UWO, Hamada Ghenniwa 13
Process-based Classification
Reengineering tools
Testing tools
Debugging tools
Program analysis tools
Language-processingtools
Method support tools
Prototyping tools
Configurationmanagement tools
Change management tools
Documentation tools
Editing tools
Planning tools
Specification Design Implementation Verificationand
Validation
Fri., Jan. 20, 2006 SE352b, ECE,UWO, Hamada Ghenniwa 14
CASE IntegrationCASE Integration
ToolsSupport individual process tasks
e.g., design consistency checking, text editing, etc.
WorkbenchesSupport a process phase
specification or design, normally include a number of integrated tools
EnvironmentsSupport all or a substantial part of an entire software process
Normally include several integrated workbenches
SE352-W03 19-Jan-06
(c) Hamada Ghenniwa, ECE, UWO 8
Fri., Jan. 20, 2006 SE352b, ECE,UWO, Hamada Ghenniwa 15
Tools, Workbenches, Environments: ExamplesTools, Workbenches, Environments: Examples
Single-methodworkbenches
General-purposeworkbenches
Multi-methodworkbenches
Language-specificworkbenches
Programming TestingAnalysis anddesign
Integratedenvironments
Process-centredenvironments
FilecomparatorsCompilersEditors
EnvironmentsWorkbenchesTools
CASEtechnology
Fri., Jan. 20, 2006 SE352b, ECE,UWO, Hamada Ghenniwa 16
More ClassificationsMore Classifications
Development tools vs. end-product toolsSupport the developmentbut don’t become part of the product
e.g., project management tools, debugger, etc.become part of the product
e.g., window managers, which provides run-time lib For HCI
Environment/Language dependencyStatic vs. Dynamic toolsVendor
SE352-W03 19-Jan-06
(c) Hamada Ghenniwa, ECE, UWO 9
Fri., Jan. 20, 2006 SE352b, ECE,UWO, Hamada Ghenniwa 17
Integrated CASE EnvironmentIntegrated CASE Environment
... “Ideally”, CASE combines a set of software development tools that are integrated with a database
to form an II--CASECASE environment...
Fri., Jan. 20, 2006 SE352b, ECE,UWO, Hamada Ghenniwa 18
CASE Environment ModelCASE Environment Model(Pressman)(Pressman)
The ChallengePutting them Together
CASE ToolsCASE Tools
CASE ToolsCASE Tools
Integration FrameworkIntegration Framework
Portability ServicesPortability Services
Hardware Platform
Operating System
Environment Architecture
SE352-W03 19-Jan-06
(c) Hamada Ghenniwa, ECE, UWO 10
Fri., Jan. 20, 2006 SE352b, ECE,UWO, Hamada Ghenniwa 19
An Integration FrameworkAn Integration Framework
Tools Management ServicesTools Management Services
CASEtool
Object Management LayerObject Management Layerintegration servicesconfiguration management services
Shared Repository LayerShared Repository LayerCASE databaseaccess control functions
Tools LayerTools Layer
Use
r Int
erfa
c e L
ayer
Use
r Int
erfa
c e L
ayer
inte
r face
tool
kit
pres
enta
tion
prot
ocol
Fri., Jan. 20, 2006 SE352b, ECE,UWO, Hamada Ghenniwa 20
An Integration FrameworkAn Integration Framework(Cont.)(Cont.)
CASE tools
Tools layertools management services - control behavior of tools inside environment
Object management layer (OML)performs the configuration management function, working with the CASE repository OML provides integration services
Shared repository layerCASE database and access control functions enabling the OML to interact with the database
User interface layercontains software for UI management and library of display objects common presentation protocol - guidelines that give all CASE tools the same look and feel (icons, mouse behavior, menu names, object names)
SE352-W03 19-Jan-06
(c) Hamada Ghenniwa, ECE, UWO 11
Fri., Jan. 20, 2006 SE352b, ECE,UWO, Hamada Ghenniwa 21
The Ideal IThe Ideal I--CASE Environment CASE Environment business systems planning
project management
support
integration &testing
re–engineering
prototyping/simulation toolsCASE
Databaseprogramming
framework
analysis and design
Fri., Jan. 20, 2006 SE352b, ECE,UWO, Hamada Ghenniwa 22
SE352b: RoadmapSE352b: Roadmap
CASE Tools: Introduction
System Programming Tools
Programming Paradigms
Database Technology
Middleware and Connectivity Tools
Web Development Tools
Software Tools: Special Topics
SE352-W03 19-Jan-06
(c) Hamada Ghenniwa, ECE, UWO 12
Fri., Jan. 20, 2006 SE352b, ECE,UWO, Hamada Ghenniwa 23
The SE352 StoryThe SE352 Story
Systems ProgrammingTools
Fri., Jan. 20, 2006 SE352b, ECE,UWO, Hamada Ghenniwa 24
Systems ProgramsSystems Programs
software that is usually supplied with the computer hardware to facilitate the process of software development on the supplied hardware
usually machine dependentin an integrated hardware-software environment
SE352-W03 19-Jan-06
(c) Hamada Ghenniwa, ECE, UWO 13
Fri., Jan. 20, 2006 SE352b, ECE,UWO, Hamada Ghenniwa 25
Executable BinaryCode
TranslatorsTranslators
a systems program that translates a symbolic source program into a target machine program
Source Procedure A
Source Procedure B
Source Procedure C
TranslatoTranslator
Interpreter: It simultaneously translates translates and executesand executes a symbolic source machine program
Compiler: It translates a high-level symbolic program in text format into rere--locatablelocatable object object format
ObjectModule A
ObjectModule C
ObjectModule B
Fri., Jan. 20, 2006 SE352b, ECE,UWO, Hamada Ghenniwa 26
Object Module: StructureObject Module: Structure1. contains the name of the module, other linking
informatione.g., the lengths of the various parts of the module, and sometimes the assembly date
2. a list of the symbols (and their values) defined in the module that other modules may reference
3. contains a list of the symbols that are used in the module and defined in other modules,
along with a list of which machine instructions use which symbols
End of module
Identification
Entry point table
Relocation Dictionary
Machine instructionsAnd constants
External Reference table
SE352-W03 19-Jan-06
(c) Hamada Ghenniwa, ECE, UWO 14
Fri., Jan. 20, 2006 SE352b, ECE,UWO, Hamada Ghenniwa 27
Object Module: StructureObject Module: Structure
4. Contains the assembled code and constantsthe only part to be loaded into memory and executed
5. the relocation dictionary
6. an end-of-module indicationsometimes a checksum to catch errors
End of module
Identification
Entry point table
Relocation Dictionary
Machine instructions
And constants
External Reference table
Fri., Jan. 20, 2006 SE352b, ECE,UWO, Hamada Ghenniwa 28
Linker & LoaderLinker & Loader
Source Procedure A
Source Procedure B
Source Procedure C
TranslatoTranslator
ObjectModule A
ObjectModule C
ObjectModule B
Linker &Linker &LoaderLoader
ExecutableBinaryCode
CALL B
MOVE P TO X
BRANCH TO 200
Object module A
CALL D
MOVE R TO X
Object module C
BRANCH TO 200
SE352-W03 19-Jan-06
(c) Hamada Ghenniwa, ECE, UWO 15
Fri., Jan. 20, 2006 SE352b, ECE,UWO, Hamada Ghenniwa 29
Linker & LoaderLinker & Loader
The linker’s function To collects modules translated separately and glue them together to run as a unit called an executable binary program
On MSMS--DOS, Windows and NTDOS, Windows and NTobject modules have extension .obj
the executable binary programs have extension .exe
On UNIXUNIX, object modules have extension .o
executable binary programs have no extension
Fri., Jan. 20, 2006 SE352b, ECE,UWO, Hamada Ghenniwa 30
The Computation Machine: The Computation Machine: Von Neumann ModelVon Neumann Model
PrimaryMemoryI/O Devices
CPU
SecondaryMemory
PrimaryMemoryI/O Devices
CPU
SecondaryMemory
SE352-W03 19-Jan-06
(c) Hamada Ghenniwa, ECE, UWO 16
Fri., Jan. 20, 2006 SE352b, ECE,UWO, Hamada Ghenniwa 31
CPU
Inside the CPU: GenericInside the CPU: Generic
0100
264
MOVE P TO XBRANCH TO 200
PrimaryMemory
PC
ExecutionUnit
Register Set
R0
R15
Clock
Clock Ticks
CPU
Data
Address
Fri., Jan. 20, 2006 SE352b, ECE,UWO, Hamada Ghenniwa 32
Linking & Loading : TasksLinking & Loading : TasksAt the start of pass one of the process,
the instruction location counter is set to 0. This assumes that the object module will be located at (virtual) address 0 during execution
Source Procedure A
Source Procedure B
Source Procedure C
Translator
ObjectModule A
ObjectModule C
ObjectModule B
CALL B
MOVE P TO X
BRANCH TO 200
Object module A400
300
200
100
0
CALL D
MOVE R TO X
Object module C
BRANCH TO 200
500
400
300
200
100
0
SE352-W03 19-Jan-06
(c) Hamada Ghenniwa, ECE, UWO 17
Fri., Jan. 20, 2006 SE352b, ECE,UWO, Hamada Ghenniwa 33
Linking & Loading: TasksLinking & Loading: Tasks
To run the program, The loader brings the object modules into main memory
to form the image of the executable binary programIf there is not enough memory to form the image, a disk file can be used
The objective is tomake an exact image of the executable program’s virtual address space inside the linker
position all the object modules at their correct locations
Fri., Jan. 20, 2006 SE352b, ECE,UWO, Hamada Ghenniwa 34
ExampleExample
600
500
400
300
200
100
0
CALL C
MOVE Q TO X
BRANCH TO 300
Object module B
MOVE S TO X
BRANCH TO 200
300
200
100
0
Object module D1900
1800
1700
1600
1500
1400
1300
1200
1100
1000
900
800
700600
500
400
300
200
100
CALL B
MOVE P TO X
BRANCH TO 200
Object module A400
300
200
100
0
CALL D
MOVE R TO X
Object module C
BRANCH TO 200
500
400
300
200
100
0
Although the program is loaded into the image of the executable binary file, it is not yet ready for execution
ObjectModule D
ObjectModule C
ObjectModule B
ObjectModule A
1900
MOVES S TO X
BRANCH TO 200
CALL D
MOVE R TO X
BRANCH TO 200
CALL C
MOVE Q TO X
BRANCH TO 300
CALL B
MOVE P TO X
BRANCH TO 200
1800
1700
1600
1500
1400
1300
1200
1100
1000
900
800
700600
500
400
300
200
100
2. Symbolic Resolution
1. Relocation Problem
SE352-W03 19-Jan-06
(c) Hamada Ghenniwa, ECE, UWO 18
Fri., Jan. 20, 2006 SE352b, ECE,UWO, Hamada Ghenniwa 35
1. Relocation Problem1. Relocation Problem
Consider the execution begins with the instruction at the beginning of module A
BRANCH TO 200
The program would not branch to the intended instructionbecause MOVE P TO X is now at address 300
All memory reference instructions will fail for the same reason
This relocation problem occurs because each generated object module represents aseparate address space, starts at 0
Fri., Jan. 20, 2006 SE352b, ECE,UWO, Hamada Ghenniwa 36
2. Symbol Resolution Problem2. Symbol Resolution Problem
In the example, the procedure call instruction, CALL B at address 400 will not work
Because each module is translated by itself
the translator doesn’t know what address to insert into the CALL Bthe address of object module B is not known until linking time
This is requires symbol resolutionor resolving the external reference problem!
SE352-W03 19-Jan-06
(c) Hamada Ghenniwa, ECE, UWO 19
Fri., Jan. 20, 2006 SE352b, ECE,UWO, Hamada Ghenniwa 37
Relocation MechanismsRelocation Mechanisms
On a machine with a segmented address spacesuch as Pentium IIPentium II,
theoretically each object module could have its own address spaceby being placed in its own segment
However, OS/2OS/2 is the only operating system for the Pentium IIPentium II that supports this concept
most OS, including Windows Windows and UNIX, UNIX, support only one linearaddress space
all the object modules must be merged into a single address space
Fri., Jan. 20, 2006 SE352b, ECE,UWO, Hamada Ghenniwa 38
Linking: Steps Linking: Steps (rough)(rough)
Linkers can be used to solve both
relocation and symbolic resolution problems
The linker merges the separate address spaces of the object modules into a single linear address space in the following steps:1. constructs a table of all the object modules and their lengths
2. Based on this table, it assigns a starting address to each object module
3. finds all the instructions that reference memory (relocation problem)a. adds to each a relocation constant equal to the starting address of its module
4. finds all the instructions that reference other modules (resolution problem)a. inserts the address of these procedures in place.
ModuleModuleABC D
LengthLength400600500300
Starting AddressStarting Address10050011001600
SE352-W03 19-Jan-06
(c) Hamada Ghenniwa, ECE, UWO 20
Fri., Jan. 20, 2006 SE352b, ECE,UWO, Hamada Ghenniwa 39
0
1900MOVES S TO X
BRANCH TO 200
CALL D
MOVE R TO X
BRANCH TO 200
CALL C
MOVE Q TO X
BRANCH TO 300
CALL B
MOVE P TO X
BRANCH TO 200
1800
1700
1600
1500
1400
1300
1200
1100
1000
900800
700600
500
400
300
200
100
ObjectModule D
ObjectModule C
ObjectModule B
ObjectModule A
Address space of the program after the linker has performed 1- 4 steps.
MOVES S TO X
BRANCH TO 1800
CALL 1600
MOVE R TO X
BRANCH TO1300
CALL 1100
MOVE Q TO X
BRANCH TO 800
CALL 500
MOVE P TO X
BRANCH TO 300
1800
1700
1600
1500
1400
1300
1200
1100
1000
900
800
700600
500
400
300
200
100
0
ObjectModule D
ObjectModule C
ObjectModule B
ObjectModule A
Linker:1-4
1900
Fri., Jan. 20, 2006 SE352b, ECE,UWO, Hamada Ghenniwa 40
SE352b: RoadmapSE352b: Roadmap
CASE Tools: Introduction
System Programming Tools
Programming Paradigms
Database Technology
Middleware and Connectivity Tools
Web Development Tools
Software Tools: Special Topics