Programming Language Design Computer Science 312 Programming Language Design
Computer Science Data structures Computer organization Theory of computation Algorithm analysis Programming language design Database management Artificial intelligence Operating systems Web and mobile apps Graphics and image processing Networks
Course Goals Experience the functional and concurrent programming styles Learn to program in Haskell, Erlang, and functional Java Learn to write scanners and parsers for different languages Have some FUN!
Computer as a Layered System Memory ALU Control Unit I/O Devices Transistors Logic Circuits Multiplexors Etc. Hardware A program and its data are patterns of voltage levels
Computer as a Layered System Machine language Hardware 001110100101 010010000011 110001010111 111111100000 001010100001 A program and its data are patterns of 1s and 0s
Computer as a Layered System Assembly language Hardware in length in width load length mul width store area out area halt A program and its data are patterns of mnemonic symbols
Computer as a Layered System High-level language while x > 0: if x % 2 == 0: evens = evens + 1 else: odds = odds + 1 x = x - 1 Hardware A program and its data are patterns of arbitrary symbols, with lots of syntactic structure for the programmer
Software Tools File manager Debugger Editor Profiler Compiler Linker Loader Run-time system Debugger Profiler CASE tools Hardware
History of Programming Languages Fifth Fourth Third Second First Hardware To a certain extent, the layers of programming languages mirror their historical evolution
History and Evolution First Second Third Fourth Fifth 1950 Machine Assembly FORTRAN 1960 ALGOL LISP COBOL 1970 PASCAL, C PROLOG Modula Smalltalk 1980 Ada Erlang Haskell C++, Java, and Python are hybrids of fourth and fifth
First Generation Languages Machine language Assembly language FORTRAN (FOrmula TRANslation Language)
First Generation Languages Programs have a linear structure, isomorphic with the underlying machine structure But FORTRAN allows algebraic notation
Second Generation Languages ALGOL (ALGOrithmic Language) COBOL (COmmon Business-Oriented Language) PL/1
Second Generation Languages Programs are hierarchical in structure Recursion Wide variety of data types and strong type checking
Third Generation Languages Pascal C
Third Generation Languages Hierarchical data structures (arrays, records) Dynamic memory (pointers)
Fourth Generation Languages Modula Ada
Fourth Generation Languages Support for information hiding in packages or modules Support for concurrency
Fifth Generation Languages LISP (LISt Processing Language) Smalltalk PROLOG (PROgramming in LOGic) Haskell, Erlang
Fifth Generation Languages Support for new paradigms of programming: Function-oriented (LISP) Object-oriented (Smalltalk) Logic-oriented (PROLOG) Concurrency-oriented (Erlang)
Multiple Models of Computation Functions Objects Gens 1-4 Hardware von Neumann Processes Logic
For next time: Read the Introduction of the Haskell book. Download and install the Haskell Platform for your computer. Bring it to class. https://www.haskell.org/downloads