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

Code Generation

Code Generation The last phase of the compiler is code generation. It is the compiler's back-end that makes multiple passes over the IR before generating the target program. The code generator's...

4 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.

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.

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.

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.

Shift Reduce Parsing in Compiler Design

Like the bottom-up parsing, the shift reduce parser also builds the parse tree from the leaves (bottom) to the root (up). The LR parser is a more versatile variation of...

4 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.

YACC in Compiler Design

YACC  YACC is known as Yet Another Compiler Compiler. It is used to produce the source code of the syntactic analyzer of the language produced by LALR (1) grammar. The input...

5 minutes 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.

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.

Optimization of Basic Blocks in Compiler Design

Optimization of Basic Blocks We can apply the optimization process on a basic block. While optimization, there is no need to change the set of expressions computed by the block. The basic...

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.

Syntax Analysis Compiler Design

Syntax Analysis This article will describe the parsing method used in the compiler. The grammatical rule of programming language can be constructed with the help of context-free grammars or BNF (Backus–Naur...

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.

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.

LEX

LEX Lex is a tool/computer program that generates a Lexical analyzer. Lex is developed by Vern Paxson in C around 1987. Lex works together with the YACC parser generator. It allows...

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.

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.

Lexical Analysis in Compiler Design

Lexical Analysis It is the first phase of the compiler. As we know, it is also known as a scanner. The input for lexical analysis is source code. After taking source...

2 minutes read.

Derivation and Parse Tree in Compiler Design

Derivation and Parse Tree In this article, we will learn Derivation and Parse Tree. Derivations The parse tree can be constructed by taking a derivational view in which production is treated as rewriting...

4 minutes read.