Professional Documents
Culture Documents
CMU CS+462+ +Software+Meassurement+and+Analysis+ +2020S +Lecture+Slides+ +6
CMU CS+462+ +Software+Meassurement+and+Analysis+ +2020S +Lecture+Slides+ +6
CMU-CS 462:
Software Measurement Measuring Internal Product Attributes:
and Analysis Software Size
Spring 2019-2020
Nguyen Duc Man
E: mannd@duytan.edu.vn
T: 0904235945
14/Mar/2020 1 14/Mar/2020 2
1 2
1
14/Mar/2020
3 4
2
14/Mar/2020
14/Mar/2020 5 14/Mar/2020 6
5 6
3
14/Mar/2020
14/Mar/2020 7 14/Mar/2020 8
7 8
4
14/Mar/2020
◼ Count of only executable statements, not including On lines with source code X
14/Mar/2020 9 14/Mar/2020 10
9 10
5
14/Mar/2020
14/Mar/2020 11 14/Mar/2020 12
11 12
6
14/Mar/2020
◼ Number of distinct operators in the program (μ1) ◼ Program length is the total number of occurrences of
operators and operands:
◼ Number of distinct operands in the program (μ2) N = N1 + N2
◼ Total number of occurrences of operators in the ◼ Program volume is the number of mental comparisons
program (N1) needed to write a program of length N
◼ Total number of occurrences of operands in the V = N log 2 = (N1 + N 2 ) log 2 (1 + 2 )
program (N2) ◼ Program level (L):
1 2
L =V* V or L= = 2
◼ Program vocabulary (μ) D 1 N2
μ = μ1 + μ2 ◼ where V * is the minimum size potential volume (i.e.,
minimal size of implementation) and D is program difficulty
14/Mar/2020 13 14/Mar/2020 14
13 14
7
14/Mar/2020
◼ Program length is the total number of occurrences ◼ Time required for developing program P is
of operators and operands: the total effort divided by the number of
N = N1 + N2 elementary discriminations per second
◼ Program estimated length (Nˆ)
T = E
Nˆ = 1 log2 1 + 2 log2 2
◼ Effort required to generate program P: number of ◼ In cognitive psychology β is usually a
elementary discriminations number between 5 and 20
V 1 N2 Halstead claims that β=18
E = V D = = N log 2 ◼
L 2 2
14/Mar/2020 15 14/Mar/2020 16
15 16
8
14/Mar/2020
3000
◼ Conclusion: the bigger program needs more
time to be developed and more bugs
remained
14/Mar/2020 17 14/Mar/2020 18
17 18
9
14/Mar/2020
14/Mar/2020 19 14/Mar/2020 20
19 20
10
14/Mar/2020
14/Mar/2020 21 14/Mar/2020 22
21 22
11
14/Mar/2020
14/Mar/2020 23 14/Mar/2020 24
23 24
12
14/Mar/2020
14/Mar/2020 25 14/Mar/2020 26
25 26
13
14/Mar/2020
14/Mar/2020 27 14/Mar/2020 28
27 28
14
14/Mar/2020
◼ etc.
14/Mar/2020 29 14/Mar/2020 30
29 30
15
14/Mar/2020
◼ Depending on the programmer and/or coding ◼ Function Point (FP) is a weighted measure of software
standards, the "line of code" could be, and usually is, functionality.
written on many separate lines: ◼ The idea is that a product with more functionality will be
for (i=0; i<100;++i) larger in size.
{ ◼ Function-oriented metrics are indirect measures of software
printf("hello"); which focus on functionality and utility.
} /* Now how many lines of code is this? */ ◼ The first function-oriented metrics was proposed by Albrecht
◼ In this example we have: (1979~1983) who suggested a productivity measurement
◼ 4 Physical Lines of Code (is placing braces worth to be approach called the Function Point (FP) method.
estimated?) ◼ Function points (FPs) measure the amount of functionality in
◼ 2 Logical Line of Code (What about all the work writing non- a system based upon the system specification.
statement lines?)
◼ 1 Comment Line (?)
14/Mar/2020 31 14/Mar/2020 32
31 32
16
14/Mar/2020
14/Mar/2020 33 14/Mar/2020 34
33 34
17
14/Mar/2020
External
20968:2002 Point Analysis Function Points
External Interface files (EIF) Inquiries (EQ)
Internal Logic files (ILF)
14/Mar/2020 35 14/Mar/2020 36
35 36
18
14/Mar/2020
Adjustment
Value Adjustment
◼ FP is computed in two steps: 14 Adjustment Factors
Factor (VAF)
Weighting of
14/Mar/2020 37 14/Mar/2020 38
37 38
19
14/Mar/2020
39 40
20
14/Mar/2020
◼ Reports created by the application being counted, where ◼ Application control information, perhaps things like user
preferences that are stored by the application
the report does not include any derived data
14/Mar/2020 41 14/Mar/2020 42
41 42
21
14/Mar/2020
14/Mar/2020 43 14/Mar/2020 44
43 44
22
14/Mar/2020
14/Mar/2020 45 14/Mar/2020 46
45 46
23
14/Mar/2020
#DET
◼ How to assess complexity? EI
1-4 5-15 > 15
1 low (3) low (3) average (4)
Data Function Types Transaction Function Types #FTR 2 low (3) average (4) high (6)
Internal Logical External External External External >2 average (4) high (6) high (6)
Files (ILF) Interface Files Input Output Inquiry
(EIF) (EI) (EO) (EQ)
Elements REcord Types (RET): User File Type Referenced (FTR): ◼ Identify number of File Types Referenced (FTR)
evaluated recognizable sub groups of data File type referenced by a
for technical elements within an ILF or an EIF. It transaction. An FTR must be an
complexity is best to look at logical groupings Internal Logical File (ILF) or
◼ Identify number of Data Element Type (DET)
assessment of data to help identify them. External Interface File (EIF).
◼ Determine complexity weight (→ used to calculate
Data Element Types (DET): A unique user recognizable, non-recursive
(non-repetitive) field containing dynamic information. If a DET is FP count)
recursive then only the first occurrence of the DET is considered not
every occurrence.
14/Mar/2020 47 14/Mar/2020 48
47 48
24
14/Mar/2020
14/Mar/2020 49 14/Mar/2020 50
49 50
25
14/Mar/2020
14/Mar/2020 51 14/Mar/2020 52
51 52
26
14/Mar/2020
14/Mar/2020 53 14/Mar/2020 54
53 54
27
14/Mar/2020
14/Mar/2020 55 14/Mar/2020 56
55 56
28
14/Mar/2020
◼ Determine complexity weight (→ used to calculate FP #RET 2-5 low (5) average (7) high (10)
>5 average (7) high (10) high (10)
count)
14/Mar/2020 57 14/Mar/2020 58
57 58
29
14/Mar/2020
14/Mar/2020 59 14/Mar/2020 60
59 60
30
14/Mar/2020
◼ Value Adjustment Factor (VAF) (aka. Technical ◼ Each component is rated from 0 to 5, where 0
complexity factors) is a weighted sum of 14 means the component is not relevant to the system
components, given below: and 5 means the component is essential.
◼ VAF can then be calculated as:
F1 Data Communications F8 On-line Update
Min = 0
F2 Distributed Data Processing F9 Complex Processing 14 Max = 0.7
F3 Performance F10 Reusability VAF = 0.65 + 0.01 Fj
F4 Heavily Used Configuration F11 Installation Ease j=1
F5 Transaction Rate F12 Operational Ease
F6 On-line Data Entry F13 Multiple Sites
◼ VAF varies from 0.65 (if all Fj are set to 0) to 1.35
F7 End-User Efficiency F14 Facilitate Change
(if all Fj are set to 5)
14/Mar/2020 61 14/Mar/2020 62
61 62
31
14/Mar/2020
Watch the following video and answer the below Criteria LOC Halstead’s FP OP
question. Applicable to early stages No
No Yes Yes
(requirement phase) of (may be)
- https://www.youtube.com/watch?v=Nf8XsGjcDSk software development?
Subjective measure? No No Yes Yes
Derivable from system No No Yes Yes
Q. What are FP analysis steps? requirements?
Language dependable? Yes Yes No No
Has clear and understandable
Yes No No No
physical meaning?
14/Mar/2020 63 14/Mar/2020 64
63 64
32
14/Mar/2020
65 66
33