Lecture 5 Flashcards

1
Q

What is a control flow graph?

A

It is a graph which describes the sequence in which the different instructions of a program get executed.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What does an edge from one node to another represent in a CFG?

A

It represents the transfer of control between nodes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How do you draw a CFG?

A

By knowing the sequence, selection and iteration statements

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is a path?

A

It is a node and edge sequence from the starting node to a terminal node of the CFG. There can be more than one terminal node in a program.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What does path coverage testing require?

A

Coverage of the linearly independent paths

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a linearly independent path?

A

Any path through the program that introduces at least one new edge that is not included in any other linearly independent paths.

Any path having a new node automatically implies that it has a new edge.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Is a path that is a sub path of another path linearly independent?

A

No

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How do we determine the number of independent paths ?

A

By using McCabe’s cyclomatic complexity which finds the maximum number of linearly independent paths in a program. It doesn’t directly identify which paths or linearly independent but how many paths to look for and the minimum number of test cases required.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is McCabe’s Cyclomatic Complexity formula?

A

Edges - Nodes + 2 (E - N + 2)

OR

Decision statements + 1 (P+1)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What steps should be followed for computing cyclomatic complexity and test cases design?

A

Construction of control flow graph (graph with nodes and edges from code)

Cyclomatic Complexity Calculation

Identification of the independent paths

Design of test cases

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What does it mean if the complexity number is between 1 and 10?

A

The code is structured and well written, it has high testability and the cost and effort is less.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What does it mean if the complexity number is between 10 and 20?

A

The code is complex, it has medium testability and the cost and effort is medium

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What does it mean if the complexity number is between 20 and 40?

A

The code is very complex, it has low testability and the cost and effort is high

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What does it mean if the complexity number is over 40?

A

The code is not testable and it has very high cost and effort

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What are the software quality product and process metrics?

A

Defect Density
Code Coverage
Mean Time To Failure
Mean Time to Repair
Test Case Effectiveness
Customer Satisfaction
Cycle Time
Code Complexity

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is defect density?

A

This measures the number of defects found in a software product per unit of size (lines of code). It can be used to evaluate the quality of the product and to identify areas for improvement.

17
Q

How do you calculate defect density?

A

Total number of defects/ size of the software product (LOC)

18
Q

What is code coverage?

A

The percentage of code that has been tested. It can be used to evaluate the thoroughness of testing and to identify areas of the code that haven’t been tested.

19
Q

How do you calculate code coverage?

A

(No. LOC executed / Total LOC) * 100

20
Q

What is mean time to failure?

A

The average time between failures of a software product. It can be used to evaluate the reliability of the product

21
Q

How do you calculate mean time to failure?

A

Total operating time/No. of failures

22
Q

What is mean time to repair?

A

The average time it takes to fix a defect in a software product. It can be used to evaluate the efficiency of the development process.

23
Q

How do you calculate mean time to repair?

A

Total downtime/ No. of repairs to restore operation

24
Q

What is test case effectiveness?

A

The percentage of test cases that detect defects. It can be used to evaluate the effectiveness of the testing process.

25
Q

How do we calculate test effectiveness?

A

(No of defects found/ total no of test cases executed) * 100

26
Q

What is customer satisfaction?

A

The satisfaction of customers with a software product. It can be obtained through surveys or feedback mechanisms and can be used to evaluate the overall quality of product.

27
Q

How do we calculate customer satisfaction?

A

(No of satisfied customers/ total number of respondents) * 100

28
Q

What is cycle time?

A

The time it takes to complete a software development process from start to finish. It can be used to evaluate the efficiency of the development process and to identify areas for improvement.

29
Q

How do you calculate cycle time?

A

Total processing time/ Total number of units

30
Q

What is code complexity?

A

The complexity of the code in a software product. It can be used to identify areas of the code that are difficult to maintain or modify.

31
Q

How do you calculate complexity?

A

McCabe’s Cyclomatic Complexity (No. edges - No. of nodes + 2)

32
Q

What is a state machine model?

A

An event driven model for a system whose processing behaviour are dependent on state transition.

33
Q

How are state machine models represented?

A

It is represented as states, events, actions and transitions.
State is the current situation
Event is the input to the state
Action is the activity to be performed
Transitions is the movement from one state to another

34
Q

What is a FSM quintuple?

A

Since FSMs are mathematical models used to represent the behaviour of a system that can be in one of a finite number of states. It is specified as a quintuple:

A is the finite input alphabet
Q is a finite set of states
q0 is the initial state
T is the state transition function
F is the finite set of final states