0% found this document useful (0 votes)
74 views11 pages

Programming Language Design Concepts

The document discusses three programming languages: Ada, Algol, and Pascal. Ada is a general purpose programming language used for a wide range of applications from missile control to payroll processing. It encourages good programming practices through features like strong typing, modularity, and readability. Algol was one of the first high-level programming languages for scientific computation. It introduced concepts like blocks, dynamic memory management, and BNF notation. Pascal was influenced by Algol but made defining complex data types and dynamic/recursive structures easier through features like records, enumerations, and subranges.

Uploaded by

kalani ruwindika
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
0% found this document useful (0 votes)
74 views11 pages

Programming Language Design Concepts

The document discusses three programming languages: Ada, Algol, and Pascal. Ada is a general purpose programming language used for a wide range of applications from missile control to payroll processing. It encourages good programming practices through features like strong typing, modularity, and readability. Algol was one of the first high-level programming languages for scientific computation. It introduced concepts like blocks, dynamic memory management, and BNF notation. Pascal was influenced by Algol but made defining complex data types and dynamic/recursive structures easier through features like records, enumerations, and subranges.

Uploaded by

kalani ruwindika
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1/ 11

Programming Language Design Concepts

Evaluate and analyse Algol, Pascal and ADA


programming languages
Ada Language
Introduction

Ada is an internationally standardized, general-purpose programming language used


in a wide variety of applications from missile control to payroll processing to air
traffic control.

Ada contains features commonly found in other programming languages and


provides additional support for modern programming practices, for controlling
special purpose hardware to meet real-time deadlines, and for the creation and
enhancement of large and complex programs by groups of programmers over long
periods of time.

Ada encourages good programming practices by incorporating software engineering


principles with strong typing, modularity, portability, reusability and readability.
These features reduce costs in software development, verifying, debugging, and
maintenance that typically puts strain on an organization's resources over the life of
the software.

Major Contributions
 Helps you design safe and reliable code
 Supports new and changing technologies
 Facilitates development of complex programs
 Helps make code readable and portable
 Reduces certification costs for safety-critical software
Main Features
 Packages - Data types, data objects, and procedure specifications can be
encapsulated into a package. This supports the program design of data
abstraction.
 Exception Handling - Ada has very good exception handling capabilities which
allow the program to handle its own run-time errors.
 Generic Program Units - It is possible to write a procedure (for example, a
sorting procedure) which does not require a data type to be specified.
 Parallel / Concurrent Processing - Ada supports parallel and concurrent
execution of tasks.
 Ada 95 Will Add -

o Support for object-oriented programming


o More flexible libraries
o Better control mechanisms for shared data

 Data Type – It is not based on a set of predefined primitive types but allows
users to declare their own types. This declaration in turn is not based on the
internal representation of the type but on describing the goal which should be
achieved. This allows the compiler to determine a suitable memory size for the
type, and to check for violations of the type definition at compile time and run
time. Ada supports numerical types defined by a range, modulo types, aggregate
types and enumeration types. Access types define a reference to an instance of a
specified type; untyped pointers are not permitted. Special types provided by the
language are task types and protected types.

 Example (language’s syntax using) :-

With Ada.Text_IO; use Ada.text_IO;

Procedure Hello is

Begin

Put_Line (“Hello word!”);


End Hello;

Strengths
 Maturity of language and implementations
 Software portability
 Successful usage in practice
 Flexibility
 Data Abstraction and Information Hiding
 Safety-critical support
 Concurrency support

Weakness
 Complexity of language
 Increase the cost of validation due to complexity of language
 Implementation is expensive
Algol Language
Introduction
ALGOL (Algorithmic Language) is one of several high level
languages designed specifically for programming scientific computations. It started
out in the late 1950's, first formalized in a report titled ALGOL 58, and then
progressed through reports ALGOL 60, and ALGOL 68. It was designed by an
international committee to be a universal language. Their original conference, which
took place in Zurich, was one of the first formal attempts to address the issue of
software portability. ALGOL's machine independence permitted the designers to be
more creative, but it made implementation much more difficult. Although ALGOL
never reached the level of commercial popularity of FORTRAN and COBOL, it is
considered the most important language of its era in terms of its influence on later
language development. ALGOL’s lexical and syntactic structures became so popular
that virtually all languages designed since have been referred to as "ALGOL - like";
that is they have been hierarchical in structure with nesting of both environments and
control structures

Major Contributions
 The assignment operation
 Regularly of Language
 The block Structure
 Dynamic memory management
 Introduction of Programming Language
 Guided the nation to define the syntax of Programming Language
Main Features
ALGOL was the first second-generation programming language and its
characteristics are typical of the entire generation. The ability to create blocks of
statements for the scope of variables and the extent of influence of control statements.
Two different means of passing parameters to subprograms; call by value and call by
name. Structured control statements: if - then - else and the use of a general condition
for iteration control were also features, as was the concept of recursion: the ability of
a procedure to call itself.

A major contribution of this report was the introduction of BNF notation for defining
the syntax of the language. Overall, ALGOL is considered to be perhaps the most
orthogonal programming language, meaning it has a relatively small number of basic
constructs and a set of rules for combining those constructs. Every construct has a
type associated with it and there are no restrictions on those types. In addition, most
constructs produce values. Several of ALGOL’s other characteristics are listed
below:

 Dynamic Arrays - one for which the subscript range is specified by variables
so that the size of the array is set at the time storage is allocated.
 Reserved Words - the symbols used for keywords are not allowed to be used
as identifiers by the programmer.
 User defined data types - allow the user to design data abstractions that fit
particular problems very closely.
 Parameter passing mechanisms
The two best known parameter passing methods are pass by value (call-
by-value) and pass by reference (call-by-reference).

Pass by value (call-by-value):


The default parameter passing method was pass by value, which, like in C,
means that parameter values are copied into the formal parameters from which point
the formal parameters act like local variables.

Pass by name:
Is powerful, Can be confusing and Expensive to Implement.
However, ALGOL also introduced pass by name which gave the programmer the
ability to change a formal parameter's value and thus affect the actual parameter.
Strengths
 Safe Typing
 Safe and Secure Software
 Safe Architecture
 Safe Syntax
 Efficiency
 Essay to read and write

Weakness
 Lack of input output Statements was a mistake
 Dynamic Scooping of in Algol makes programme a lot of read difficult.
 Need Extra memory for array implementing in the display
Pascal Language
Introduction
Pascal was to create an efficient language (regarding both compilation speed and
generated code) based on structured programming, a recently popularized concept
that he had promoted in his book Algorithms + Data Structures = Programs. Pascal
has its roots in the ALGOL 60 language, but also introduced concepts and
mechanisms enabled programmers to define their own complex datatypes, and also
made it easier to build dynamic and recursive data structures such
as lists, trees and graphs. Important features included for this
were records, enumerations, subranges, dynamically allocated variables with
associated pointers, and sets. To make this possible and meaningful, Pascal has
a strong typing on all objects, which means that one type of data cannot be converted
or interpreted as another without explicit conversions. Similar mechanisms are
standard in many programming languages today.
Pascal, like many programming languages of today (but unlike most languages in the
C family), allows nested procedure definitions to any level of depth, and also allows
most kinds of definitions and declarations inside subroutines (procedures and
functions). This enables a very simple and coherent syntax where a
complete program is syntactically nearly identical to a
single procedure or function (except for the heading, which has one of these three
keywords).

Major Contributions
 Compatible
 Distribution independence
 Readable
 maintainable
 Integrated development environment
 Great integration with assembler
Main Features

Pascal features that allow it to used as a powerful learning tool in introducing structured
programming techniques

 Data type - A type in Pascal, and in several other popular programming


languages, defines a variable in such a way that it defines a range of values
which the variable is capable of storing, and it also defines a set of operations
that are permissible to be performed on variables of that type. The predefined
types are :

Data Type Type of value witch the variable capable of storing


Integer Integer whole numbers
Real Floating point numbers
Boolean The value true or false
char A string character from an ordered character set
string A group of “String” of characters

 Provides a defined set of Data Structures- These data structures include


Arrays, Records, Files and Sets.
 Has a strong data typing element - Pascal compliers can diagnose an
incompatible assignment of one type to a variable to another type
 Supports Structured Programming - This is accomplished through the use
of subprograms called procedures and functions.
 Simplicity and Expressivity - Because the language is simple and expressive
in nature it allows for effective teaching of computer programming techniques.
 Data type declaration –

Sub Range Type :- Type declaration :-

var type

x : 1..10; x = integer;

y =x;
y: ‘a’ .. ‘z’;
Strengths
 Available for a lot of platforms
 Simplicity and Expressivity
 Ability to write own Libraries
 Essay Compilation
 Security
 Reliability
 Support Structured Programming

Weakness
 Weak String handling capabilities
 Not mainstream
 Pascal not suitable for serious programming
 Being a high-level language ,it does not allow as much control over the
generated code
References
 http://www.adahome.com/Discover/Introduction.html
 https://en.wikipedia.org/wiki/Ada_(programming_language)
 http://groups.engin.umd.umich.edu/CIS/course.des/cis400/algol/a
lgol.html
 https://en.wikipedia.org/wiki/Pascal_(programming_language)
 Concepts Of Programming Language-Robert W. Sebesta(10th
Edition)

You might also like