Homework Assignment 0F for Advanced Programming Languages course, Assignments of Programming Languages

Two exercises for the Advanced Programming Languages course, EECS 590. The first exercise is a bookkeeping task with five questions, and the second exercise is about set theory and functions. The submission guidelines are also provided. suitable for students who want to practice their knowledge of set theory and functions in programming languages.

Typology: Assignments

2021/2022

Uploaded on 05/11/2023

chiara44
chiara44 🇺🇸

4.7

(11)

245 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Advanced Programming Languages
Homework Assignment 0F
EECS 590
Logistics. You must work alone. Your name and Michigan email address must appear on
the first page of your PDF submission but may not appear anywhere else. This is to protect
your identity during peer review. The first page of your submission is not shared during
peer view but all subsequent pages are.
Exercise 0F-1. Bookkeeping [5 points]. These answers should appear on the first page
of your submission and are kept private.
1. Indicate one thing you like about the class.
2. Indicate one thing you you would change about the class.
3. Tell me something about yourself that I do not already know.
4. Pose a question that you would like to see addressed in class or in office hours. (Students
often ask questions relating to career goals or concepts they would like to understand
in the course, but anything is fair game.)
5. Give an English word that contains three adjacent doubled letters but does not con-
tain the substring “bookkeep”. Hint: one approach is to use an “extended” regular
expression on a dictionary file like /usr/dict/words.
Exercise 0F-2. Set Theory [5 points]. This answer should appear after the first page
of your submission and may be shared during class peer review.
This exercise is meant to help you refresh your knowledge of set theory and functions.
Let Xand Ybe sets. Let P(X) denote the powerset of X(the set of all subsets of X). There
is a 1-1 correspondence (i.e., a bijection) bewteen the sets Aand B, where A=X P (Y)
and B=P(X×Y). Note that Ais a set of functions and Bis a (or can be viewed as a) set
of relations. This correspondence will allow us to use functional notation for certain sets in
class. This is Exercise 1.4 from page 8 of the Winskel textbook.
Demonstrate the correspondence between Aand Bby presenting an appropriate function
and proving that it is a bijection. For example, you might construct a function f:BA
and prove that fis an injection and a surjection.
1
pf2

Partial preview of the text

Download Homework Assignment 0F for Advanced Programming Languages course and more Assignments Programming Languages in PDF only on Docsity!

Advanced Programming Languages

Homework Assignment 0F

EECS 590

Logistics. You must work alone. Your name and Michigan email address must appear on the first page of your PDF submission but may not appear anywhere else. This is to protect your identity during peer review. The first page of your submission is not shared during peer view but all subsequent pages are.

Exercise 0F-1. Bookkeeping [5 points]. These answers should appear on the first page of your submission and are kept private.

  1. Indicate one thing you like about the class.
  2. Indicate one thing you you would change about the class.
  3. Tell me something about yourself that I do not already know.
  4. Pose a question that you would like to see addressed in class or in office hours. (Students often ask questions relating to career goals or concepts they would like to understand in the course, but anything is fair game.)
  5. Give an English word that contains three adjacent doubled letters but does not con- tain the substring “bookkeep”. Hint: one approach is to use an “extended” regular expression on a dictionary file like /usr/dict/words.

Exercise 0F-2. Set Theory [5 points]. This answer should appear after the first page of your submission and may be shared during class peer review. This exercise is meant to help you refresh your knowledge of set theory and functions. Let X and Y be sets. Let P(X) denote the powerset of X (the set of all subsets of X). There is a 1-1 correspondence (i.e., a bijection) bewteen the sets A and B, where A = X → P(Y ) and B = P(X × Y ). Note that A is a set of functions and B is a (or can be viewed as a) set of relations. This correspondence will allow us to use functional notation for certain sets in class. This is Exercise 1.4 from page 8 of the Winskel textbook. Demonstrate the correspondence between A and B by presenting an appropriate function and proving that it is a bijection. For example, you might construct a function f : B → A and prove that f is an injection and a surjection.

Exercise 0F-3. Model Checking [10 points]. This answer should appear after the first page of your submission and may be shared during class peer review. Download the CPAChecker software model-checking tool using the instructions on the homework webpage. Read through enough of the manual to run the tool on the tcas.i testcase provided on the homework webpage. Check the three properties given. For each command, copy or screenshot the last ten non-empty lines (or all of the lines you have, if there are fewer than ten) of (standard, terminal) output from CPAChecker and include them as part of your answer to this question. It is your responsibility to find a machine on which CPAChecker works properly (but feel free to check the class forum if you are getting stuck). Hint: CPAChecker 2.0 should find a violation for Property1a, verify that Property1b is safe, and find a violation for Property2b. If your output does not match that and you are using version 2.0 then you may not have not set things up correctly. What is going on when you run CPAChecker using the commands listed? In at most three paragraphs, summarize your experience with the CPAChecker tool. What does Property1a mean? Is tcas.i a reasonable test suite? What has been proved? Did you find CPAChecker to be a usable tool? You may find the graphical reporting option of CPAChecker to be helpful here. For full credit, do not restate my lecture on counter-example guided abstraction refinement; instead, discuss your thoughts and experience using this tool. Focus on threats to validity (e.g., imagine that you were writing a paper and using this as an experiment) over usability. Both your ideas and also the clarity with which they are expressed (i.e., your English prose) matter. A reader should be able to identify your main claim, the arguments you are making, and your conclusion.

Submission. Turn in your assignment as a single PDF document via the gradescope website. Your name and Michigan email address must appear on the first page of your PDF submission but may not appear anywhere else.