✍️ Get Writing Help
WhatsApp

Uncategorized

What is name equivalence?

1.       What is name equivalence? In what context is name equivalence used during the type checking? Illustrate with an example in C language. 2.       Write an algorithm to check the equivalence of two type expressions in C language represented by a linked list. 3.       Explain some of the productions and the semantic actions pertaining to […]

What is name equivalence? Read More »

Input source

A compiler can choose one of the two options (a) Translate the input source into intermediate code and then convert it to final machine code; (b) Directly generate the final machine code from the input source. What is the preferred option and why? Describe the three address code form of the intermediate code. List out

Input source Read More »

Abstract syntax

Compare the different methods of implementing three address code. How is an abstract syntax tree different from a parse tree? List out some of the nodes in the AST for a C compiler? Translate a C statement ‘a = b + c – (4ab + 3*c);’ into TAC. How are the binary operators like +,

Abstract syntax Read More »

Pointer accesses

1.       How is the offset calculated for a multidimensional array reference? Derive the formula. 2.       Translate the C statements ‘p=& arr[3]; *p=10;’ into TAC. What TAC operators are useful during the translation of pointer accesses? 3.       Translate the C statement ‘x.age = 30;’ into TAC. Assume that the field ‘age’ is at an offset of

Pointer accesses Read More »

In semantic analysis

1.       In semantic analysis, the global variables declared in the input source are converted to symbol table entries. How are the symbol table entries translated into corresponding declarations in x86 assembly language by the target code generator? Illustrate by example for   (a) simple variables   (b) arrays. 2.       How do you generate target code for arithmetic

In semantic analysis Read More »

The run-time environments

Illustrate by example, the calling and return sequences in C runtime environment. Explain the terms (a) Actual parameters. (b) Formal parameters. Illustrate with an example. Explain (a) call-by-reference and (b) call-by-value parameter-passing mechanisms. Illustrate with an example. Explain (a) call-by-value-result and (b) call-by-name parameter-passing mechanisms. Illustrate with an example. How do the run-time environments of

The run-time environments Read More »

Assembly language program

The target code generator takes the intermediate code as the input and generates a target program as output. The target program can take one of the three forms (1) assembly language program; (2) relocatable code; (3) absolute code. The memory organisation of FORTRAN77 runtime environment does not have a stack or a heap for dynamic

Assembly language program Read More »

Code generator

1.       How are local variables resolved to memory addresses during the translation of intermediate code to target code by the code generator? Draw the stack layout showing the local variables. 2.       How are numeric and string literals in the intermediate code translated to the target code? Illustrate with an example each.

Code generator Read More »

Comparison operators

1.       How do you generate target code for indexed TAC operators in a template-based code generation approach? Illustrate with examples for   (a) L_INDEX_ASSIGN   (b) R_INDEX_ASSIGN. 2.       How do you generate target code for comparison TAC operators in a template-based code generation approach? Illustrate with examples for any three comparison operators. 3.       How do you generate

Comparison operators Read More »

Mechanism

1.       The ‘display’ scheme helps in resolving non-local variable access in the case of nested procedures in PASCAL. 2.       In ‘call by value-result’ parameter-passing mechanism used in languages like ADA, the final value of the formal parameters is copied back to the actual parameters. 3.       The literals are accessed using the label with a dollar($)

Mechanism Read More »

For faster services, inquiry about  new assignments submission or  follow ups on your assignments please text us/call us on +1 (251) 265-5102