welcome to cs 335/535
DESCRIPTION
Welcome to CS 335/535. Programming Languages. Professor Dolores Zage. Computer Science Department [email protected] RB 443 (765) 285-8646 http://www.cs.bsu.edu/homepages/dmz/. Materials. Programming Languages Concepts and Constructs Ravi Sethi. - PowerPoint PPT PresentationTRANSCRIPT
Professor Dolores Zage
Computer Science Department [email protected] RB 443 (765) 285-8646 http://www.cs.bsu.edu/
homepages/dmz/
Materials Programming Languages Concepts and Constructs Ravi Sethi
Course Overview and History of Programming Languages
Lecture 1:
Dolores Zage
Programming Languages
Two types of courses Survey of PL Principles of PL
“Survey of PL” Courses
A “survey” course aims to expose to student to a variety of specific programming languages.
“Principles of PL” Courses
A “principles” course aims to teach the underlying concepts behind all programming languages
This Course
is a “principles” course will use a variety of specific programming
languages to illustrate concepts. C++ Java Prolog Scheme ML ? Ada ?
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
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
languages
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
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
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.
Types of Languages
Numerically Based Business Artificial Intelligence Systems
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
Other Influences
Computer capabilities Applications Programming methods Implementation methods Theoretical studies Standardization
The subject of programming languages is at the exciting juncture of theory and practice-- where the mind meets the computer
Early Applications
Early four basic domains: business, scientific, system and AI
Business - COBOL Scientific - FORTRAN System - Assembler AI -LISP
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
Effects of Environments
Batch-processing interactive embedded-system programming
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
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)
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
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
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)
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
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)
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
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
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
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
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
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