1 / 6

Tools for JML jmlc & jmlrac Assignment date: Lab 2 Delivery date: Lab 3

Software System Verification and Validation Laboratory Assignment 2. Tools for JML jmlc & jmlrac Assignment date: Lab 2 Delivery date: Lab 3. Software System Verification and Validation. Tools for JML. Extended static checking with ESC/Java.

gaius
Download Presentation

Tools for JML jmlc & jmlrac Assignment date: Lab 2 Delivery date: Lab 3

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. Software System Verification and Validation Laboratory Assignment 2 Tools for JML jmlc & jmlrac Assignment date: Lab 2 Delivery date: Lab 3

  2. Software System Verification and Validation Tools for JML Extended static checking with ESC/Java Runtime assertion checking with jmlc/jmlrac Special compiler inserts runtime tests for all JML assertions.Any assertion violation results in a special exception. checks specs at run-time. only tests correctness of specs. Find violations at runtime. • Automatically tries to prove simple JML assertions at compile time. • checks specs at compile-time • proves correctness of specs. • Warn about likely runtime exceptions and violations.

  3. Software System Verification and Validation Runtime assertion checking • Normally • Compile using javac to get A.class • Execute A.class using javac • To do JML runtime assertion checking • Compile using jmlc to get A.class (compiles an instrumented version of the code where JML-assertions are explicitly checked) • Execute A.class using jmlrac (translates JML assertions into runtime checks:during execution, all assertions are tested and any violation of an assertion produces an Error) • Actually, jmlc is a preprocessor for javac, and jmlrac a wrapper for java. • Typically, you use jmlc/jmlrac when testing code. • Benefit (we hope) : More errors detected, with less effort.

  4. Software System Verification and Validation Method specification Specifying Exceptions • normal_behavior keyword notes that method should finish normally. • behavior keyword notes that there can be an exception thrown. • exceptional_behavior states that the method must always terminate with an exception. • signals clause can be used to describe under what condition an exception can be thrown.

  5. jmlc and jmlrac– by example jmlc and jmlrac - Demo 01: Factorial Exception – Demo02: Integer sqrt

  6. Software System Verification and Validation Laboratory Assignment 2 • Tools for JML • jmlc & jmlrac • Assignment date: Lab 2 • Delivery date: Lab 3 • See file AssignmentLab02.pdf

More Related