programming language design and implemenation

28
PRESENTATION ON TOPIC :-> PROGRAMMING LANGUAGES – DESIGN AND IMPLEMENATION

Upload: ashwini-awatare

Post on 29-Nov-2014

266 views

Category:

Engineering


0 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Programming language design and implemenation

PRESENTATION ON TOPIC :->

PROGRAMMING LANGUAGES – DESIGN AND

IMPLEMENATION

Page 2: Programming language 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

Page 3: Programming language design and implemenation

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 .

Page 4: Programming language design and implemenation

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 .

Page 5: Programming language design and implemenation

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

Page 6: Programming language design and implemenation

Numerically based languages

Computing mathematical expressions

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

 

Business languages

COBOL (Common Business Oriented Language) English-like notation

Page 7: Programming language design and implemenation

 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

Page 8: Programming language design and implemenation

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

Page 9: Programming language design and implemenation

  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

Page 10: Programming language design and implemenation

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

Page 11: Programming language design and implemenation

3.Impact of programming paradigmsWhat is programming language .

Language paradigms .

Problem solving .

Software design .

Page 12: Programming language design and implemenation

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.

Page 13: Programming language design and implemenation

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.

Page 14: Programming language design and implemenation

2.Language paradigms

Imperative / procedural languages

Applicative / functional languages

Rule-based / declarative languages

Object-oriented languages

Page 15: Programming language design and implemenation

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

Page 16: Programming language design and implemenation

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 .

Page 17: Programming language design and implemenation

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

Page 18: Programming language design and implemenation

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)

Page 19: Programming language design and implemenation

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

Page 20: Programming language design and implemenation

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 .

Page 21: Programming language design and implemenation

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.

Page 22: Programming language design and implemenation

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.

Page 23: Programming language design and implemenation

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?

Page 24: Programming language design and implemenation

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

Page 25: Programming language design and implemenation

Programming environment:

the environment in which programs are created and tested.

Separate compilation

Separate execution

Testing

Debugging

Page 26: Programming language design and implemenation

Effects on language design :->

Modular organization

Local/global variables

Libraries

Page 27: Programming language design and implemenation

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

Page 28: Programming language design and implemenation

•Language design must:

Allow program solution to match problem structure

Allow for world-wide use

Be easy to prove correctness of solutions