1 / 34

Welcome to CS 335/535

Welcome to CS 335/535. Programming Languages. Professor Dolores Zage. Computer Science Department dmz@cs.bsu.edu RB 443 (765) 285-8646 http://www.cs.bsu.edu/homepages/dmz/. Materials. Programming Languages Concepts and Constructs Ravi Sethi.

Télécharger la présentation

Welcome to CS 335/535

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. Welcome to CS 335/535

  2. Programming Languages

  3. Professor Dolores Zage • Computer Science Department • dmz@cs.bsu.edu • RB 443 • (765) 285-8646 • http://www.cs.bsu.edu/homepages/dmz/

  4. Materials • Programming Languages • Concepts and Constructs • Ravi Sethi

  5. Course Overview and History of Programming Languages Lecture 1: Dolores Zage

  6. Programming Languages • Two types of courses • Survey of PL • Principles of PL

  7. “Survey of PL” Courses • A “survey” course aims to expose to student to a variety of specific programming languages.

  8. “Principles of PL” Courses • A “principles” course aims to teach the underlying concepts behind all programming languages

  9. This Course • is a “principles” course • will use a variety of specific programming languages to illustrate concepts. • C++ • Java • Prolog • Scheme • ML ? • Ada ?

  10. Goals of Course • After completing this course, a student should be able to • learn new languages quickly • evaluate appropriateness of a language for a task

  11. Why do schools teach other natural languages? • Create pain • studying other languages makes you reference “your own” • obtain a deeper understanding and grasp • expressiveness • become a better speller • notice that spoken languages are not enough to communicate all thought -- the mathematical language

  12. Natural communicate among humans write essays few write well 300,000 years old extremely complex no formal theory is capable of describing Programming communicate with literal-minded machine write programs few write well 50 years old complex based on mathematical formalisms languages

  13. History of Programming Languages • 50 years • over 120 widely used languages • The 50s - FORTRAN and LISP • The 70s - Ada, C, Pascal, Prolog and Smalltalk • The 80s - C++ and ML • The 90s - Java

  14. Frederick Brooks “… the programmer, like the poet, works only slightly removed from pure thought-stuff. He builds his castles in the air, from air, creating by exertion of the imagination. Few media of creation are so flexible, so easy to polish and rework, so rapidly capable of realizing grand conceptual structures.” We build new creations that have powerful effects on the real world.

  15. Types of Languages • Numerically Based • Business • Artificial Intelligence • Systems

  16. Role of Programming Languages • Initially languages were designed to execute efficiently • Any high-level language had to be competitive with the execution behavior of hand-coded assembly • Portability became the issue • Ease maintenance

  17. Other Influences • Computer capabilities • Applications • Programming methods • Implementation methods • Theoretical studies • Standardization

  18. The subject of programming languages is at the exciting juncture of theory and practice-- where the mind meets the computer

  19. Early Applications • Early four basic domains: business, scientific, system and AI • Business - COBOL • Scientific - FORTRAN • System - Assembler • AI -LISP

  20. Modern Applications • Business - COBOL, 4GLs, spreadsheet • Scientific - FORTRAN, C, C++ • AI - LISP, Prolog • Publishing - TeX, Postscript • Process - UNIX shell, TCL, PERL • New Paradigms - ML, Eiffel, SDL

  21. Effects of Environments • Batch-processing • interactive • embedded-system • programming

  22. Batch Processing • Files are usually the basis for most I/O • Files are stored as fixed length records • error terminates execution - acceptable but costly • no external help • error and exception handling • lack of timing constraints

  23. Interactive • Support for terminal interaction • error handling - bad data from keyboard, automatic feedback and correction from user, less need of language for handling errors • termination as a result of error is usually not acceptable (unlike batch) • has timing constraints (video game)

  24. Embedded System • Often operate without usual environment of files and I/O • Nonstandard devices • provide access to hardware - registers, memory locations, interrupt handlers • Error handling - extreme importance - Failure may be life-threatening • reliability and correctness • real-time • distributed - run indefinitely and concurrently

  25. Programming Environments • Features aiding separate compilation - redeclare shared information or prescribe an order of compilation or a library of specs • Features aiding testing and debugging - trace, breakpoints, assertions

  26. Environment Frameworks • Infrastructure services • supplies data repository, graphical user interface, security, communication services • programs are written to use these services • easily use services as part of their program design • good - gives common behavior pattern for the user (Dr. Place’s Windows programming)

  27. Specific Languages - FORTRAN • First - developed by a team lead by John Bacus 1955-57 • FORmula TRANslator • numerical calculations • extremely successful - FORTRAN II in 58, FORTRAN IV (standardized in 66 and rename to FORTRAN 66), FORTRAN 77, FORTRAN 90

  28. ALGOL • Afraid of IBM domination • Peter Naur lead • ALGOrithmic Language • where FORTRAN was optimized to run on IBM 704, ALGOL was not bound to single computer architecture • goal was ambitious (did not really know how to do this)

  29. ALGOL • Lead to call by name concept • no commercial success, however, many important advances • Jules Schwartz developed Jules’ Own Version of IAL (the original name of ALGOL) JOVIAL- • JOVIAL was the standard for US Air Force applications

  30. ALGOL advances • Variables are changed • block and procedures are basic units • procedures may call themselves recursively • data are organized into different types • identifiers have lexical scope

  31. Other Advances • Bacus used a syntactic notation comparable to context free language developed by Chomsky (BNF) • Lukasiewicz - enable arithmetic expression to be written without () - efficient stack-based evaluation • basis of stack architecture - Burroughs based a computer and wrote a ALGOL compiler that ran faster than any FORTRAN

  32. Other Advances • Classes to ALGOL - Nygaard and Dahl • who later developed Simual 67 • gave Stroustrup the idea for C++ • Wirth developed ALGOL-W then later developed Pascal in early 70s • PL/I - multipurpose programming language intended for the IBM 360s

  33. C • Designed and implemented by Dennis Ritchie at Bell Laboratories in 1972 • influenced by B developed by Ken Thompson for the first UNIX system on PDP-11 • graphics and network programming require greater access to the hardware environment • 1989 the ANSI standard established

  34. OO Languages • Smalltalk ( 1970s) • C++ (late 70s) • Ada (80s) - constructs for concurrent execution and real time programming, construct for aggregating data structures and subprocedures called a package, and a mechanism for exception handling

More Related