According to the university's final exam schedule, the second exam for this class will be on Thursday, May 4, at 2:45 p.m. Below is a summary of the exam topics and some review/practice problems.
This page documents what we do in class. It contains Java programs that we will discuss in class, reading assignments, simple homework exercises that you can work on for practice and exam preparation (not for credit), and links to other sources of information.
According to the university's final exam schedule, the second exam for this class will be on Thursday, May 4, at 2:45 p.m. Below is a summary of the exam topics and some review/practice problems.
Here is a language with anonymous lambda expressions and closures.
Here are the files and explanations for the example we used in class.
See the homework assignment page for your fourth programming assignment.
Here are the examples we used in class to explain and think about Hw4.
Read the first 20 pages (up to the section called "Applications") from following chapter about functions in Scheme.
Here is a basic introduction to Racket.
Here is a link to where you can download a Racket (Scheme) interpreter.
See the homework assignment page for your fourth programming assignment.
Read the following chapters about functions in JavaScript.
Today we will look at "function environments" in Language_5.
Here are the Language_3, JavaScript, and C examples of "nested environments" that we used in class today.
Today we will look at the implementation of local environments in Language_3.
For next week, read the file Language_5.txt which explains how we add functions to our language.
See the homework assignment page for your third programming assignment.
Today we will look at the implementations of Languages 3 and 4, in particular the local Environment data structure in Language_3.
Today we will look at the implementation of Language 2, in particular the Environment data structure in Language_2.
Here are the simple examples we looked at in class of Java and C++ "environments".
Today we will look at the implementations of Language 1.
The midterm exam is today.
Remember that the midterm exam is this Thursday, March 23. See the notes below for Feb 28. Here are the review problems for the exam.
Here is a language that adds if-statements and while-loops to the previous language. Read the file Language_4.txt
Spring Break - No class today.
Spring Break - No class today.
Here is a language that adds blocks and lexically scoped variables to the expression language. Read the file Language_3.txt
Remember that the midterm exam is Thursday, March 23. See the notes below for Feb 28. Here are the review problems for the exam.
Here is a language that adds variables to the expression language. Read the file Language_2.txt
We are going to look at "interpreters" for two new languages, a tree language, and a Lisp like expression language.
The first midterm exam will be Thursday, March 23. The exam will be over the following topics.
Here are the reading assignments collected in one place.
Here are some review problems for the exam.
See the homework assignment page for your second programming assignment.
Here are all the parsers for arithmetic expressions.
Today we will convert the simple recognizing parsers to parsers that create parse trees and expression trees. Then we will look at how to convert the parsers to evaluators. The zip file contains code that uses the parsers to evaluate expressions from these languages.
Today we will finish the simple recursive descent parsers and start to convert the simple parsers to parsers that create parse trees and expression trees. The zip file contains code that builds parse and expression trees for these languages.
Today we will write simple recursive descent parsers that parse expression-like languages. Next week we will convert the simple parsers to parsers that create parse trees and expression trees. The zip file contains code that parses these languages.
Read this explanation of a parser that builds an expression tree.
Thursday we will talk about writing recursive descent parsers that create parse trees.
Read pages 26-34 (Section 11.6) in the following chapter from the book Foundations of Computer Science,
and read the following chapter from Introduction to Programming Using Java.
Today we will look at more examples of how the design of a grammar can influence the semantics of its language.
Read pages 20-26 (Section 11.5) in the following chapter from the book Foundations of Computer Science.
Here are some examples to work with.
Read pages 12-19 (Section 11.4) in the following chapter from the book Foundations of Computer Science.
Here is the tokenizing example we used in class today.
Next week we will begin talking about language grammars. Read pages 1-12 (Sections 11.1 - 11.3) in the following chapter from the book Foundations of Computer Science.
Here are two good summaries of grammars.
See the homework assignment page for your first programming assignment.
Here is another way to bundle up and distribute our small library of binary tree implementations.
Here is an interesting, and useful, explanation of binary tree traversal.
Here is a good overview of the tree data type.
Read these references about infix, prefix, and postfix notation for expressions. Notice that they are equivalent to inorder, preorder, and postorder traversals of an expression tree.
Today we will look at the examples of recursive functions.
For next week, read the following online sections about recursion.
The following zip file contains Java programs that implement and process binary trees.
Here are some of the code examples we used in class today.
We will begin the course by studying tree data structures. Read the following online chapter.