1 / 12

Model Checking 2007 Exercises

Model Checking 2007 Exercises. Barbara Jobstmann. Today. General Mocha Examples. Contact. Email: barbara.jobstmann@epfl.ch Office: BC 358 Mailing list: modelchecking2007@listes.epfl.ch For all participants subscribe http://mtc.epfl.ch/courses/ModelChecking-2007/. Homework.

kylac
Download Presentation

Model Checking 2007 Exercises

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Model Checking 2007Exercises Barbara Jobstmann

  2. Today • General • Mocha • Examples

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

  4. 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. 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. MOCHA • Systems written in RML (finite-state subset) • Specifications as invariants • Provides • Simulator • Checkers (enumerative, symbolic)

  7. 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 lecture

  8. Examples • Tiny examples • Boat example • Lock example • Sunscreen example

  9. Cabbage, Goat, Wolf

  10. 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. Buggy Sunscreen

  12. Buggy Sunscreen ws Window doOpen buttondown doClose buttonup Control goup open Screen godown close ss

More Related