CS 603 Programming Language Organization Lecture 1 Spring

  • Slides: 12
Download presentation
CS 603: Programming Language Organization Lecture 1 Spring 2003 Department of Computer Science University

CS 603: Programming Language Organization Lecture 1 Spring 2003 Department of Computer Science University of Alabama © 2003 Joel Jones

Outline • • Policy and Syllabus Prerequisites Diagnostic Imp. Core © 2003 Joel Jones

Outline • • Policy and Syllabus Prerequisites Diagnostic Imp. Core © 2003 Joel Jones

Policy and Syllabus © 2003 Joel Jones

Policy and Syllabus © 2003 Joel Jones

Prerequisites • Forms • Knowledge of several different programming languages • At least one

Prerequisites • Forms • Knowledge of several different programming languages • At least one non-imperative © 2003 Joel Jones

Teaming and Active Learning • Active Participation in Classroom – Questioning – Preparation –

Teaming and Active Learning • Active Participation in Classroom – Questioning – Preparation – Working in Pairs – Reporting © 2003 Joel Jones

Why Study Weird Programming Languages? • Why don’t you tell me? Pair Up: •

Why Study Weird Programming Languages? • Why don’t you tell me? Pair Up: • Why study weird programming languages? • Why are you taking this class? © 2003 Joel Jones

Languages and their Paradigms • Brainstorm—name as many programming languages as you can. –

Languages and their Paradigms • Brainstorm—name as many programming languages as you can. – LISP, Scheme, CLOS, Python, APL, C, C++, Smalltalk, Ruby, Perl, AWK, COBOL, FORTRAN, AWK, Pascal, Apple. Script, Visual Basic, BASIC, Java, Prolog, CLP, SML, Haskell, etc. • Brainstorm—what “paradigms” or “kinds” of languages are these? – functional (applicative), object-oriented, imperative, scripting, logic programming © 2003 Joel Jones

Diagnostic © 2003 Joel Jones

Diagnostic © 2003 Joel Jones

What is the Simplest Possible Language? • Simple Syntax • Few Primitives © 2003

What is the Simplest Possible Language? • Simple Syntax • Few Primitives © 2003 Joel Jones

Imp. Core Language • Two kinds of expressions – Function definitions: • (define double

Imp. Core Language • Two kinds of expressions – Function definitions: • (define double (x) (+ x x)) – Expressions: • (double 5) • Environment is interactive/interpreted © 2003 Joel Jones

LISP-like Syntax • • • input -> expression | fundef -> ( define function

LISP-like Syntax • • • input -> expression | fundef -> ( define function arglist expression ) arglist -> ( variable* ) expression -> value | variable | ( if expression ) | ( while expression ) | ( set variable expression ) | ( begin expression+ ) | ( optr expression* ) • • optr -> function | value-op value -> integer value-op -> + | - | / | = | < | > | print function -> name variable -> name integer -> sequence of digits, possibly preceded by minus sign name -> any sequence of characters not an integer, and not containing a blank or any of the following characters: ( ) ; . © 2003 Joel Jones

Reading & Questions for Next Class • Chapter 1 of textbook • Come up

Reading & Questions for Next Class • Chapter 1 of textbook • Come up with a question: – That would help others when reading these chapters -or– A question raised, but not answered by these chapters © 2003 Joel Jones