Here are a few examples for testing Project 2. There is nothing magical or tricky about them. Feel free to modify as you see fit by adding parentheses and
end. As a reminder you do not need to write a parser. Feel free to translate these examples directly into abstract syntax.
X := 1 ; IF X = 3 THEN X:=1 ; Y:=4 ELSE X:=0 ENDIF SKIP
Y := X ; Z := Y ; WHILE Y <= 10 DO WHILE Z <= 10 DO X := X+Z ; Z := Z+1 ; Y := Y+1 ; SKIP ;
Y:=0; IF X <= 10 THEN WHILE Y <= 10 DO Y:=Y+1; X:=X+Y ELSE X := 10
IF X <= 3 THEN IF Y <= 4 THEN Z:=X+Y ELSE SKIP ELSE IF Y <= 4 THEN Z:=X*Y ELSE Z:=1
Project 2 is due
March 21 not March 19 as originally posted. Sorry for the panic that may have cause.
One more update. Project is now due March 26.
Project 2 is now available on the projects page. Nothing is intentionally different from what we discussed in class. Bring your questiosn to class after spring break.
As announced last week in class I will be traveling to attend a DARPA PI meeting this week. Thus, we will not be holding class February 26 and 28.
Your project is officially due on March 5 at 11:59pm. We’ll talk in class about various solutions before you submit.
Quick correction. In class I used the form
define-sort to define an enumerated data type. The correct form is
define-datatypes. The type definitions for
Var should be:
(declare-datatypes () ((L l1 l2 l3 l4 l5 l6 l?))) (declare-datatypes () ((V X Y Z)))
I realized after class last week that not everyone has access to the code snippets and transformations for the assignment I gave in class. This is not fair for people who joined the class late or don’t have complete notes. Thus, I have created a formal project and pushed the due date to Feburary 7. See the projects section on the website for the project description.
Welcome to the EECS 742 blog for Spring 2019. I will post interesting things here about class, projects, exams and other related stuff. Please check the blog often, particularly around project time when I tend to post hints and answers to student questions.