1. Gyanastra
  2. Software Engineering
  3. Configuration Management Reuse and Reengineering
  4. Software Reuse
Free lesson, no account needed 13 min read 21 practice questions after it

Software Engineering · Configuration Management Reuse and Reengineering

Software Reuse

Overview

Software reuse is the systematic use of existing software artifacts and knowledge to build new software instead of creating every part from scratch.
In the UGC NET Software Engineering syllabus it sits under Configuration Management, Reuse and Reengineering, but the focus here is the reuse discipline: what can be reused, how reusable assets are engineered, how they are selected and adapted, and how costs and benefits are measured.
It requires basic understanding of software development life-cycle activities, components, architectures, and configuration management ideas such as versions and repositories.
Reuse is not mere copy-paste; it is planned engineering of assets, qualification, adaptation, integration, and maintenance.

Key concepts

  • Software reuse is the process of using existing software artifacts and knowledge to construct new software.
    Artifacts include requirements, designs, architectures, source code, components, test cases, documentation, patterns, and process knowledge.
  • The principal objective of reuse is to reduce development effort, time, and cost while improving quality, productivity, reliability, and standardization.
    These benefits are conditional: suitable assets must exist and must be integrated and adapted effectively.
  • Reuse cost includes asset search and evaluation, adaptation, integration, testing, licensing, training, repository maintenance, and long-term maintenance of the reused asset. Reuse is not automatically cheaper.
  • Opportunistic reuse is ad hoc reuse, often by individual developers, without a planned process.
    Systematic reuse is planned, organization-wide reuse supported by a repository, standards, measurements, roles, and a defined process.
  • Development for reuse means building an asset specifically so that it can be reused: generalize it, parameterize it, document it, test it, and make it easy to adapt.
    Development with reuse means building a new system by selecting, adapting, and integrating existing assets.
  • In systematic reuse, assets are often developed for reuse rather than merely extracted from a completed project, because assets designed for reuse are more general, better documented, and easier to qualify and adapt.
  • A reuse repository is a catalogued store of reusable assets with metadata such as name, description, interface, version, platform, quality level, owner, usage constraints, and test information.
    Systematic reuse requires such a repository and a search process.
  • Component reuse reuses an independently deliverable software unit with a defined interface and explicit dependencies.
    A reused component must undergo component qualification: checking functionality, quality, compatibility, security, licensing, and fitness for the new context.
  • Framework reuse reuses an overall architecture and control structure. A framework provides skeletal design, extension points, and control flow; the developer supplies application-specific code.
    This is inversion of control: the framework calls the application code.
  • A library is a collection of reusable routines or classes that the application calls. In a library, the developer controls the flow; in a framework, the framework controls the flow.
  • Application system reuse reuses a complete or substantial application system, usually by configuration or adaptation, for example reusing a payroll application and modifying one module for a new organization.
  • COTS reuse means reusing Commercial Off-The-Shelf software, usually without source-code modification, by configuration.
    Risks include vendor dependence, licensing, upgrade incompatibility, hidden defects, integration difficulty, security, and lack of control.
  • Generator-based reuse embeds domain knowledge in a generator that takes a specification or model and produces code or other artifacts.
    It is effective in well-understood domains with stable patterns, but risks include generator cost, domain mismatch, tool lock-in, and maintenance of generated output.
  • A software product line (SPL) is a set of systems sharing a common, managed set of features and derived from shared core assets in a prescribed way.
    Product-line engineering separates domain engineering, which builds core assets, from application engineering, which builds individual products by configuring and adapting those assets.
  • A domain is an application area or family of systems sharing common concepts, requirements, technology, and user needs, such as payroll, banking, or avionics.
    Domain engineering identifies commonalities and variabilities in a domain and develops reusable core assets for it.
  • Horizontal reuse is reuse across application domains through generic assets, such as graphical-user-interface libraries, database libraries, or mathematical libraries.
    Vertical reuse is reuse within one application domain, such as a payroll product line or banking product line.
  • Adaptation is the process of modifying or configuring an existing reusable asset so that it satisfies the requirements of a new system. Related terms are tailoring and customization.

How it works

Systematic reuse follows a controlled life cycle.

  1. Domain analysis: define the application domain, identify commonalities and variabilities, and find candidate reusable assets.
  2. Design and implement for reuse: generalize, parameterize, document, and test the asset so that it can serve multiple systems.
  3. Qualify and certify: verify functionality, quality, compatibility, security, legal status, and fitness before cataloguing.
  4. Catalog in a repository: record metadata so that developers can search, compare, and select assets.
  5. Application engineering: search the repository, select the closest asset, evaluate fit, adapt it, integrate it, and test the new product.
  6. Feedback and maintenance: record defects and enhancement requests, update the asset, and maintain its documentation and version history.

Product-line reuse separates two engineering processes:

Figure. The arrows show a linear reuse process: domain analysis leads to candidate assets, then design, qualification, cataloging, selection, adaptation and integration, product testing, and asset maintenance.
Figure. Domain engineering produces core assets that feed Products 1, 2, and 3; application engineering is a separate process linked to the same three products.

Formulas

  • All costs are in person-days and are positive. A positive net saving means reuse is cheaper.

  • For one reusable asset reused in nn projects:

Total cost without reuse=nS\text{Total cost without reuse} = nS

Total cost with reuse=D+nA\text{Total cost with reuse} = D + nA

Net saving B(n)=n(S−A)−D\text{Net saving } B(n) = n(S-A)-D

Break-even number of reuses n∗=⌈DS−A⌉\text{Break-even number of reuses } n^* = \left\lceil \frac{D}{S-A} \right\rceil

  • where DD = one-time development and certification cost of the reusable asset, SS = cost of building the needed item from scratch in one project, AA = cost of adapting and integrating the reusable asset in one project, and nn = number of projects or reuses. This formula requires S>AS>A.

  • For a software product line with NN products:

Cost of separate development=NCs\text{Cost of separate development} = N C_s

Cost with product line=Ccore+NCp\text{Cost with product line} = C_{\text{core}} + N C_p

Saving=N(Cs−Cp)−Ccore\text{Saving} = N(C_s-C_p)-C_{\text{core}}

Break-even number of products N∗=⌈CcoreCs−Cp⌉\text{Break-even number of products } N^* = \left\lceil \frac{C_{\text{core}}}{C_s-C_p} \right\rceil

  • where CsC_s = cost to build one product separately, CcoreC_{\text{core}} = one-time core-asset cost, and CpC_p = cost to derive one product after core assets exist. This requires Cs>CpC_s>C_p.

Worked examples

Example 1: Identify the reuse approach.
A team starts from an existing payroll application, keeps its overall architecture and control flow, and modifies the tax-calculation module for a new organization. Which reuse approach is this?

  1. The starting asset is a complete payroll application, not a small component.
  2. The team retains the application’s architecture and control flow and modifies a module.
  3. This is reuse of an application system with adaptation.
    Answer: application system reuse. If the starting asset were only a skeletal architecture into which application-specific code is plugged, it would be framework reuse.

Example 2: Match the terms.
List-I: A. Component reuse, B. Application system reuse, C. Domain engineering, D. Framework reuse.
List-II: i. Reusing a complete application with configuration or adaptation; ii. Reusing an independently deliverable unit with a defined interface; iii. Building reusable core assets for a family of systems in a domain; iv. Reusing a skeletal architecture and control flow that calls application-specific code.

  1. A component is an independently deliverable unit with an interface, so A matches ii.
  2. Application system reuse uses a complete application, so B matches i.
  3. Domain engineering builds reusable core assets for a domain, so C matches iii.
  4. Framework reuse uses architecture and control flow, so D matches iv.
    Answer: A-ii, B-i, C-iii, D-iv.

Example 3: Component reuse break-even.
A reusable component costs D=120D=120 person-days to develop and certify. Each project saves 30 person-days compared with building the component from scratch but spends 6 person-days adapting it. Seven projects reuse it. Find the net saving and break-even.

  1. Net saving per project before the one-time cost is 30−6=2430-6=24 person-days.
  2. Net saving for 7 projects is 7(24)−120=168−120=487(24)-120=168-120=48 person-days.
  3. Break-even is ⌈120/24⌉=⌈5⌉=5\lceil 120/24\rceil=\lceil 5\rceil=5 reuses. Check: 4 reuses give 4(24)−120=−244(24)-120=-24; 5 reuses give 5(24)−120=05(24)-120=0.
    Answer: net saving is 48 person-days; break-even is 5 reuses.

Example 4: Product-line break-even.
A product line has 8 products. Building each product separately costs 120 person-days. With the product line, core assets cost 500 person-days once, and each product costs 50 person-days after the core assets exist. Find the saving and break-even.

  1. Separate development cost =8×120=960=8 \times 120=960.
  2. Product-line cost =500+8×50=500+400=900=500+8 \times 50=500+400=900.
  3. Saving =960−900=60=960-900=60 person-days.
  4. Break-even =⌈500/(120−50)⌉=⌈500/70⌉=⌈7.14⌉=8=\lceil 500/(120-50)\rceil=\lceil 500/70\rceil=\lceil 7.14\rceil=8 products. Check: 7 products cost 7×120=8407 \times 120=840 separately and 500+7×50=850500+7 \times 50=850 with the product line, so saving is still negative.
    Answer: saving is 60 person-days at 8 products; break-even is 8 products.

Example 5: Assertion and reason.
Assertion A: In a software product line, core assets are developed once and then configured for each product.
Reason R: Product-line engineering separates the development of reusable core assets from the development of individual products.

  1. A is true: product lines derive products from shared core assets.
  2. R is true: domain engineering builds core assets; application engineering builds products.
  3. R correctly explains why core assets can be developed once and then configured.
    Answer: both A and R are true, and R is the correct explanation of A.

Comparison

Reuse approachWhat is reusedTypical exampleMain check or risk
Component reuseIndependently deliverable unit with defined interfaceClass library, software component, serviceInterface mismatch, qualification
Framework reuseArchitecture, control flow, extension pointsApplication or GUI frameworkLearning curve, framework lock-in, inversion of control
Application system reuseComplete or substantial applicationPayroll system, ERP systemAdaptation, vendor dependence, less control
COTS reuseCommercial packaged software without source modificationOffice package, database packageLicensing, hidden defects, upgrade incompatibility
Generator-based reuseDomain knowledge and code templatesModel-driven generator, DSL compilerGenerator cost, domain fit, generated-code maintenance
Software product lineShared core assets for a family of productsBanking or avionics product lineLarge up-front core investment, configuration discipline
LibraryFramework
Developer calls library routinesFramework calls developer code
Control remains with the applicationControl is inverted to the framework
Usually smaller-grained functions or classesUsually larger-grained architecture and extension points
Example: math libraryExample: web application framework
Horizontal reuseVertical reuse
Across application domainsWithin one application domain
Generic assetsDomain-specific assets
GUI library, database libraryPayroll product line, banking product line
Systematic reuseOpportunistic reuse
Planned with process, repository, standards, metricsAd hoc and individual
Long-term organizational payoffQuick and unpredictable payoff
Requires qualification and maintenanceOften becomes copy-paste

Revision summary

  • Reuse is not copy-paste; it is asset selection, qualification, adaptation, integration, and maintenance.
  • The principal objective is to reduce effort, time, and cost and improve quality, but only when assets fit and integration is controlled.
  • Systematic reuse requires a searchable repository, standards, and measurement; opportunistic reuse does not.
  • Horizontal reuse is across domains; vertical reuse is within one domain.
  • Domain engineering builds core assets for reuse; application engineering builds products with reuse.
  • Framework calls you; library is called by you.
  • Component qualification checks functionality, quality, compatibility, security, and licensing before reuse.
  • COTS reuse means no source-code modification; manage vendor, licensing, upgrade, and integration risks.
  • Product line = shared core assets + individual product configuration.
  • Break-even for one asset: n∗=⌈D/(S−A)⌉n^*=\lceil D/(S-A)\rceil.
  • Product-line break-even: N∗=⌈Ccore/(Cs−Cp)⌉N^*=\lceil C_{\text{core}}/(C_s-C_p)\rceil.
  • Do not confuse reuse with reverse engineering or reengineering: reuse uses existing assets for a new product; reverse engineering recovers design; reengineering restructures an existing system for maintainability.

Previous-year exam insights

  • Direct definition questions ask what software reuse is; the correct idea is using existing artifacts and knowledge to build new software, not reverse engineering or reengineering.
  • Statement-based questions test whether reuse always reduces cost, whether systematic reuse needs a repository, and whether product lines use shared core assets.
    Watch for absolute words such as “always” and “without adaptation”.
  • Match-the-list questions commonly pair component reuse, framework reuse, application system reuse, domain engineering, COTS, generator-based reuse, and product lines with their definitions.
  • Assertion-reason questions often test product-line separation of domain engineering and application engineering, or the claim that assets developed for reuse are more general and better documented.
  • Scenario questions ask you to identify the approach from clues: complete application reused means application system reuse; architecture and control skeleton means framework reuse; independently deliverable unit means component reuse.
  • Numeric questions require one-time cost, per-reuse adaptation cost, and number of reuses; compute net saving per reuse first, then subtract the one-time cost.
  • Traps include confusing framework with library, horizontal with vertical reuse, opportunistic with systematic reuse, and application system reuse with framework reuse.
  • Check first: what is the reusable asset, who controls the flow, whether the asset is complete or skeletal, and whether the cost is one-time or per project.

Practice at PARIKSHA

You are ready for the PARIKSHA tests of this sub-topic when you can:

  1. Define software reuse and state its principal objective without confusing it with reverse engineering or reengineering.
  2. Distinguish development for reuse from development with reuse with one example each.
  3. Explain domain engineering, application engineering, and how a product line uses core assets.
  4. Classify a given scenario as component, framework, application system, COTS, generator-based, or product-line reuse.
  5. Compare horizontal and vertical reuse, and systematic and opportunistic reuse.
  6. Explain framework versus library using the idea of inversion of control.
  7. List at least five costs and five risks of software reuse, including COTS risks.
  8. Compute net saving and break-even for a single reusable asset.
  9. Compute saving and break-even for a software product line.
  10. Answer match-the-list and assertion-reason questions on reuse terminology with correct reasoning.

Attempt the Software Reuse sub-topic test first, then the Configuration Management Reuse and Reengineering subject test.

Pages 1–2 of 2