LANGUAGE DESIGN AND
TRANSLATION ISSUES
BY:SURBHI SAROHA
SYLLABUS
 Programming Language Concepts
 Paradigms and Models
 Programming Environments
 Virtual Computers and Binding Times
 Programming Language Syntax
 Stages in Translation
 Formal Transition Models
 Elementary Data Types: Properties of Types and Objects
 Scalar and Composite Data Types
Programming Language Concepts
 A program is a set of instructions that help computer to perform tasks. This set of
instructions is also called as scripts. Programs are executed by processor whereas
scripts are interpreted.
 The languages that are used to write a program or set of instructions are called
"Programming languages". Programming languages are broadly categorized
into three types −
 Machine level language
 Assembly level language
 High-level language
Paradigms and Models
 Paradigm can also be termed as method to solve some problem or do some task.
 Programming paradigm is an approach to solve problem using some
programming language or also we can say it is a method to solve a problem using
tools and techniques that are available to us following some approach.
 There are lots for programming language that are known but all of them need to
follow some strategy when they are implemented and this methodology/strategy
is paradigms.
 Apart from varieties of programming language there are lots of paradigms to fulfil
each and every demand.
Programming Environments
 Though Environment Setup is not an element of any Programming Language, it is
the first step to be followed before setting on to write a program.
 When we say Environment Setup, it simply implies a base on top of which we can
do our programming. Thus, we need to have the required software setup, i.e.,
installation on our PC which will be used to write computer programs, compile,
and execute them. For example, if you need to browse Internet, then you need the
following setup on your machine −
 A working Internet connection to connect to the Internet
 A Web browser such as Internet Explorer, Chrome, Safari, etc.
Cont…..
 Similarly, you will need the following setup to start with programming using any
programming language.
 A text editor to create computer programs.
 A compiler to compile the programs into binary format.
 An interpreter to execute the programs directly.
 In case you don’t have sufficient exposure to computers, you will not be able to
set up either of these software. So, we suggest you take the help from any
technical person around you to set up the programming environment on your
machine from where you can start. But for you, it is important to understand what
these items are.
Virtual Computers and Binding Times
 Virtual Computers
 In easy words, the Virtual Computer is "a software emulation of a physical
computing environment".
 Virtual Computers are also knows as virtual machines.
 Task of the virtual computer is to provide one or more simultaneous execution
environments in which operating systems or other programs may execute.
 Binding Times
Cont…..
 Binding : A source file has many names whose properties need to be determined.
 The meaning of these properties might be determined at different phases of the
life cycle of a program.
 Examples of such properties include the set of values associated with a type; the
type of a variable; the memory location of the compiled function; the value stored
in a variable, and so forth. Binding is the act of associating properties with names.
 Binding time is the moment in the program`s life cycle when this association
occurs.
Programming Language Syntax
 Hello World Program in C
 #include <stdio.h>
 int main() {
 /* printf() function to write Hello, World! */
 printf( "Hello, World!" );
 }
Stages in Translation
 Structure of Compiler: A compiler takes input as source program and produces
as output an equivalence sequence of machine instructions.
 The compilation process is divided into a series of sub process called phases.
 A phase is a logically cohesive operation that takes as input one representation of
source program and produce as output i.e; target program in other
representation.
Formal Transition Models
Elementary Data Types: Properties of
Types and Objects
 An elementary data object includes a single data value and a class of
elementary data objects with a set of operations for creating and manipulating
them is represented as an elementary data type. An example of elementary data
types such as integer, real, character, Boolean, pointer, etc.
 The basic components of elementary data types are as follows −
 Attributes − Attributes refers to characteristics or group of characteristics that
distinguish one data object from others. The main attributes of a data object are
its name, associated address, and data type. The following declaration in C.
 int a;
Cont…..
 It specifies that a data object named ‘a’ is of type integer. The attributes of a data
object can be stored in a collection of memory cells, called descriptor (or dope vector).
A descriptor is the group of attributes of a variable. If the attributes are all fixed,
descriptors are needed only at compile time. They are developed by the compiler,
generally as a part of the symbol table, and are used during compilation.
 Values − It refers to a set of all possible values that a data object can contain. The
values that a data object can assume are determined by the type of that data object.
An elementary data object contains a single value from the set of values at any point
during its lifetime. For example, the C declaration int a; specifies that the data object a
can assume a single integer value from a set of integer values. The value included in a
data object can change during the lifetime of the data object and is therefore
represented explicitly during the program execution.
Cont….
 Operations − An operation refers to a mathematical function for the manipulation of
data objects. An operation includes −
 Domain − It refers to a set of all possible input arguments on which the operation is defined.
 Range − It refers to a set of all possible results that an operation can produce as an output.
 Action − The action of the operation represents the result created for any given set of
arguments.
 Algorithm − It defines how to evaluate the results for any given set of arguments. It is used
for determining the action of an operation.
 Signature − A signature of an operator defines the number, order, and data types of the
arguments in the domain of an operation and the order and data type of the producing
order.
Scalar and Composite Data Types
 In computer science, a composite data type or compound data type is any data
type which can be constructed in a program using the programming
language's primitive data types and other composite types.
 It is sometimes called a structure or aggregate data type,[1] although the latter
term may also refer to arrays, lists, etc.
 The act of constructing a composite type is known as composition. Composite
data types are often contrasted with scalar variables.
THANK YOU

Language design and translation issues

  • 1.
    LANGUAGE DESIGN AND TRANSLATIONISSUES BY:SURBHI SAROHA
  • 2.
    SYLLABUS  Programming LanguageConcepts  Paradigms and Models  Programming Environments  Virtual Computers and Binding Times  Programming Language Syntax  Stages in Translation  Formal Transition Models  Elementary Data Types: Properties of Types and Objects  Scalar and Composite Data Types
  • 3.
    Programming Language Concepts A program is a set of instructions that help computer to perform tasks. This set of instructions is also called as scripts. Programs are executed by processor whereas scripts are interpreted.  The languages that are used to write a program or set of instructions are called "Programming languages". Programming languages are broadly categorized into three types −  Machine level language  Assembly level language  High-level language
  • 4.
    Paradigms and Models Paradigm can also be termed as method to solve some problem or do some task.  Programming paradigm is an approach to solve problem using some programming language or also we can say it is a method to solve a problem using tools and techniques that are available to us following some approach.  There are lots for programming language that are known but all of them need to follow some strategy when they are implemented and this methodology/strategy is paradigms.  Apart from varieties of programming language there are lots of paradigms to fulfil each and every demand.
  • 6.
    Programming Environments  ThoughEnvironment Setup is not an element of any Programming Language, it is the first step to be followed before setting on to write a program.  When we say Environment Setup, it simply implies a base on top of which we can do our programming. Thus, we need to have the required software setup, i.e., installation on our PC which will be used to write computer programs, compile, and execute them. For example, if you need to browse Internet, then you need the following setup on your machine −  A working Internet connection to connect to the Internet  A Web browser such as Internet Explorer, Chrome, Safari, etc.
  • 7.
    Cont…..  Similarly, youwill need the following setup to start with programming using any programming language.  A text editor to create computer programs.  A compiler to compile the programs into binary format.  An interpreter to execute the programs directly.  In case you don’t have sufficient exposure to computers, you will not be able to set up either of these software. So, we suggest you take the help from any technical person around you to set up the programming environment on your machine from where you can start. But for you, it is important to understand what these items are.
  • 8.
    Virtual Computers andBinding Times  Virtual Computers  In easy words, the Virtual Computer is "a software emulation of a physical computing environment".  Virtual Computers are also knows as virtual machines.  Task of the virtual computer is to provide one or more simultaneous execution environments in which operating systems or other programs may execute.  Binding Times
  • 9.
    Cont…..  Binding :A source file has many names whose properties need to be determined.  The meaning of these properties might be determined at different phases of the life cycle of a program.  Examples of such properties include the set of values associated with a type; the type of a variable; the memory location of the compiled function; the value stored in a variable, and so forth. Binding is the act of associating properties with names.  Binding time is the moment in the program`s life cycle when this association occurs.
  • 10.
    Programming Language Syntax Hello World Program in C  #include <stdio.h>  int main() {  /* printf() function to write Hello, World! */  printf( "Hello, World!" );  }
  • 11.
    Stages in Translation Structure of Compiler: A compiler takes input as source program and produces as output an equivalence sequence of machine instructions.  The compilation process is divided into a series of sub process called phases.  A phase is a logically cohesive operation that takes as input one representation of source program and produce as output i.e; target program in other representation.
  • 13.
  • 14.
    Elementary Data Types:Properties of Types and Objects  An elementary data object includes a single data value and a class of elementary data objects with a set of operations for creating and manipulating them is represented as an elementary data type. An example of elementary data types such as integer, real, character, Boolean, pointer, etc.  The basic components of elementary data types are as follows −  Attributes − Attributes refers to characteristics or group of characteristics that distinguish one data object from others. The main attributes of a data object are its name, associated address, and data type. The following declaration in C.  int a;
  • 15.
    Cont…..  It specifiesthat a data object named ‘a’ is of type integer. The attributes of a data object can be stored in a collection of memory cells, called descriptor (or dope vector). A descriptor is the group of attributes of a variable. If the attributes are all fixed, descriptors are needed only at compile time. They are developed by the compiler, generally as a part of the symbol table, and are used during compilation.  Values − It refers to a set of all possible values that a data object can contain. The values that a data object can assume are determined by the type of that data object. An elementary data object contains a single value from the set of values at any point during its lifetime. For example, the C declaration int a; specifies that the data object a can assume a single integer value from a set of integer values. The value included in a data object can change during the lifetime of the data object and is therefore represented explicitly during the program execution.
  • 16.
    Cont….  Operations −An operation refers to a mathematical function for the manipulation of data objects. An operation includes −  Domain − It refers to a set of all possible input arguments on which the operation is defined.  Range − It refers to a set of all possible results that an operation can produce as an output.  Action − The action of the operation represents the result created for any given set of arguments.  Algorithm − It defines how to evaluate the results for any given set of arguments. It is used for determining the action of an operation.  Signature − A signature of an operator defines the number, order, and data types of the arguments in the domain of an operation and the order and data type of the producing order.
  • 17.
    Scalar and CompositeData Types  In computer science, a composite data type or compound data type is any data type which can be constructed in a program using the programming language's primitive data types and other composite types.  It is sometimes called a structure or aggregate data type,[1] although the latter term may also refer to arrays, lists, etc.  The act of constructing a composite type is known as composition. Composite data types are often contrasted with scalar variables.
  • 18.