Evolution of Programming Languages in Compiler Design

The Evolution of Programming Languages

The first computer came in the 1940s and was programmed in a binary language that told the computer what operations are to be performed and in which order. The operations were deficient level as well as the kind of programming was very slow, error-prone.

Evolution of Programming Languages in Compiler Design

Higher-level programming language

The first programming language, which was was developed in the 1950s, was more people-friendly. It was the mnemonic assembly language.

First, the instruction in assembly language was mnemonic representations of machine instructions. Later macro instructions were added to assembly language, which helped the programmer to define a parameterized shorthand for a frequently used sequence of machine instructions.

The first primary high-level programming language was FORTRAN, developed by IBM in the latter half of the 1950s. It was developed for scientific computation. FORTRAN was the first high–level programming language which had the function implementation.

Later in the 1950s, COBOL was developed by a short-range committee. It was developed for the purpose of business data processing. In 1958, John McCarthy developed LISP. It was developed for the purpose of symbolic computation.

    The main motive behind these programming languages was to create higher-level notation so that the programmer could easily write numerical computations, business applications, and symbolic programs. Due to its popularity, this programming language is still in use. 

There are many more programming languages that were created with much more creativity, which makes programming more accessible, robust, and more natural. Let's discuss some features of modern programming languages.

Classification of programming language

As of now, there are many programming languages available in the market. The programming language can be divided in different ways. One such way to classify the programming language is through generations.

  • Machine language is the first-generation language, Assembly language is the second-generation languages, and high-level programming languages like C, C++, LISP, FORTRAN, and JAVA are the third-generation languages.
  • Fourth-generation languages are NOMAD, which is used for report generation, SQL is used for the database, and the postscript is used for formating. Prolog and OPS5 are an example of fifth-generation languages.

Another way of classification is imperative for language; it specifies how a computation is to be done and declarative for language as it specifies which computation is to be done.

  •  C, C++, C#, JAVA are examples of an imperative language. Functional languages are considered a declarative language. ML, Haskel, and constraint logic-based are declarative language.

The programming languages in which the computational method is based on von Neumann architecture is considered as von Neumann language.

  • FORTRAN and C are von Neumann language.

A programming language that consists of class, object and support object-oriented programming is considered as an object-oriented language.

  • Language such as C++, C#, ruby, java is object-oriented languages.

Impacts on compiler

The design of programming language and compiler design are closely related to each other. With the evaluation of programming language, it has placed a new demand for compiler developers. They had to revise algorithm and representation to translate and support new features of programming language. They had to revise the translation algorithm in a way that would make the compiler more efficient.

   The compiler minimizes the execution overhead of the program in a high-level language. This promotes the use of high-level language. Compiler improves the performance of computer architecture on user applications.

Compiler writing is a very challenging task. The compiler is a large program. For creating and evolving a modern compiler, one should have hands on software engineering techniques.

         A compiler must translate correctly the infinite set of the program written in the source language. The compiler writer must tackle what problem will arise and what heuristic approach to be used to tackle the problem of gathering efficient code.

Compiler-Construction Tools

Like any software developer, compiler writers use software development environment tools such as language editor, debugger, profilers, test gear, and so on. Some other dedicated tools have been created for different appliance phases of the compiler. These tools use a certain language for implementing special components and algorithms. Following are some of the common tools used for compiler-construction:

Parser generator – It produces a syntax analyzer from the grammar of programming language.

Scanner generators – It generates a lexical analyzer from regular-expression of the tokens of programming language.

Syntax-directed translation engine – It produces a collection of routines for making parse trees and intermediate code generation.

Code-generator Generators – It produces code generators from a collection of rules that translates each operation of the intermediate into the machine code for the target machine.

Data-flow analysis engine – It gathers the information about how values are transferred from one part to another part of the program.

Compiler-construction toolkits – It provides a combined set of rules for the construction of various phases of the compiler.


Related Topics

Finite State Machine

Finite State Machine A finite state machine is a simple machine to recognize patterns. It takes a string of symbols as the input and changes its state to another state, but...

3 minutes read.

Machine-Independent Optimizations in Compiler Design

Machine-Independent Optimizations The main aim of machine-independent optimization is to improve the generated intermediate code so that compiler can get better target code. Eliminating unwanted code from the object code or replacing...

8 minutes read.

Symbol Table Compiler Design

Symbol Table It is an important data structure used by the compiler. It stores information about various entities such as object, class, variable names, functions name, interfaces, procedure, literals, string etc.  The...

3 minutes read.

Evolution of Programming Languages in Compiler Design

The Evolution of Programming Languages The first computer came in the 1940s and was programmed in a binary language that told the computer what operations are to be performed and in...

4 minutes read.

Parsing in Compiler Design

Parsing is the term used to describe the process of converting data between different formats. The parser can carry out this operation. The parser is a part of the translator...

4 minutes read.

CLR Parsing Compiler Design

CLR Parsing CLR parsing refers to the canonical lookahead. We will use the canonical collection of LR(1) items for the construction of the CLR(1) parsing table. Generally, CLR(1) parsing has more...

6 minutes read.

Intermediate-Code Generator Compiler Design

Intermediate-Code Generator The process of translating a source language into machine code for a given target machine is done by intermediate-code. It lies between the high-level language and the machine language....

2 minutes read.

Syntax-Directed Translation

Syntax-Directed Translation A context-free-grammar with some additional rules is known as a syntax-directed definition. In SDT, attributes are associated with grammar symbols and rules are associated with productions. The attributes can...

3 minutes read.

Regular Expression | Compiler Design

Regular Expression A regular expression is a set of patterns that can match a character or string. It can also match alternative characters or strings. The grammar defined by the regular...

3 minutes read.

Boolean Expression in Compiler Design

Boolean Expression The translation of conditional statements such as if-else statements and while-do statements is associated with Boolean expression's translation. The main use of the Boolean expression is the following: Boolean expressions...

3 minutes read.

Ambiguity Elimination Compiler Design

Ambiguity Elimination Ambiguity elimination makes the sentence clear and readable. A sentence is grammatically ambiguous if it can produce more than one parse tree for a particular grammar. In this article,...

3 minutes read.

LR Parser in Compiler Design

LR Parser The most popular type of bottom-up parsing is LR(K) parsing. The LR() parser scans the input from left – to – right, which is the actual abbreviation of L...

2 minutes read.

SLR 1 Parsing Compiler Design

SLR(1) Parsing It is a simple LR parsing. Most of the function of this parsing is the same as LR(0) parsing. The parsing table for both the parser vary. The SLR(1)...

5 minutes read.

Errors in Compiler Design

Introduction Errors in compiler design refer to mistakes or issues that arise during the process of execution of the program. A compiler is a program that translates source code written in...

4 minutes read.

S-attributed and L-attributed SDTs

S-attributed and L-attributed SDTs STD stands for Syntax Directed Translation. When we associate some informal notations called semantic rules and the grammar, they are known as STD. So we can say...

2 minutes read.

Storage Allocation

Storage Allocation The storage allocation represents memory management. The allocation of memory can be done in the following ways: Static AllocationStack AllocationHeap Management Static Allocation: It is a procedure used for the allocation of...

1 minute read.

Basic Blocks and Flow Graphs in Compiler Design

Basic Blocks and Flow Graphs In this section, we are going to learn how to work with basic block and flow graphs in compiler design. Basic Block The basic block is a set...

3 minutes read.

LALR 1 Parsing | Compiler Design

LALR (1) Parsing The LALR parsing refers to the "lookahead LR" that has many lesser steps than typical parsers based on LR(1) items. For constructing the LALR(1) parsing table, the canonical...

6 minutes read.

Data Flow Analysis in Compiler Design

Data Flow Analysis All the optimization techniques we have learned earlier depend on data flow analysis. DFA is a technique used to know about how the data is flowing in any...

3 minutes read.

LR Parser Compiler Design

LR Parser LR parsing is a type of bottom-up parsing that is used to parse the large class of grammars. Here "L" stands for left-to-right scanning of the input "R" stands...

6 minutes read.