Presentation is loading. Please wait.

Presentation is loading. Please wait.

Programming Languages

Similar presentations


Presentation on theme: "Programming Languages"— Presentation transcript:

1 Programming Languages
CS 430/CS 530 Fall 2004 Professor Adams

2 Programming Languages
facilitate the expression and communication of ideas between people have a narrower expressive domain than natural languages because they only communicate algorithmic ideas enable communication of algorithms between people and computers Think of all the ways I could tell you to “leave me alone” and the nuances of each. Narrower expressive domain doesn’t have those nuances.

3 Required definition of an Algorithm
An algorithm is an unambiguous, step-by-step procedure for solving a problem in a finite amount of time using a finite amount of space

4 Categories of Language Design Principles
Syntax context-free grammar Type systems and semantics values that programs can manipulate meaning of programs Memory management Exception handling

5 Memory Management static memory dynamic memory stack heap
lifetime of objects techniques for garbage collection & storage reclamation

6 Exceptions unexpected input unexpected divide by zero
unexpected attempt to create a new block of space on the heap

7 Programming Paradigms
Imperative Object-oriented Functional Logic (declarative) programming Event-driven programming Concurrent programming

8 Imperative Programming
Explicit series of steps calculates, retrieves input, produces output Procedural abstraction assignments, loops, sequences, conditionals Major imperative languages Fortran (1954, IBM, John Backus), Cobol (Codasyl Committee), C (designed for and implemented on the UNIX operating system on the DEC PDP-11 by Dennis Ritchie) , C++, Ada

9 Object-Oriented Programming
Program is a collection of objects which pass messages to one another to transform their states Object modeling, classification, inheritance are fundamental building blocks Major OO languages Smalltalk (Xerox PARC - Adele Goldberg & Alan Kay 1970’s), Java, C++, Eiffel

10 Functional Programming
Program is a collection of mathematical functions input (domain) result (range) Functions interact & combine using functional composition, conditionals, recursion Major functional languages Lisp (John McCarthy – M.I.T. – late 50’s), Scheme (block structure, lexical scoping, etc.), Haskell, ML

11 Logic (declarative) Programming
Program is a series of statements about what should happen rather than how it should be done Expresses non-determinism Major logic programming language Prolog(Alain Colmerauer – Universite d’Aix Marseilles – 1972)

12 Event-driven Programming
Program is a continuous loop that responds to unpredictably ordered events Events originate from user actions (mouse clicks or keystrokes) sensors on a robot Major event-driven languages include Visual Basic, Java

13 Concurrent Programming
Program is a collection of cooperating processes Concurrent Programming Languages SR, Linda, High Performance Fortran


Download ppt "Programming Languages"

Similar presentations


Ads by Google