Consider the following intermediate program in three address code
p = a - b q = p * c p = u * v q = p + q
Which one of the following corresponds to a static single assignment form of the above code?
p1 = a - b q1 = p1 * c p1 = u * v q1 = p1 + q1
p3 = a - b q4 = p3 * c p4 = u * v q5 = p4 + q4
p1 = a - b q1 = p2 * c p3 = u * v q2 = p4 + q3
p1 = a - b q1 = p * c p2 = u * v q2 = p + q
Here option (B), not typed correctly.
B IS CORRECT A IS WRONG
https://en.wikipedia.org/wiki/Static_single_assignment_form
http://www.cse.iitd.ernet.in/~nvkrishna/courses/winter07/ssa.pdf
https://www.cs.cmu.edu/~fp/courses/15411-f08/lectures/09-ssa.pdf
http://www.seas.harvard.edu/courses/cs252/2011sp/slides/Lec04-SSA.pdf
so B is ans.
In compiler design, static single assignment form (often abbreviated as SSA form or simply SSA) is a property of an intermediate representation (IR), which requires that each variable is assigned exactly once, and every variable is defined before it is used. Thus option B only satisfies the above criteria.