Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Sep 21, 2007 MC Model Checking 2007 Exercises Barbara Jobstmann.

Similar presentations


Presentation on theme: "1 Sep 21, 2007 MC Model Checking 2007 Exercises Barbara Jobstmann."— Presentation transcript:

1 1 Sep 21, 2007 MC Model Checking 2007 Exercises Barbara Jobstmann

2 2 Sep 21, 2007 MC Today General Mocha Examples

3 3 Sep 21, 2007 MC Contact Email: barbara.jobstmann@epfl.chbarbara.jobstmann@epfl.ch Office: BC 358 Mailing list: modelchecking2007@listes.epfl.chmodelchecking2007@listes.epfl.ch For all participants subscribe http://mtc.epfl.ch/courses/ModelChecking-2007/

4 4 Sep 21, 2007 MC Homework Theoretical: Examples and proofs on paper Practical Using MOCHA Schedule Given out: Thursday afternoon Handed in: Thursday morning (before the lecture) or send an email Discussed: Friday afternoon (from 13:15 to 15:00)

5 5 Sep 21, 2007 MC MOCHA “MOCHA is a growing interactive software environment for system specification and verification.” Three universities: University of California at Berkeley University of Pennsylvania State University of New York at Stony Brook Versions: cmocha, jmocha We will use jmocha 2.0

6 6 Sep 21, 2007 MC MOCHA Systems written in RML (finite-state subset) Specifications as invariants Provides Simulator Checkers (enumerative, symbolic)

7 7 Sep 21, 2007 MC MOCHA Where to find MOCHA? http://embedded.eecs.berkeley.edu/research/mocha/ Information and Help MOCHA manual Collection of “Do’s and Don’ts” at homepage of the lecturehomepage

8 8 Sep 21, 2007 MC Examples Tiny examples Boat example Lock example Sunscreen example

9 9 Sep 21, 2007 MC Cabbage, Goat, Wolf

10 10 Sep 21, 2007 MC Lock Example int got_lock = 0; do{ 1 if (*) { 2 lock();} 3 got_lock = got_lock + 1; 4 if (got_lock != 0) { 5 unlock(); 6 got_lock = got_lock - 1;} 7 } while(*) void lock() { 11 assert(L = 0); 12 L = 1; } void unlock(){ 21 assert(L = 1); 22 L = 0; }

11 11 Sep 21, 2007 MC Buggy Sunscreen

12 12 Sep 21, 2007 MC Buggy Sunscreen Control buttondown buttonup open close Window Screen doClose ss ws doOpen godown goup


Download ppt "1 Sep 21, 2007 MC Model Checking 2007 Exercises Barbara Jobstmann."

Similar presentations


Ads by Google