Unformatted text preview: are nonescaping unless specified otherwise. e. a<b , which should be implemented by making an ESEQ whose left-hand side moves a 1 or 0 into some newly defined temporary, and whose right-hand side is the temporary. f. if a then b else c , where a is an integer variable (true if n = 0 ); this should also be translated using an ESEQ . h. if a<b then c:=a else c:=b , translated using the a<b tree from part (e) above; the whole statement will therefore be rather clumsy and inefficient. 7.2 Translate each of these expressions into IR trees, but using the Ex , Nx , and Cx constructors as appropriate. In each case, just draw pictures of the trees; an Ex tree will be a Tree Exp , an Nx tree will be a Tree Stm , and a Cx tree will be a Stm with holes labeled true and false into which labels can later be placed. g. if a then b else c , where a is an integer variable (true if n = 0 ). j. if a<b then c:=a else c:=b 1...
View Full Document
- Fall '08
- Logic, Intermediate Code, Cx constructors