0% found this document useful (0 votes)
2K views13 pages

Translation Process Presentation

The presentation discusses the translation process, which involves converting a program's source code into object code that can be understood by a computer. It describes the main stages of translation: lexical analysis, syntax analysis, semantic analysis, intermediate code generation, code optimization, and code generation. Diagrams are provided to illustrate how the source code is translated through these stages into machine-readable object code that can be executed by the computer.

Uploaded by

Ockouri Barnes
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2K views13 pages

Translation Process Presentation

The presentation discusses the translation process, which involves converting a program's source code into object code that can be understood by a computer. It describes the main stages of translation: lexical analysis, syntax analysis, semantic analysis, intermediate code generation, code optimization, and code generation. Diagrams are provided to illustrate how the source code is translated through these stages into machine-readable object code that can be executed by the computer.

Uploaded by

Ockouri Barnes
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 13

OUR

PRESENTATION
ON THE
TRANSLATION
PROCESS
GROUP MEMBERS:
OCKOURI BARNES
PICCARD HARRIS
MALIEK ALLWOOOD
MALAKAI ALLWOOD
What is the translation process?
A computer system can only understand machine code. A program written
for example: in a high level language such as Java or C cannot be run
directly. To execute a computer program written in any programming
language it must first be translated.

The source code which is written by the programmer needs to be


translated. When translated, the source code becomes the object code
which is understandable by the computer system. This process can be seen
in the following diagram in the next slide.
Diagram below showing how the source code
becomes the object code
Type Description
Assembler
Types of translators
 Assemblers
 converts each instruction

 Interpreters
of the source code into
Assemblers convert
the object code as the
assembly language
Interpreters program is being
mnemonics into machine
run. This gives a better
code.
interactive environment

 Compilers
but is slower.

 converts the entire


source code into machine
code so that it can be run
Compilers on the machine without
further translation.
However, error correction
is tedious.
Step 1 Lexical Analysis
Lexical analysis is the first phase
of in the translation process. It
takes the modified source code
from language preprocessors that
are written in the form of
sentences. The lexical
analyzer breaks these syntaxes
into a series of tokens, by
removing any whitespace or
comments in the source code.
Step 2 Synthax Analysis
Syntax analysis is the second
phase of the translation process
that comes after lexical analysis.
It analyses the syntactical 
structure of the given input. It
checks if the given input is in the
correct syntax of the
programming language in which
the input which has been written.
Step 3 Semantic Analysis
Semantic analysis is third phase
of the translation process this is
the task of ensuring that the
declarations and statements of
a program are semantically
correct, that is their meaning is
clear and consistent with the way
in which control structures and
data types are supposed to be
used.
Step4 Intermediate Code Generation
Intermediate code generator is
the fourth phase of the translation
process input is received from
the predecessor phase, semantic
analyzer, in the form of an
annotated syntax tree. That syntax
tree then can be converted into a
linear representation, e.g: postfix
notation. Intermediate code tends
to be machine independent code.
Step 5 Code Optimization
In computer science program
optimization is the fifth phase of the
translation process, code
optimization or software optimization is
the process of modifying a software
system to make some aspect of it work
more efficiently or use fewer resources. In
general a computer program may be
optimized so that it executes more
rapidly or to make it capable of operating
with less memory storage or
other resources or draw less power.
Step 6 Code Generation
In computer science code
generation is the final phase of
the translation process by
which a compiler's code
generator converts some
intermediate representation     
      of source code into a form
(e.g :machine code) that can be
readily executed by a machine.
First Diagram showing stages of the translation process
Second Diagram showing the stages of the
translation process

You might also like