0% found this document useful (0 votes)
23 views3 pages

Week 11

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views3 pages

Week 11

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

10/21/24, 2:58 PM Software Testing - - Unit 14 - Week 11

(https://swayam.gov.in) (https://swayam.gov.in/nc_details/NPTEL)

[email protected]

NPTEL (https://swayam.gov.in/explorer?ncCode=NPTEL) » Software Testing (course)

Course outline Week 11 : Assignment 11


The due date for submitting this assignment has passed.
About NPTEL () Due on 2024-10-09, 23:59 IST.

How does an
NPTEL online
Assignment submitted on 2024-10-02, 19:33 IST
course work? () 1) Which of the following lists use(s) of symbolic execution in logic-based testing? 1 point

Week 0 () Symbolic execution is used to generate the predicates for logic-based testing.
Symbolic execution is used to reach the predicates for applying logicbased testing.
Week 1 () Symbolic execution is used to solve the reachability and infection problems for logic-based testing.
Symbolic execution is used to compute the predicates for logic-based testing
Week 2 ()
No, the answer is incorrect.
Score: 0
Week 3 ()
Accepted Answers:
Symbolic execution is used to solve the reachability and infection problems for logic-based testing.
Week 4 ()

2) When symbolic execution of a piece of code reaches a decision statement (like if), what kind of path 1 point
Week 5 ()
constraints are generated?

Week 6 () One path constraint, True is always generated.


One path constraint containing the predicate of the decision statement is generated.
Week 7 ()
Two path constraints are generated, one corresponding to the predicate with symbolic variables as it occurs in the
decision statement and another corresponding to the negation of the same predicate with symbolic variables.
Week 8 ()
Two path constraints are generated, corresponding to the predicate and negation of the predicate, as it occurs in the
Week 9 () decision statement, with symbolic variables, and these are combined with a logical AND to the existing path constraint.

Yes, the answer is correct.


Week 10 () Score: 1
Accepted Answers:
Week 11 () Two path constraints are generated, corresponding to the predicate and negation of the predicate, as it occurs in the
decision statement, with symbolic variables, and these are combined with a logical AND to the existing path constraint.
Symbolic Testing
(unit? 3) State yes or no: Can symbolic execution be used to detect the presence of non-terminating loops in a given 1 point
unit=86&lesson=87)
code?
Symbolic Testing 2
(unit?
Yes.
unit=86&lesson=88) No.

DART: Directed No, the answer is incorrect.


Automated Random Score: 0
Testing (unit? Accepted Answers:
unit=86&lesson=89) No.

DART: Directed
4) Which of the following is a list of all known disadvantages of symbolic execution? 1 point
Automated Random
Symbolic execution is not an expressive testing technique for exploring all execution paths.

https://onlinecourses.nptel.ac.in/noc24_cs91/unit?unit=86&assessment=223 1/3
10/21/24, 2:58 PM Software Testing - - Unit 14 - Week 11

Testing - 2 (unit? Symbolic execution will generate path constraints that are not solvable by known constraint solvers.
unit=86&lesson=90)
Symbolic execution will not work for code bases that use API calls and hence not useful.
DART: Directed
Symbolic execution can generate path constraints that are not solvable by known constraint solvers, it will not work
Automated Random
for code that contains functions whose source code is not available, and when there are many different program paths,
Testing 3 (unit?
the path constraints might get large, making it infeasible.
unit=86&lesson=91)
Yes, the answer is correct.
Practice: Week 11: Score: 1
Assignment 11 (Non
Accepted Answers:
graded)
Symbolic execution can generate path constraints that are not solvable by known constraint solvers, it will not work for
(assessment?
code that contains functions whose source code is not available, and when there are many different program paths, the
name=209)
path constraints might get large, making it infeasible.
Week 11 Feedback
Form: Software
5) State true or false: DART algorithm, when run on a program, always terminates. 1 point
Testing (IIITB) (unit?
True.
unit=86&lesson=167)
False.
Quiz: Week 11 :
Assignment 11 Yes, the answer is correct.
Score: 1
(assessment?
name=223) Accepted Answers:
False.
Week 12 ()

Consider the code fragment below. It is written in a generic programming language, and doesn’t represent a full executable
DOWNLOAD
piece of code. Answer the following questions related to the symbolic execution of the given code fragment.
VIDEOS ()

Text Transcripts ()
1 int x, y;
2 if (x > y) {
Live sessions ()
3 x = x + y;
4 y = x - y;
Books ()
5 x = x - y;
6 if (x - y > 0)
7 assert(false);
8 }

6) What does the code fragment do? 1 point

Tries to check if x is greater than y.


Tries to check if y is greater than x.
Swaps the values x and y.
Swaps the values of x and x - y.

Yes, the answer is correct.


Score: 1
Accepted Answers:
Swaps the values x and y.

7) How many nodes will be there in the symbolic execution tree of this code fragment? 1 point

3 nodes.
4 nodes.
7 nodes.
8 nodes.

No, the answer is incorrect.


Score: 0
Accepted Answers:
8 nodes.

8) What will be the path constraint at line 1 of the code fragment such that no further execution happens? 1 point

x > y.

x <= y .

Yes, the answer is correct.

https://onlinecourses.nptel.ac.in/noc24_cs91/unit?unit=86&assessment=223 2/3
10/21/24, 2:58 PM Software Testing - - Unit 14 - Week 11

Score: 1
Accepted Answers:
x <= y .

9) What will be the path constraint to reach statement 6? 1 point

x > y && x - y > 0 .

x > y && x - y <= 0 .

x <= y .

x > y && x - y <= 0 .

Yes, the answer is correct.


Score: 1
Accepted Answers:
x > y && x - y > 0 .

10) Is statement 6 reachable in the given program fragment? 1 point

Yes, it is reachable.
No, it is not reachable.

Yes, the answer is correct.


Score: 1
Accepted Answers:
No, it is not reachable.

https://onlinecourses.nptel.ac.in/noc24_cs91/unit?unit=86&assessment=223 3/3

You might also like