Programming Language Design Concepts
Programming Language Design Concepts
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 -
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.
Procedure Hello is
Begin
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 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
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)