Difference between pages "User:Nicolas/Collections/ADVANCE Deliverable D3.4" and "Theory Plug-in"

From Event-B
< User:Nicolas(Difference between pages)
Jump to navigationJump to search
imported>Nicolas
(D3.4 main entry point, initial revision)
 
(Add to Theory Plug-in category)
 
Line 1: Line 1:
== Introduction ==
+
Return to [[Rodin Plug-ins]]
The purpose of this page is to give a common structure and guidelines to collaboratively build the ADVANCE Deliverable D3.4 (Methods and tools for model construction and proof III) which will be delivered to the European Commission at month 38 (2014-10-31).
 
The DOW reads:
 
<blockquote>
 
This deliverable provides a summary of the improvements made to the Rodin Platform throughout the project. It validates the delivery of improvements to both tools and methods for model construction and proof against the original plan. In addition, it reports on the development of formal design patterns that have arisen from the case studies of WP1 and WP2 and nature and availability of the supporting documentation and tutorials. It also reports on the composition / decomposition cookbook.
 
</blockquote>
 
  
== Schedule ==
+
See also [[Theory Release History]]
*the template of the deliverable is released on 2014-10-06
 
*the contents are contributed by 2014-10-22
 
*the draft for internal review is sent on 2014-10-24
 
*the final deliverable is produced for 2014-10-31
 
  
== Template ==
+
The Theory plug-in provides capabilities to extend the Event-B language and the proving infrastructure in a familiar fashion to Rodin users. This page provides useful information about the plug-in and its capabilities.
For each item covered in this document, a wiki page has been created (see [[#Contents | Contents]]) to give a brief description of the work that was carried on during third period of the project (Oct 2013-Nov 2014). The contents of each page should not go deeply into technical details, but should rather look like an executive summary. All details (papers, detailed wiki pages, etc.) should be made available as pointers.
 
'''Moreover, each contribution shall be quite short (ca. two printed pages).'''
 
  
 +
===Motivation===
 +
Up to Rodin v2.0, the mathematical language used in Event-B has been fixed. As such, it was not possible to define reusable polymorphic operators. A workaround was to define any required operators as set constructs in contexts. Originally, contexts were supposed to provide a parametrization of machines. The aforementioned limitations of the Event-B language lead to users to use contexts for purposes for which they were not intentionally devised. Examples of operators that can be useful to users include the sequence operator (which was present in classical B mathematical language) and the bag operator.
  
=== Overview ===
+
In Rodin v2.0, support for customised syntactic symbols was introduced. The Theory plug-in, as a result, evolved from being just a component to define rewrite rules to a versatile platform to define and validate proof and language extensions.
This first paragraph shall identify the involved partners and give an overview of the contribution. In particular, it shall provide answers to the following questions:
 
* What are the common denominations?
 
* Is it a new feature or an improvement?
 
* What is the main purpose?
 
* Who was in charge?
 
* Who was involved?
 
  
=== Motivations / Decisions ===
+
The latest Theory plug-in is released for Rodin v2.8.
This paragraph shall express the motivation for each tool extension and improvement. More precisely, it shall first indicate the state before the work, the encountered difficulties, and shall highlight the requirements (eg. those of industrial partners). Then, it shall summarize how these requirements were addressed and what are the main benefits.
 
This paragraph shall also summarize the decisions (eg. design decisions) and justify them. Thus, it may present the studied solutions, through their main advantages and inconvenients, to legitimate the final choices.
 
  
=== Available Documentation ===
+
===Overview===
This paragraph shall give pointers to the available wiki pages or related publications. This documentation may contain:
+
The Theory plug-in is a Rodin extension that provides the facility to define '''''mathematical extensions''''' as well as '''''prover extensions'''''.
* Requirements.  
+
Mathematical extensions are new operator definitions and new datatype definitions and axiomatic definitions. Operator definitions can be expression operators (e.g., ''card'') and predicate operators (e.g., ''finite''). Datatypes extensions can be used to define enumerated datatypes (e.g., ''DIRECTION'') as well as inductive datatypes (e.g., ''Tree''). Axiomatic definitions can be used to define new data types like "REAL".
* Pre-studies (states of the art, proposals, discussions).
 
* Technical details (specifications).
 
* Teaching materials (tutorials).
 
* User's guides.  
 
A distinction shall be made on the one hand between these different categories, and on the other hand between documentation written for developers and documentation written for end-users.
 
  
=== Planning ===
+
The placeholder for mathematical and prover extensions is a Theory construct which looks similar to contexts and machines. A theory can include datatypes definitions, operator definitions, axiomatic definitions, inference and rewrite rules as well as polymorphic theorems. The [http://wiki.event-b.org/images/Theory_Plugin.pdf user manual] provides a guide to developing and using theories.
This paragraph shall give an outlook on the current status and the plans for future work.
 
See also the [[Tool Development Roadmap]].
 
  
== Formatting rules ==
+
=== Installation & Update ===
In order to homogeneize the contributions and to ensure consistent spelling the following formatting rules shall be enforced:
 
* See §4 of [http://wiki.event-b.org/images/Llncsdoc.pdf How to Edit Your Input File] for LLNCS formatting rules.
 
* ADVANCE and Rodin shall be typed this way.
 
* Contractions shall not be used (eg. write "does not" instead of "doesn't", "let us" instead of "let's", etc).
 
* British english spelling shall be retained.
 
* "plug-in" shall be preferred to "plugin".
 
* Remember that the document is dated 2013-09-30, use past, present and future accordingly.
 
* The dedicated category, <nowiki>[[Category:ADVANCE D3.4 Deliverable]]</nowiki>, shall be specified for wiki pages.
 
* If you intend to use the same reference multiple times, please use the Cite extension [http://www.mediawiki.org/wiki/Extension:Cite/Cite.php].
 
: By doing so, you will have to add the additional paragraph at the end of your page :
 
==References==
 
<nowiki><references/></nowiki>
 
: Note that you can add references using the normal wikimedia links as well as using references nevertheless only the latter ones will appear in the references section on the wiki (e.g. all references will appear in the final PDF document whatever their type).
 
  
== Contents ==
+
The installation or update for the Theory plug-in is available under the main Rodin Update site (http://rodin-b-sharp.sourceforge.net/updates) under the category "Modelling Extensions". Like always, after the installation, restarting Rodin is recommended.
=== D3.4 ===
 
  
:[[ADVANCE D3.4 Introduction|Introduction]] (Laurent Voisin/Nicolas Beauger)
+
===User Manual===
 +
The user manual is available here: [http://wiki.event-b.org/images/Theory_Plugin.pdf Theory User Manual]. Below is the presentation of the sequence theory which its description can be found in the user manual:
  
:[[ADVANCE D3.4 General Platform Maintenance|General Platform Maintenance]]  
+
[[image:SeqTheory.png|center|thumb|1500px|'''Theory of Sequence''']]
:* Core Rodin platform (Laurent Voisin/Nicolas Beauger)
 
:* UML-B Improvements (Colin Snook, Vitaly Savicks)
 
:* ProR (Michael Jastram/Lukas Ladenberger)
 
:* Camille (Ingo Weigelt)
 
  
:[[ADVANCE D3.4 Improvement of automated proof|Improvement of automated proof]]
+
===Standard Library===
:* Integrated provers (Laurent Voisin/Nicolas Beauger)
+
In this section, you find a set of standard theories and some models using some of these theories.
:* SMT Provers (Laurent Voisin)
 
  
:[[ADVANCE D3.4 Model Checking|Model Checking]] (Michael Leuschel & al.)
+
The standard library of the theories is available to download:
 +
[https://sourceforge.net/projects/rodin-b-sharp/files/Theory_StdLib/StandardTheory0.1.zip/download here] for Rodin2.8 and
 +
[https://sourceforge.net/projects/rodin-b-sharp/files/Theory_StdLib/StandardTheory0.2.zip/download here] for Rodin3.1.
 +
This library includes:
 +
* BasicTheory project: including theories of BinaryTree, BoolOps, List, PEANO, SUMandPRODUCT and Seq.
 +
* RelationOrderTheory project: including theories of Connectivity, FixPoint, Relation, Well_Fondation, closure, complement and galois.
 +
* RealTheory project: including theory of Real.
  
:[[ADVANCE D3.4 Language extension|Language extension]] (Asieh Salehi)
+
Also it includes three simple Event-B models that use some of the theories:  
 +
* Data project: using SUMandPRODUCT theory
 +
* Queue project: using Seq theory
 +
* SimpleNetwork project: using closure theory
  
:[[ADVANCE D3.4 Model Composition and Decomposition|Model Composition and Decomposition]] (Asieh Salehi)
+
In order to keep the POs discharged, you need to install "Atelier B provers" as well.
 +
 
 +
===Capabilities===
 +
The Theory plug-in has the following capabilities:
 +
 
 +
* Theory Definition:
 +
** Definition of datatypes: datatypes are defined by supplying the types on which they are polymorphic, a set of constructors one of which has to be a base constructor. Each constructor may or may not have destructors.
 +
** Definition of operators: operators can be defined as predicate or expression operators. An expression operator is an operator that "returns" an expression, an example existing operator is ''card''. A predicate operator is one that "returns" a predicate, an example existing predicate operator is ''finite''.
 +
** Definition of axiomatic definitions: axiomatic definitions are defined by supplying the types, a set of operators, and a set of axioms.
 +
** Definition of rewrite rules: rewrite rules are one-directional equalities that can be applied from left to right. The Theory plug-in can be used to define rewrite rules.
 +
** Definition of inference rules: inference rules can be used to infer new hypotheses, split a goal into sub-goals or discharge sequents.
 +
** Definition of polymorphic theorems: theorems can be defined and validated once, and can then be imported into sequents of proof obligations if a suitable type instantiation is available.
 +
** Validation of extensions: where appropriate, proof obligations are generated to ensure soundness of extensions. This includes, proof obligations for validity of inference and rewrite rules, as well as proof obligations to validate operator properties such as associativity and commutativity.
 +
*Theory Deployment: this step signifies that a theory is ready for use. Theories can be deployed after they have been optionally validated by the user. It is strongly advisable to discharge all proof obligations before deployment.
 +
Once a theory has been deployed to its designated project, all its extensions (mathematical and prover extensions) can be used in models.
 +
 
 +
===Insider Look===
 +
The Theory plug-in partially satisfies the requirements outlined in the following document:
 +
* [http://deploy-eprints.ecs.soton.ac.uk/80/ Abrial, Jean-Raymond and Butler, Michael and Schmalz, Matthias and Hallerstede, Stefan and Voisin, Laurent. Mathematical Extensions Proposal]
 +
 
 +
A more accurate description of the implemented functionalities of the plug-in can be found in the following document:
 +
* [http://deploy-eprints.ecs.soton.ac.uk/251/ Michael Butler, Issam Maamria. Mathematical Extensions Summary]
 +
 
 +
The following two papers describe rewriting and well-definedness issues that has to be accounted for:
 +
 
 +
* [http://eprints.ecs.soton.ac.uk/18269/ Issam Maamria, Michael Butler, Andrew Edmunds, and Abdolbaghi Rezazadeh. On an Extensible Rule-based Prover for Event-B, ABZ'2010.]
 +
* [http://eprints.ecs.soton.ac.uk/21221/ Issam Maamria, Michael Butler. Rewriting and Well-Definedness within a Proof System.]
 +
 
 +
 
 +
[[Category:Plugin]]
 +
[[Category:User documentation]]
 +
[[Category:Proof]]
 +
[[Category:Theory Plug-in]]

Latest revision as of 14:53, 14 June 2021

Return to Rodin Plug-ins

See also Theory Release History

The Theory plug-in provides capabilities to extend the Event-B language and the proving infrastructure in a familiar fashion to Rodin users. This page provides useful information about the plug-in and its capabilities.

Motivation

Up to Rodin v2.0, the mathematical language used in Event-B has been fixed. As such, it was not possible to define reusable polymorphic operators. A workaround was to define any required operators as set constructs in contexts. Originally, contexts were supposed to provide a parametrization of machines. The aforementioned limitations of the Event-B language lead to users to use contexts for purposes for which they were not intentionally devised. Examples of operators that can be useful to users include the sequence operator (which was present in classical B mathematical language) and the bag operator.

In Rodin v2.0, support for customised syntactic symbols was introduced. The Theory plug-in, as a result, evolved from being just a component to define rewrite rules to a versatile platform to define and validate proof and language extensions.

The latest Theory plug-in is released for Rodin v2.8.

Overview

The Theory plug-in is a Rodin extension that provides the facility to define mathematical extensions as well as prover extensions. Mathematical extensions are new operator definitions and new datatype definitions and axiomatic definitions. Operator definitions can be expression operators (e.g., card) and predicate operators (e.g., finite). Datatypes extensions can be used to define enumerated datatypes (e.g., DIRECTION) as well as inductive datatypes (e.g., Tree). Axiomatic definitions can be used to define new data types like "REAL".

The placeholder for mathematical and prover extensions is a Theory construct which looks similar to contexts and machines. A theory can include datatypes definitions, operator definitions, axiomatic definitions, inference and rewrite rules as well as polymorphic theorems. The user manual provides a guide to developing and using theories.

Installation & Update

The installation or update for the Theory plug-in is available under the main Rodin Update site (http://rodin-b-sharp.sourceforge.net/updates) under the category "Modelling Extensions". Like always, after the installation, restarting Rodin is recommended.

User Manual

The user manual is available here: Theory User Manual. Below is the presentation of the sequence theory which its description can be found in the user manual:

Theory of Sequence

Standard Library

In this section, you find a set of standard theories and some models using some of these theories.

The standard library of the theories is available to download:

here for Rodin2.8 and
here for Rodin3.1. 

This library includes:

  • BasicTheory project: including theories of BinaryTree, BoolOps, List, PEANO, SUMandPRODUCT and Seq.
  • RelationOrderTheory project: including theories of Connectivity, FixPoint, Relation, Well_Fondation, closure, complement and galois.
  • RealTheory project: including theory of Real.

Also it includes three simple Event-B models that use some of the theories:

  • Data project: using SUMandPRODUCT theory
  • Queue project: using Seq theory
  • SimpleNetwork project: using closure theory

In order to keep the POs discharged, you need to install "Atelier B provers" as well.

Capabilities

The Theory plug-in has the following capabilities:

  • Theory Definition:
    • Definition of datatypes: datatypes are defined by supplying the types on which they are polymorphic, a set of constructors one of which has to be a base constructor. Each constructor may or may not have destructors.
    • Definition of operators: operators can be defined as predicate or expression operators. An expression operator is an operator that "returns" an expression, an example existing operator is card. A predicate operator is one that "returns" a predicate, an example existing predicate operator is finite.
    • Definition of axiomatic definitions: axiomatic definitions are defined by supplying the types, a set of operators, and a set of axioms.
    • Definition of rewrite rules: rewrite rules are one-directional equalities that can be applied from left to right. The Theory plug-in can be used to define rewrite rules.
    • Definition of inference rules: inference rules can be used to infer new hypotheses, split a goal into sub-goals or discharge sequents.
    • Definition of polymorphic theorems: theorems can be defined and validated once, and can then be imported into sequents of proof obligations if a suitable type instantiation is available.
    • Validation of extensions: where appropriate, proof obligations are generated to ensure soundness of extensions. This includes, proof obligations for validity of inference and rewrite rules, as well as proof obligations to validate operator properties such as associativity and commutativity.
  • Theory Deployment: this step signifies that a theory is ready for use. Theories can be deployed after they have been optionally validated by the user. It is strongly advisable to discharge all proof obligations before deployment.

Once a theory has been deployed to its designated project, all its extensions (mathematical and prover extensions) can be used in models.

Insider Look

The Theory plug-in partially satisfies the requirements outlined in the following document:

A more accurate description of the implemented functionalities of the plug-in can be found in the following document:

The following two papers describe rewriting and well-definedness issues that has to be accounted for: