Compare quadruples, triples and indirect triples.
x= (a + b) * - c / d
Represent this expression in quadruples, triples and indirect triples forms. Generate the machine code for the following instruction:
V=a+(b*c)-d.
The three address code can be using following methods:
In quadruple representation the result of the operation is stored in some temporary variable. In target code generation one can quickly access the value of temporary variable using symbol table. Whereas in triple representation, use of temporary variables is avoided. The pointers to symbol table hold the result of computation.
The quadruple representation is beneficial for optimizing compilers. The level of indirection is applied by introducing temporary variables between value of computation and its use. Whereas in triple representation references to arg1 and arg2 define value of temporary variable which is not suitable method for optimizing “compiler".
Whereas in indirect triple list of all references to computations is made separately. Thus indirect triple and quadruple representations are similar as far as their utility is concerned. But indirect triple saves amount of space as compared to quadruple.
Machine code for V = a+(b*c)-d:
Draw the syntax tree and DAG from the following expression.
if x>0 then x=3*(y+1) else y=y+1
Explain Sequence and Activity diagram with example.
Briefly describe different user interface elements.
Discuss the ACID properties of transaction.
Write a C program to find a number is AMSTRONG or NOT.
Why Required of ISO 9001:2000 standard?
Write an program to generate Pascal’s triangle.