Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1. [30pt] Given the following C program, (1) construct a control flow graph (CFG) for the program: make sure you understand the semantics of the
1. [30pt] Given the following C program, (1) construct a control flow graph (CFG) for the program: make sure you understand the semantics of the break and continue statements. Then (2) calculate the DOM (i.e., dominator set) of each basic block. (3) Also, construct the dominator tree for the CFG.
procedure sqrt (real x): real real x1,x2, x3, eps, errval; 2. 3. 5 8. begin 1. x3 = 1 errval = 0.0 eps = .001 4. if (x = 2.0*eps ) 16. x3 (x1+x2)/2.0 17. if ( (x3*x3-x) * (x1+x1-x) = 2.0*eps ) 16. x3 (x1+x2)/2.0 17. if ( (x3*x3-x) * (x1+x1-x)Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started