source code metrics and other maintenance tools and techniques

4,690 views 9 slides Nov 06, 2020
Slide 1
Slide 1 of 9
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9

About This Presentation

source code metrics and other maintenance tools and techniques


Slide Content

k.Sivapriya II.MSc (IT) Department of CS &IT Nadar saraswathi college of arts and science Theni Source code metrics & Other maintenance tools and techniques

Most of the metrics incorporate easily computed properties of the source code ,such as the number of operators and operands, the complexity of the source code. Such as the number of operators and operands, the complexity of the control flow graph, the number of parameters and global variables in routines. Source code metrics

Two source code metrics are discussed in this section Halstead’s effort equation McCabe’s cyclomatic complexity measure. Source code metrics type

Halstead developed a number of metrics that are computed from easily obtained properties of the source code. These properties include the total number of operators in a program, N1 ; the total number of operands in the program,N2; the number of unique operators in the program n1; and the number of unique operands ,n2. FORTRAN routine and the associated values of N1,N2 ,n1 and n2. Halstead’s effort equation

Halstead defines several quantities using these number. For example the program length N is defined as N1+N2;(N1+N2=50). Halstead’s estimator of program length is: N=n1 log2 n1 + n2 log2 n2 Example N=10(3.2)+7(2.8)=52.9 Program v olume is defined as V=(N1+N2) log2(n1+n2) Language level(level of abstraction) is L=(2*n2)/(n1*N2) Defined as V/L E=(n1*N2*(N1+N2)*log2(n1+n2))/(2*n2)

McCabe has observed that the difficulty of understanding a program is largely determined by the complexity of the of the control flow graph for that program. T he cyclomatic number V of a connoted graph G is the number of linearly independent path in thee graph. V(G) is computed as follows: V(G)= E-n +2p Where E is the number of edges N is the number of nodes P is the number of connected components. McCabe’s cyclomatic metric

Because software maintenance is a microcosm of software development, the activities that a software maintainer may become involved in span the entire spectrum of software engineering. Automated tools to support software maintenance include technical support tools and managerial supports tools. Other maintenance tools and techniques

A text editor permits rapid, efficient modification of source programs test data and supporting documents. text editors can be used to insert and replace segments of source code , internal comments, test data, and supporting documents. Debugging aids provide traps, dumps, traces, assertion checking, and history files to aid in locating the causes of known errors. A linkage editor links together objet models of compiled code to produce an executable program.

A comparator compares two files of information and reports the differences. Use of complexity metrics requires automated tools to compute the measures of interest. They can be used to track the history of each module in a system by recording which modules and which versions of which modules comprise which system r eleases.
Tags