Consider the follow interface specifications:
/*
* Resets the global value of `GLOBAL` to 0 if it is not already 0.
*/
void reset();
/*
* Returns the global value of `GLOBAL`.
*/
int get();
/*
* Sets the global value of `GLOBAL` to `x`.
*/
int set(int x);
There are six possible pairs of actions:
Answer the following questions:
Which pairs of interfaces are SIM-commutative under all possible histories? Why?
Which pairs of interfaces aren’t SIM-commutative under all possible histories? Why?
Local Stanford students should write up their response on a sheet of paper that includes their name. The sheet of paper with the response should be submitted immediately before lecture.
SCPD students should write up their response in a text file named
response.sv6.txt
and upload it via the submission and grades page. You’ll
need to sign in with your SUNetID to access the page. Responses will be accepted
until one week after the corresponding paper’s lecture.
In either case, the response should be short, likely only a pithy paragraph in length.
Tuesdays and Thursdays
4:30pm - 5:50pm
Gates B1
Dawson
Mondays
3:00pm - 5:00pm
Gates 314
Sergio
Mondays and Wednesdays
6:00pm - 7:30pm
Gates 288
Dawson Engler
Instructor
Gates 314
Sergio Benitez
Instructor
Gates 288
Spring 2015
Spring 2014
Winter 2013
Spring 2013
Spring 2012
Spring 2011
Spring 2010