3.3.3 Translation methods in software solutions

Syntax Vs Semantics - Programming Languages

Compiler vs Interpreter

Machine Code and High level Languages Using Interpreters and Compilers


A bit more detailed explanation of the process....

Compilers and interpreters


Translation Process


Translating the source code - the basic steps

Compilation - Part One: Overview of the Stages of Compilation



Linking and Lexical Analysis


Lexical Analysis

Lexical Analyzer Solution - Programming Languages



Compilation - Part Two: Lexical Analysis





Syntactical/Syntactic Analysis

Compilation - Part Three: Syntax Analysis

Syntactical Analysis - Programming Languages


YouTube Video


Syntactical Analysis - Programming Languages


Syntax Vs Semantics - Programming Languages

Syntax Vs Semantics - Programming Langua




Diagrammatic view of the translation process



Incremental Compiler


The Incremental Compiler is such a compilation scheme in which only modified source text gets recompiled and merged with previously compiled code to form a new target code. 

Thus incremental compiler avoid recompilation of the whole source code on some modification. Rather only modified portion of source program gets compiled.

Need of Incremental Compiler :
Much of a programmer’s time is spent in an edit-compile-debug workflow as following.

  • you make a small change (often in a single module or even function).
  • you let the compiler translate the code into a binary, and finally.
  • you run the program or a bunch of unit tests in order to see results of the change.

This will increase the time of compilation at every step of change. But this can be overcome with the concept of incremental compiler (save the previous compilation and compile the modified part of the code).


How can this concept (concept of incremented compilation) be implemented :
We have already heard that computing something incrementally means updating only those parts of the computation’s output that need to be adapted in response to a given change in the computation’s inputs. One basic strategy we can employ to achieve this is to view one big computation (like compiling a program) as a composite of many smaller, interrelated computations that build upon each other. Each of those smaller computations will yield an intermediate result that can be cached and hopefully re-used in a later iteration, sparing us the need to re-compute that particular intermediate result again.

Features of incremental compiler :

  • During program development process modifications to Source program can cause recompilation of whole source text. This overhead is reduced in incremental compiler.
  • Run time errors can be patched up just like compile time errors by keeping program modification as it is.
  • The compilation process is faster.
  • The memory used is less.
  • Handling batch programs become very flexible using Incremental compiler.
  • In incremental compiler program structure table is maintained for memory allocation of target code. When a new statement is compiled the new entry for it is created in program structure table. Thus memory allocation required for incremental compiler need not be contiguous.
  • Helps in tracking the dependencies on source program.




Subpages (1): Student Activity
Comments