Difference between pages "Help:Talk pages" and "Theory Plug-in"

From Event-B
(Difference between pages)
Jump to navigationJump to search
imported>Mathieu
m (importing help from mediawiki)
 
(Add to Theory Plug-in category)
 
Line 1: Line 1:
 +
Return to [[Rodin Plug-ins]]
  
 +
See also [[Theory Release History]]
  
Every wiki page has an associated talk page which can be used for discussion and communicating with other users. Talk pages can be accessed by clicking the ''Discussion'' tab at the top of the page. Simply edit the page as normal to add your comment.
+
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.
  
A talk page is actually very similar to any other wiki page, but it is in the 'talk' namespace, to keep it separate from the articles in the 'main' namespace (See [[Help:namespaces]]) As with any wiki page, you can edit it, link to it, and view the editing history.
+
===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.
  
== Editing conventions on talk pages ==
+
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.
Having discussions on a free-form wiki page will seem strange at first. It helps if everyone follows some simple editing conventions:
 
  
* Always sign your name after your comments. Use the four tildes '<tt><nowiki>~~~~</nowiki></tt>' wiki syntax (or the toolbar button)
+
The latest Theory plug-in is released for Rodin v2.8.
* Start a new discussion with a <tt><nowiki>==level 2 heading==</nowiki></tt> at the bottom of the page (or use the '+' tab)
 
* Indent replies with colons (':') at the beginning of the line.
 
  
== Example ==
+
===Overview===
Here is an example discussion, following the talk page conventions:
+
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".
  
{| align="center" {{Prettytable}}
+
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.
|-
 
|{{Hl2}} |'''Wiki text'''
 
|{{Hl2}} |'''Formatted talk page'''
 
|-
 
|
 
  
 +
=== Installation & Update ===
  
<tt><nowiki>== More spiders information needed ==</nowiki></tt><br/>
+
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.
<tt><nowiki>This page has a lot of detail about the web, but I really dont understand a single word of it, and it doesn't mention the spider once -- [[User:Bob Smith|Bob Smith]] 18:07, 26 August 1991 (UTC)</nowiki></tt><br/>
 
<tt><nowiki>: No no. This page is talking about the "world wide web". I have added a clarification at the top - [[User:Simon Brown|Simon Brown]] 11:21, 28 August 1991(UTC)</nowiki></tt><br/>
 
<tt><nowiki>:: Oh I see... So what's the big deal about hyperlinked documents? Seems like a stupid idea to me. -- [[User:Bob Smith|Bob Smith]] 14:11, 3 September 1991 (UTC)</nowiki></tt><br/>
 
<tt><nowiki>::: Well I think we should have some information about it here on our wiki, but you're probably right. It'll never catch on. -- [[User:Simon Brown|Simon Brown]] 21:55, 3 September 1991 (UTC)</nowiki></tt>
 
|
 
== More spiders information needed ==
 
This page has a lot of detail about the web, but I really dont understand a single word of it, and it doesn't mention the spider once -- [[User:Bob Smith|Bob Smith]] 18:07, 26 August 1991 (UTC)
 
: No no. This page is talking about the "world wide web". I have added a clarification at the top - [[User:Simon Brown|Simon Brown]] 11:21, 28 August 1991(UTC)
 
:: Oh I see... So what's the big deal about hyperlinked documents? Seems like a stupid idea to me. -- [[User:Bob Smith|Bob Smith]] 14:11, 3 September 1991 (UTC)
 
::: Well I think we should have some information about it here on our wiki, but you're probably right. It'll never catch on. -- [[User:Simon Brown|Simon Brown]] 21:55, 3 September 1991 (UTC)
 
|}
 
  
 +
===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:
  
== Editing discussions ==
+
[[image:SeqTheory.png|center|thumb|1500px|'''Theory of Sequence''']]
Having discussions on a free-form wiki page will seem strange at first. It has some advantages over the conventional rigid forum format, but it can get a little messy. As with other wiki pages, anyone can help with tidying up discussions, to conform to the editing conventions e.g. add signatures and headings where they are missing.
 
  
Clearly we also have the opportunity to edit other people's comments. It is generally bad etiquette to modify somebody else's wording (Better to just add your own comment with your corrections) But it can be acceptable to...
+
===Standard Library===
 +
In this section, you find a set of standard theories and some models using some of these theories.  
  
;Modify discussion headings
+
The standard library of the theories is available to download:
:Change wording or append words to the discussion headings, to better describe the topic of discussion. Note that good descriptive headings become important when many discussions start to fill the page.
+
[https://sourceforge.net/projects/rodin-b-sharp/files/Theory_StdLib/StandardTheory0.1.zip/download here] for Rodin2.8 and
;Move discussions to a different page
+
[https://sourceforge.net/projects/rodin-b-sharp/files/Theory_StdLib/StandardTheory0.2.zip/download here] for Rodin3.1.  
:If discussions are put in the wrong place on the wiki, and are better associated with different talk page, then you could just move the discussion by cut & paste. This is potentially confusing, for the people posting, but can be important for keeping things tidy. You could leave the discussion in the wrong place for a few days/weeks grace before tidying it. You could leave a link behind explaining that a discussion was moved, or if not, you should link within the edit summary.
+
This library includes:
;Delete discussions when they are out-of-date
+
* BasicTheory project: including theories of BinaryTree, BoolOps, List, PEANO, SUMandPRODUCT and Seq.
:Discussions can often get left lying around on a talk page long after the issue is no longer relevant. It's usually a good idea to reply to saying "I think this is now resolved", but sooner or later it's time to just blow away the old discussions (they are of course preserved in the editing history)
+
* RelationOrderTheory project: including theories of Connectivity, FixPoint, Relation, Well_Fondation, closure, complement and galois.
;Split a post into several discussions
+
* RealTheory project: including theory of Real.
:It may appropriate to do this, if somebody has raised several points which need to be answered separately. However you should always be respectful to other people's words. Does their post still make sense if you split it up?
 
  
== Building articles - Discussing articles ==
+
Also it includes three simple Event-B models that use some of the theories:
It is usually best to keep focused on the task of building a wiki article, and use discussion pages only to support this process. The topic of conversation should generally revolve around what needs to be done to make the associated article better. Remember that editing the article itself is often a more effective means of communicating. It can be more difficult, requiring you to balance your views alongside those of others, but it can also be more rewarding. This is how the community of wiki editors will make progress. Often it will feel more natural to engage in heated debate on a talk page (or indeed any other contact channel) but in fact the wiki article itself can offer a powerful means of reaching middle-ground. Think about how to portray both sides of the argument (e.g. listing advantages and disadvantages) and you may find the debate evaporates.
+
* Data project: using SUMandPRODUCT theory
 +
* Queue project: using Seq theory
 +
* SimpleNetwork project: using closure theory
  
== User Talk pages ==
+
In order to keep the POs discharged, you need to install "Atelier B provers" as well.
A "user talk page" is a talk page associated with somebody's "user page" (See [[Help:User page]])  This is a place to leave messages for a particular wiki user.
 
  
This can function as a kind of messaging system. Users receive a prominent notification when new messages have been left on their talk page. They may be notified by email as well, although this cannot always be relied upon (since the email notification feature must be activated by supplying a valid email address, and clicking a confirmation link). If you don't get a response to your user talk page message, try looking for other contact details which they may have supplied on their user page.
+
===Capabilities===
 +
The Theory plug-in has the following capabilities:
  
Note that the messages are not private, and others can join in the conversation.
+
* 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]
  
[[Category:Help|Talk pages]]
+
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: