Discuss the various applications of compiler technology


 Applications of Compiler Technology

1. Implementation of high-level programming languages

Ø High-level programming language defines a programming abstraction
Ø Low-level language have more control over computation and produce efficient code
Ø Hard to write, less portable, prone to errors and harder to maintain
Ø Example : register  keyword
Ø Common programming languages (C, Fortran, Cobol) support
Ø User-defined aggregate data types (arrays, structures, control flow )
Ø Data-flow optimizations
Ø Analyze flow of data through the program and remove redundancies
Ø Key ideas behind object oriented languages are Data Abstraction
      and Inheritance of properties
Ø Java has features that make programming easier
Ø Type-safe – an object cannot be used as an object of an unrelated type
Ø Array accesses are checked to ensure that they lie within the bounds
Ø Built in garbage-collection facility
Ø Optimizations developed to overcome the overhead by eliminating unnecessary range checks
2. Optimizations for Computer Architectures

Ø Parallelism
Ø Instruction level : multiple operations are executed simultaneously
Ø Processor level : different threads of the same application run on different processors
Ø Memory hierarchies
Ø Consists of several levels of storage with different speeds and sizes
Ø Average memory access time is reduces
Ø Using registers effectively is the most important problem in optimizing a program
Ø Caches and physical memories are managed by the hardware
Ø Improve effectiveness by changing the layout of data or order of instructions accessing the data
3. Design of new Computer Architectures

Ø RISC (Reduced Instruction-Set Computer)
Ø CISC (Complex Instruction-Set Computer)
Ø Make assembly programming easier
Ø Include complex memory addressing modes
Ø Optimizations reduce these instructions to a small number of simpler operations
Ø PowerPC, SPARC, MIPS, Alpha and PA-RISC
Ø Specialized Architectures
Ø Data flow machines, vector machines, VLIW, SIMD, systolic arrays
Ø Made way into the designs of embedded machines
Ø Entire systems can fit on a single chip
Ø Compiler technology helps to evaluate architectural designs
4. Program Translations
Ø Binary Translation
Ø Translate binary code of one machine to that of another
Ø Allow machine to run programs compiled for another instruction set
Ø Used to increase the availability of software for their machines
Ø Can provide backward compatibility
Ø Hardware synthesis
Ø Hardware designs are described in high-level hardware description languages like Verilog and VHDL
Ø Described at register transfer level (RTL)
Ø Variables represent registers
Ø Expressions represent combinational logic
Ø Tools translate RTL descriptions into gates, which are then mapped to transistors and eventually to physical layout
Ø Database Query Interpreters
Ø Languages are useful in other applications
Ø Query languages like SQL are used to search databases
Ø Queries consist of predicates containing relational and boolean operators
Ø Can be interpreted or compiled into commands to search a database
Ø Compiled Simulation
Ø Simulation Technique used in scientific and engg disciplines,Understand a phenomenon or validate a design
Ø Inputs include description of the design and specific input parameters for that run
5. Software Productivity Tools
Ø Testing is a primary technique for locating errors in a program
Ø Use data flow analysis to locate errors statically
Ø Problem of finding all program errors is undecidable
Ø Ways in which program analysis has improved software productivity
Ø Type Checking
Ø Catch inconsistencies in the program
Ø Operation applied to wrong type of object
Ø Parameters to a procedure do not match the signature
Ø Go beyond finding type errors by analyzing flow of data
Ø If pointer is assigned null and then dereferenced, the program is clearly in error
Ø Bounds Checking
Ø Security breaches are caused by buffer overflows in programs written in C
Ø Data-flow analysis can be used to locate buffer overflows
Ø Failing to identify a buffer overflow may compromise the security of the system
Ø Memory-management tools
Ø Automatic memory management removes all memory-management errors like memory leaks
Tools developed to help programmers find memory management errors



Share to whatsapp

More Questions from System Software and Compiler Design Module 3

Explain machine dependent features of loader
View
Discuss the various applications of compiler technology
View
Explain how transition diagram is used to identify relational operator during Lexical Analysis. Write the code for same
View
Write a short note on the structure of Generated Analyzer
View
Explain the different methods of handling reserved words that look like identifiers.
View
Write a short note on Compilers and Interpreters. Also explain the various units of language processing system.
View
Explain Input Buffering. What is the drawback of using one buffer scheme and explain how it is overcome?
View