2 votes 2 votes x = 7 if b { x = 8 } print(x) Convert the following code in Static single assignment form. Compiler Design compiler-design static-single-assignment + – Mk Utkarsh asked Jan 21, 2018 Mk Utkarsh 314 views answer comment Share Follow See 1 comment See all 1 1 comment reply junk_mayavi commented Jan 21, 2018 reply Follow Share I think we just need to replace the second $x$ with $x_1 $. rest everything stays the same. I referred this nptel handout. http://nptel.ac.in/courses/106108052/module13/ssa-1.pdf they are using a flow diagram representation for SSA. since the printed $x$ can be different depending on whether or not the if is taken, they are using a $ϕ$ function termed as special merge operator. it will take the appropriate value depending on the path of execution the program takes.so we will have to add a new line before the $print(x)$ as $x_2$=$ϕ(x,x_1)$ and we print $x_2$. this is what I understood. 2 votes 2 votes Please log in or register to add a comment.