Software Engineering – Product Metrics for SoftwareSoftware Engineering – Product Metrics for Software
SOFTWARE QUALITYSOFTWARE QUALITY
In a general sense, software quality is:In a general sense, software quality is:
Conformance to explicitly stated functional and performance requirements, explicitly Conformance to explicitly stated functional and performance requirements, explicitly documented development standards, and implicit characteristics that are expected of documented development standards, and implicit characteristics that are expected of all professionally developed software.all professionally developed software.
There are three key points:There are three key points:
1.1.Software requirements are the foundation from which quality is measured. Lack of Software requirements are the foundation from which quality is measured. Lack of conformance to requirements is a lack of quality.conformance to requirements is a lack of quality.
2.2.Specified standards define a set of development criteria that guide the manner in Specified standards define a set of development criteria that guide the manner in which software is engineered. If the criteria are not followed, lack of quality will almost which software is engineered. If the criteria are not followed, lack of quality will almost surely result.surely result.
3.3.There is a set of implicit requirements that often goes unmentioned (e.g. the desire for There is a set of implicit requirements that often goes unmentioned (e.g. the desire for ease of use). If software conforms to its explicit requirements but fails to meet implicit ease of use). If software conforms to its explicit requirements but fails to meet implicit requirements, software quality is suspect.requirements, software quality is suspect.
Software Engineering – Product Metrics for SoftwareSoftware Engineering – Product Metrics for Software
SOFTWARE QUALITYSOFTWARE QUALITY
McCall’s Quality FactorsMcCall’s Quality Factors
Factors that affect software quality can be categorized in two broad groups:Factors that affect software quality can be categorized in two broad groups:
1.1.Factors that can be directly measured (e.g. defects uncovered during testing)Factors that can be directly measured (e.g. defects uncovered during testing)
2.2.Factors that can be measured only indirectly (e.g. usability or maintainability)Factors that can be measured only indirectly (e.g. usability or maintainability)
Software Engineering – Product Metrics for SoftwareSoftware Engineering – Product Metrics for Software
SOFTWARE QUALITYSOFTWARE QUALITY
McCall’s Quality FactorsMcCall’s Quality Factors
Correctness: The extent to which a program satisfies the specification and fulfills the Correctness: The extent to which a program satisfies the specification and fulfills the customer’s mission objectives.customer’s mission objectives.
Reliability: The extent to which a program can be expected to perform its intended Reliability: The extent to which a program can be expected to perform its intended function with required precision.function with required precision.
Efficiency: The amount of computing recourses and code required by a program to Efficiency: The amount of computing recourses and code required by a program to perform its function.perform its function.
Integrity: The extend to which access to software or data by unauthorized persons can Integrity: The extend to which access to software or data by unauthorized persons can be controlled.be controlled.
Usability: The effort required to learn, operate, prepare input for and interpret output of Usability: The effort required to learn, operate, prepare input for and interpret output of a program. (This can be contradictory, can any guess why?)a program. (This can be contradictory, can any guess why?)
Software Engineering – Product Metrics for SoftwareSoftware Engineering – Product Metrics for Software
SOFTWARE QUALITYSOFTWARE QUALITY
McCall’s Quality FactorsMcCall’s Quality Factors
Usability: The effort required to learn, operate, prepare input for and interpret output of Usability: The effort required to learn, operate, prepare input for and interpret output of a program. (This can be contradictory, can any guess why?)a program. (This can be contradictory, can any guess why?)
What is efficient for a power user may not be effective for a end or novice user.What is efficient for a power user may not be effective for a end or novice user.
Maintainability: The effort required to locate and fix an error in a program.Maintainability: The effort required to locate and fix an error in a program.
Flexibility: The effort required to modify an operational program.Flexibility: The effort required to modify an operational program.
Testability: The effort required to test a program to ensure that it performs the intended Testability: The effort required to test a program to ensure that it performs the intended function.function.
Software Engineering – Product Metrics for SoftwareSoftware Engineering – Product Metrics for Software
SOFTWARE QUALITYSOFTWARE QUALITY
McCall’s Quality FactorsMcCall’s Quality Factors
Portability: The effort required to transfer the program from one hardware and/or Portability: The effort required to transfer the program from one hardware and/or software system environment to another.software system environment to another.
Reusability: The extent to which a program [or parts of a program] can be reused in Reusability: The extent to which a program [or parts of a program] can be reused in other applications – related to the packaging and scope of the functions that the other applications – related to the packaging and scope of the functions that the program performsprogram performs
Interoperability: The effort required to couple one system to another.Interoperability: The effort required to couple one system to another.
Software Engineering – Product Metrics for SoftwareSoftware Engineering – Product Metrics for Software
SOFTWARE QUALITYSOFTWARE QUALITY
McCall’s Quality FactorsMcCall’s Quality Factors
It is difficult, and in some cases impossible to develop direct measures of these quality It is difficult, and in some cases impossible to develop direct measures of these quality factors.factors.
Software Engineering – Product Metrics for SoftwareSoftware Engineering – Product Metrics for Software
SOFTWARE QUALITYSOFTWARE QUALITY
ISO 9126 Quality FactorsISO 9126 Quality Factors
A standard developed in an attempt to identify attributes for computer software.A standard developed in an attempt to identify attributes for computer software.
Functionality: The degree to which the software satisfies stated needs as indicated by Functionality: The degree to which the software satisfies stated needs as indicated by the following sub-attributes: suitability, accuracy, interoperability, compliance, and the following sub-attributes: suitability, accuracy, interoperability, compliance, and security.security.
Reliability: The amount of time that the software is available for use as indicated by the Reliability: The amount of time that the software is available for use as indicated by the following sub-attributes: maturity, fault tolerance, recoverability.following sub-attributes: maturity, fault tolerance, recoverability.
Usability: The degree to which the software is easy to use as indicated by the following Usability: The degree to which the software is easy to use as indicated by the following sub-attributes: understandability, learnability, operability.sub-attributes: understandability, learnability, operability.
Software Engineering – Product Metrics for SoftwareSoftware Engineering – Product Metrics for Software
SOFTWARE QUALITYSOFTWARE QUALITY
ISO 9126 Quality FactorsISO 9126 Quality Factors
Efficiency: The degree to which the software makes optimal use of system resources as Efficiency: The degree to which the software makes optimal use of system resources as indicated by the following sub-attributes: time behavior, resource behavior.indicated by the following sub-attributes: time behavior, resource behavior.
Maintainability: The ease with which repair may be made to the software as indicated Maintainability: The ease with which repair may be made to the software as indicated by the following sub-attributes: analyzability, changeability, stability, and testability.by the following sub-attributes: analyzability, changeability, stability, and testability.
Portability: The ease with which the software can be transposed from one environment Portability: The ease with which the software can be transposed from one environment to another as indicated by the following sub-attributes: adaptability, installability, to another as indicated by the following sub-attributes: adaptability, installability, conformance, and replaceability. conformance, and replaceability.
Again these factors do not necessarily lend themselves to direct measurement.Again these factors do not necessarily lend themselves to direct measurement.
Software Engineering – Product Metrics for SoftwareSoftware Engineering – Product Metrics for Software
SOFTWARE QUALITYSOFTWARE QUALITY
Transition to a Quantitative ViewTransition to a Quantitative View
Subjectivity and specialization apply to determining software quality.Subjectivity and specialization apply to determining software quality.
To help solve the problem, a more precise definition of software quality is needed as To help solve the problem, a more precise definition of software quality is needed as well as a way to derive quantitative measurements of software quality for objective well as a way to derive quantitative measurements of software quality for objective analysis.analysis.
Software Engineering – Product Metrics for SoftwareSoftware Engineering – Product Metrics for Software
SOFTWARE QUALITYSOFTWARE QUALITY
Measure: provides a quantitative indication of the extent, amount, dimension, capacity, Measure: provides a quantitative indication of the extent, amount, dimension, capacity, or size of some attribute of a product or process.or size of some attribute of a product or process.
Measurement :is the act of determining a measure.Measurement :is the act of determining a measure.
Metric: relates the individual measure in some way (e.g. the average number of errors Metric: relates the individual measure in some way (e.g. the average number of errors found per review or the average number of errors found per unit test)found per review or the average number of errors found per unit test)
CHALLENGES OF PRODUCT METRICSCHALLENGES OF PRODUCT METRICS
Researchers have attempted to develop a single metric that provides a comprehensive Researchers have attempted to develop a single metric that provides a comprehensive measure of software complexity.measure of software complexity.
It is fair to ask, just how valid product metrics are?It is fair to ask, just how valid product metrics are?
Software Engineering – Product Metrics for SoftwareSoftware Engineering – Product Metrics for Software
SOFTWARE QUALITYSOFTWARE QUALITY
A metric should have desirable mathematical properties (i.e. a meaningful range, zero A metric should have desirable mathematical properties (i.e. a meaningful range, zero to one).to one).
When a metric represents a software characteristic that increase when positive traits When a metric represents a software characteristic that increase when positive traits occur or decreases when undesirable traits are encountered, the value of the metric occur or decreases when undesirable traits are encountered, the value of the metric should increase or decrease in the same manner. should increase or decrease in the same manner.
Each metric should be validated empirically in a wide variety of contexts before being Each metric should be validated empirically in a wide variety of contexts before being published or used to make decisions. published or used to make decisions.
Software Engineering – Product Metrics for SoftwareSoftware Engineering – Product Metrics for Software
SOFTWARE QUALITYSOFTWARE QUALITY
Good attributes for software metrics are:Good attributes for software metrics are:
• Simple and ComputableSimple and Computable• Intuitively persuasiveIntuitively persuasive• Consistent and objectiveConsistent and objective• Consistent in the use of units and dimensionsConsistent in the use of units and dimensions• Programming language independent Programming language independent • An effective mechanism for high-quality feedback.An effective mechanism for high-quality feedback.
Software Engineering – Product Metrics for SoftwareSoftware Engineering – Product Metrics for Software
METRIC FOR SOURCE CODEMETRIC FOR SOURCE CODE
nn11 = the number of distinct operators that appear in a program = the number of distinct operators that appear in a program
nn22 = the number of distinct operands that appear in a program = the number of distinct operands that appear in a program
NN11 = the total number of operator occurrences. = the total number of operator occurrences.
NN22 = the total number of operand occurrence. = the total number of operand occurrence.
Overall program length N can be computed:Overall program length N can be computed:
N = nN = n11 log2 n log2 n11 + n + n22 log2 n log2 n22
V = N logV = N log22 (n (n11 + n + n22))
Software Engineering – Product Metrics for SoftwareSoftware Engineering – Product Metrics for Software
METRIC FOR TESTINGMETRIC FOR TESTING
nn11 = the number of distinct operators that appear in a program = the number of distinct operators that appear in a program
nn22 = the number of distinct operands that appear in a program = the number of distinct operands that appear in a program
NN11 = the total number of operator occurrences. = the total number of operator occurrences.
NN22 = the total number of operand occurrence. = the total number of operand occurrence.
Program Level and EffortProgram Level and Effort
PL = 1/[(nPL = 1/[(n11 / 2) x (N / 2) x (N22 / n / n22 l)] l)]
e = V/PLe = V/PL
Software Engineering – Product Metrics for SoftwareSoftware Engineering – Product Metrics for Software
SOFTWARE QUALITYSOFTWARE QUALITY
METRICS FOR MAINTENANCEMETRICS FOR MAINTENANCE
MMtt = the number of modules in the current release = the number of modules in the current release
FFcc = the number of modules in the current release that have been changed = the number of modules in the current release that have been changed
FFaa = the number of modules in the current release that have been added. = the number of modules in the current release that have been added.
FFdd = the number of modules from the preceding release that were deleted in the = the number of modules from the preceding release that were deleted in the current releasecurrent release
The Software Maturity Index, SMI, is defined as:The Software Maturity Index, SMI, is defined as:
SMI = [MSMI = [Mt – (t – (FFcc + F + Fa + a + FFd)/ d)/ MMtt ] ]