Lectures‎ > ‎

Week01

Class overview

Student introductions

Class details
  • Translation and Interpretation
  • Syntax
  • Semantics
    • Lambda Calculus
    • Operational
  • Paradigms
    • Imperative
    • Object Oriented
    • Functional
    • Logic
    • Declarative
    • Domain Specific Languages
Programming Language Evolution

Language Popularity

Course Roadmap
  • Parsing, translation, code generation, and virtual machines (Python)
  • Functional Programming (Lisp, Haskell, Scala, Python)
  • Object Oriented Programming (Python, Java)
  • Logic Programming (Prolog, Python)
  • Declarative Programming (SQL, Python)

Compilers and Interpreters
  • A compiler usually has these steps
    • Parse source code
    • Create tree representation (abstract syntax tree)
    • Transform tree representation into an intermediate representation (IR)
    • Transform IR into machine code (code generation)
    • This results in an machine-dependent executable that can be run on a specific CPU and OS.
  • An interpreter usually has these steps
    • Parse source code
    • Create tree representation (abstract syntax tree)
    • Execute the code in the tree form
  • Modern interpreters do the following (Python, Ruby) :
    • Parse source code
    • Create tree representation
    • Transform tree into bytecode (an machine independent form that requires a bytecode interpreter or virtual machine)
    • Execute the bytecode
  • Java
    • Parse source code
    • Create tree representation
    • Transform tree into IR
    • Transform IR into Java bytecode (.java to .class files)
    • Execute the Java bytecode on the JVM (Java Virtual Machine)

Git
  • Generate ssh rsa key pair:
    • ssh-keygen -t rsa
  • Send public key (id_rsa.pub) to support@cs.usfca.edu
  • State you are in CS 345 with Benson

Python Overview
  • Types
  • Expressions
  • Statements
  • Syntax
  • Functions
  • Control
  • Lists
  • Dicts
  • Classes

Python Resources


ċ
ex1.py
(2k)
Greg Benson,
Jan 24, 2013, 3:43 PM
ċ
sort_words.py
(0k)
Greg Benson,
Jan 24, 2013, 3:43 PM
ċ
types.out
(1k)
Greg Benson,
Jan 24, 2013, 3:43 PM
Comments