package alt-ergo-plugin-ab-why3

  1. Overview
  2. Docs

ABWhy3 plugin

What is this plugin ?

An experimental front-end that parses a subset of Why3's logic. More precisely, this front-end targets proof obligations generated by the Atelier-B framework in Why3 format. It should be used with a prelude defining the B Set theory (currently provided in preludes/b-set-theory-prelude-2020-02-28.ae).

What this plugin is not ?

This plugin mainly focuses on the shape of the proof obligations produced by the Why3 proofs obligations generator of Atelier-B. You will probably not be able to use it to parse/solve other formulas written in Why3's logic.

How to use it ?

Assuming you are currently in alt-ergo-git/sources directory, and make && make AB-Why3 succeeded, you can ask Alt-Ergo to prove the goals given in a file b-why3-POs.why with the following command:

 ./alt-ergo b-why3-POs.why --add-parser ABWhy3Plugin.cmxs --prelude b-set-theory-prelude-2020-02-28.ae

where --add-parser=ABWhy3Plugin.cmxs allows to load this plugin and register the parser it contains, and --prelude b-set-theory-prelude-2020-02-28.ae provides an axiomatization of the B Set theory for Alt-Ergo.

For instance, using the following command to prove the goals in the file examples/AB-Why3-plugin/p4_34.why.zip:

./alt-ergo examples/AB-Why3-plugin/p4_34.why.zip --add-parser ABWhy3Plugin.cmxs --prelude b-set-theory-prelude-2020-02-28.ae --timelimit-per-goal --timelimit 3 --no-locs-in-answers

Alt-Ergo returns:

Warning: A parser for extension ".why" is already registered. It will be hidden !
Preprocessing (0.0315) (0 steps)
Valid (0.0033) (28 steps) (goal g_0)
Valid (0.0369) (163 steps) (goal g_1)
Valid (0.0087) (94 steps) (goal g_2)
Timeout (3.0016) (2191 steps) (goal g_3)
Valid (0.0476) (184 steps) (goal g_4)
Valid (0.0525) (215 steps) (goal g_5)

If you have already installed this version of Alt-Ergo and this plugin, you should be able to simply use the command:

alt-ergo b-why3-POs.why --parser ABWhy3Plugin.cmxs --prelude b-set-theory-prelude-2020-02-28.ae

Licensing

The OCaml files in this directory come from Why3's source code (release 0.88.2 to be exact). We have quite modified them for our needs. They are licensed under the terms of the GNU Lesser General Public License version 2.1, as stated in sources/plugins/AB-Why3/WHY3-LICENSE. The plugin ABWhy3Plugin.cmxs resulting from their compilation is thus licensed under the same terms.

OCaml

Innovation. Community. Security.