22
The Re-engineering The Re-engineering and Reuse of and Reuse of Software Software Patrick A.V. Hall and Patrick A.V. Hall and Lingzi Jin Lingzi Jin Vol 1, p.335-351 Vol 1, p.335-351 Presented by: Andrew Presented by: Andrew Wheeler Wheeler

The Re-engineering and Reuse of Software Patrick A.V. Hall and Lingzi Jin Vol 1, p.335-351 Presented by: Andrew Wheeler

Embed Size (px)

Citation preview

The Re-engineering The Re-engineering and Reuse of and Reuse of

SoftwareSoftware

Patrick A.V. Hall and Lingzi JinPatrick A.V. Hall and Lingzi Jin

Vol 1, p.335-351Vol 1, p.335-351

Presented by: Andrew Presented by: Andrew WheelerWheeler

OverviewOverview

DefinitionsDefinitions IntroductionIntroduction Historical BackgroundHistorical Background ImplementationsImplementations ChallengesChallenges ConclusionsConclusions

DefinitionsDefinitions Re-engineeringRe-engineering

– The combination of reverse engineering and The combination of reverse engineering and forward engineeringforward engineering

– The concept of “redoing” a software systemThe concept of “redoing” a software system ReuseReuse

– Using a given piece of software to solve more Using a given piece of software to solve more than one problemthan one problem

Reverse engineeringReverse engineering– The tools and methods used to understand The tools and methods used to understand

softwaresoftware– Figuring out a software system for potential Figuring out a software system for potential

redeploymentredeployment

IntroductionIntroduction

Software re-engineering and reuse Software re-engineering and reuse are concerned with maximizing are concerned with maximizing software usage for any given software usage for any given development effortdevelopment effort– Both are used to maximize profit and Both are used to maximize profit and

minimize turnaround timeminimize turnaround time Software re-engineering and reuse Software re-engineering and reuse

also help minimize staff also help minimize staff – The more code you can reuse the less The more code you can reuse the less

code you have to write and rewritecode you have to write and rewrite

Introduction (cont)Introduction (cont)

Reuse not only applies to using a Reuse not only applies to using a piece of software:piece of software:– Reuse designs and ideas thrown out Reuse designs and ideas thrown out

during design phaseduring design phase– May have use in other applicationsMay have use in other applications

Reverse engineering and reuse can Reverse engineering and reuse can help recover lost investmenthelp recover lost investment– Time has already been placed into Time has already been placed into

designing it the first time around.designing it the first time around.

Historical Background - Historical Background - ReuseReuse

Reuse dates back to sharing of Reuse dates back to sharing of algorithms through publicationsalgorithms through publications– Reuse of high level language and Reuse of high level language and

packagespackages– Textbook publicationsTextbook publications

Use of macros and similar assembly Use of macros and similar assembly instructionsinstructions– Subroutine entry and exitSubroutine entry and exit– For loops, if blocks, arithmeticFor loops, if blocks, arithmetic

Historical Background Historical Background – Reuse (cont)– Reuse (cont)

Reuse associated with flexibilityReuse associated with flexibility– ParameterizationParameterization– Build scriptsBuild scripts

Historical Background Historical Background - Re-engineering- Re-engineering

Flow-charting tools have been Flow-charting tools have been around for awhilearound for awhile– Now evolved into UML and sequence Now evolved into UML and sequence

diagramsdiagrams Cross reference listings of variablesCross reference listings of variables

– Helps understand large pieces of Helps understand large pieces of softwaresoftware

Originally designed to help maintain Originally designed to help maintain COBOL legacy systems around 1980sCOBOL legacy systems around 1980s

Implementations – ReuseImplementations – Reuse

Integration into lifecycleIntegration into lifecycle– Building phase to construct the reusable Building phase to construct the reusable

components into a librarycomponents into a library– Incorporating those reusable Incorporating those reusable

components into the building of a components into the building of a software systemsoftware system Time required to account for integration Time required to account for integration

issuesissues

Implementations – ReuseImplementations – ReuseComponent basedComponent based

Central to reuseCentral to reuse Design for “plug and play”Design for “plug and play” Which components comes from Which components comes from

domain analysisdomain analysis– File Input/Output component not needed File Input/Output component not needed

for a system that won’t write to diskfor a system that won’t write to disk

Implementations – ReuseImplementations – ReuseComponent basedComponent based

Give clear descriptions and classificationsGive clear descriptions and classifications Avoid over generalizationAvoid over generalization

– Map instead of treeMap instead of tree Object oriented programming lends itself Object oriented programming lends itself

to reuseto reuse– Objects are often in reusable component Objects are often in reusable component

formform– Inheritance provides contexts for reuseInheritance provides contexts for reuse

Sorted Map inherits from MapSorted Map inherits from Map Size or granularitySize or granularity

Implementations – ReuseImplementations – Reuse Reuse in designReuse in design

– Component or components could fulfill a Component or components could fulfill a requirement based on specificationsrequirement based on specifications

– If multiple components are used then If multiple components are used then requirements must be broken down furtherrequirements must be broken down further Logging utility = Time utility + Format utility + File Logging utility = Time utility + Format utility + File

utility + Process input utilityutility + Process input utility– Identification, evaluation, modification, and Identification, evaluation, modification, and

integrationintegration White-box reuseWhite-box reuse

– Reuse with simple modifications of codeReuse with simple modifications of code FrameworksFrameworks

Implementations – ReuseImplementations – Reuse

MIL – Module Interconnection MIL – Module Interconnection Languages – Prieto-Diaz, et. al (1986)Languages – Prieto-Diaz, et. al (1986)– Going beyond procedure calls in codeGoing beyond procedure calls in code– Helps in system building another higher Helps in system building another higher

languagelanguage Design with reuse involves Design with reuse involves

transforming the outputs of one transforming the outputs of one components to the inputs of anothercomponents to the inputs of another

Implementations – Re-Implementations – Re-engineeringengineering

Reverse engineering involves Reverse engineering involves abstracting the current system and abstracting the current system and revealing the nature of the systemrevealing the nature of the system– Describe the system to a non technical Describe the system to a non technical

personperson Documentation of class methods and Documentation of class methods and

members could be used during the members could be used during the processprocess– Outlining tools and sequence diagrams Outlining tools and sequence diagrams

have been in use for many decadeshave been in use for many decades

Implementations – Re-Implementations – Re-engineeringengineering

Use of formal transformationsUse of formal transformations– Gather details about an efficient Gather details about an efficient

algorithm that may be difficult to algorithm that may be difficult to understandunderstand

Use of wide spectrum language - WardUse of wide spectrum language - Ward– An interactive system to abstract details An interactive system to abstract details

of implementation into Z language and of implementation into Z language and implement Z language in code language implement Z language in code language of choiceof choice

Implementations – Re-Implementations – Re-engineeringengineering

Use of reverse engineering back to Use of reverse engineering back to specifications – Lano, et. alspecifications – Lano, et. al– Used to reverse engineer COBOL applicationsUsed to reverse engineer COBOL applications

Using good coding practices helps the re-Using good coding practices helps the re-engineering processengineering process– Self documenting codeSelf documenting code

Knowledge of higher level domain Knowledge of higher level domain concepts helps re-engineeringconcepts helps re-engineering– Knowing for what purpose the software system Knowing for what purpose the software system

was usedwas used

Implementations – Re-Implementations – Re-engineeringengineering

Using design patterns in codeUsing design patterns in code– Helps to know the purpose for a software Helps to know the purpose for a software

system and helps the forward process by system and helps the forward process by knowing how to build the systemknowing how to build the system

Object-oriented programming Object-oriented programming facilitates the reverse-engineering facilitates the reverse-engineering processprocess– Components of the high level systems Components of the high level systems

share the names of the objects share the names of the objects

Implementations – Domain Implementations – Domain AnalysisAnalysis

Identify the major concepts and the Identify the major concepts and the relationships between the conceptsrelationships between the concepts

Usage of components is determined by the Usage of components is determined by the domain in which they will be useddomain in which they will be used

Determine if components needed have Determine if components needed have already been builtalready been built

Helps guide the production of components Helps guide the production of components for better reusefor better reuse– Adequate domain models help scope the Adequate domain models help scope the

components and their usagecomponents and their usage

Challenges of Re-engineering Challenges of Re-engineering and Reuseand Reuse

Personnel issuesPersonnel issues– ““Why buy when you can build?”Why buy when you can build?”

Reuse doesn’t always mean buyingReuse doesn’t always mean buying

– Contrast to electronic engineeringContrast to electronic engineering Build your own microprocessor?Build your own microprocessor?

Payoff issuesPayoff issues– Rewarding someone for building a Rewarding someone for building a

reusable component by royalties?reusable component by royalties?

Challenges of Re-engineering Challenges of Re-engineering and Reuseand Reuse

Economical issuesEconomical issues– Payoff occurs after component Payoff occurs after component

productionproduction– Most companies are geared towards Most companies are geared towards

producing a systemproducing a system Gain another contract and reduce Gain another contract and reduce

turnaround time from reuseturnaround time from reuse

– Accounting treats software as Accounting treats software as consumable and not capitalconsumable and not capital Concept of making software reusable capital Concept of making software reusable capital

like a desklike a desk

Challenges of Re-engineering Challenges of Re-engineering and Reuseand Reuse

Legal issuesLegal issues– Protection against physical piracy and Protection against physical piracy and

intellectual piracyintellectual piracy– Use of proprietary software remedies Use of proprietary software remedies

certain issuescertain issues

ConclusionsConclusions

Software reuse, re-engineering, and Software reuse, re-engineering, and reverse engineering are cutting-edge reverse engineering are cutting-edge methodologiesmethodologies– Product Line and Battle Command Product LineProduct Line and Battle Command Product Line

Technology has caught up to these Technology has caught up to these practicespractices– UMLUML

There is a future in adding reuse to the There is a future in adding reuse to the software lifecyclesoftware lifecycle– Economic gains must be establishedEconomic gains must be established