Tuesday, January 21, 2014

1.flow chart

 




2.computer compiler and types



A compiler is a computer program (or set of programs) that transforms source code written in a programming language (the source language) into another computer language (the target language, often having a binary form known as object code. The most common reason for wanting to transform source code is to create an executable program.

Types of Compiler:

One-pass compiler, like early compilers for Pascal The compilation is done in one pass, hence it is very fast.
Threaded code compiler (or interpreter), like most implementations of FORTH This kind of compiler can be thought of as a database lookup program. It just replaces given strings in the source with given binary code. The level of this binary code can vary; in fact, some FORTH compilers can compile programs that don't even need an operating system.
Incremental compiler, like many Lisp systems Individual functions can be compiled in a run-time environment that also includes interpreted functions. Incremental compilation dates back to 1962 and the first Lisp compiler, and is still used in Common Lisp systems.
Stage compiler that compiles to assembly language of a theoretical machine, like some Prolog implementations This Prolog machine is also known as the Warren abstract machine (or WAM). Byte-code compilers for Java, Python (and many more) are also a subtype of this.
Just-in-time compiler, used by Smalltalk and Java systems Applications are delivered in bytecode, which is compiled to native machine code just prior to execution
A retargetable compiler is a compiler that can relatively easily be modified to generate code for different CPU architectures. The object code produced by these is frequently of lesser quality than that produced by a compiler developed specifically for a processor. Retargetable compilers are often also cross compilers. GCC is an example of a retargetable compiler.
A parallelizing compiler converts a serial input program into a form suitable for efficient execution on a parallel computer architecture.