SlideShare a Scribd company logo
Halsted’s software scienceAn Analytical Technique
1
PREPARED BY-

NUR ISLAM

Department of Information Technology
BESU, SHIBPUR
Halstead’s Software Science
2

 Halstead’s software science is an analytical

estimation method.
-Have scientific basis
 Starts with few simple assumptions about the
product, Halstead used few primitive program parameters
to develop expressions for:
1.
2.
3.
4.
5.

Overall program length
Potential minimum volume and Program level
Actual volume
Effort
Development time
Important Keywords
3

 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
Important Keywords
4

 Operands in general: A quantity to which an

operator is applied
– Subroutine declarations
– Variable declarations
– Variables and constants used with operators
in an expression
Example
5

2.

1.
a=&b
• Operands: a , b
• Operators : = , &

3.
int func (int a, int b)
{
...

}
• Operators:

{} , (), “,”

func(a, b);
• Operators: func, “,” , “;”
, “()”
• Operands: a , b
Halstead’s Software Science
6

• For any giving programs lets define the following
parameters:
– η1 be the number of unique parameters used in the

program
– η2 be the number of unique operands used in the
program
– N1 be the number of the total parameters used in the
program
– N2 be the number of the total operands used in the
program
Halstead’s Software Science
7

 Length and Vocabulary:

– Program Length (N)= N1 + N2
This notation agrees with our understanding of the total
length of a program as the total count of tokens
(operators and operands)

– Program Vocabulary (η)= η1 + η2
Halstead’s Software Science
8

 Program Volume:

Program volume (V)= is the minimum number of bits needed
to encode the program
– 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
Halstead’s Software Science
9

Program volume (V)= is the minimum number of
bits needed to encode the program

– 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
Halstead’s Software Science
10

Potential Program 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
• Example : func()
– Therefore: V* = (2+η2) log2(2+η2)
– Program Level (L) = V*/V
– Program level gives an indication of the language level
of abstraction
– Higher L, higher the language is easier to program with
• Example: Assembly vs. C#
Halstead’s Software Science
11

 Effort and Time:

– To obtain the needed effort , we divide the
program volume (size) on the program level
(complexity)
2
–Effort = E =V / L = V /V*
– The programmer’s time needed to finish the
program (T) = E / S, where S is the speed of mental
discriminations
• The recommended value of S is 18
Halstead’s Software Science
12

 Estimation of Length:

•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
Halstead’s Software Science
13

• 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
– Any program of length N consists of N/η
unique strings (of length η)
r
– for an alphabet of size K, there are K strings of
length r
Halstead’s Software Science
14

N = η1 log2 (η1) + η2log2(n2)
• 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
15

 Unique operators
 Unique Operands
 Total Operators
 Total Operands
 Program Vocabulary
 Program Length
 Program Volume
 Effort
 Time
 Estimated Length
 Estimated Effort

:
:
:
:
:
:
:
:
:
:
:

η1
η2
N1
N2
η=η1+η2
N=N1+N2
Nlog2η
E=V/L
T=E/S
N=η1log2η1+η2log2η2
E=V.(η1/η2).(N2/2)
Example
16

Main()
{
int a, b, c, avg;
scanf(“%d %d %d”, &a, &b, &c);
avg = (a +b +c )/3;
printf(“avg = %d”, avg);
}
Example
17

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
Resources
18

• Wikipedia
• Fundamentals of Software Engineering by
Rajib Mall, Chapter 3
19

More Related Content

What's hot

Symbol table in compiler Design
Symbol table in compiler DesignSymbol table in compiler Design
Symbol table in compiler Design
Kuppusamy P
 
Principles of programming languages. Detail notes
Principles of programming languages. Detail notesPrinciples of programming languages. Detail notes
Principles of programming languages. Detail notes
VIKAS SINGH BHADOURIA
 
Syntax analysis
Syntax analysisSyntax analysis
Syntax analysis
Akshaya Arunan
 
Code optimization in compiler design
Code optimization in compiler designCode optimization in compiler design
Code optimization in compiler design
Kuppusamy P
 
Type Checking(Compiler Design) #ShareThisIfYouLike
Type Checking(Compiler Design) #ShareThisIfYouLikeType Checking(Compiler Design) #ShareThisIfYouLike
Type Checking(Compiler Design) #ShareThisIfYouLike
United International University
 
4 evolution-of-programming-languages
4 evolution-of-programming-languages4 evolution-of-programming-languages
4 evolution-of-programming-languages
Rohit Shrivastava
 
Performance analysis(Time & Space Complexity)
Performance analysis(Time & Space Complexity)Performance analysis(Time & Space Complexity)
Performance analysis(Time & Space Complexity)
swapnac12
 
Python programs - first semester computer lab manual (polytechnics)
Python programs - first semester computer lab manual (polytechnics)Python programs - first semester computer lab manual (polytechnics)
Python programs - first semester computer lab manual (polytechnics)
SHAMJITH KM
 
Lecture 12 intermediate code generation
Lecture 12 intermediate code generationLecture 12 intermediate code generation
Lecture 12 intermediate code generation
Iffat Anjum
 
Type checking in compiler design
Type checking in compiler designType checking in compiler design
Type checking in compiler design
Sudip Singh
 
Asymptotic analysis
Asymptotic analysisAsymptotic analysis
Asymptotic analysis
Soujanya V
 
Asymptotic Notation
Asymptotic NotationAsymptotic Notation
Asymptotic Notation
Protap Mondal
 
RECURSIVE DESCENT PARSING
RECURSIVE DESCENT PARSINGRECURSIVE DESCENT PARSING
RECURSIVE DESCENT PARSING
Jothi Lakshmi
 
08 subprograms
08 subprograms08 subprograms
08 subprograms
baran19901990
 
Compiler Design
Compiler DesignCompiler Design
Compiler Design
Mir Majid
 
Software Engineering Layered Technology Software Process Framework
Software Engineering  Layered Technology Software Process FrameworkSoftware Engineering  Layered Technology Software Process Framework
Software Engineering Layered Technology Software Process Framework
JAINAM KAPADIYA
 
Unit1 principle of programming language
Unit1 principle of programming languageUnit1 principle of programming language
Unit1 principle of programming language
Vasavi College of Engg
 
Iterations and Recursions
Iterations and RecursionsIterations and Recursions
Iterations and Recursions
Abdul Rahman Sherzad
 
Formal Specification in Software Engineering SE9
Formal Specification in Software Engineering SE9Formal Specification in Software Engineering SE9
Formal Specification in Software Engineering SE9
koolkampus
 
Organization and team structures
Organization and team structuresOrganization and team structures
Organization and team structures
Nur Islam
 

What's hot (20)

Symbol table in compiler Design
Symbol table in compiler DesignSymbol table in compiler Design
Symbol table in compiler Design
 
Principles of programming languages. Detail notes
Principles of programming languages. Detail notesPrinciples of programming languages. Detail notes
Principles of programming languages. Detail notes
 
Syntax analysis
Syntax analysisSyntax analysis
Syntax analysis
 
Code optimization in compiler design
Code optimization in compiler designCode optimization in compiler design
Code optimization in compiler design
 
Type Checking(Compiler Design) #ShareThisIfYouLike
Type Checking(Compiler Design) #ShareThisIfYouLikeType Checking(Compiler Design) #ShareThisIfYouLike
Type Checking(Compiler Design) #ShareThisIfYouLike
 
4 evolution-of-programming-languages
4 evolution-of-programming-languages4 evolution-of-programming-languages
4 evolution-of-programming-languages
 
Performance analysis(Time & Space Complexity)
Performance analysis(Time & Space Complexity)Performance analysis(Time & Space Complexity)
Performance analysis(Time & Space Complexity)
 
Python programs - first semester computer lab manual (polytechnics)
Python programs - first semester computer lab manual (polytechnics)Python programs - first semester computer lab manual (polytechnics)
Python programs - first semester computer lab manual (polytechnics)
 
Lecture 12 intermediate code generation
Lecture 12 intermediate code generationLecture 12 intermediate code generation
Lecture 12 intermediate code generation
 
Type checking in compiler design
Type checking in compiler designType checking in compiler design
Type checking in compiler design
 
Asymptotic analysis
Asymptotic analysisAsymptotic analysis
Asymptotic analysis
 
Asymptotic Notation
Asymptotic NotationAsymptotic Notation
Asymptotic Notation
 
RECURSIVE DESCENT PARSING
RECURSIVE DESCENT PARSINGRECURSIVE DESCENT PARSING
RECURSIVE DESCENT PARSING
 
08 subprograms
08 subprograms08 subprograms
08 subprograms
 
Compiler Design
Compiler DesignCompiler Design
Compiler Design
 
Software Engineering Layered Technology Software Process Framework
Software Engineering  Layered Technology Software Process FrameworkSoftware Engineering  Layered Technology Software Process Framework
Software Engineering Layered Technology Software Process Framework
 
Unit1 principle of programming language
Unit1 principle of programming languageUnit1 principle of programming language
Unit1 principle of programming language
 
Iterations and Recursions
Iterations and RecursionsIterations and Recursions
Iterations and Recursions
 
Formal Specification in Software Engineering SE9
Formal Specification in Software Engineering SE9Formal Specification in Software Engineering SE9
Formal Specification in Software Engineering SE9
 
Organization and team structures
Organization and team structuresOrganization and team structures
Organization and team structures
 

Viewers also liked

Implementation of halstead
Implementation of halsteadImplementation of halstead
Implementation of halstead
vamshi batchu
 
Software Metrics
Software MetricsSoftware Metrics
Software Metrics
swatisinghal
 
13 software metrics
13 software metrics13 software metrics
Customer satisfaction analysis final
Customer satisfaction analysis finalCustomer satisfaction analysis final
Customer satisfaction analysis final
Hareesh M
 
PROCESSO DE SÍNTESE INDUSTRIAL DE UREIA: UMA REVISÃO DE LITERATURA
PROCESSO DE SÍNTESE INDUSTRIAL DE UREIA: UMA REVISÃO DE LITERATURAPROCESSO DE SÍNTESE INDUSTRIAL DE UREIA: UMA REVISÃO DE LITERATURA
PROCESSO DE SÍNTESE INDUSTRIAL DE UREIA: UMA REVISÃO DE LITERATURA
Victor Said
 
Instruction cycle
Instruction cycleInstruction cycle
Instruction cycle
Kumar
 
Line of Code (LOC) Matric and Function Point Matric
Line of Code (LOC) Matric and Function Point MatricLine of Code (LOC) Matric and Function Point Matric
Line of Code (LOC) Matric and Function Point Matric
Ankush Singh
 
Exerc. química orgânica
Exerc. química orgânicaExerc. química orgânica
Exerc. química orgânica
Wander Wesley
 
Software process and project metrics
Software process and project metricsSoftware process and project metrics
Software process and project metrics
Indu Sharma Bhardwaj
 
Summer Internship Project report- Customer Satisfaction Analysis: Reliance S...
Summer Internship Project report-  Customer Satisfaction Analysis: Reliance S...Summer Internship Project report-  Customer Satisfaction Analysis: Reliance S...
Summer Internship Project report- Customer Satisfaction Analysis: Reliance S...
Shubham Dasgupta
 
TOTAL QUALITY MANAGEMENT-Customer Satisfaction
TOTAL QUALITY MANAGEMENT-Customer SatisfactionTOTAL QUALITY MANAGEMENT-Customer Satisfaction
TOTAL QUALITY MANAGEMENT-Customer Satisfaction
Impulsive Maya
 
Customer satisfaction
Customer satisfactionCustomer satisfaction
Customer satisfaction
Rizwan Khurram
 
Measuring Customer Satisfaction
Measuring Customer SatisfactionMeasuring Customer Satisfaction
Measuring Customer Satisfaction
Teaching Excellence
 
Instruction cycle
Instruction cycleInstruction cycle
Instruction cycle
shweta-sharma99
 
Customer Satisfaction
Customer SatisfactionCustomer Satisfaction
Customer Satisfaction
munishmalhautra
 
Customer Satisfaction Presentation
Customer Satisfaction PresentationCustomer Satisfaction Presentation
Customer Satisfaction Presentation
Ateneo Graduate School of Business
 
Software engineering project management
Software engineering project managementSoftware engineering project management
Software engineering project management
jhudyne
 

Viewers also liked (17)

Implementation of halstead
Implementation of halsteadImplementation of halstead
Implementation of halstead
 
Software Metrics
Software MetricsSoftware Metrics
Software Metrics
 
13 software metrics
13 software metrics13 software metrics
13 software metrics
 
Customer satisfaction analysis final
Customer satisfaction analysis finalCustomer satisfaction analysis final
Customer satisfaction analysis final
 
PROCESSO DE SÍNTESE INDUSTRIAL DE UREIA: UMA REVISÃO DE LITERATURA
PROCESSO DE SÍNTESE INDUSTRIAL DE UREIA: UMA REVISÃO DE LITERATURAPROCESSO DE SÍNTESE INDUSTRIAL DE UREIA: UMA REVISÃO DE LITERATURA
PROCESSO DE SÍNTESE INDUSTRIAL DE UREIA: UMA REVISÃO DE LITERATURA
 
Instruction cycle
Instruction cycleInstruction cycle
Instruction cycle
 
Line of Code (LOC) Matric and Function Point Matric
Line of Code (LOC) Matric and Function Point MatricLine of Code (LOC) Matric and Function Point Matric
Line of Code (LOC) Matric and Function Point Matric
 
Exerc. química orgânica
Exerc. química orgânicaExerc. química orgânica
Exerc. química orgânica
 
Software process and project metrics
Software process and project metricsSoftware process and project metrics
Software process and project metrics
 
Summer Internship Project report- Customer Satisfaction Analysis: Reliance S...
Summer Internship Project report-  Customer Satisfaction Analysis: Reliance S...Summer Internship Project report-  Customer Satisfaction Analysis: Reliance S...
Summer Internship Project report- Customer Satisfaction Analysis: Reliance S...
 
TOTAL QUALITY MANAGEMENT-Customer Satisfaction
TOTAL QUALITY MANAGEMENT-Customer SatisfactionTOTAL QUALITY MANAGEMENT-Customer Satisfaction
TOTAL QUALITY MANAGEMENT-Customer Satisfaction
 
Customer satisfaction
Customer satisfactionCustomer satisfaction
Customer satisfaction
 
Measuring Customer Satisfaction
Measuring Customer SatisfactionMeasuring Customer Satisfaction
Measuring Customer Satisfaction
 
Instruction cycle
Instruction cycleInstruction cycle
Instruction cycle
 
Customer Satisfaction
Customer SatisfactionCustomer Satisfaction
Customer Satisfaction
 
Customer Satisfaction Presentation
Customer Satisfaction PresentationCustomer Satisfaction Presentation
Customer Satisfaction Presentation
 
Software engineering project management
Software engineering project managementSoftware engineering project management
Software engineering project management
 

Similar to Halsted’s Software Science-An analytical technique

Halstead's software science - ananalytical technique
Halstead's software science - ananalytical techniqueHalstead's software science - ananalytical technique
Halstead's software science - ananalytical technique
Vishnupriya T H
 
Software code metrics
Software code metricsSoftware code metrics
Software code metrics
PVS-Studio
 
Introduction to computer programming
Introduction to computer programmingIntroduction to computer programming
Introduction to computer programming
Sangheethaa Sukumaran
 
System Programming Overview
System Programming OverviewSystem Programming Overview
System Programming Overview
Dattatray Gandhmal
 
System programming vs application programming
System programming vs application programmingSystem programming vs application programming
System programming vs application programming
Inderbir Kaur Sandhu
 
Presentation1
Presentation1Presentation1
Presentation1
Zarin Tasnim
 
Presentation1
Presentation1Presentation1
Presentation1
Zarin Tasnim
 
C programming for Computing Techniques
C programming for Computing TechniquesC programming for Computing Techniques
C programming for Computing Techniques
Appili Vamsi Krishna
 
Unit1.ppt
Unit1.pptUnit1.ppt
Unit1.ppt
BerlinShaheema2
 
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
 
Cs111 ch01 v4
Cs111 ch01 v4Cs111 ch01 v4
Cs111 ch01 v4
ArnoldNarte
 
A benchmark based approach to determine language verbosity - Hans Kuijpers - ...
A benchmark based approach to determine language verbosity - Hans Kuijpers - ...A benchmark based approach to determine language verbosity - Hans Kuijpers - ...
A benchmark based approach to determine language verbosity - Hans Kuijpers - ...
Nesma
 
structured programming Introduction to c fundamentals
structured programming Introduction to c fundamentalsstructured programming Introduction to c fundamentals
structured programming Introduction to c fundamentals
OMWOMA JACKSON
 
FALLSEM2022-23_BCSE202L_TH_VL2022230103292_Reference_Material_I_25-07-2022_Fu...
FALLSEM2022-23_BCSE202L_TH_VL2022230103292_Reference_Material_I_25-07-2022_Fu...FALLSEM2022-23_BCSE202L_TH_VL2022230103292_Reference_Material_I_25-07-2022_Fu...
FALLSEM2022-23_BCSE202L_TH_VL2022230103292_Reference_Material_I_25-07-2022_Fu...
AntareepMajumder
 
Chapter 4 computer language
Chapter 4 computer languageChapter 4 computer language
Chapter 4 computer language
Azimjon Khamdamov
 
Lecture-1.pptx . this is about the computer program
Lecture-1.pptx . this is about the computer programLecture-1.pptx . this is about the computer program
Lecture-1.pptx . this is about the computer program
MuhammadUsmanYaseen2
 
R programming Language , Rahul Singh
R programming Language , Rahul SinghR programming Language , Rahul Singh
R programming Language , Rahul Singh
Ravi Basil
 
Introduction to algorithms
Introduction to algorithmsIntroduction to algorithms
Introduction to algorithms
Madishetty Prathibha
 
1 cc
1 cc1 cc
1 cc
Jay Soni
 
Introduction to data structures and Algorithm
Introduction to data structures and AlgorithmIntroduction to data structures and Algorithm
Introduction to data structures and Algorithm
Dhaval Kaneria
 

Similar to Halsted’s Software Science-An analytical technique (20)

Halstead's software science - ananalytical technique
Halstead's software science - ananalytical techniqueHalstead's software science - ananalytical technique
Halstead's software science - ananalytical technique
 
Software code metrics
Software code metricsSoftware code metrics
Software code metrics
 
Introduction to computer programming
Introduction to computer programmingIntroduction to computer programming
Introduction to computer programming
 
System Programming Overview
System Programming OverviewSystem Programming Overview
System Programming Overview
 
System programming vs application programming
System programming vs application programmingSystem programming vs application programming
System programming vs application programming
 
Presentation1
Presentation1Presentation1
Presentation1
 
Presentation1
Presentation1Presentation1
Presentation1
 
C programming for Computing Techniques
C programming for Computing TechniquesC programming for Computing Techniques
C programming for Computing Techniques
 
Unit1.ppt
Unit1.pptUnit1.ppt
Unit1.ppt
 
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
 
Cs111 ch01 v4
Cs111 ch01 v4Cs111 ch01 v4
Cs111 ch01 v4
 
A benchmark based approach to determine language verbosity - Hans Kuijpers - ...
A benchmark based approach to determine language verbosity - Hans Kuijpers - ...A benchmark based approach to determine language verbosity - Hans Kuijpers - ...
A benchmark based approach to determine language verbosity - Hans Kuijpers - ...
 
structured programming Introduction to c fundamentals
structured programming Introduction to c fundamentalsstructured programming Introduction to c fundamentals
structured programming Introduction to c fundamentals
 
FALLSEM2022-23_BCSE202L_TH_VL2022230103292_Reference_Material_I_25-07-2022_Fu...
FALLSEM2022-23_BCSE202L_TH_VL2022230103292_Reference_Material_I_25-07-2022_Fu...FALLSEM2022-23_BCSE202L_TH_VL2022230103292_Reference_Material_I_25-07-2022_Fu...
FALLSEM2022-23_BCSE202L_TH_VL2022230103292_Reference_Material_I_25-07-2022_Fu...
 
Chapter 4 computer language
Chapter 4 computer languageChapter 4 computer language
Chapter 4 computer language
 
Lecture-1.pptx . this is about the computer program
Lecture-1.pptx . this is about the computer programLecture-1.pptx . this is about the computer program
Lecture-1.pptx . this is about the computer program
 
R programming Language , Rahul Singh
R programming Language , Rahul SinghR programming Language , Rahul Singh
R programming Language , Rahul Singh
 
Introduction to algorithms
Introduction to algorithmsIntroduction to algorithms
Introduction to algorithms
 
1 cc
1 cc1 cc
1 cc
 
Introduction to data structures and Algorithm
Introduction to data structures and AlgorithmIntroduction to data structures and Algorithm
Introduction to data structures and Algorithm
 

More from Nur Islam

Lan wan
Lan wanLan wan
Lan wan
Nur Islam
 
Gsm
GsmGsm
Overview of iso 9001
Overview of iso 9001Overview of iso 9001
Overview of iso 9001
Nur Islam
 
Software reliability & quality
Software reliability & qualitySoftware reliability & quality
Software reliability & quality
Nur Islam
 
Metrics for project size estimation
Metrics for project size estimationMetrics for project size estimation
Metrics for project size estimation
Nur Islam
 
Cellular automata
Cellular automataCellular automata
Cellular automata
Nur Islam
 
Designing of media player
Designing of media playerDesigning of media player
Designing of media player
Nur Islam
 

More from Nur Islam (7)

Lan wan
Lan wanLan wan
Lan wan
 
Gsm
GsmGsm
Gsm
 
Overview of iso 9001
Overview of iso 9001Overview of iso 9001
Overview of iso 9001
 
Software reliability & quality
Software reliability & qualitySoftware reliability & quality
Software reliability & quality
 
Metrics for project size estimation
Metrics for project size estimationMetrics for project size estimation
Metrics for project size estimation
 
Cellular automata
Cellular automataCellular automata
Cellular automata
 
Designing of media player
Designing of media playerDesigning of media player
Designing of media player
 

Recently uploaded

Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
National Information Standards Organization (NISO)
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
Katrina Pritchard
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
Celine George
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
Celine George
 
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...
Diana Rendina
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
PECB
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
Celine George
 
Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
TechSoup
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
adhitya5119
 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
Jyoti Chand
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
Celine George
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
WaniBasim
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
Celine George
 
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UPLAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
RAHUL
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
Nicholas Montgomery
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
amberjdewit93
 
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
siemaillard
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
Nguyen Thanh Tu Collection
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
AyyanKhan40
 

Recently uploaded (20)

Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
 
BBR 2024 Summer Sessions Interview Training
BBR  2024 Summer Sessions Interview TrainingBBR  2024 Summer Sessions Interview Training
BBR 2024 Summer Sessions Interview Training
 
How to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 InventoryHow to Setup Warehouse & Location in Odoo 17 Inventory
How to Setup Warehouse & Location in Odoo 17 Inventory
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
 
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...
Reimagining Your Library Space: How to Increase the Vibes in Your Library No ...
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
 
Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
 
Wound healing PPT
Wound healing PPTWound healing PPT
Wound healing PPT
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
 
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UPLAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
 
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
 

Halsted’s Software Science-An analytical technique

  • 1. Halsted’s software scienceAn Analytical Technique 1 PREPARED BY- NUR ISLAM Department of Information Technology BESU, SHIBPUR
  • 2. Halstead’s Software Science 2  Halstead’s software science is an analytical estimation method. -Have scientific basis  Starts with few simple assumptions about the product, Halstead used few primitive program parameters to develop expressions for: 1. 2. 3. 4. 5. Overall program length Potential minimum volume and Program level Actual volume Effort Development time
  • 3. Important Keywords 3  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
  • 4. Important Keywords 4  Operands in general: A quantity to which an operator is applied – Subroutine declarations – Variable declarations – Variables and constants used with operators in an expression
  • 5. Example 5 2. 1. a=&b • Operands: a , b • Operators : = , & 3. int func (int a, int b) { ... } • Operators: {} , (), “,” func(a, b); • Operators: func, “,” , “;” , “()” • Operands: a , b
  • 6. Halstead’s Software Science 6 • For any giving programs lets define the following parameters: – η1 be the number of unique parameters used in the program – η2 be the number of unique operands used in the program – N1 be the number of the total parameters used in the program – N2 be the number of the total operands used in the program
  • 7. Halstead’s Software Science 7  Length and Vocabulary: – Program Length (N)= N1 + N2 This notation agrees with our understanding of the total length of a program as the total count of tokens (operators and operands) – Program Vocabulary (η)= η1 + η2
  • 8. Halstead’s Software Science 8  Program Volume: Program volume (V)= is the minimum number of bits needed to encode the program – 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
  • 9. Halstead’s Software Science 9 Program volume (V)= is the minimum number of bits needed to encode the program – 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
  • 10. Halstead’s Software Science 10 Potential Program 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 • Example : func() – Therefore: V* = (2+η2) log2(2+η2) – Program Level (L) = V*/V – Program level gives an indication of the language level of abstraction – Higher L, higher the language is easier to program with • Example: Assembly vs. C#
  • 11. Halstead’s Software Science 11  Effort and Time: – To obtain the needed effort , we divide the program volume (size) on the program level (complexity) 2 –Effort = E =V / L = V /V* – The programmer’s time needed to finish the program (T) = E / S, where S is the speed of mental discriminations • The recommended value of S is 18
  • 12. Halstead’s Software Science 12  Estimation of Length: •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
  • 13. Halstead’s Software Science 13 • 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 – Any program of length N consists of N/η unique strings (of length η) r – for an alphabet of size K, there are K strings of length r
  • 14. Halstead’s Software Science 14 N = η1 log2 (η1) + η2log2(n2) • 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
  • 15. Recap 15  Unique operators  Unique Operands  Total Operators  Total Operands  Program Vocabulary  Program Length  Program Volume  Effort  Time  Estimated Length  Estimated Effort : : : : : : : : : : : η1 η2 N1 N2 η=η1+η2 N=N1+N2 Nlog2η E=V/L T=E/S N=η1log2η1+η2log2η2 E=V.(η1/η2).(N2/2)
  • 16. Example 16 Main() { int a, b, c, avg; scanf(“%d %d %d”, &a, &b, &c); avg = (a +b +c )/3; printf(“avg = %d”, avg); }
  • 17. Example 17 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
  • 18. Resources 18 • Wikipedia • Fundamentals of Software Engineering by Rajib Mall, Chapter 3
  • 19. 19