Difference between revisions of "Event-B to SMT-LIB"

From Event-B
Jump to navigationJump to search
imported>Pascal
imported>Pascal
Line 17: Line 17:
 
* <tt>_exploratory/carinepascal/fr.systerel.decert.tests</tt>
 
* <tt>_exploratory/carinepascal/fr.systerel.decert.tests</tt>
  
The following theories are currently supported: Linear Arithmetic, Linear Order Int and Integer.
+
The following theories are currently supported: Linear Arithmetic, Linear Order and Integer. The lemmas referencing other theories will not be translated.
  
 
== How to perform the translation? ==
 
== How to perform the translation? ==

Revision as of 15:26, 25 August 2009

Introduction

The Event-B to SMT-LIB plug-in allows to translate mathematical lemmas that rely on the Event-B language to the SMT-LIB format.

The considered lemmas are those often encountered in practice, but not yet well supported by proving tools such as those embedded in the Rodin platform. The purpose is not here to entirely define the translation, but rather to give a mapping for this subset of Event-B formulas. These typical mathematical problems are entry points for the DECERT project, and more precisely for the Work Package 1. Using the SMT-LIB standard is among the requirements for this project.

This version mainly focuses on lemmas based on unquantified integer linear arithmetic.

Specification

A first specification draft has been written.

Implementation

A first plug-in prototype is accessible under the following respositories:

  • _exploratory/carinepascal/fr.systerel.decert
  • _exploratory/carinepascal/fr.systerel.decert.tests

The following theories are currently supported: Linear Arithmetic, Linear Order and Integer. The lemmas referencing other theories will not be translated.

How to perform the translation?

The XML files containing the Event-B lemmas are assumed to be stored in the Lemmas folder. The SMT files containing the SMT-LIB benchmarks are assumed to be stored in the Benchmarks folder.

Follow the following steps in order to translate Event-B lemmas to SMT-LIB benchmarks:

  1. Launch the fr.systerel.decert.tests.TypeCheckingTests JUnit test to type-check the lemmas (optional). Note that it is previously necessary to set the XMLFolder field of the TypeCheckingTests class to specify the absolute path of the Lemmas folder.
  2. Launch the fr.systerel.decert.tests.smt.TranslationTests JUnit test to translate the lemmas (mandatory). Note that it is necessary to previously configure the test:
    • The XMLFolder field shall contain the absolute path of the Lemmas folder.
    • The SMTFolder field shall contain the absolute path of the Benchmarks folder.
    • If the format of the generated SMT files is to be checked, the CHECK_FORMAT option shall be set and the SMTParserFolder field shall contain the absolute path of the directory where is installed the SMT-LIB parser. Otherwise, the option shall be turned off. The SMT-LIB parser is available from the SMT-LIB web page.
    • If the generated benchmarks are to be checked for satisfiability, the CHECK_SAT option shall be set and the SMTSolverFolder field shall contain the absolute path of the directory where is installed the Z3 SMT solver. Otherwise, the option shall be turned off. The Z3 SMT solver is available from the following address.

Bibliography