Date | No of Classes | Topics | Documents |
02/01/2017 | 1 | Introduction | PPT |
08/01/2017 09/01/2017 | 2 3 | Overviewof Software Processes | PPT |
16/01/2017 22/01/2017 | 4 5 | Feasibility Study | PPT |
26/01/2017 29/01/2017 | 6 7 | Project Management | PPT |
30/01/2017 13/02/2017 16/02/2017 | 8 9 10 | Project Management Techniques | PPT |
20/02/2017 26/02/2017 | 11 12 | GanttChart | PPT |
27/02/2017 | 13 | Firs Mid Term Exam | Marks |
05/03/2017 | 14 | Systems Models I | PPT |
09/03/2017 | 15 | Systems Models II | PPT |
12/03/2017 | 16 | Object Model | PPT |
13/03/2017 | 17 | Open Discussion | |
16/03/2017 17/03/2017 | 18 | GRASP PATTERNS | PPT |
20/03/2017 | 20 | Collaboration Diagram | PPT |
23/03/2017 | 21 | Second Mid Term Exam | Marks |
27/03/2017 02/04/2017 | 22 23 | Risk Management Measurement | PPT |
03/04/2017 | 24 | Students Presentations | |
06/04/2017 | 25 | Softwarecost estimation | PPT |
09/04/2017 | 26 | SoftwareMetrics | PPT |
4.5 Collecting Software Engineering Data. The challenge of collecting software engineering data is to make sure that the collected data can provide useful information for project, process, and quality management and, at the same time, that the data collection process will not be a burden on development teams. Data flow and data structure attributes Architectural measurement Review week: Review and midterm exam. Software Metrics: A Guide to Planning, Analysis, and Application. A Methodology for Collecting Valid Software Engineering Data, IEEE Transactions on Software Engineering, vol. 10, pp.728-738. We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Metrics need dramatically less space to store a data point than a log line. For example, authors of prometheus.io claim that it needs on average 1.37 bytes to store a single data point. We can keep more metrics for longer than log lines using the same storage.
A computer program is an implementation of an algorithm considered to be a collection of tokens which can be classified as either operators or operands. Halstead’s metrics are included in a number of current commercial tools that count software lines of code. By counting the tokens and determining which are operators and which are operands, the following base measures can be collected :
n1 = Number of distinct operators.
n2 = Number of distinct operands.
N1 = Total number of occurrences of operators.
N2 = Total number of occurrences of operands.
n2 = Number of distinct operands.
N1 = Total number of occurrences of operators.
N2 = Total number of occurrences of operands.
Data Structure Introduction Ppt
In addition to the above, Halstead defines the following :
n1* = Number of potential operators.
n2* = Number of potential operands.
n2* = Number of potential operands.
Halstead refers to n1* and n2* as the minimum possible number of operators and operands for a module and a program respectively. This minimum number would be embodied in the programming language itself, in which the required operation would already exist (for example, in C language, any program must contain at least the definition of the function main()), possibly as a function or as a procedure: n1* = 2, since at least 2 operators must appear for any function or procedure : 1 for the name of the function and 1 to serve as an assignment or grouping symbol, and n2* represents the number of parameters, without repetition, which would need to be passed on to the function or the procedure.
Halstead metrics –
Halstead metrics are :
- Halstead Program Length – The total number of operator occurrences and the total number of operand occurrences.
N = N1 + N2And estimated program length is, N^ = n1log2n1 + n2log2n2The following alternate expressions have been published to estimate program length:- NJ = log2(n1!) + log2(n2!)
- NB = n1 * log2n2 + n2 * log2n1
- NC = n1 * sqrt(n1) + n2 * sqrt(n2)
- NS = (n * log2n) / 2
- Halstead Vocabulary – The total number of unique operator and unique operand occurrences.
n = n1 + n2 - Program Volume – Proportional to program size, represents the size, in bits, of space necessary for storing the program. This parameter is dependent on specific algorithm implementation. The properties V, N, and the number of lines in the code are shown to be linearly connected and equally valid for measuring relative program size.V = Size * (log2 vocabulary) = N * log2(n)The unit of measurement of volume is the common unit for size “bits”. It is the actual size of a program if a uniform binary encoding for the vocabulary is used. And error = Volume / 3000
- Potential Minimum Volume – The potential minimum volume V* is defined as the volume of the most succinct program in which a problem can be coded.V* = (2 + n2*) * log2(2 + n2*)Here, n2* is the count of unique input and output parameters
- Program Level – To rank the programming languages, the level of abstraction provided by the programming language, Program Level (L) is considered. The higher the level of a language, the less effort it takes to develop a program using that language.L = V* / VThe value of L ranges between zero and one, with L=1 representing a program written at the highest possible level (i.e., with minimum size).
And estimated program level is L^ =2 * (n2) / (n1)(N2) - Program Difficulty – This parameter shows how difficult to handle the program is.
D = (n1 / 2) * (N2 / n2)
D = 1 / L
As the volume of the implementation of a program increases, the program level decreases and the difficulty increases. Thus, programming practices such as redundant usage of operands, or the failure to use higher-level control constructs will tend to increase the volume as well as the difficulty. - Programming Effort – Measures the amount of mental activity needed to translate the existing algorithm into implementation in the specified program language.
E = V / L = D * V = Difficulty * Volume - Language Level – Shows the algorithm implementation program language level. The same algorithm demands additional effort if it is written in a low-level program language. For example, it is easier to program in Pascal than in Assembler.
L’ = V / D / D
lambda = L * V* = L2 * V - Intelligence Content – Determines the amount of intelligence presented (stated) in the program This parameter provides a measurement of program complexity, independently of the program language in which it was implemented.
I = V / D - Programming Time – Shows time (in minutes) needed to translate the existing algorithm into implementation in the specified program language.
T = E / (f * S)The concept of the processing rate of the human brain, developed by the psychologist John Stroud, is also used. Stoud defined a moment as the time required by the human brain requires to carry out the most elementary decision. The Stoud number S is therefore Stoud’s moments per second with:
5 <= S <= 20. Halstead uses 18. The value of S has been empirically developed from psychological reasoning, and its recommended value for programming applications is 18.Stroud number S = 18 moments / secondseconds-to-minutes factor f = 60
Counting rules for C language –
- Comments are not considered.
- The identifier and function declarations are not considered
- All the variables and constants are considered operands.
- Global variables used in different modules of the same program are counted as multiple occurrences of the same variable.
- Local variables with the same name in different functions are counted as unique operands.
- Functions calls are considered as operators.
- All looping statements e.g., do {…} while ( ), while ( ) {…}, for ( ) {…}, all control statements e.g., if ( ) {…}, if ( ) {…} else {…}, etc. are considered as operators.
- In control construct switch ( ) {case:…}, switch as well as all the case statements are considered as operators.
- The reserve words like return, default, continue, break, sizeof, etc., are considered as operators.
- All the brackets, commas, and terminators are considered as operators.
- GOTO is counted as an operator and the label is counted as an operand.
- The unary and binary occurrence of “+” and “-” are dealt separately. Similarly “*” (multiplication operator) are dealt separately.
- In the array variables such as “array-name [index]” “array-name” and “index” are considered as operands and [ ] is considered as operator.
- In the structure variables such as “struct-name, member-name” or “struct-name -> member-name”, struct-name, member-name are taken as operands and ‘.’, ‘->’ are taken as operators. Some names of member elements in different structure variables are counted as unique operands.
- All the hash directive are ignored.
Example – List out the operators and operands and also calculate the values of software science measures like
Explanation –
operators | occurrences | operands | occurrences |
int | 4 | sort | 1 |
() | 5 | x | 7 |
, | 4 | n | 3 |
[] | 7 | i | 8 |
if | 2 | j | 7 |
< | 2 | save | 3 |
; | 11 | im1 | 3 |
for | 2 | 2 | 2 |
= | 6 | 1 | 3 |
– | 1 | 0 | 1 |
<= | 2 | – | – |
++ | 2 | – | – |
return | 2 | – | – |
{} | 3 | – | – |
n1=14 | N1=53 | n2=10 | N2=38 |
Reference –
Halstead complexity measures – Wikipedia
ristancase
Halstead complexity measures – Wikipedia
ristancase
Types Of Metrics In Software Engineering
This article is contributed by Shivani Virmani. If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to [email protected]. See your article appearing on the GeeksforGeeks main page and help other Geeks.
![Data structure metrics in software engineering ppt download Data structure metrics in software engineering ppt download](https://www.tutorialspoint.com/software_engineering/images/DFD_level_one.png)
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.