Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2010 Barcelona Spain September 2010 Proceedings Part 3 Lnai 6323

Authors: Jose L. Balcazar ,Francesco Bonchi ,Aristides Gionis ,Michele Sebag

2010th Edition

3642159389, 978-3642159381

More Books

Students also viewed these Databases questions

Question

Explain the contribution of Peter F. Drucker to Management .

Answered: 1 week ago

Question

What is meant by organisational theory ?

Answered: 1 week ago

Question

What is meant by decentralisation of authority ?

Answered: 1 week ago

Question

Briefly explain the qualities of an able supervisor

Answered: 1 week ago

Question

2. Define communication.

Answered: 1 week ago