SlideShare a Scribd company logo
1 of 12
A critique of cyclomatic complexity as a
software metric
                 by Martin Shepperd
        Software Engineering Journal March 1988




                            Presented By:
                            Tameem Ahmad
                                   M.Tech. Student
                                         Z.H.C.E.T.
                                     A.M.U.,Aligarh




   Copyright, 1996 © Dale Carnegie & Associates, Inc.
Overview
• Introduction
• Overview of Cyclomatic Complexity
• Theoretical assumptions that reasoned for
 objection
• Modification Suggested
• Conclusion


 Martin Shepperd, Software Engineering Journal March 1988   2
Introduction
 ‘Halstead’s Software Science’
 Cyclomatic Complexity approach of
 MacCabe




 Martin Shepperd, Software Engineering Journal March 1988   3
Overview of the Cyclomatic
Complexity Metric
 Control Path is the indicator
 v(G) = e - n + 1                                           (1)
 v(S) = e - n + 2p                                          (2)
 IF X < 1 AND Y <2 THEN
 Case statements       (n-1) n is the no. of cases

 Upper limit v(G)=10 suggested with
 some relaxations.


 Martin Shepperd, Software Engineering Journal March 1988         4
Controversy (1)
   On the basis of the counting rule
   Myers interval




Thus the failure of cyclomatic complexity to count ELSE branches is
  only a serious deficiency if the metric is intended to Capture
  complexity of comprehension.

  Martin Shepperd, Software Engineering Journal March 1988            5
Controversy (2);                              on count of case
 Hansen (count case contribution to the complexity should be one)
 raises the question on the count of the
 cases
 Other have suggested as log2(n)




 Martin Shepperd, Software Engineering Journal March 1988           6
Controversy (3);                              (modification)


 Hansen proposed 2-tuple cyclomtic
 complexity(defined to be arithmetical operators, function and
 subroutine calls, assignments, input and output statements and array
 subscription).
 Discarded by Baker and Zweben as the problem to comparision.




 Martin Shepperd, Software Engineering Journal March 1988               7
Controversy (4) ;                               (modification)

 Stetter suggested cyclometic flow
 complexity metric. (flow of data is also
 considered her)




 Martin Shepperd, Software Engineering Journal March 1988        8
Controversy (5)
 Based on no. of structured
 With increase of program structure
 cyclometic complexity aslo increases.




 Martin Shepperd, Software Engineering Journal March 1988   9
Controversy (6) ;                               a critical one
 Evangelist reports that the application
 of only 2 out of 26 of Kernighan and
 Plauger’s rules of good programming
 style invariably results in a decrease in
 cyclomatic complexity.




 Martin Shepperd, Software Engineering Journal March 1988        10
Conclusion
    Much of the difficulty stems from the fact that McCabe was originally thinking in
    terms of Fortran, whereas most of these difficulties arise from other
    languages, some of them more recent, such as Ada Here one has to contend
    with problems such as distinguishing between
‘IF y = 1 ORy = 3’ and
IF y = 0 OR ELSE x/y>1.
   the mapping from code to a program graph is ambiguous.




  Martin Shepperd, Software Engineering Journal March 1988                          11
Thank You




             12

More Related Content

What's hot

PRAM algorithms from deepika
PRAM algorithms from deepikaPRAM algorithms from deepika
PRAM algorithms from deepikaguest1f4fb3
 
Exact network reconstruction from consensus signals and one eigen value
Exact network reconstruction from consensus signals and one eigen valueExact network reconstruction from consensus signals and one eigen value
Exact network reconstruction from consensus signals and one eigen valueIJCNCJournal
 
Shor's discrete logarithm quantum algorithm for elliptic curves
 Shor's discrete logarithm quantum algorithm for elliptic curves Shor's discrete logarithm quantum algorithm for elliptic curves
Shor's discrete logarithm quantum algorithm for elliptic curvesXequeMateShannon
 
ICDE-2015 Shortest Path Traversal Optimization and Analysis for Large Graph C...
ICDE-2015 Shortest Path Traversal Optimization and Analysis for Large Graph C...ICDE-2015 Shortest Path Traversal Optimization and Analysis for Large Graph C...
ICDE-2015 Shortest Path Traversal Optimization and Analysis for Large Graph C...Waqas Nawaz
 
C055011012
C055011012C055011012
C055011012inventy
 
Analysis of Algorithms II - PS3
Analysis of Algorithms II - PS3Analysis of Algorithms II - PS3
Analysis of Algorithms II - PS3AtakanAral
 
Dueling Network Architectures for Deep Reinforcement Learning
Dueling Network Architectures for Deep Reinforcement LearningDueling Network Architectures for Deep Reinforcement Learning
Dueling Network Architectures for Deep Reinforcement LearningYoonho Lee
 
Daa unit 6_efficiency of algorithms
Daa unit 6_efficiency of algorithmsDaa unit 6_efficiency of algorithms
Daa unit 6_efficiency of algorithmssnehajiyani
 
Introduction to Algorithms Complexity Analysis
Introduction to Algorithms Complexity Analysis Introduction to Algorithms Complexity Analysis
Introduction to Algorithms Complexity Analysis Dr. Pankaj Agarwal
 
A Load-Balanced Parallelization of AKS Algorithm
A Load-Balanced Parallelization of AKS AlgorithmA Load-Balanced Parallelization of AKS Algorithm
A Load-Balanced Parallelization of AKS AlgorithmTELKOMNIKA JOURNAL
 
Equivalent condition and two algorithms for hamiltonian graphs
Equivalent condition and two algorithms for hamiltonian graphsEquivalent condition and two algorithms for hamiltonian graphs
Equivalent condition and two algorithms for hamiltonian graphsgraphhoc
 
Algorithms Lecture 1: Introduction to Algorithms
Algorithms Lecture 1: Introduction to AlgorithmsAlgorithms Lecture 1: Introduction to Algorithms
Algorithms Lecture 1: Introduction to AlgorithmsMohamed Loey
 
Efficient asic architecture of rsa cryptosystem
Efficient asic architecture of rsa cryptosystemEfficient asic architecture of rsa cryptosystem
Efficient asic architecture of rsa cryptosystemcsandit
 
Data Structures and Algorithm Analysis
Data Structures  and  Algorithm AnalysisData Structures  and  Algorithm Analysis
Data Structures and Algorithm AnalysisMary Margarat
 

What's hot (18)

JAIDEEP SINGH
JAIDEEP SINGHJAIDEEP SINGH
JAIDEEP SINGH
 
00454
0045400454
00454
 
PRAM algorithms from deepika
PRAM algorithms from deepikaPRAM algorithms from deepika
PRAM algorithms from deepika
 
Exact network reconstruction from consensus signals and one eigen value
Exact network reconstruction from consensus signals and one eigen valueExact network reconstruction from consensus signals and one eigen value
Exact network reconstruction from consensus signals and one eigen value
 
Shor's discrete logarithm quantum algorithm for elliptic curves
 Shor's discrete logarithm quantum algorithm for elliptic curves Shor's discrete logarithm quantum algorithm for elliptic curves
Shor's discrete logarithm quantum algorithm for elliptic curves
 
ICDE-2015 Shortest Path Traversal Optimization and Analysis for Large Graph C...
ICDE-2015 Shortest Path Traversal Optimization and Analysis for Large Graph C...ICDE-2015 Shortest Path Traversal Optimization and Analysis for Large Graph C...
ICDE-2015 Shortest Path Traversal Optimization and Analysis for Large Graph C...
 
C055011012
C055011012C055011012
C055011012
 
Analysis of Algorithms II - PS3
Analysis of Algorithms II - PS3Analysis of Algorithms II - PS3
Analysis of Algorithms II - PS3
 
Dueling Network Architectures for Deep Reinforcement Learning
Dueling Network Architectures for Deep Reinforcement LearningDueling Network Architectures for Deep Reinforcement Learning
Dueling Network Architectures for Deep Reinforcement Learning
 
M045077578
M045077578M045077578
M045077578
 
Parallel-kmeans
Parallel-kmeansParallel-kmeans
Parallel-kmeans
 
Daa unit 6_efficiency of algorithms
Daa unit 6_efficiency of algorithmsDaa unit 6_efficiency of algorithms
Daa unit 6_efficiency of algorithms
 
Introduction to Algorithms Complexity Analysis
Introduction to Algorithms Complexity Analysis Introduction to Algorithms Complexity Analysis
Introduction to Algorithms Complexity Analysis
 
A Load-Balanced Parallelization of AKS Algorithm
A Load-Balanced Parallelization of AKS AlgorithmA Load-Balanced Parallelization of AKS Algorithm
A Load-Balanced Parallelization of AKS Algorithm
 
Equivalent condition and two algorithms for hamiltonian graphs
Equivalent condition and two algorithms for hamiltonian graphsEquivalent condition and two algorithms for hamiltonian graphs
Equivalent condition and two algorithms for hamiltonian graphs
 
Algorithms Lecture 1: Introduction to Algorithms
Algorithms Lecture 1: Introduction to AlgorithmsAlgorithms Lecture 1: Introduction to Algorithms
Algorithms Lecture 1: Introduction to Algorithms
 
Efficient asic architecture of rsa cryptosystem
Efficient asic architecture of rsa cryptosystemEfficient asic architecture of rsa cryptosystem
Efficient asic architecture of rsa cryptosystem
 
Data Structures and Algorithm Analysis
Data Structures  and  Algorithm AnalysisData Structures  and  Algorithm Analysis
Data Structures and Algorithm Analysis
 

Similar to Cyclometic Criticisms

Modelling of ntc thermistor using artificial neural network for non linearity...
Modelling of ntc thermistor using artificial neural network for non linearity...Modelling of ntc thermistor using artificial neural network for non linearity...
Modelling of ntc thermistor using artificial neural network for non linearity...ieijjournal
 
Performance analysis of machine learning approaches in software complexity pr...
Performance analysis of machine learning approaches in software complexity pr...Performance analysis of machine learning approaches in software complexity pr...
Performance analysis of machine learning approaches in software complexity pr...Sayed Mohsin Reza
 
Complexity Analysis
Complexity Analysis Complexity Analysis
Complexity Analysis Shaista Qadir
 
DSP unit1,2,3 VSQs-vrc.pdf important question
DSP unit1,2,3 VSQs-vrc.pdf important questionDSP unit1,2,3 VSQs-vrc.pdf important question
DSP unit1,2,3 VSQs-vrc.pdf important questionSahithikairamkonda
 
A Novel Algorithm on Wavelet Based Robust Invisible Digital Image Watermarkin...
A Novel Algorithm on Wavelet Based Robust Invisible Digital Image Watermarkin...A Novel Algorithm on Wavelet Based Robust Invisible Digital Image Watermarkin...
A Novel Algorithm on Wavelet Based Robust Invisible Digital Image Watermarkin...IJERA Editor
 
OTP, Phishing, QR code, Shares, Visual Cryptography.
OTP, Phishing, QR code, Shares, Visual Cryptography.OTP, Phishing, QR code, Shares, Visual Cryptography.
OTP, Phishing, QR code, Shares, Visual Cryptography.IJERA Editor
 
On Selection of Periodic Kernels Parameters in Time Series Prediction
On Selection of Periodic Kernels Parameters in Time Series Prediction On Selection of Periodic Kernels Parameters in Time Series Prediction
On Selection of Periodic Kernels Parameters in Time Series Prediction cscpconf
 
ON SELECTION OF PERIODIC KERNELS PARAMETERS IN TIME SERIES PREDICTION
ON SELECTION OF PERIODIC KERNELS PARAMETERS IN TIME SERIES PREDICTIONON SELECTION OF PERIODIC KERNELS PARAMETERS IN TIME SERIES PREDICTION
ON SELECTION OF PERIODIC KERNELS PARAMETERS IN TIME SERIES PREDICTIONcscpconf
 
R18B.Tech.CSESyllabus.pdf
R18B.Tech.CSESyllabus.pdfR18B.Tech.CSESyllabus.pdf
R18B.Tech.CSESyllabus.pdfKANDE ARCHANA
 
[Ris cy business]
[Ris cy business][Ris cy business]
[Ris cy business]Dino, llc
 
Scalable Algorithm Design with MapReduce
Scalable Algorithm Design with MapReduceScalable Algorithm Design with MapReduce
Scalable Algorithm Design with MapReducePietro Michiardi
 
Automatic Task-based Code Generation for High Performance DSEL
Automatic Task-based Code Generation for High Performance DSELAutomatic Task-based Code Generation for High Performance DSEL
Automatic Task-based Code Generation for High Performance DSELJoel Falcou
 
Belief Propagation Decoder for LDPC Codes Based on VLSI Implementation
Belief Propagation Decoder for LDPC Codes Based on VLSI ImplementationBelief Propagation Decoder for LDPC Codes Based on VLSI Implementation
Belief Propagation Decoder for LDPC Codes Based on VLSI Implementationinventionjournals
 
A Hybrid Method of CART and Artificial Neural Network for Short Term Load For...
A Hybrid Method of CART and Artificial Neural Network for Short Term Load For...A Hybrid Method of CART and Artificial Neural Network for Short Term Load For...
A Hybrid Method of CART and Artificial Neural Network for Short Term Load For...Salford Systems
 

Similar to Cyclometic Criticisms (20)

Modelling of ntc thermistor using artificial neural network for non linearity...
Modelling of ntc thermistor using artificial neural network for non linearity...Modelling of ntc thermistor using artificial neural network for non linearity...
Modelling of ntc thermistor using artificial neural network for non linearity...
 
Cd32504509
Cd32504509Cd32504509
Cd32504509
 
Cd32504509
Cd32504509Cd32504509
Cd32504509
 
Performance analysis of machine learning approaches in software complexity pr...
Performance analysis of machine learning approaches in software complexity pr...Performance analysis of machine learning approaches in software complexity pr...
Performance analysis of machine learning approaches in software complexity pr...
 
Ch1
Ch1Ch1
Ch1
 
Complexity Analysis
Complexity Analysis Complexity Analysis
Complexity Analysis
 
70
7070
70
 
Sorting_project_2.pdf
Sorting_project_2.pdfSorting_project_2.pdf
Sorting_project_2.pdf
 
DSP unit1,2,3 VSQs-vrc.pdf important question
DSP unit1,2,3 VSQs-vrc.pdf important questionDSP unit1,2,3 VSQs-vrc.pdf important question
DSP unit1,2,3 VSQs-vrc.pdf important question
 
A Novel Algorithm on Wavelet Based Robust Invisible Digital Image Watermarkin...
A Novel Algorithm on Wavelet Based Robust Invisible Digital Image Watermarkin...A Novel Algorithm on Wavelet Based Robust Invisible Digital Image Watermarkin...
A Novel Algorithm on Wavelet Based Robust Invisible Digital Image Watermarkin...
 
OTP, Phishing, QR code, Shares, Visual Cryptography.
OTP, Phishing, QR code, Shares, Visual Cryptography.OTP, Phishing, QR code, Shares, Visual Cryptography.
OTP, Phishing, QR code, Shares, Visual Cryptography.
 
On Selection of Periodic Kernels Parameters in Time Series Prediction
On Selection of Periodic Kernels Parameters in Time Series Prediction On Selection of Periodic Kernels Parameters in Time Series Prediction
On Selection of Periodic Kernels Parameters in Time Series Prediction
 
ON SELECTION OF PERIODIC KERNELS PARAMETERS IN TIME SERIES PREDICTION
ON SELECTION OF PERIODIC KERNELS PARAMETERS IN TIME SERIES PREDICTIONON SELECTION OF PERIODIC KERNELS PARAMETERS IN TIME SERIES PREDICTION
ON SELECTION OF PERIODIC KERNELS PARAMETERS IN TIME SERIES PREDICTION
 
R18B.Tech.CSESyllabus.pdf
R18B.Tech.CSESyllabus.pdfR18B.Tech.CSESyllabus.pdf
R18B.Tech.CSESyllabus.pdf
 
R18B.Tech.CSESyllabus.pdf
R18B.Tech.CSESyllabus.pdfR18B.Tech.CSESyllabus.pdf
R18B.Tech.CSESyllabus.pdf
 
[Ris cy business]
[Ris cy business][Ris cy business]
[Ris cy business]
 
Scalable Algorithm Design with MapReduce
Scalable Algorithm Design with MapReduceScalable Algorithm Design with MapReduce
Scalable Algorithm Design with MapReduce
 
Automatic Task-based Code Generation for High Performance DSEL
Automatic Task-based Code Generation for High Performance DSELAutomatic Task-based Code Generation for High Performance DSEL
Automatic Task-based Code Generation for High Performance DSEL
 
Belief Propagation Decoder for LDPC Codes Based on VLSI Implementation
Belief Propagation Decoder for LDPC Codes Based on VLSI ImplementationBelief Propagation Decoder for LDPC Codes Based on VLSI Implementation
Belief Propagation Decoder for LDPC Codes Based on VLSI Implementation
 
A Hybrid Method of CART and Artificial Neural Network for Short Term Load For...
A Hybrid Method of CART and Artificial Neural Network for Short Term Load For...A Hybrid Method of CART and Artificial Neural Network for Short Term Load For...
A Hybrid Method of CART and Artificial Neural Network for Short Term Load For...
 

Recently uploaded

The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 

Recently uploaded (20)

The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 

Cyclometic Criticisms

  • 1. A critique of cyclomatic complexity as a software metric by Martin Shepperd Software Engineering Journal March 1988 Presented By: Tameem Ahmad M.Tech. Student Z.H.C.E.T. A.M.U.,Aligarh Copyright, 1996 © Dale Carnegie & Associates, Inc.
  • 2. Overview • Introduction • Overview of Cyclomatic Complexity • Theoretical assumptions that reasoned for objection • Modification Suggested • Conclusion Martin Shepperd, Software Engineering Journal March 1988 2
  • 3. Introduction ‘Halstead’s Software Science’ Cyclomatic Complexity approach of MacCabe Martin Shepperd, Software Engineering Journal March 1988 3
  • 4. Overview of the Cyclomatic Complexity Metric Control Path is the indicator v(G) = e - n + 1 (1) v(S) = e - n + 2p (2) IF X < 1 AND Y <2 THEN Case statements (n-1) n is the no. of cases Upper limit v(G)=10 suggested with some relaxations. Martin Shepperd, Software Engineering Journal March 1988 4
  • 5. Controversy (1) On the basis of the counting rule Myers interval Thus the failure of cyclomatic complexity to count ELSE branches is only a serious deficiency if the metric is intended to Capture complexity of comprehension. Martin Shepperd, Software Engineering Journal March 1988 5
  • 6. Controversy (2); on count of case Hansen (count case contribution to the complexity should be one) raises the question on the count of the cases Other have suggested as log2(n) Martin Shepperd, Software Engineering Journal March 1988 6
  • 7. Controversy (3); (modification) Hansen proposed 2-tuple cyclomtic complexity(defined to be arithmetical operators, function and subroutine calls, assignments, input and output statements and array subscription). Discarded by Baker and Zweben as the problem to comparision. Martin Shepperd, Software Engineering Journal March 1988 7
  • 8. Controversy (4) ; (modification) Stetter suggested cyclometic flow complexity metric. (flow of data is also considered her) Martin Shepperd, Software Engineering Journal March 1988 8
  • 9. Controversy (5) Based on no. of structured With increase of program structure cyclometic complexity aslo increases. Martin Shepperd, Software Engineering Journal March 1988 9
  • 10. Controversy (6) ; a critical one Evangelist reports that the application of only 2 out of 26 of Kernighan and Plauger’s rules of good programming style invariably results in a decrease in cyclomatic complexity. Martin Shepperd, Software Engineering Journal March 1988 10
  • 11. Conclusion Much of the difficulty stems from the fact that McCabe was originally thinking in terms of Fortran, whereas most of these difficulties arise from other languages, some of them more recent, such as Ada Here one has to contend with problems such as distinguishing between ‘IF y = 1 ORy = 3’ and IF y = 0 OR ELSE x/y>1. the mapping from code to a program graph is ambiguous. Martin Shepperd, Software Engineering Journal March 1988 11