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`. The value returned will be the value * set by the last `reset` or `set` call. */ int get(); /* * Sets the global value of `GLOBAL` to `x` if it is not already `x`. */ void set(int x);
There are six possible pairs of actions:
Assume that any value returned from any of these actions can later be inspected. Answer the following questions:
Which pairs of actions are SIM-commutative under all possible histories? Why?
Which pairs of actions are not SIM-commutative under all possible histories? Why?
Local Stanford students should write up their response on a sheet of paper that includes their name and SUNetID. The sheet of paper with the response should be submitted immediately before lecture.
SCPD students should write up their response in a text file
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
In either case, the response should be short, likely only a pithy paragraph in length.
Mondays and Wednesdays
1:30pm - 2:50pm
Join the CS240 Google group.
Lathrop Tech Lounge