2 In designing a compiler you will face many tradeoffs What
2. In designing a compiler, you will face many tradeoffs. What are the
five qualities that you, as a user, consider most important in a compiler
that you purchase? Does that list change when you are the compiler
writer? What does your list tell you about a compiler that you would
implement?
3. Compilers are used in many different circumstances. What differences
might you expect in compilers designed for the following applications?
a. A just-in-time compiler used to translate user interface code
downloaded over a network
b. A compiler that targets the embedded processor used in a cellular
telephone
c. A compiler used in an introductory programming course at a high
school
d. A compiler used to build wind-tunnel simulations that run on a
massively parallel processor (where all processors are identical)
e. A compiler that targets numerically intensive programs to a large
number of diverse machines
Solution
Generally compiler job is to translation of code from one language to another language. compiler design is based on the principle of in depth view of translation and optimization process. Compiler design covered basically with translation mechanism. Compilers are large, complex and carefully engineered.
A compiler needs the below qualities:
these are all qualities looking to develop a good compiler.
In designing a compiler scanner stage is first stage because it scans the input stream for user understand. The scanner reads the stream of characters and produces a stream of words. If the input stream is correct or valid perform the appropriate action and assign syntax. The scanners performs a relatively simple task.
3) a) A just in time compiler is mixed with translation to machine code and vice versa. JIT is fast compiler . JIT is a form of dynamic compilation. The jit compiler reads the byte codes in many sections and compiled them dynamically into many languages. It allows the program faster.
b) Most tiny devices like mobiles used ARM processors. An Embedded Processor is a microprocessor that is used in an embedded system. These processors are usually smaller, use a surface mount form factor and consume less power. Embedded processors are also used in consumer electronic devices.
c) Designing of a compiler course introduced in school level is good . at school level students are habituated to programming and analysis of problem so they write effective and efficient program .
d) parallel processing is a good approach for computing instructions. Parallel computers can be roughly classified according to the level at which the hardware supports parallelism. In the parallel processing compilers are used to massive applications like wind tunnel.
e)A compilers targets the input stream this is applicable to all the devices that are connected to
via a network. These are large scale applications that runs in a large systems.

