Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

a) Draw the Control Flow Automaton (CFA) model of the program sample. Use the numbers specified next to the statements (0, 1, 2) to

 

a) Draw the Control Flow Automaton (CFA) model of the program sample. Use the numbers specified next to the statements (0, 1, 2) to label the CFA locations. Use a specific location err for the case when there is division with zero in statement 2, and location end for the normal termination of the program. 0: 1: 2: b int b = 25 while (25 b*b < 0) { } b = (b+25/b)/2; b) For model checking of the CFA we use location and predicate abstraction, using a single predicate (b==0). Decide whether the following path appears in the abstract state space (justify your answer): (0, true) (1, false) (2, true) (err, true). c) Someone claims that in the abstract state space he found the following counterexample to the correct behavior of the program: (0, false) (1, false) (2, false) (err, false). Check whether this path can be traversed in the concrete state space (justify your answer).

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

Step: 3

blur-text-image

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

Business Statistics For Contemporary Decision Making

Authors: Black Ken

8th Edition

978-1118494769, 1118800842, 1118494768, 9781118800843, 978-1118749647

More Books

Students also viewed these Programming questions