1 / 13

Programming Languages

Programming Languages. CS 430/CS 530 Fall 2004 Professor Adams. 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

jensend
Download Presentation

Programming Languages

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

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

  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

More Related