This page will be removed on August 6th 2026. Please update your links to refer to https://esb.ics.hawaii.edu/2022fall.ics313/index.html instead.
Programming Language Theory, ICS 313
This page is
http://www2.hawaii.edu/~esb/2022fall.ics313/
This page is subject to change without notice -- please reload it
in your browser if an item that might affect you may have changed.
The lectures for this class are in Kuykendall 301 every Monday and
Wednesday 10:30-11:45am.
Office hours and contact information for the instructor and the
TA are available in the Resources on Laulima. Generally speaking, the
instructor is responsible for the lectures and the exams, and the TA is
responsible for everything else. The instructor assigns the homeworks
and the TA grades them.
The following textbook is required: "Programming Language Pragmatics" (PLP), fourth edition. Michael L. Scott, Morgan Kaufmann Pub., 2015 (paperback), ISBN-10: 0124104096, ISBN-13: 978-0124104099. Note: we will not use the CD from the book. Any edition will contain most, if not all, of the relevant material, but the page references might be different. The electronic version (PDF) is fine.
Optional Reference Material:
- Unix/Emacs:
- "Just Enough Unix", any edition, Paul K. Andersen McGraw Hill (or comparable text). Note: ITS (on campus) has free reference material available on the "flavor" of Unix installed on UHUnix.
- Lisp:
- "Practical Common Lisp", Peter Seibel, Apress, 2005, ISBN: 1590592395.
- "ANSI Common Lisp, Paul Graham, Prentice Hall, 1995, ISBN: 0-133708756
- "Land of Lisp (LoL), Conrad Barski, No starch press, 2011.
- Prolog:
- "Thinking as Computation: A First Course (TaC), Hector J. Levesque, 978- 0262016995, The MIT Press, (Jan 6, 2012). Slides and sample programs from the textbook are available from the author and on Laulima.
- "Learn Prolog Now http://www.learnprolognow.org/ Programming in Prolog, 4th edition, Clocksin & Mellish, Springer-Verlag, ISBN 3-540- 58350-5.
Schedule
This schedule is subject to change.
- Mon, Aug 22. Course introductions, course summary, variety of programming languages, compilation and interpretation. Programming Language Pragmatics, Chapter 1 (every section, except section 1.6 can be skimmed).
Presentation
- introductions
- course overview
- variety of programming languages
- compilation and interpretation
- creating a new programming language
- Wed, Aug 24. Practical Common Lisp Chapter 1.
Presentation
- review: creating a new programming language
- language equivalence
- LISP:
- history
- memory management
- basic types
- function definitions
- Mon, Aug 29. Practical Common Lisp Chapters 3 and 4.
Presentation
- LISP function definition and parameters
- lists as data structures
- LISP variables
- LISP syntax and semantics
- LISP:
homework 1 assigned, due Wednesday, September 7th.
- Wed, Aug 31. Using Unix Systems.
Presentation
- some history
- uhunix
- command line
- control characters: EOF/^D, interrupt/^C
- file commands
- editors
- Mon, Sep 5. Labor Day holiday.
- Wed, Sep 7. Functional Programming Languages. Programming Language Pragmatics, Chapter 11-11.2, 1.5-1.7, skim sections 11.3, 11.8. Practical Common Lisp, Chapter 5.
Presentation
- functional programming
- lambda expressions
- currying
- purely functional programming
- Mon, Sep 12. Practical Common Lisp Chapter 12.
Presentation
- cons, car, cdr
- append
- recursive list processing
- other cons-based data structures
- Wed, Sep 14. Practical Common Lisp Chapter 10.
Presentation
- recursive list processing
- other cons-based data structures
- collections: vectors, arrays, hash tables
- LISP equality
homework 2 assigned, due Friday, September 23rd.
- Mon, Sep 19. Practical Common Lisp Chapter 11.
Presentation
- collections review
- LISP equality
- functional programming in LISP
- Wed, Sep 21. Practical Common Lisp Chapters 7 and 8.
Presentation
- quote and backtick
- LISP macros
- midterm exam review
- Mon, Sep 26. Midterm exam 1.
- Wed, Sep 28. Introduction to OCAML. Programming Language Pragmatics, Chapter 11.4-11.8.
Presentation
- LISP with different syntax
- using the compiler
- let expressions
- functions and recursive functions
- types and type inference
- lists and pattern matching
- higher-order functions
homework 3 assigned, due Friday, October 7th.
- Mon, Oct 3. More OCAML. Evaluation orders. Programming Language Pragmatics, Section 6.6.2 (Applicative- and Normal-Order Evaluation) and Section 9.3 (Parameter Passing).
Presentation
- lists and pattern matching
- higher-order functions
- more pattern matching: tuples and data types
- Wed, Oct 5. More OCAML.
Presentation
- data types and pattern matching
- exceptions
- higher-order functions
- more data structures: records and trees
- imperative programming: references, arrays, exceptions
- evaluation order: applicative order (strict evaluation, eager evaluation) and normal order (lazy evaluation)
- Mon, Oct 10.
Programming Language Pragmatics, Section 6.6.2 (Applicative- and Normal-Order Evaluation) and Section 9.3 (Parameter Passing).
Names, Scopes, and Bindings. Programming Language Pragmatics, Chapter 3.
Presentation
- imperative programming: references, arrays, exceptions
- evaluation order: applicative order (strict evaluation, eager evaluation) and normal order (lazy evaluation)
- names in programming languages
- binding times
- overview of storage management
homework 4 assigned, due Friday, October 14th.
- Wed, Oct 12.
Presentation
- overview of storage management
- scope
- nested scope
- separate compilation, modules and classes
- Mon, Oct 17. Syntax. Programming Language Pragmatics, Chapter 2.
Presentation
- separate compilation, modules and classes
- aliasing and overloading
- closures
- syntax
- lexical scanning
- parsing
- Wed, Oct 19. Semantics, compilers and interpreters.
Introduction to Prolog and predicate calculus.
Programming Language Pragmatics, Chapter 12.
Presentation
- parsing
- semantics
- predicate calculus
- Horn clauses
- introduction to Prolog
homework 5 assigned, due Wednesday, October 26th.
- Mon Oct 24. Backtracking and other Prolog Features.
Presentation
- introduction to Prolog
- example of Prolog backtracking
- Prolog negation
- Prolog arithmetic
- Prolog imperative features
- Prolog reflection
- Wed, Oct 26. Exam Review.
Presentation
- prolog imperative features: cut, arithmetic, read/write
- ocaml: type inference, let expressions, pattern matching
- evaluation order: applicative/eager/strict, normal/lazy
- logic programming
- prolog: unification, resolution, backtracking, cut and imperative features
- assignments
- Mon, Oct 31. Midterm Exam 2.
- Wed, Nov 2. Scripting Languages. Programming Language Pragmatics, Chapter 14.
Presentation
- post-exam review
- shell command interpreters
- text processing languages
- scripting languages
- shell scripts
- filename expansion and pattern matching
- scripting languages and web scripting
homework 6 assigned, due Wednesday, November 9th.
- Mon, Nov 7. Scripting Languages and Python.
In the Python tutorial, read all of
Section 3,
Section 4,
Section 6,
and skim
Section 9,
Section 10,
and the documentation for
regular expressions.
Presentation
- shell scripts
- filename expansion and pattern matching
- scripting languages and web scripting
- python
- Wed, Nov 9. Python.
Presentation
- python classes and variables
- python GUI programs
- python sequences and other data structures
- python pattern matching
- python regular expressions
homework 7 assigned, due Wednesday, November 16th.
- Mon, Nov 14. Python Libraries. Read
Section 10 and
Section 11 of the tutorial.
Presentation
- os (operating system) and sys (system I/O and exit)
- file wildcards
- command-line arguments
- mathematics
- internet access and email
- dates and times, program timing
- compression, doctest, unittest, and more!
- Wed, Nov 16. Python Libraries. Read
Section 11 and
Section 12, and
the pip part
of the tutorial.
Presentation
- multithreading
- weak references
- decimal floating point arithmetic
- pip
- pack and unpack
- output formatting, locales and templates
homework 8 assigned, due Wednesday, November 30th.
- Mon, Nov 21. Read Programming Language Pragmatics, Chapter 13.
Read the
Java Synchronization Tutorial.
Presentation
- multithreading
- vector operations
- synchronization
- atomic operations
- race conditions
- critical regions
- locks
- monitors
- Wed, Nov 23. Multiprocessing and threads.
Presentation
- monitors
- granularity of synchronization
- thread creation
- thread scheduling
- implementation of synchronization
- Mon, Nov 28. Synchronization, deadlocks, and semaphores.
Presentation
- implementation of synchronization
- deadlock and dining philosophers
- semaphores
- the bounded-buffer problem and network queues
- transactions
- Wed, Nov 30. Transactions and other forms of parallel programming.
Presentation
- transactions
- futures
- parallel logic programming
- remote procedure call
- synchronous message passing
- asynchronous message passing
- MPI
homework 9 assigned, due Wednesday, December 7th.
- Mon, Dec 5. RPC and Message Passing.
Presentation
- message passing
- MPI
- course review:
- languages: LISP, Ocaml, Prolog, Python, and practice using these languages
- programming language concepts and ideas
- Wed, Dec 7. Course Review.
Continuation of the Dec 5th Presentation
- Thu, Dec 8, 2pm, early final for those who have requested it.
- Fri, Dec 16, 9:45am-11:45am, final exam.
Grading
This course has three exams (including the final exam) and a number of homework assignments.
Grades are assigned based on your performance on:
- two mid-term exams, each worth 15% of the grade, and a final, worth 20% of the grade.
- 5-10 homework assignments, worth a total of 50% of the grade.
Grading will use the standard cutoffs of 97% (A+), 93% (A), 90% (A-), 87% (B+), 83% (B), 80% (B-), 77% (C+), 73% (C), 70% (C-), 67% (D+), 63% (D), 60% (D-). Note that you need a B or better in ICS 211 (83% or more) to take ICS 311.
The homeworks are graded by the Teaching Assistant (TA), the exams by the instructor. Any questions should be directed accordingly.
Organization
Unless stated otherwise, homeworks will be due on Fridays by 11:55pm. All homeworks must be turned in on time, that is, by 11:55pm Friday if the due date is Friday (you are more than welcome to turn in your assignment ahead of time). A delay of up to 24 hours is allowed, but with a 10%/day grade penalty (meaning if the full grade for an assignment is 83%, the same assignment will be given 73% if turned in 1 day late, 63% after 2 days, and so on).
Assignments are submitted through Laulima. Be sure to submit early in case there are technical problems.
Homework assignments and exams must be done individually unless otherwise specified. Any collaboration on assignments or exams will result in severe penalties (see below).
Every source file in every assignment should include a header describing the author of the code. Comments are strongly encouraged when appropriate. Summary comments at the beginning of a file should describe anything special about the code as well as ways of testing. The quality of your comments may contribute to your grade on the assignment.
You must test your code, and include in your submission both your test files and the corresponding output files. The quality of your tests may contribute to your grade on the assignment.
Do not submit binary files.
Your grade on an assignment may be affected if you fail to follow the instructions for completing and submitting the assignment (So, follow the instructions!).
It is to every student's advantage to turn in assignments as soon as possible, even if the assignment is not complete. This gives the possibility of obtaining at least partial credit for the work done.
Exams include programming problems.
Exams may be taken early, if requested at least one week before the scheduled time. Under no circumstances may an exam be taken late. If an exam is missed for a very good, well documented reason, the next exam will count twice as much, except for the final, in which case (i.e. with a good reason and proper documentation submitted well in advance of the grading deadline) an incomplete will be given.
Homeworks are posted on the web site no later than Friday each week and are due by 11:55pm on Friday the following week (7 days later). All assignments must be turned in on time.
To accomodate the potential for covid or other emergencies affecting
academic performance,
- the lowest two assignments grades will be dropped.
This is intended for use with covid or other emergencies. It need not be justified, but will also not be extended in any way, so students should not take advantage of it unless actually needed (or until the end of the semester, whichever comes first).
- Exams may be taken early, if requested at least one week before the scheduled time. Under no circumstances may an exam be taken late. If an exam is missed for a very good, well documented reason, the next exam will count twice as much, except for the final, in which case (i.e. with a good reason and proper documentation submitted well in advance of the grading deadline) an incomplete will be given.
- if the instructor or either TA has to take time off for health reason, the students must study the corresponding material on their own.
Accomodations
If you feel you need reasonable accomodations because of the impact of a disability, please (1) contact the Kokua (Disability Access) Program at 956-7511 or in room 013 of the Queen Lili'uokalani Center for Student Services, and/or (2) speak privately with the instructor to discuss your specific needs. I will be happy to work with you and the Kokua program to meet your access needs related to your documented disability.
Cheating
In this course, students may not use material from any source whatsoever in completing their assignments. Code must be written by the student, not copied from the textbook or another book, the web, another student, or any other source. Any violation of this is considered cheating. Quizzes and assignments must be done individually, except for those homework assignments that explicitly allow teamwork.
Anything a student turns in must be entirely that student's own intellectual contribution. The instructor and TA may check homeworks using a specialized tool designed to detect cheating.
In general, cheating means presenting the work of somebody else as one's own, or providing one's work to somebody else to help them cheat.
No Cheating Policy: any cheating will result in a grade of 0 for the assignment or quiz the first three times it is detected, and a grade of F for the entire course for any subsequent instance. Any instance of cheating will also be recorded in the student's ICS department file, and may be reported to the office of the Dean of Students, possibly resulting in disciplinary action against the student.
The Student Conduct Code has more details on both impermissible behavior (see for example section IV.B.1 of the policies, Acts of dishonesty) and possible disciplinary sanctions.
Goals of this Course and Learning Objectives
From the UH
catalog:
ICS 313 Programming Language Theory (3)
Syntax, semantics, control structures, variable binding and scopes, data and control abstractions. Programming in functional (LISP) and logic (Prolog) programming styles. Pre: Pre: 212, (311 or EE 367), and 314, or consent.
Student Learning Objectives for the Fall 2022 ICS 313 are:
- students will be exposed to concepts and learn at least rudimentary
programming skills in a wide variety of programming languages, including
at least:
- one functional programing language
- one logic programing language
- one scripting language
- students will appreciate the tradeoffs of different programming
language features, including at least:
- pure functional programming
- dynamic data structures
- strict and flexible typing
- datatypes and pattern matching
- map and reduce and other parallel processing primitives
Improvements
Any suggestions for improvement are welcome.