Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Computer Science 312 Programming Language Design Course Goals • Experience different programming language styles • Learn to write interpreters for different languages • Learn to program in Scheme, Erlang, and Smalltalk • Have some FUN! Computer Science • Algorithms and data structures • Computer organization • Theory of computation • Programming language design • • • • • Database management Artificial intelligence Operating systems Compiler construction Graphics and image processing • Networks Computer as a Layered System Transistors Logic Circuits Multiplexors Etc. Hardware Memory ALU Control Unit I/O Devices 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 Hardware while x > 0: if x % 2 == 0: evens = evens + 1 else: odds = odds + 1 x=x-1 A program and its data are patterns of arbitrary symbols, with lots of structure for the programmer Software Tools File manager Editor Assembler Linker Loader Run-time system Hardware Debugger Profiler CASE tools History of Programming Languages • To a certain extent, the layers of programming languages mirror their historical evolution 5 Generations of Languages Hardware History and Evolution First 1950 1960 1970 1980 Second Third Fourth Fifth Machine Assembly FORTRAN ALGOL COBOL LISP PASCAL, C PROLOG Modula Smalltalk Ada Erlang 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 Fifth Generation Languages • LISP (LISt Processing Language) • Smalltalk • PROLOG (PROgramming in LOGic) • 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 Objects Processes Hardware von Neumann Functions Logic