SlideShare a Scribd company logo
1 of 19
Download to read offline
Software Quality Management 
          Unit – IV 

                      G. Roy Antony Arnold 
                           Asst. Prof. / CSE
• The li
   h lines of code ( OC) count i usually f
              f d (LOC)             is  ll for
  executable statements.
• LOC count represents the program size and
  complexity, it is not a surprise that

                            .
• More recent studies point to a curvilinear
  relationship between lines of code and defect
  rate:
Maximum Source     Average Defect per
Lines of Modules   1,000 Source Lines
       63                 1.5
      100                 1.4
      158                 0.9
      251                 0.5
      398                 1.1
      630                 1.9
      1000                1.3
     >1000                1.4
• Wh
  When module size b
             d l     i    becomes very l    large, the
                                                    h
  complexity increases to a level beyond a
  programmer s
  programmer's immediate span of control and total
  comprehension.
• The curvilinear model between size and defect
  density sheds new light on software quality
  engineering. It implies that there may be an
    g        g         p                      y
  optimal program size that can lead to the lowest
  defect rate.
• Such an optimum may depend on language,
  project, product, and environment; apparently
  many more empirical i
                  i i l investigations are needed.
                             ti ti              d d
• Halstead (1977) distinguishes software
  science from computer science.
• The premise of software science is that any
  programming task consists of selecting and
  arranging a finite number of program
  “tokens”, which are
   tokens
                              .
• A computer program, according to software
                             di        f
  science,
                                         .
• Th primitive measures of H l t d' software science
  The i iti              f Halstead's ft       i
  are




• Based on these primitive measures, Halstead
  developed a system of equations expressing

                                             and other
  features such as development effort and the projected
  number of faults in the software.
Vocabulary, 
Length, 
Length,
Volume, 
Level, 
Difficulty, 
Difficulty
Effort, 
Faults, 
• The measurement of cyclomatic complexity b
   h               f    l    i      l i by
  McCabe (1976) was designed

  (maintainability).
• It is the classical graph theory cyclomatic
  number,
          .
• To determine the paths, the program
  procedure is represented

       .
• The general formula to compute cyclomatic
      p    y
  complexity is:

• Wh
  Where,
 V(G) – Cyclomatic Number of G
  ( ) y
 e – Number of edges
 n – Number of nodes
 n Number of nodes
 p – Number of unconnected parts of the graph
• If we count the edges, nodes, and 
  disconnected parts of the graph, 


• The iteration test in a looping statement is
  The iteration test in a looping statement is 
  counted as one binary decision. In the 
  preceding simple example, since there are 
  two binary decisions, M = 2 + 1 = 3
• The cyclomatic complexity metric is 
  additive. The complexity of several graphs 
  additive The complexity of several graphs
  considered as a group is equal to the sum 
                    g p          p
  of the individual graphs' complexities.
needing detailed inspections.
      g             p
                                   likely to 
have a low defect rate and therefore 
have a low defect rate and therefore
candidates for development without 
detailed inspections.
     l

     , identify troublesome code, and 
estimate testing effort.
estimate testing effort
• McCabe's cyclomatic complexity index is a
                                      .
• It does not distinguish different kinds of control
  flow complexity such as
            p    y
                                        .
• In studying the quality and syntactic indicators
  among a sample of twenty modules of a COBOL
  compiler product
             product,             found that
          at the module level can be estimated
  through the following equations:
• Lo found that most developers were having difficulty 
                             p             g          y
  mastering the DO WHILE construct.
• As a result, minimizing the use of DO WHILE was one of 
  the actions the team took to reduce defects in the 
  compiler product.
• St t
  Structure metrics try to take into account the 
              ti t t t k i t               t th
                                        .
• The most common design structure metrics 
  are the 
  are the                        , which are 
                                   which are
  based on the                proposed by 
                         (1979) and 
  (1978):
             A count of the modules that call a given 
    module
           : A count of modules that are called by a 
    given module
    given module
• I        l    d l    ith l       f i
  In general, modules with a large fan‐in are 
                                                     . 
• In contrast, modules that are large and complex are 
  likely to have a small fan‐in.
                        structure complexity is 
  defined as:

• Henry and Selig's work (1990) defines a hybrid form 
  of their information‐flow metric as
  of their information flow metric as

  where, C internal complexity of procedure p
  where, Cip – internal complexity of procedure p
• C d d Gl (1990) d l
  Card and Glass (1990) developed a system complexity model
                                d      t       l it     d l

  Ct – System Complexity St – Structural (intermodule)
       System Complexity, S Structural (intermodule) 
   complexity, Dt – Data (intermodule) complexity
• They defined relative system complexity as

  n – no. Of modules in the system
• S
  Structure complexity is further defined as
                 l i i f h d fi d

              S=
                   ∑   f 2 (i )
                       n

  Where S – Structural Complexity, f(i) – Fan‐out of Module i,      
  n – no. Of modules in the system
• D t C
  Data Complexity is further defined as
           l it i f th d fi d



  Di  Data Complexity of Module i, V(i)  I/O 
  Di – Data Complexity of Module i, V(i) – I/O
  Variables in module i, f(i) – fan‐out of module i



  D – Data (intramodule) Complexity, D(i) – Data 
  Complexity of module i, n = Number of new 
  modules in the system

More Related Content

What's hot

Cost of software quality ( software quality assurance )
Cost of software quality ( software quality assurance )Cost of software quality ( software quality assurance )
Cost of software quality ( software quality assurance )Kiran Hanjar
 
Software Test Metrics and Measurements
Software Test Metrics and MeasurementsSoftware Test Metrics and Measurements
Software Test Metrics and MeasurementsDavis Thomas
 
Ch 6 development plan and quality plan
Ch 6 development plan and quality planCh 6 development plan and quality plan
Ch 6 development plan and quality planKittitouch Suteeca
 
Software Risk Management
Software Risk ManagementSoftware Risk Management
Software Risk ManagementGunjan Patel
 
Software Quality Attributes
Software Quality AttributesSoftware Quality Attributes
Software Quality AttributesHayim Makabee
 
Software reliability growth model
Software reliability growth modelSoftware reliability growth model
Software reliability growth modelHimanshu
 
Risk management in software engineering
Risk management in software engineeringRisk management in software engineering
Risk management in software engineeringdeep sharma
 
Constructive Cost Model - II (COCOMO-II)
Constructive Cost Model - II (COCOMO-II)Constructive Cost Model - II (COCOMO-II)
Constructive Cost Model - II (COCOMO-II)AmanSharma1172
 
Ch2-Software Engineering 9
Ch2-Software Engineering 9Ch2-Software Engineering 9
Ch2-Software Engineering 9Ian Sommerville
 
Development and quality plan
Development and quality planDevelopment and quality plan
Development and quality plannethisip13
 
Software Measurement: Lecture 1. Measures and Metrics
Software Measurement: Lecture 1. Measures and MetricsSoftware Measurement: Lecture 1. Measures and Metrics
Software Measurement: Lecture 1. Measures and MetricsProgrameter
 
Software Reliability
Software ReliabilitySoftware Reliability
Software Reliabilityranapoonam1
 

What's hot (20)

Cost of software quality ( software quality assurance )
Cost of software quality ( software quality assurance )Cost of software quality ( software quality assurance )
Cost of software quality ( software quality assurance )
 
Software Test Metrics and Measurements
Software Test Metrics and MeasurementsSoftware Test Metrics and Measurements
Software Test Metrics and Measurements
 
Ch 6 development plan and quality plan
Ch 6 development plan and quality planCh 6 development plan and quality plan
Ch 6 development plan and quality plan
 
Software Risk Management
Software Risk ManagementSoftware Risk Management
Software Risk Management
 
Software Quality Attributes
Software Quality AttributesSoftware Quality Attributes
Software Quality Attributes
 
Software reliability growth model
Software reliability growth modelSoftware reliability growth model
Software reliability growth model
 
On demand provisioning
On demand provisioningOn demand provisioning
On demand provisioning
 
Risk management in software engineering
Risk management in software engineeringRisk management in software engineering
Risk management in software engineering
 
Rayleigh model
Rayleigh modelRayleigh model
Rayleigh model
 
Constructive Cost Model - II (COCOMO-II)
Constructive Cost Model - II (COCOMO-II)Constructive Cost Model - II (COCOMO-II)
Constructive Cost Model - II (COCOMO-II)
 
Software quality management standards
Software quality management standardsSoftware quality management standards
Software quality management standards
 
Ch2-Software Engineering 9
Ch2-Software Engineering 9Ch2-Software Engineering 9
Ch2-Software Engineering 9
 
Ch 11-component-level-design
Ch 11-component-level-designCh 11-component-level-design
Ch 11-component-level-design
 
Development and quality plan
Development and quality planDevelopment and quality plan
Development and quality plan
 
Debugging
DebuggingDebugging
Debugging
 
Software cost estimation
Software cost estimationSoftware cost estimation
Software cost estimation
 
The Art of Debugging.pptx
The Art of Debugging.pptxThe Art of Debugging.pptx
The Art of Debugging.pptx
 
Software Measurement: Lecture 1. Measures and Metrics
Software Measurement: Lecture 1. Measures and MetricsSoftware Measurement: Lecture 1. Measures and Metrics
Software Measurement: Lecture 1. Measures and Metrics
 
Software Reliability
Software ReliabilitySoftware Reliability
Software Reliability
 
Software metrics
Software metricsSoftware metrics
Software metrics
 

Viewers also liked (14)

Rayleigh model
Rayleigh modelRayleigh model
Rayleigh model
 
Relations diagram
Relations diagramRelations diagram
Relations diagram
 
6 sigma
6 sigma6 sigma
6 sigma
 
6 sigma
6 sigma6 sigma
6 sigma
 
Seven basic tools of quality
Seven basic tools of qualitySeven basic tools of quality
Seven basic tools of quality
 
Case tools
Case toolsCase tools
Case tools
 
Reliability growth models for quality management
Reliability growth models for quality managementReliability growth models for quality management
Reliability growth models for quality management
 
customer satisfaction
customer satisfactioncustomer satisfaction
customer satisfaction
 
Elements Of An Effective Quality Management System
Elements Of An Effective Quality Management SystemElements Of An Effective Quality Management System
Elements Of An Effective Quality Management System
 
Six Sigma
Six SigmaSix Sigma
Six Sigma
 
Customer satisfaction
Customer satisfactionCustomer satisfaction
Customer satisfaction
 
Basic Six Sigma Presentation
Basic Six Sigma PresentationBasic Six Sigma Presentation
Basic Six Sigma Presentation
 
Customer Satisfaction
Customer SatisfactionCustomer Satisfaction
Customer Satisfaction
 
Customer Satisfaction Presentation
Customer Satisfaction PresentationCustomer Satisfaction Presentation
Customer Satisfaction Presentation
 

Similar to Complexity metrics and models

Software engineering
Software engineeringSoftware engineering
Software engineeringRohan Bhatkar
 
Vulnerability Detection Based on Git History
Vulnerability Detection Based on Git HistoryVulnerability Detection Based on Git History
Vulnerability Detection Based on Git HistoryKenta Yamamoto
 
Introduction to OpenSees by Frank McKenna
Introduction to OpenSees by Frank McKennaIntroduction to OpenSees by Frank McKenna
Introduction to OpenSees by Frank McKennaopenseesdays
 
naveed-kamran-software-architecture-agile
naveed-kamran-software-architecture-agilenaveed-kamran-software-architecture-agile
naveed-kamran-software-architecture-agileNaveed Kamran
 
Software Architectures, Week 2 - Decomposition techniques
Software Architectures, Week 2 - Decomposition techniquesSoftware Architectures, Week 2 - Decomposition techniques
Software Architectures, Week 2 - Decomposition techniquesAngelos Kapsimanis
 
INTRODUCTION TO C PROGRAMMING in basic c language
INTRODUCTION TO C PROGRAMMING in basic c languageINTRODUCTION TO C PROGRAMMING in basic c language
INTRODUCTION TO C PROGRAMMING in basic c languageGOKULKANNANMMECLECTC
 
Keynote at IWLS 2017
Keynote at IWLS 2017Keynote at IWLS 2017
Keynote at IWLS 2017Manish Pandey
 
Scalable constrained spectral clustering
Scalable constrained spectral clusteringScalable constrained spectral clustering
Scalable constrained spectral clusteringNishanth Harapanahalli
 
Software architacture recovery
Software architacture recoverySoftware architacture recovery
Software architacture recoveryImdad Ul Haq
 
Putnam Resource allocation model.ppt
Putnam Resource allocation model.pptPutnam Resource allocation model.ppt
Putnam Resource allocation model.pptAnupamaSharma80
 
IncQuery-D: Incremental Queries in the Cloud
IncQuery-D: Incremental Queries in the CloudIncQuery-D: Incremental Queries in the Cloud
IncQuery-D: Incremental Queries in the CloudGábor Szárnyas
 
Software_effort_estimation for Software engineering.pdf
Software_effort_estimation for Software engineering.pdfSoftware_effort_estimation for Software engineering.pdf
Software_effort_estimation for Software engineering.pdfsnehan789
 
Generating test cases using UML Communication Diagram
Generating test cases using UML Communication Diagram Generating test cases using UML Communication Diagram
Generating test cases using UML Communication Diagram Praveen Penumathsa
 
Software Product Measurement and Analysis in a Continuous Integration Environ...
Software Product Measurement and Analysis in a Continuous Integration Environ...Software Product Measurement and Analysis in a Continuous Integration Environ...
Software Product Measurement and Analysis in a Continuous Integration Environ...Gabriel Moreira
 

Similar to Complexity metrics and models (20)

Digital_system_design_A (1).ppt
Digital_system_design_A (1).pptDigital_system_design_A (1).ppt
Digital_system_design_A (1).ppt
 
Software engineering
Software engineeringSoftware engineering
Software engineering
 
Vulnerability Detection Based on Git History
Vulnerability Detection Based on Git HistoryVulnerability Detection Based on Git History
Vulnerability Detection Based on Git History
 
Introduction to OpenSees by Frank McKenna
Introduction to OpenSees by Frank McKennaIntroduction to OpenSees by Frank McKenna
Introduction to OpenSees by Frank McKenna
 
Cost effort.ppt
Cost effort.pptCost effort.ppt
Cost effort.ppt
 
naveed-kamran-software-architecture-agile
naveed-kamran-software-architecture-agilenaveed-kamran-software-architecture-agile
naveed-kamran-software-architecture-agile
 
Software metrics
Software metricsSoftware metrics
Software metrics
 
Software Architectures, Week 2 - Decomposition techniques
Software Architectures, Week 2 - Decomposition techniquesSoftware Architectures, Week 2 - Decomposition techniques
Software Architectures, Week 2 - Decomposition techniques
 
computer architecture.
computer architecture.computer architecture.
computer architecture.
 
INTRODUCTION TO C PROGRAMMING in basic c language
INTRODUCTION TO C PROGRAMMING in basic c languageINTRODUCTION TO C PROGRAMMING in basic c language
INTRODUCTION TO C PROGRAMMING in basic c language
 
Keynote at IWLS 2017
Keynote at IWLS 2017Keynote at IWLS 2017
Keynote at IWLS 2017
 
Scalable constrained spectral clustering
Scalable constrained spectral clusteringScalable constrained spectral clustering
Scalable constrained spectral clustering
 
Software architacture recovery
Software architacture recoverySoftware architacture recovery
Software architacture recovery
 
Putnam Resource allocation model.ppt
Putnam Resource allocation model.pptPutnam Resource allocation model.ppt
Putnam Resource allocation model.ppt
 
IncQuery-D: Incremental Queries in the Cloud
IncQuery-D: Incremental Queries in the CloudIncQuery-D: Incremental Queries in the Cloud
IncQuery-D: Incremental Queries in the Cloud
 
Ch01lect1 et
Ch01lect1 etCh01lect1 et
Ch01lect1 et
 
Chapter 12
Chapter 12Chapter 12
Chapter 12
 
Software_effort_estimation for Software engineering.pdf
Software_effort_estimation for Software engineering.pdfSoftware_effort_estimation for Software engineering.pdf
Software_effort_estimation for Software engineering.pdf
 
Generating test cases using UML Communication Diagram
Generating test cases using UML Communication Diagram Generating test cases using UML Communication Diagram
Generating test cases using UML Communication Diagram
 
Software Product Measurement and Analysis in a Continuous Integration Environ...
Software Product Measurement and Analysis in a Continuous Integration Environ...Software Product Measurement and Analysis in a Continuous Integration Environ...
Software Product Measurement and Analysis in a Continuous Integration Environ...
 

More from Roy Antony Arnold G (20)

Run chart
Run chartRun chart
Run chart
 
Quality management models
Quality management modelsQuality management models
Quality management models
 
Pareto diagram
Pareto diagramPareto diagram
Pareto diagram
 
Ishikawa diagram
Ishikawa diagramIshikawa diagram
Ishikawa diagram
 
Histogram
HistogramHistogram
Histogram
 
Customer satisfaction
Customer satisfactionCustomer satisfaction
Customer satisfaction
 
Control chart
Control chartControl chart
Control chart
 
Complexity metrics and models
Complexity metrics and modelsComplexity metrics and models
Complexity metrics and models
 
Check lists
Check listsCheck lists
Check lists
 
Capability maturity model
Capability maturity modelCapability maturity model
Capability maturity model
 
Structure chart
Structure chartStructure chart
Structure chart
 
Seven new tools
Seven new toolsSeven new tools
Seven new tools
 
Scatter diagram
Scatter diagramScatter diagram
Scatter diagram
 
Qms
QmsQms
Qms
 
Defect removal effectiveness
Defect removal effectivenessDefect removal effectiveness
Defect removal effectiveness
 
Customer satisfaction
Customer satisfactionCustomer satisfaction
Customer satisfaction
 
Reliability growth models
Reliability growth modelsReliability growth models
Reliability growth models
 
Customer oriented planning of case-tools using quality function deployment (qfd)
Customer oriented planning of case-tools using quality function deployment (qfd)Customer oriented planning of case-tools using quality function deployment (qfd)
Customer oriented planning of case-tools using quality function deployment (qfd)
 
Case Tools
Case ToolsCase Tools
Case Tools
 
10 rules of e-business
10 rules of e-business10 rules of e-business
10 rules of e-business
 

Recently uploaded

Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxCarlos105
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYKayeClaireEstoconing
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptxmary850239
 
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxMusic 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxleah joy valeriano
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptxiammrhaywood
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfVanessa Camilleri
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)cama23
 
Integumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptIntegumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptshraddhaparab530
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 

Recently uploaded (20)

Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx4.16.24 Poverty and Precarity--Desmond.pptx
4.16.24 Poverty and Precarity--Desmond.pptx
 
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxMusic 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdf
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)
 
Raw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptxRaw materials used in Herbal Cosmetics.pptx
Raw materials used in Herbal Cosmetics.pptx
 
Integumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptIntegumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.ppt
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 

Complexity metrics and models

  • 1. Software Quality Management  Unit – IV  G. Roy Antony Arnold  Asst. Prof. / CSE
  • 2. • The li h lines of code ( OC) count i usually f f d (LOC) is ll for executable statements. • LOC count represents the program size and complexity, it is not a surprise that . • More recent studies point to a curvilinear relationship between lines of code and defect rate:
  • 3.
  • 4. Maximum Source  Average Defect per Lines of Modules 1,000 Source Lines 63 1.5 100 1.4 158 0.9 251 0.5 398 1.1 630 1.9 1000 1.3 >1000 1.4
  • 5. • Wh When module size b d l i becomes very l large, the h complexity increases to a level beyond a programmer s programmer's immediate span of control and total comprehension. • The curvilinear model between size and defect density sheds new light on software quality engineering. It implies that there may be an g g p y optimal program size that can lead to the lowest defect rate. • Such an optimum may depend on language, project, product, and environment; apparently many more empirical i i i l investigations are needed. ti ti d d
  • 6. • Halstead (1977) distinguishes software science from computer science. • The premise of software science is that any programming task consists of selecting and arranging a finite number of program “tokens”, which are tokens . • A computer program, according to software di f science, .
  • 7. • Th primitive measures of H l t d' software science The i iti f Halstead's ft i are • Based on these primitive measures, Halstead developed a system of equations expressing and other features such as development effort and the projected number of faults in the software.
  • 9. • The measurement of cyclomatic complexity b h f l i l i by McCabe (1976) was designed (maintainability). • It is the classical graph theory cyclomatic number, . • To determine the paths, the program procedure is represented .
  • 10. • The general formula to compute cyclomatic p y complexity is: • Wh Where, V(G) – Cyclomatic Number of G ( ) y e – Number of edges n – Number of nodes n Number of nodes p – Number of unconnected parts of the graph
  • 11. • If we count the edges, nodes, and  disconnected parts of the graph,  • The iteration test in a looping statement is The iteration test in a looping statement is  counted as one binary decision. In the  preceding simple example, since there are  two binary decisions, M = 2 + 1 = 3 • The cyclomatic complexity metric is  additive. The complexity of several graphs  additive The complexity of several graphs considered as a group is equal to the sum  g p p of the individual graphs' complexities.
  • 12.
  • 13. needing detailed inspections. g p likely to  have a low defect rate and therefore  have a low defect rate and therefore candidates for development without  detailed inspections. l , identify troublesome code, and  estimate testing effort. estimate testing effort
  • 14. • McCabe's cyclomatic complexity index is a . • It does not distinguish different kinds of control flow complexity such as p y . • In studying the quality and syntactic indicators among a sample of twenty modules of a COBOL compiler product product, found that at the module level can be estimated through the following equations:
  • 15. • Lo found that most developers were having difficulty  p g y mastering the DO WHILE construct. • As a result, minimizing the use of DO WHILE was one of  the actions the team took to reduce defects in the  compiler product.
  • 16. • St t Structure metrics try to take into account the  ti t t t k i t t th . • The most common design structure metrics  are the  are the , which are  which are based on the  proposed by  (1979) and  (1978): A count of the modules that call a given  module : A count of modules that are called by a  given module given module
  • 17. • I l d l ith l f i In general, modules with a large fan‐in are  .  • In contrast, modules that are large and complex are  likely to have a small fan‐in. structure complexity is  defined as: • Henry and Selig's work (1990) defines a hybrid form  of their information‐flow metric as of their information flow metric as where, C internal complexity of procedure p where, Cip – internal complexity of procedure p
  • 18. • C d d Gl (1990) d l Card and Glass (1990) developed a system complexity model d t l it d l Ct – System Complexity St – Structural (intermodule) System Complexity, S Structural (intermodule)  complexity, Dt – Data (intermodule) complexity • They defined relative system complexity as n – no. Of modules in the system • S Structure complexity is further defined as l i i f h d fi d S= ∑ f 2 (i ) n Where S – Structural Complexity, f(i) – Fan‐out of Module i,       n – no. Of modules in the system
  • 19. • D t C Data Complexity is further defined as l it i f th d fi d Di  Data Complexity of Module i, V(i)  I/O  Di – Data Complexity of Module i, V(i) – I/O Variables in module i, f(i) – fan‐out of module i D – Data (intramodule) Complexity, D(i) – Data  Complexity of module i, n = Number of new  modules in the system