SlideShare a Scribd company logo
HALSTEAD’S SOFTWARE SCIENCE
- AN ANALYTICAL TECHNIQUE
PROJECT ESTIMATION TECHNIQUES
● Empirical Estimation Techniques
● Heuristic Techniques
● Analytical Estimation Techniques
○ HALSTEAD’S SOFTWARE SCIENCE
INTRODUCTION
Halstead’s Technique measure
● Size
● Development effort
● Development cost of s/w products
INTRO (cont’d)
Halstead used few primitive program parameters to develop expressions for:
● Overall program length
● Potential minimum volume and Program level
● Actual volume
● Effort
● Development time
INTRO (cont’d)
For any giving programs lets define the following parameters:
● η1
be the number of unique operators used in the program
● η2
be the number of unique operands used in the program
● N1
be the number of the total operators used in the program
● N2
be the number of the total operands used in the program
INTRO (cont’d)
Operator in general: a symbol or function representing a mathematical
operation.
● assignments arithmetic and logical operators
● Parentheses pair, block begin/end pair
● If…then… else… endif
● Do…. While
● Statement terminator “;”
● Bitwise operator
● Pointers operator
INTRO (cont’d)
Operands in general: A quantity to which an operator is applied
● Subroutine declarations
● Variable declarations
● Variables and constants used with operators in an expression
Operators and Operands for the ANSI C Language
● List of operators
( [ . , -> * + - ~ ! ++ -- * / % + - << >> < > <= >= != == & ^ | && ||
= *= /= %= += -= <<= >>= &= ^= |= : ? { ; CASE DEFAULT IF ELSE SWITCH
WHILE DO FOR GOTO CONTINUE BREAK RETURN and a function name in
function call
● Operands are those variables and constants which are used with
operators in expressions
Eg : a=&b;
a,b are operands and = & are operators
Length and Vocabulary
● Length : total usage of all operators and operands ie., total number of
tokens used in the program
Program Length (N)= N1
+ N2
● Vocabulary : is the number unique operands and operators used in the
program
Program Vocabulary (η)= η1
+ η2
Program Volume
● Program vocabulary and length depends on the programming style
● Different lengths of programs, corresponding to the same problem when
different languages are used
● We need to express the program length by taking the programming
language into consideration
Program volume (V) is the minimum number of bits needed to encode the
program
Program Volume (cont’d)
Program volume V = N log2
(η)
● To represent η different tokens we need log2
(η) bits
○ Example: to represent 8 operands we need 3 bits
● For a program of N length, we need N log2
(η) bits
Program volume represents the size of the program by approximately
compensating the effect of the programming language used
Potential Minimum Volume (V*)
● V* is the volume of the most concise program in which the problem can
be coded
● A program require at least 2 operators (η1
=2) and the required number of
operands is η2
=n
V* = (2+η2
) log2
(2+η2
)
Potential Minimum Volume (V*) (cont’d)
Program Level (L) = V*/V
● Program level measures the level of abstraction provided by
programming language
● Higher L, less effort it takes to develop a program using that language
○ Example: Assembly vs. C#
Effort and Time
● To obtain the needed effort , we divide the program volume (size) on the
program level (complexity)
Effort (E) = V / L
= V2
/ V* (as L = V*/V)
● The programmer’s time needed to finish the program
T = E / S
where S is the speed of mental discriminations, recommended value of S
is 18
Length Estimation
● Although the program length can be estimated easily using the previous
discussed equation N = N1
+N2
, this can be done before starting the
programming activities.
● Instead, we can calculate the length depending on the unique numbers of
operands and operators
Length Estimation (cont’d)
Halstead assumptions are based on:
● Program are unlikely to have several identical parts that are greater than
(η)
● Identical parts are usually made into procedures and functions
N = η1
log2
(η1
) + η2
log2
(η2
)
● Experimental evidence showed that the actual and the computed values
are very close
● Results may be inaccurate when dealing with small programs or
subsystems individually
Recap
● Unique operators : η1
● Unique Operands : η2
● Total Operators : N1
● Total Operands : N2
● Program Vocabulary: η=η1
+η2
● Program Length : N=N1
+N2
● Program Volume : Nlog2
η
● Effort : E=V/L
● Time : T=E/S
● Estimated Length : N=η1
log2
η1
+η2
log2
η2
Example
Main()
{
int a, b, c, avg;
scanf(“%d %d %d”, &a, &b, &c);
avg = (a +b +c )/3;
printf(“avg = %d”, avg);
}
Example (cont’d)
● The unique operators are: main, (), {}, int, scanf, &, “, “, “ ; ”, =, +, /, printf
● The unique operands are : a, b, c, &a, &b, &c, a +b +c, avg, 3, “%d %d %d”,
“avg = %d”
therefore η1 = 12, η2 = 11
N = 12 log2(12)+ 11log2(11) = 81
V = Nlog2(η) = 81log2(23) = 366
THANKYOU

More Related Content

What's hot

Unit1
Unit1Unit1
Unit1
anuragmbst
 
Practical Malware Analysis: Ch 6: Recognizing C Code Constructs in Assembly
Practical Malware Analysis: Ch 6: Recognizing C Code Constructs in AssemblyPractical Malware Analysis: Ch 6: Recognizing C Code Constructs in Assembly
Practical Malware Analysis: Ch 6: Recognizing C Code Constructs in Assembly
Sam Bowne
 
Design notation
Design notationDesign notation
Design notation
ramya marichamy
 
Agile Process
Agile ProcessAgile Process
Agile Process
binto
 
Computer graphics basic transformation
Computer graphics basic transformationComputer graphics basic transformation
Computer graphics basic transformation
Selvakumar Gna
 
3.5 equivalence of pushdown automata and cfl
3.5 equivalence of pushdown automata and cfl3.5 equivalence of pushdown automata and cfl
3.5 equivalence of pushdown automata and cfl
Sampath Kumar S
 
Chomsky Normal Form
Chomsky Normal FormChomsky Normal Form
Chomsky Normal Form
Jasmine Peniel
 
Systemd: the modern Linux init system you will learn to love
Systemd: the modern Linux init system you will learn to loveSystemd: the modern Linux init system you will learn to love
Systemd: the modern Linux init system you will learn to love
Alison Chaiken
 
source code metrics and other maintenance tools and techniques
source code metrics and other maintenance tools and techniquessource code metrics and other maintenance tools and techniques
source code metrics and other maintenance tools and techniques
Siva Priya
 
Software requirements
Software requirementsSoftware requirements
Software requirements
Dr. Loganathan R
 
Process management in linux
Process management in linuxProcess management in linux
Process management in linux
Mazenetsolution
 
Spm unit2
Spm unit2Spm unit2
Spm unit2
sweetyammu
 
Estimating Software Maintenance Costs
Estimating Software Maintenance CostsEstimating Software Maintenance Costs
Estimating Software Maintenance Costs
lalithambiga kamaraj
 
Syntax Directed Definition and its applications
Syntax Directed Definition and its applicationsSyntax Directed Definition and its applications
Syntax Directed Definition and its applications
ShivanandManjaragi2
 
Single instruction multiple data
Single instruction multiple dataSingle instruction multiple data
Single instruction multiple data
Syed Zaid Irshad
 
Class diagrams
Class diagramsClass diagrams
Class diagrams
Nadia_Nazeer
 
Greate Introduction to Software Engineering @ Track IT Academy
Greate Introduction to Software Engineering @ Track IT AcademyGreate Introduction to Software Engineering @ Track IT Academy
Greate Introduction to Software Engineering @ Track IT Academy
Mohamed Shahpoup
 
Algorithmic Software Cost Modeling
Algorithmic Software Cost ModelingAlgorithmic Software Cost Modeling
Algorithmic Software Cost Modeling
Kasun Ranga Wijeweera
 
Parallel sorting algorithm
Parallel sorting algorithmParallel sorting algorithm
Parallel sorting algorithm
Richa Kumari
 
Specification-of-tokens
Specification-of-tokensSpecification-of-tokens
Specification-of-tokens
Dattatray Gandhmal
 

What's hot (20)

Unit1
Unit1Unit1
Unit1
 
Practical Malware Analysis: Ch 6: Recognizing C Code Constructs in Assembly
Practical Malware Analysis: Ch 6: Recognizing C Code Constructs in AssemblyPractical Malware Analysis: Ch 6: Recognizing C Code Constructs in Assembly
Practical Malware Analysis: Ch 6: Recognizing C Code Constructs in Assembly
 
Design notation
Design notationDesign notation
Design notation
 
Agile Process
Agile ProcessAgile Process
Agile Process
 
Computer graphics basic transformation
Computer graphics basic transformationComputer graphics basic transformation
Computer graphics basic transformation
 
3.5 equivalence of pushdown automata and cfl
3.5 equivalence of pushdown automata and cfl3.5 equivalence of pushdown automata and cfl
3.5 equivalence of pushdown automata and cfl
 
Chomsky Normal Form
Chomsky Normal FormChomsky Normal Form
Chomsky Normal Form
 
Systemd: the modern Linux init system you will learn to love
Systemd: the modern Linux init system you will learn to loveSystemd: the modern Linux init system you will learn to love
Systemd: the modern Linux init system you will learn to love
 
source code metrics and other maintenance tools and techniques
source code metrics and other maintenance tools and techniquessource code metrics and other maintenance tools and techniques
source code metrics and other maintenance tools and techniques
 
Software requirements
Software requirementsSoftware requirements
Software requirements
 
Process management in linux
Process management in linuxProcess management in linux
Process management in linux
 
Spm unit2
Spm unit2Spm unit2
Spm unit2
 
Estimating Software Maintenance Costs
Estimating Software Maintenance CostsEstimating Software Maintenance Costs
Estimating Software Maintenance Costs
 
Syntax Directed Definition and its applications
Syntax Directed Definition and its applicationsSyntax Directed Definition and its applications
Syntax Directed Definition and its applications
 
Single instruction multiple data
Single instruction multiple dataSingle instruction multiple data
Single instruction multiple data
 
Class diagrams
Class diagramsClass diagrams
Class diagrams
 
Greate Introduction to Software Engineering @ Track IT Academy
Greate Introduction to Software Engineering @ Track IT AcademyGreate Introduction to Software Engineering @ Track IT Academy
Greate Introduction to Software Engineering @ Track IT Academy
 
Algorithmic Software Cost Modeling
Algorithmic Software Cost ModelingAlgorithmic Software Cost Modeling
Algorithmic Software Cost Modeling
 
Parallel sorting algorithm
Parallel sorting algorithmParallel sorting algorithm
Parallel sorting algorithm
 
Specification-of-tokens
Specification-of-tokensSpecification-of-tokens
Specification-of-tokens
 

Viewers also liked

A comparative review of various approaches for feature extraction in Face rec...
A comparative review of various approaches for feature extraction in Face rec...A comparative review of various approaches for feature extraction in Face rec...
A comparative review of various approaches for feature extraction in Face rec...
Vishnupriya T H
 
Micro Programmed Control Unit
Micro Programmed Control UnitMicro Programmed Control Unit
Micro Programmed Control Unit
Kamal Acharya
 
Resume1
Resume1Resume1
Cpm systems-pvt-ltd
Cpm systems-pvt-ltdCpm systems-pvt-ltd
Cpm systems-pvt-ltd
CPM Systems Private Limited
 
Swpanica Exim; India II Proma Doors II OB Modular Kitchen II Omeya Bath Set I...
Swpanica Exim; India II Proma Doors II OB Modular Kitchen II Omeya Bath Set I...Swpanica Exim; India II Proma Doors II OB Modular Kitchen II Omeya Bath Set I...
Swpanica Exim; India II Proma Doors II OB Modular Kitchen II Omeya Bath Set I...
Swapan Bose
 
Ejercicio de revision 1
Ejercicio de revision 1Ejercicio de revision 1
Ejercicio de revision 1
Lorena Pinto Narvaez
 
Industrialism
IndustrialismIndustrialism
Industrialism
SyedaNira
 
Galeria 5
Galeria 5Galeria 5
Proceso desarrollo humano slideshare
Proceso desarrollo humano slideshareProceso desarrollo humano slideshare
Proceso desarrollo humano slideshare
Paula Garcia
 
21st century skills k to 12
21st century skills  k to 1221st century skills  k to 12
21st century skills k to 12
nizzalibunao
 
Report about AB Bank
Report about AB BankReport about AB Bank
Report about AB Bank
SyedaNira
 
Chapter 6 software metrics
Chapter 6 software metricsChapter 6 software metrics
Chapter 6 software metrics
despicable me
 
Participatory Educational Planning
Participatory Educational PlanningParticipatory Educational Planning
Participatory Educational Planning
nizzalibunao
 
New business plan( Green Coconut- Sipco)
New business plan( Green Coconut- Sipco)New business plan( Green Coconut- Sipco)
New business plan( Green Coconut- Sipco)
SyedaNira
 
Ekonomiks 10 - Kalakalang Panlabas ng Pilipinas
Ekonomiks 10 - Kalakalang Panlabas ng PilipinasEkonomiks 10 - Kalakalang Panlabas ng Pilipinas
Ekonomiks 10 - Kalakalang Panlabas ng Pilipinas
nizzalibunao
 
Microprogram Control
Microprogram Control Microprogram Control
Microprogram Control
Anuj Modi
 
Control statements
Control statementsControl statements
Control statements
kamal kotecha
 
Galeria 1
Galeria 1 Galeria 1
Galeria 2
Galeria 2Galeria 2
Mnatenimieto de tablet version 3
Mnatenimieto de tablet version 3Mnatenimieto de tablet version 3
Mnatenimieto de tablet version 3
Lorena Pinto Narvaez
 

Viewers also liked (20)

A comparative review of various approaches for feature extraction in Face rec...
A comparative review of various approaches for feature extraction in Face rec...A comparative review of various approaches for feature extraction in Face rec...
A comparative review of various approaches for feature extraction in Face rec...
 
Micro Programmed Control Unit
Micro Programmed Control UnitMicro Programmed Control Unit
Micro Programmed Control Unit
 
Resume1
Resume1Resume1
Resume1
 
Cpm systems-pvt-ltd
Cpm systems-pvt-ltdCpm systems-pvt-ltd
Cpm systems-pvt-ltd
 
Swpanica Exim; India II Proma Doors II OB Modular Kitchen II Omeya Bath Set I...
Swpanica Exim; India II Proma Doors II OB Modular Kitchen II Omeya Bath Set I...Swpanica Exim; India II Proma Doors II OB Modular Kitchen II Omeya Bath Set I...
Swpanica Exim; India II Proma Doors II OB Modular Kitchen II Omeya Bath Set I...
 
Ejercicio de revision 1
Ejercicio de revision 1Ejercicio de revision 1
Ejercicio de revision 1
 
Industrialism
IndustrialismIndustrialism
Industrialism
 
Galeria 5
Galeria 5Galeria 5
Galeria 5
 
Proceso desarrollo humano slideshare
Proceso desarrollo humano slideshareProceso desarrollo humano slideshare
Proceso desarrollo humano slideshare
 
21st century skills k to 12
21st century skills  k to 1221st century skills  k to 12
21st century skills k to 12
 
Report about AB Bank
Report about AB BankReport about AB Bank
Report about AB Bank
 
Chapter 6 software metrics
Chapter 6 software metricsChapter 6 software metrics
Chapter 6 software metrics
 
Participatory Educational Planning
Participatory Educational PlanningParticipatory Educational Planning
Participatory Educational Planning
 
New business plan( Green Coconut- Sipco)
New business plan( Green Coconut- Sipco)New business plan( Green Coconut- Sipco)
New business plan( Green Coconut- Sipco)
 
Ekonomiks 10 - Kalakalang Panlabas ng Pilipinas
Ekonomiks 10 - Kalakalang Panlabas ng PilipinasEkonomiks 10 - Kalakalang Panlabas ng Pilipinas
Ekonomiks 10 - Kalakalang Panlabas ng Pilipinas
 
Microprogram Control
Microprogram Control Microprogram Control
Microprogram Control
 
Control statements
Control statementsControl statements
Control statements
 
Galeria 1
Galeria 1 Galeria 1
Galeria 1
 
Galeria 2
Galeria 2Galeria 2
Galeria 2
 
Mnatenimieto de tablet version 3
Mnatenimieto de tablet version 3Mnatenimieto de tablet version 3
Mnatenimieto de tablet version 3
 

Similar to Halstead's software science - ananalytical technique

Halsted’s Software Science-An analytical technique
Halsted’s Software Science-An analytical techniqueHalsted’s Software Science-An analytical technique
Halsted’s Software Science-An analytical technique
Nur Islam
 
Software code metrics
Software code metricsSoftware code metrics
Software code metrics
PVS-Studio
 
Product Metrics
Product MetricsProduct Metrics
Product Metrics
Sohail Ahmed
 
Performance analysis(Time & Space Complexity)
Performance analysis(Time & Space Complexity)Performance analysis(Time & Space Complexity)
Performance analysis(Time & Space Complexity)
swapnac12
 
CHAPTER 3 - LESSON C
CHAPTER 3 - LESSON CCHAPTER 3 - LESSON C
CHAPTER 3 - LESSON C
MLG College of Learning, Inc
 
Basic Programming concepts - Programming with C++
Basic Programming concepts - Programming with C++Basic Programming concepts - Programming with C++
Basic Programming concepts - Programming with C++
Mohamed El Desouki
 
C programming for Computing Techniques
C programming for Computing TechniquesC programming for Computing Techniques
C programming for Computing Techniques
Appili Vamsi Krishna
 
L1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdfL1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdf
MMRF2
 
C Course material
C Course materialC Course material
C Course material
Fareed Khan
 
Fundamentals of programming with C++
Fundamentals of programming with C++Fundamentals of programming with C++
Fundamentals of programming with C++
Seble Nigussie
 
Introduction to computer programming
Introduction to computer programmingIntroduction to computer programming
Introduction to computer programming
Sangheethaa Sukumaran
 
INTRODUCCIÓN A LA PROGRAMACIÓN
INTRODUCCIÓN A LA PROGRAMACIÓNINTRODUCCIÓN A LA PROGRAMACIÓN
INTRODUCCIÓN A LA PROGRAMACIÓN
BenjaminAnilema
 
Implementation of halstead
Implementation of halsteadImplementation of halstead
Implementation of halstead
vamshi batchu
 
C++ good tutorial
C++ good tutorialC++ good tutorial
C++ good tutorial
Ezzat Atalla
 
Chapter 1.ppt
Chapter 1.pptChapter 1.ppt
Chapter 1.ppt
tadudemise
 
Computer programing 111 lecture 2
Computer programing 111 lecture 2Computer programing 111 lecture 2
Computer programing 111 lecture 2
ITNet
 
Cp 111 lecture 2
Cp 111 lecture 2Cp 111 lecture 2
Cp 111 lecture 2
HafidhyMasoud
 
Introduction to TensorFlow
Introduction to TensorFlowIntroduction to TensorFlow
Introduction to TensorFlow
Ralph Vincent Regalado
 
C Programming - Refresher - Part I
C Programming - Refresher - Part I C Programming - Refresher - Part I
C Programming - Refresher - Part I
Emertxe Information Technologies Pvt Ltd
 
Introduction to design and analysis of algorithm
Introduction to design and analysis of algorithmIntroduction to design and analysis of algorithm
Introduction to design and analysis of algorithm
DevaKumari Vijay
 

Similar to Halstead's software science - ananalytical technique (20)

Halsted’s Software Science-An analytical technique
Halsted’s Software Science-An analytical techniqueHalsted’s Software Science-An analytical technique
Halsted’s Software Science-An analytical technique
 
Software code metrics
Software code metricsSoftware code metrics
Software code metrics
 
Product Metrics
Product MetricsProduct Metrics
Product Metrics
 
Performance analysis(Time & Space Complexity)
Performance analysis(Time & Space Complexity)Performance analysis(Time & Space Complexity)
Performance analysis(Time & Space Complexity)
 
CHAPTER 3 - LESSON C
CHAPTER 3 - LESSON CCHAPTER 3 - LESSON C
CHAPTER 3 - LESSON C
 
Basic Programming concepts - Programming with C++
Basic Programming concepts - Programming with C++Basic Programming concepts - Programming with C++
Basic Programming concepts - Programming with C++
 
C programming for Computing Techniques
C programming for Computing TechniquesC programming for Computing Techniques
C programming for Computing Techniques
 
L1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdfL1. Basic Programming Concepts.pdf
L1. Basic Programming Concepts.pdf
 
C Course material
C Course materialC Course material
C Course material
 
Fundamentals of programming with C++
Fundamentals of programming with C++Fundamentals of programming with C++
Fundamentals of programming with C++
 
Introduction to computer programming
Introduction to computer programmingIntroduction to computer programming
Introduction to computer programming
 
INTRODUCCIÓN A LA PROGRAMACIÓN
INTRODUCCIÓN A LA PROGRAMACIÓNINTRODUCCIÓN A LA PROGRAMACIÓN
INTRODUCCIÓN A LA PROGRAMACIÓN
 
Implementation of halstead
Implementation of halsteadImplementation of halstead
Implementation of halstead
 
C++ good tutorial
C++ good tutorialC++ good tutorial
C++ good tutorial
 
Chapter 1.ppt
Chapter 1.pptChapter 1.ppt
Chapter 1.ppt
 
Computer programing 111 lecture 2
Computer programing 111 lecture 2Computer programing 111 lecture 2
Computer programing 111 lecture 2
 
Cp 111 lecture 2
Cp 111 lecture 2Cp 111 lecture 2
Cp 111 lecture 2
 
Introduction to TensorFlow
Introduction to TensorFlowIntroduction to TensorFlow
Introduction to TensorFlow
 
C Programming - Refresher - Part I
C Programming - Refresher - Part I C Programming - Refresher - Part I
C Programming - Refresher - Part I
 
Introduction to design and analysis of algorithm
Introduction to design and analysis of algorithmIntroduction to design and analysis of algorithm
Introduction to design and analysis of algorithm
 

More from Vishnupriya T H

Computer graphics - colour crt and flat-panel displays
Computer graphics - colour crt and flat-panel displaysComputer graphics - colour crt and flat-panel displays
Computer graphics - colour crt and flat-panel displays
Vishnupriya T H
 
Security challenges in IoT
Security challenges in IoTSecurity challenges in IoT
Security challenges in IoT
Vishnupriya T H
 
Apache HBase
Apache HBase  Apache HBase
Apache HBase
Vishnupriya T H
 
Security auditing architecture
Security auditing architectureSecurity auditing architecture
Security auditing architecture
Vishnupriya T H
 
Sampling design, sampling errors, sample size determination
Sampling design, sampling errors, sample size determinationSampling design, sampling errors, sample size determination
Sampling design, sampling errors, sample size determination
Vishnupriya T H
 
Introduction to Triz (TIPS)
Introduction to Triz (TIPS)Introduction to Triz (TIPS)
Introduction to Triz (TIPS)
Vishnupriya T H
 

More from Vishnupriya T H (6)

Computer graphics - colour crt and flat-panel displays
Computer graphics - colour crt and flat-panel displaysComputer graphics - colour crt and flat-panel displays
Computer graphics - colour crt and flat-panel displays
 
Security challenges in IoT
Security challenges in IoTSecurity challenges in IoT
Security challenges in IoT
 
Apache HBase
Apache HBase  Apache HBase
Apache HBase
 
Security auditing architecture
Security auditing architectureSecurity auditing architecture
Security auditing architecture
 
Sampling design, sampling errors, sample size determination
Sampling design, sampling errors, sample size determinationSampling design, sampling errors, sample size determination
Sampling design, sampling errors, sample size determination
 
Introduction to Triz (TIPS)
Introduction to Triz (TIPS)Introduction to Triz (TIPS)
Introduction to Triz (TIPS)
 

Recently uploaded

22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
KrishnaveniKrishnara1
 
Engine Lubrication performance System.pdf
Engine Lubrication performance System.pdfEngine Lubrication performance System.pdf
Engine Lubrication performance System.pdf
mamamaam477
 
A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...
nooriasukmaningtyas
 
Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...
IJECEIAES
 
Properties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptxProperties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptx
MDSABBIROJJAMANPAYEL
 
Generative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of contentGenerative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of content
Hitesh Mohapatra
 
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Sinan KOZAK
 
Modelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdfModelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdf
camseq
 
Computational Engineering IITH Presentation
Computational Engineering IITH PresentationComputational Engineering IITH Presentation
Computational Engineering IITH Presentation
co23btech11018
 
basic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdfbasic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdf
NidhalKahouli2
 
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdfBPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
MIGUELANGEL966976
 
Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...
bijceesjournal
 
Question paper of renewable energy sources
Question paper of renewable energy sourcesQuestion paper of renewable energy sources
Question paper of renewable energy sources
mahammadsalmanmech
 
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
Yasser Mahgoub
 
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball playEric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
enizeyimana36
 
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
171ticu
 
Literature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptxLiterature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptx
Dr Ramhari Poudyal
 
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECTCHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
jpsjournal1
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
SUTEJAS
 
Manufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptxManufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptx
Madan Karki
 

Recently uploaded (20)

22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
 
Engine Lubrication performance System.pdf
Engine Lubrication performance System.pdfEngine Lubrication performance System.pdf
Engine Lubrication performance System.pdf
 
A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...A review on techniques and modelling methodologies used for checking electrom...
A review on techniques and modelling methodologies used for checking electrom...
 
Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...
 
Properties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptxProperties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptx
 
Generative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of contentGenerative AI leverages algorithms to create various forms of content
Generative AI leverages algorithms to create various forms of content
 
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024
 
Modelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdfModelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdf
 
Computational Engineering IITH Presentation
Computational Engineering IITH PresentationComputational Engineering IITH Presentation
Computational Engineering IITH Presentation
 
basic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdfbasic-wireline-operations-course-mahmoud-f-radwan.pdf
basic-wireline-operations-course-mahmoud-f-radwan.pdf
 
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdfBPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
BPV-GUI-01-Guide-for-ASME-Review-Teams-(General)-10-10-2023.pdf
 
Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...Comparative analysis between traditional aquaponics and reconstructed aquapon...
Comparative analysis between traditional aquaponics and reconstructed aquapon...
 
Question paper of renewable energy sources
Question paper of renewable energy sourcesQuestion paper of renewable energy sources
Question paper of renewable energy sources
 
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
2008 BUILDING CONSTRUCTION Illustrated - Ching Chapter 02 The Building.pdf
 
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball playEric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
Eric Nizeyimana's document 2006 from gicumbi to ttc nyamata handball play
 
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样官方认证美国密歇根州立大学毕业证学位证书原版一模一样
官方认证美国密歇根州立大学毕业证学位证书原版一模一样
 
Literature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptxLiterature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptx
 
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECTCHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
 
Understanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine LearningUnderstanding Inductive Bias in Machine Learning
Understanding Inductive Bias in Machine Learning
 
Manufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptxManufacturing Process of molasses based distillery ppt.pptx
Manufacturing Process of molasses based distillery ppt.pptx
 

Halstead's software science - ananalytical technique

  • 1. HALSTEAD’S SOFTWARE SCIENCE - AN ANALYTICAL TECHNIQUE
  • 2. PROJECT ESTIMATION TECHNIQUES ● Empirical Estimation Techniques ● Heuristic Techniques ● Analytical Estimation Techniques ○ HALSTEAD’S SOFTWARE SCIENCE
  • 3. INTRODUCTION Halstead’s Technique measure ● Size ● Development effort ● Development cost of s/w products
  • 4. INTRO (cont’d) Halstead used few primitive program parameters to develop expressions for: ● Overall program length ● Potential minimum volume and Program level ● Actual volume ● Effort ● Development time
  • 5. INTRO (cont’d) For any giving programs lets define the following parameters: ● η1 be the number of unique operators used in the program ● η2 be the number of unique operands used in the program ● N1 be the number of the total operators used in the program ● N2 be the number of the total operands used in the program
  • 6. INTRO (cont’d) Operator in general: a symbol or function representing a mathematical operation. ● assignments arithmetic and logical operators ● Parentheses pair, block begin/end pair ● If…then… else… endif ● Do…. While ● Statement terminator “;” ● Bitwise operator ● Pointers operator
  • 7. INTRO (cont’d) Operands in general: A quantity to which an operator is applied ● Subroutine declarations ● Variable declarations ● Variables and constants used with operators in an expression
  • 8. Operators and Operands for the ANSI C Language ● List of operators ( [ . , -> * + - ~ ! ++ -- * / % + - << >> < > <= >= != == & ^ | && || = *= /= %= += -= <<= >>= &= ^= |= : ? { ; CASE DEFAULT IF ELSE SWITCH WHILE DO FOR GOTO CONTINUE BREAK RETURN and a function name in function call ● Operands are those variables and constants which are used with operators in expressions Eg : a=&b; a,b are operands and = & are operators
  • 9. Length and Vocabulary ● Length : total usage of all operators and operands ie., total number of tokens used in the program Program Length (N)= N1 + N2 ● Vocabulary : is the number unique operands and operators used in the program Program Vocabulary (η)= η1 + η2
  • 10. Program Volume ● Program vocabulary and length depends on the programming style ● Different lengths of programs, corresponding to the same problem when different languages are used ● We need to express the program length by taking the programming language into consideration Program volume (V) is the minimum number of bits needed to encode the program
  • 11. Program Volume (cont’d) Program volume V = N log2 (η) ● To represent η different tokens we need log2 (η) bits ○ Example: to represent 8 operands we need 3 bits ● For a program of N length, we need N log2 (η) bits Program volume represents the size of the program by approximately compensating the effect of the programming language used
  • 12. Potential Minimum Volume (V*) ● V* is the volume of the most concise program in which the problem can be coded ● A program require at least 2 operators (η1 =2) and the required number of operands is η2 =n V* = (2+η2 ) log2 (2+η2 )
  • 13. Potential Minimum Volume (V*) (cont’d) Program Level (L) = V*/V ● Program level measures the level of abstraction provided by programming language ● Higher L, less effort it takes to develop a program using that language ○ Example: Assembly vs. C#
  • 14. Effort and Time ● To obtain the needed effort , we divide the program volume (size) on the program level (complexity) Effort (E) = V / L = V2 / V* (as L = V*/V) ● The programmer’s time needed to finish the program T = E / S where S is the speed of mental discriminations, recommended value of S is 18
  • 15. Length Estimation ● Although the program length can be estimated easily using the previous discussed equation N = N1 +N2 , this can be done before starting the programming activities. ● Instead, we can calculate the length depending on the unique numbers of operands and operators
  • 16. Length Estimation (cont’d) Halstead assumptions are based on: ● Program are unlikely to have several identical parts that are greater than (η) ● Identical parts are usually made into procedures and functions N = η1 log2 (η1 ) + η2 log2 (η2 ) ● Experimental evidence showed that the actual and the computed values are very close ● Results may be inaccurate when dealing with small programs or subsystems individually
  • 17. Recap ● Unique operators : η1 ● Unique Operands : η2 ● Total Operators : N1 ● Total Operands : N2 ● Program Vocabulary: η=η1 +η2 ● Program Length : N=N1 +N2 ● Program Volume : Nlog2 η ● Effort : E=V/L ● Time : T=E/S ● Estimated Length : N=η1 log2 η1 +η2 log2 η2
  • 18. Example Main() { int a, b, c, avg; scanf(“%d %d %d”, &a, &b, &c); avg = (a +b +c )/3; printf(“avg = %d”, avg); }
  • 19. Example (cont’d) ● The unique operators are: main, (), {}, int, scanf, &, “, “, “ ; ”, =, +, /, printf ● The unique operands are : a, b, c, &a, &b, &c, a +b +c, avg, 3, “%d %d %d”, “avg = %d” therefore η1 = 12, η2 = 11 N = 12 log2(12)+ 11log2(11) = 81 V = Nlog2(η) = 81log2(23) = 366