1 / 6

Verificare şi Validarea Sistemelor Soft Temă L aborator 1

Verificare şi Validarea Sistemelor Soft Temă L aborator 1. Tools for JML jmlc & jmlrac D at ă primire laborator : Lab 1 D at ă predare laborator : Lab 2. Verificare şi Validarea Sistemelor Soft. Tools for JML. Extended static checking with ESC/Java.

rimona
Download Presentation

Verificare şi Validarea Sistemelor Soft Temă L aborator 1

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. Verificare şi Validarea Sistemelor Soft Temă Laborator1 Tools for JML jmlc & jmlrac Dată primire laborator: Lab 1 Dată predare laborator: Lab 2

  2. Verificareşi Validarea Sistemelor Soft 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. Verificareşi Validarea Sistemelor Soft 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. Verificareşi Validarea Sistemelor Soft 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. Verificare şi Validarea Sistemelor Soft Temă Laborator 1 • Tools for JML • jmlc & jmlrac • Dată primire laborator: Lab 1 • Dată predare laborator: Lab 2 • A se vedea fişierul TemaLab01_JML.pdf

More Related