User Tools

Site Tools


deferred

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
deferred [2020/04/22 13:37] franckdeferred [2020/04/22 14:01] (current) franck
Line 17: Line 17:
 ====== Question ====== ====== Question ======
  
-A classical concurrency problemknown as the sleeping barber problemtakes place in a barbershop.  This problem is originally due to Dijkstra.  Given the current COVID-19 outbreak, the problem has been adjusted.  The barbershop has one barber, a barber chair, and n chairs (where n is positive odd number) for waiting customers, if any, to sit on To ensure that customers practice social distancing, customers are not allowed to sit on adjacent chairs.  To address thisthe barber has numbered the chairs 012, ..., n-1 and there is a note on the door requiring customers to only use the even-numbered chairs.+Volunteers of AmazonNo FrillsStaples, and Urban Outfitters collaborate to make face masks.  These face masks consist of a bandana, a coffee filter, and two rubber bands (details on how to make such face mask can be found [[https://www.cnn.com/2020/04/04/health/how-to-make-your-own-mask-wellness-trnd/index.html|here]]).  No Frills provides coffee filtersStaples provides rubber bandsUrban Outfitters provides bandanas, and Amazon provides all three ingredients.
  
-If there are no customers present, the barber sits down in the barber chair, takes off his face mask, and falls asleep.  When a customer arrives, they have to first use hand sanitizer, put on their face mask, and wake up the sleeping barber by calling the barber's cellphone, as has also been mentioned on the note at the door of the barbershop.  If additional customers arrive while the barber is cutting customer's hair, then they also use hand sanitizer and put on their face mask before sitting down (if there still is hand sanitizer and there are empty even-numbered chairs) or they simply leave the shop (if the barber has run out of hand sanitizer or all even-numbered chairs are full). If the last customer for the day notices that the barber has run out of hand sanitizer and that the barber is asleep, then this customer wakes up the barber.  Once awake, the barber puts on his face mask and gives hair cuts to waiting customers.+The four volunteers surround a work bench.  The Amazon volunteer randomly picks two of the three ingredients and places them on the bench.  The volunteer who has the third ingredient makes a mask out of the ingredients on the bench and its own ingredient.  Once sufficiently many masks have been made, the Amazon volunteer puts three gift cards on the bench for the other three volunteers.
  
-During the test, you are provided with the classes ShopBarberCustomer, and Main.  These classes and some other code will be available at pm [[https://www.eecs.yorku.ca/course/4315/exam|here]].  The APIs of these classes can be found [[http://www.eecs.yorku.ca/course/4315/api/exam|here]].  During the exam, you are expected to apply JPF to this code in order to verify properties of the code.  **You should describe how you applied JPF to the code** (such as documenting how you configured JPF, which properties you checked, how you added code to the classes to check for particular properties, what output JPF produced, what you concluded from that output, if you detected any bugs (//this does not imply that the code contains any bugs//) and how you corrected those bugs (//if there are any//)).  **Please describe all the steps in sufficient details so that the instructor can reproduce your work.**  The focus of the exam is on the process of applying JPF to the provided code.  You should submit a report describing all the steps, as well as your modified classes (//try to make as few, if any, changes as needed//), other code that you developed, application configuration files, etc.+During the test, you are provided with the classes AmazonNoFrillsStaples, UrbanOutfitters, WorkBench, and Main.  These classes and some other code will be available at pm [[https://www.eecs.yorku.ca/course/4315/deferred|here]].  The APIs of these classes can be found [[http://www.eecs.yorku.ca/course/4315/api/deferred|here]].  During the exam, you are expected to apply JPF to this code in order to verify properties of the code.  **You should describe how you applied JPF to the code** (such as documenting how you configured JPF, which properties you checked, how you added code to the classes to check for particular properties, what output JPF produced, what you concluded from that output, if you detected any bugs (//this does not imply that the code contains any bugs//) and how you corrected those bugs (//if there are any//)).  **Please describe all the steps in sufficient details so that the instructor can reproduce your work.**  The focus of the exam is on the process of applying JPF to the provided code.  You should submit a report describing all the steps, as well as your modified classes (//try to make as few, if any, changes as needed//), other code that you developed, application configuration files, etc.
  
 ====== Submission ====== ====== Submission ======
deferred.txt · Last modified: 2020/04/22 14:01 by franck