by admin | Dec 31, 2020 | Compiler Design
Optimization of Basic Blocks We can apply the optimization process on a basic block. While optimization, there is no need to change the set of expressions computed by the block. The basic block optimization can be done in two ways: Structure-Preserving...
by admin | Dec 31, 2020 | Compiler Design
Boolean Expression The translation of conditional statements such as if-else statements and while-do statements is associated with Boolean expression’s translation. The main use of the Boolean expression is the following: Boolean expressions are used as...
by admin | Dec 31, 2020 | Compiler Design
Translation of Array References We can access the elements of an array stored in consecutive blocks very easily and quickly. In a programming language like C and Java, the size of an array is one less than the number of the element stored in an array. We can...
by admin | Dec 26, 2020 | Compiler Design
Three-Address Code If there is at most one operator on the right side of the instruction, then the instruction will be the three-address code so that no arithmetic expressions are permitted. It is a kind of intermediate code that can be easily generated and converted...
by admin | Dec 26, 2020 | Compiler Design
Target Machine A target machine is a byte-addressable machine. This machine has n general-purpose registers, R0, R1,…..Rn-1. A Simple Target Machine Model has three-address instruction. A full-edged assembly language would have a variety of instructions. The...
by admin | Dec 26, 2020 | Compiler Design
LEX Lex is a tool/computer program that generates a Lexical analyzer. Lex is developed by Vern Paxson in C around 1987. Lex works together with the YACC parser generator. It allows us to identify a Lexical analyzer by specifying regular expressions to describe...
by admin | Dec 26, 2020 | Compiler Design
Run-Time Storage Management Every executing program has its own logical address space. Logical address space is partitioned into: Code: It is responsible for storing the executable target code. Static: It is used to holdglobal constant and compiler generate data....
by admin | Dec 26, 2020 | Compiler Design
Finite State Machine A finite state machine is a simple machine to recognize patterns. It takes a string of symbols as the input and changes its state to another state, but it rests on the given input symbol. The automata have two-state; either they advance to the...
by admin | Dec 26, 2020 | Compiler Design
Code Generation The last phase of the compiler is code generation. It is the compiler’s back-end that makes multiple passes over the IR before generating the target program. The code generator’s main task is instruction selection, registers allocation and...
by admin | Dec 25, 2020 | Compiler Design
Symbol Table It is an important data structure used by the compiler. It stores information about various entities such as object, class, variable names, functions name, interfaces, procedure, literals, string etc. The purpose of the symbol table is given...