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

Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 

Recently uploaded (20)

Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 

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