programming language design and implemenation

Post on 29-Nov-2014

266 Views

Category:

Engineering

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

 

TRANSCRIPT

PRESENTATION ON TOPIC :->

PROGRAMMING LANGUAGES – DESIGN AND

IMPLEMENATION

Programming Languages :Language Design IssuesWhy study programming languages ?

A short history of programming languages

Impact of programming languagesRole of programming languagesProgramming enviornment

1.Why study ProgrammingLanguage Concepts?

Increased capacity to express programming concepts

Improved background for choosing appropriate languages

Increased ability to learn new languagesUnderstanding the significance of

implementation .

Why study programming languages

To improve your ability to develop effective algorithms .

To improve your use of existing programming languages .

To increase your vocabulary of useful programming constructs .

Why study programming languages

To allow a better choice of programming language

To make it easier to learn a new language

To make it easier to design a new language

Numerically based languages

Computing mathematical expressions

FORTRAN, Algol, Pascal, PL/1, BASIC, C, C++

 

Business languages

COBOL (Common Business Oriented Language) English-like notation

 Artificial intelligence languages

Tree search; Rule-based paradigm

LISP (LISt Processing)

PROLOG (PROgramming in LOGic)

System languages

C, C++

Script languages: AWK, Perl, TCL/TK

Web programming: HTML, XML, Java,

Microsoft *.NET family

1.Batch enviornment (batches of files)

2.Interactive enviornment (time sharing)

 Effects on language design

File I/O in batch processing

Error handling in batch processing

Time constraints in interactive processing

  1.Interactive processing

2.Embedded system environments

 

Effects on language design

No need for time sharing

Good interactive graphics

Non-standard I/O devices for embedded systems

Client-server model of computing

Server: a program that provides information

Client - a program that requests information

 Effects on language design

Interaction between the client and server programs

Active web pages, Security issues, Performance

3.Impact of programming paradigmsWhat is programming language .

Language paradigms .

Problem solving .

Software design .

Attributes of a good languageClarity,simplicity,unityOrthogonalityNaturalness for the applicationSupport for abstractionEase of program verificationProgramming environmentPortability of programsCost of use 1.cost of program execution

2.cost of program translation

3.cost of program creation,testing,use.

1.WHAT IS PROGRAMMING LANGUAGE?

Programming languages are essentially carefully designed notations .They are used to specify ,organize, and reason about the various aspects of problem solving. The designers of programming language have twin goals:

Making computing convenient.Making efficient use of computing machines.

2.Language paradigms

Imperative / procedural languages

Applicative / functional languages

Rule-based / declarative languages

Object-oriented languages

Statement oriented languages that change machine state

EX : (C, Pascal, FORTRAN, COBOL)

Computation: a sequence of machine states (contents of memory)

Syntax: S1, S2, S3, ... where S1, S2, … are statements

Programming consists of building the function that computes the answer

EX: (ML, LISP)

Computation: Function composition is major operation

Syntax: F1(F2(F3(X))) where F1,F2,F3 are functions & X is data .

Computation: Actions are specified by rules that check for the presence of certain enabling conditions. EX:(Prolog)

The order of execution is determined by the enabling conditions, not by the order of the statements.

Syntax: Condition Action

Imperative languages that merge applicative design with imperative statements

EX:(Java, C++, Smalltalk)

Syntax: Set of objects (classes) containing data (imperative concepts) and methods (applicative concepts)

3.Problem solving Defining the systemAnalyzing the system definedDetailed system specificationDesign the systemImplement the designTesting and debuggingvalidation

4.Software design Software design sits at crossroads of all the

computers : hardware and software engineering and programming, human factors research , ergonomics .

It Is the study of intersection of human , machine ,and the various interfaces- physical ,sensory ,psychological -that connect them .

A designer studies the following aspects of a programming language or paradigm:

Support for abstraction.Parameters and parameter

transmission. Exceptions and exception handling.Support for static and dynamic storage

management.

The need for standards - to increase portability of programs

Problem: When to standardize a language?

If too late - many incompatible versions

If too early - no experience with language

Problem: What happens with the software developed before the standardization?

  Ideally, new standards have to be compatible with older standards.

I18N issue - How to specify languages useful in a global economy?

• What character codes to use?

• Collating sequences? - How do you alphabetize various languages?

• Dates? - What date is 10/12/01? 10-12-01? 12.10.01 ?Is it a date in October or December?

• Time? - How do you handle

• time zones,

• summer time in Europe,

• daylight savings time in US,

• Southern hemisphere is 6 months out of phase with northern hemisphere,

• the date to change from summer to standard time is not consistent.

• Currency? - How to handle dollars, pounds, marks, francs, euros, etc.

Programming environment:

the environment in which programs are created and tested.

Separate compilation

Separate execution

Testing

Debugging

Effects on language design :->

Modular organization

Local/global variables

Libraries

Process control languages

Scripting languages

• Usually interpreted,

• Able to process programs and data files

• Specify a sequence of operations on program and data files.

Awk, Perl, Tcl/Tk

•Language design must:

Allow program solution to match problem structure

Allow for world-wide use

Be easy to prove correctness of solutions

top related