The Programming Language - PowerPoint PPT Presentation

1 / 18
About This Presentation
Title:

The Programming Language

Description:

Discusses the features that a good programming language should have from the ... integrated software environment Ex: Ada Programming Support Environment (APSE) ... – PowerPoint PPT presentation

Number of Views:32
Avg rating:3.0/5.0
Slides: 19
Provided by: kishorehup
Category:

less

Transcript and Presenter's Notes

Title: The Programming Language


1
The Programming Language
  • By Doug Bell, Ian Morrey
  • and
  • John Pugh

2
Introduction
  • Discusses the features that a good programming
    language should have from the viewpoint of the SW
    engineer such as FORTRAN, COBOL, C, Pascal, and
    Ada what features encourage the development of
    software that is reliable, maintainable and
    efficient
  • Programming languages are very difficult to
    evaluate and compare
  • COBOL- Data processing community
  • FORTRAN - language of scientist and engineer
  • Ada- real time or embedded computer systems
  • C- Systems programmer

3
Classification of programming Languages
  • High-level, Low-level, Systems implementation
    language or high-level assembler
  • weakly or strongly typed
  • compiled or interpreted

4
Selection of programming language
  • Many organizations have a substantial investment
    in a particular programming language
  • Contact that actually specifies the programming
    language
  • Support from suppliers of major software
    components, compilers and database management
    systems
  • Language sensitive editors,debugging systems,
    project management tools and development tools

5
Programming in the small
  • 1. Simplicity, Clarity and Orthogonality
  • SimpleLarger no.of features more complex
  • Clarity There is design languages for the
    programmers than for the machines
  • high-level languages
  • natural, unambiguous and meaningful
  • Orthogonality possible to combine language
    features freely special cases and restrictions
    should not be prevalent

6
Programming in the small
  • 2. Language Syntax consistent, natural, and
    promote readability of programs
  • A number of systematic concepts help the physical
    layout of a program to reflect dynamic algorithm
  • The readability of program improved by the use of
    meaningful identifiers and consistency of
    language syntax

7
Programming in the small
  • 3.Control Abstractions small but powerful set of
    control structures to describe the flow of
    execution within a program unit
  • Basic structured programming constructs
    Sequence, Selection(IF,CASE) and
    Repetition(iterations fixed, controlled by
    evaluation of some conditions)
  • Basic set of primitives fits in well with the
    top-down philosophy of program design
  • Each primitive has a single entry and exit points

8
Programming in the small
  • 4.Data Types and Strong Typing Data type is a
    set of data objects and operations applicable to
    all objects of that type and a language said to
    be Strongly typed if it can be determined at
    compile-time whether or not each operation
    performed on an object is consistent with the
    type of that object
  • Strongly typed languages are more clear, reliable
    and portable
  • dynamic (change at run-time) and static typing

9
Programming in the small
  • 4.Data Types and Strong Typing(cont)
  • a. Primitive Data Types Boolean, Character,
    Integer,Real, supporting cast of operations,
    literals or constants
  • Pointer data type Provide the ability to refer
    to data object indirectly eg lists and trees
  • Arrays Mapping is less clear and less flexible
  • Readability, reliability, data abstraction
    capabilities are enhanced if the programmer
    extend the primitive data types

10
Programming in the small
  • 4.Data Types and Strong Typing(cont)
  • b. Structured data types
  • Arrays homogeneous elements
  • Record in FORTRAN heterogeneous elements
  • Variant records or discriminated unions union of
    several subtypes based on some discriminating tag
    field

11
Programming in the small
  • 4.Data Types and Strong Typing(cont)
  • c. Strong Vs Weak Typing Strong typing will be
    seen as most desirable but languages must provide
    well defined escape mechanisms to circumvent type
    checking
  • implicit and explicit conversions

12
Programming in the small
  • 5. Procedural Abstraction what should be done
    before how it should be done
  • Procedures and functions allow layered design and
    factoring increases readability and
    maintainability of program
  • Procedures should only accept and return
    information through their parameters and
    functions should accept but not return
  • Recursion Cobol, Fortran does not support

13
Programming in the small
  • 5. Procedural Abstraction (cont)
  • a. Parameter Passing Mechanism
  • Input, output, Input-output parameters
  • Fortran parameter passing mode call by
    reference in input-output parameters- Location
    of actual parameter is bound to the formal
    parameter
  • Pascal uses both call by reference in both
    input-output, output parameters and call by
    value in input parameters
  • ADA uses in, out, and in out

14
Programming in the small
  • 5. Procedural Abstraction (cont)
  • a. Scoping Mechanisms
  • Objects used within the procedure should have no
    effect outside the procedure
  • Information hiding
  • Scope to control the visibility of names
  • BASIC- provides no scoping-global variable
  • Fortran- sub routine or function- local variable
  • Algol, Pascal, and ADA are block-structured
    languages

15
Programming in the large
  • Undergo continual maintenance and enhancement
    over extended lifetime
  • Integrate the software tools with particular
    language to form integrated software environment
    Ex Ada Programming Support Environment (APSE)
  • Functional, Data Abstractions
  • Use of abstractions provides modularity, reuse of
    code and information hiding
  • Interface between modules must be carefully
    controlled
  • Strong type checking across module boundaries

16
Programming in the large
  • 1.Functional and data Abstractions
  • Functional Abstraction in the form of procedures
    or functions
  • An abstract data type consists of a set of
    objects and operations
  • Programming language should include
    Encapsulation, clear separation between
    specification and implementation of abstraction,
    Information hiding, reusable program modules

17
Programming in the large
  • 1.Functional and data Abstractions (cont)
  • In Pascal, functional abstraction at the level of
    procedure or function and provide support for
    transparent data types and gives little support
    for data abstraction
  • Ada provides encapsulation mechanisms at
    subprogram and package level- Two parts of
    package, specification and body which are
    separately compiled
  • Generics allow programmers to define templates
    for packages and procedures

18
Programming in the large
  • 2.Seperate Compilation
  • Integration of routines that have been developed
    separately
  • Additional support environmental tools such as
    linkers, cross reference generators, file
    librarians, and source code control systems
  • Fortran provides independent compilation of
    modules at sub routine level but no run-time
    checking of calls to external routines
  • Pascal provides no support for separate
    compilation and Ada provides greater support for
    separate compilation with strong type checking
Write a Comment
User Comments (0)
About PowerShow.com