Measuring Internal Product Attributes: Size: Basel Dudin Dudinbk@mcmaster - Ca
Measuring Internal Product Attributes: Size: Basel Dudin Dudinbk@mcmaster - Ca
[email protected]
Outline
¡ Aspects of Software Size
¡ Length (LOC)
¡ Lines of Code
¡ Halstead’s Theory
¡ Functionality
¡ Unadjusted Function Point
Count (UFC)
Aspects of Software Size
¡ Size: One of the most useful attributes of a software
product that can be measured without having to
execute the system.
¡ Can be described by length, functionality, and
complexity:
¡ Length is the physical product size (traditionally code
length).
¡ Functionality is a measure of the functions supplied by
the product to the user.
¡ Complexity is a multi-faceted attribute which can be
interpreted in multiple ways.
¡ {
¡ printf("hello");
¡ }
¡ 1 comment line: tools must account for all code and comments
regardless of comment placement.
LOC: Pros and Cons
¡ Advantages of LOC
¡ Simple and automatically measurable
¡ Correlates with programming effort (& cost)
N=N1 +N2
Ń = µ1 log2 µ1 + µ2 log2 µ2
T=E/β
#include<stdio.h>
main()
{
int a ;
}
Example
¡ Determine number of operators (μ1).
¡ Example:
for (i=0; i<100; ++i)
{
printf("hello");
} /* Now how many lines of code is this? */
¡ 4 Physical Lines of Code (is placing braces worth to be
estimated?)
¡ 2 Logical Lines of Code (What about all the work writing
non-statement lines?)
¡ 1 Comment Line (?)
Functionality
¡ Function Point (FP) is a weighted measure of software
functionality.
Function
Point
Functions
¡ Function Point (FP) is a weighted measure of
software functionality.
n Example:
n Reports created by the application being counted,
where the reports include derived information
External Inquiries (EQ)
¡ External Inquiries – IFPUG Definition:
¡ Example:
Reports created by the application being counted, where
the report does not include any derived data
Internal Logic Files (ILF)
¡ Internal Logical Files – IFPUG Definition:
¡ An ILF is a user-identifiable group of logically related
data or control information maintained within the
boundary of the application
¡ The primary intent of an ILF is to hold data
maintained through one or more elementary
processes of the application being counted
¡ Examples:
¡ Tables in a relational database
¡ Files
External Interface Files (EIF)
¡ External Interface files – IFPUG Definition:
¡ An external interface file (EIF) is a user identifiable
group of logically related data or control information
referenced by the application, but maintained
within the boundary of another application
¡ The primary intent of an EIF is to hold data
referenced through one or more elementary
processes within the boundary of the application
counted
¡ This means an EIF counted for an application must
be in an ILF in another application
Example:
External Inputs 3 4 6
(NEI)
External Outputs 4 5 7
(NEO)
External Inquiries 3 4 6
(NEQ)
External 5 7 10
Interface Files
(NEIF)
Internal Logic 7 10 15
Files (NILF)
Unadjusted Function Count
(UFC)
¡ Defined as a complexity rating that is associated
with each of the defined counts according to
function point complexity weights illustrated on
previous table
UFC = 4NEI+5NEO+4NEQ+7NEIF+10NILF
Weighted Technical
Complexity
Element Low Average High Sum
External Inputs ____X3 ____X4 ____X6
(NEI)
External ____X4 ____X5 ____X7
Outputs (NEO)
¡ Requests can be issued at any point in time while processing the
document file
Spell Checker Model
Computer
A
Doc Dic
Name Name #Errors
#Words
Document
Name
Spell Checker
User Dictionary
Personal
Dictionary
#Words #Errors
Report
Computer
B
Context Diagram
Solution
¡ EI: Doc. name + User Dic. name à 2
¡ EQ: --
Internal 7 10 15
Logic Files
(NILF)