Question: Assignment Content Symbolically execute one of the following code listings ( i . e . , create a symbolic execution tree ) to determine if

Assignment Content
Symbolically execute one of the following code listings (i.e., create a symbolic execution tree) to determine if it ever returns the wrong result. The code listings are both intended to return the minimum of three inputs or, when invalid inputs are provided, an error code (e.g., null or None).
Java Listing
static Integer minimum(Integer a, Integer b, Integer c){
if(a == null || b == null || c == null)
return null;
Integer min = a;
if(min >= c){
min = c;
if(min >= b){
min = b;
}
}
return min;
}
Python Listing
def minimum(a, b, c):
if not (isinstance(a, int) and isinstance(b, int) and isinstance(c, int)):
return None
min = a
if min >= c:
min = c
if min >= b:
min = b;
return min;
Discuss the symbolic values and path conditional in each of the leaf nodes of the symbolic execution tree to justify that the code is correct or contains an error. If the code contains an error, provide a concrete set of values that illustrates the error.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!