Difference between pages "ADVANCE D3.2 Improvement of automated proof" and "Rodin Developer Support"

From Event-B
(Difference between pages)
Jump to navigationJump to search
imported>Tommy
 
imported>Laurent
(→‎Debugging: add pointers to Eclipse resources.)
 
Line 1: Line 1:
== Overview ==
+
The Developer Support provides resources for developing plug-ins for the Rodin Platform.
In an Event-B development, more than 60% of the time is spent on proofs. That explains why all users are naturally keen for the proofs to be as automatic as possible and why the automated prover enhancement was a continuous task since the birth of the Rodin platform.
 
Enhancing the automated prover can be achieved by core platform refactorings and additions to it, such as the addition of integrated reasoners and tactics, but also by the integration of some external reasoning ability such as external provers (e.g. the SMT solvers).<br>
 
From the core platform point of view, and within the ten first month of ADVANCE, it consisted into two tasks: the addition of rewriting and inference rules, and the addition of a mechanism to allow the customization and the parametrization or combination of tactics. The user is now able to define various types of tactics called 'profiles' which could be customized and parameterized tactics to discharge some specific proof obligations. The user can furthermore share and backup these defined tactics using the provided import/export mechanism.<br>
 
From an external point of view, the SMT Solvers plug-in allowing to use the SMT solvers within Rodin is an effective alternative to the Atelier-B provers, particularly when reasoning on linear arithmetic. It is maintained in the time frame of ADVANCE, and increases the rate of automatically discharged proof obligations.
 
  
== Motivations / Decisions ==
 
The proportion of automatically discharged proof obligations heavily depends on Auto-Tactic configuration. Sometimes, the automatic prover fails because the tactics are applied in a unappropriate order. Since Rodin 2.4,  a new tactic combinator 'Attempt after Lasso' is available in auto tactic profile editor as well as an import/export feature. Indeed, a user that elaborates a good profile for a certain proof pattern is now able to share or backup this profile thus increasing the number of automatic proofs for a given proof pattern.
 
  
Two main reasons mainly motivated the integration of SMT solvers into the Rodin platform. Firstly, to allow Rodin to benefit from the know capacity of such solvers in the field of arithmetics. Secondly, to extract some useful informations from the proofs that these solvers produce such as unsatisfiable cores, in order to significantly decrease the proving time of a modified model. The translation of Event-B language into the SMT-LIB language is the main issue of this integration. Two approaches were developed for this. The more efficient one is based on the translation capabilities of the integrated predicate prover of the Rodin platform (PP). It is completed by translating membership using an uninterpreted predicate symbol, refined with an axiom of the set theory.
+
== Rodin Developer FAQ ==
  
== Available Documentation ==
+
see [[Developer FAQ]].
A page<ref>http://handbook.event-b.org/current/html/preferences.html#ref_01_preferences_auto_post_tactic</ref> concerning tactic profiles is available in the user manual.<br>
 
A page<ref>http://wiki.event-b.org/index.php/SMT_Solvers_Plug-in</ref> is dedicated to the SMT Solver integration plug-in on the Event-B wiki.
 
  
== Planning ==
+
== Architecture of the Rodin Platform ==
Enhancement of the automated proof will continue as long as Rodin is maintained. This will be mainly be achieved by the implementation of the remaining missing rewriting<ref>http://wiki.event-b.org/index.php/All_Rewrite_Rules</ref> and inference rules<ref>http://wiki.event-b.org/index.php/Inference_Rules</ref> that have already been documented, and by the addition of new ones.
 
  
Maintenance of the SMT solver integration plug-in will be ensured within the time frame of ADVANCE.
+
=== Rodin Platform Core ===
  
== References ==
+
* [[Database]]
<references/>
 
  
[[Category:ADVANCE D3.2 Deliverable]]
+
* [[Builder]]
 +
 
 +
* [[Rodin Index Design]]
 +
 
 +
* [[Indexing System]]
 +
 
 +
* [[Undo Redo]]
 +
 
 +
* [[File Root Separation]]
 +
 
 +
=== Event-B User Interface ===
 +
 
 +
The Event-B User Interface of the Roding Platform has two major components that are concerned with either [http://handbook.event-b.org/current/html/event_b_perspective.html modelling] in Event-B or [http://handbook.event-b.org/current/html/proving_perspective.html proving] properties of models.
 +
 
 +
* [http://handbook.event-b.org/current/html/event_b_perspective.html Modelling User Interface]
 +
 
 +
* [http://handbook.event-b.org/current/html/proving_perspective.html Proving User Interface]
 +
 
 +
Apart from these are more minor components.
 +
 
 +
* [[Proof Purger Design|Proof Purger]] allows to delete unused proofs.
 +
 
 +
* [[Proof Skeleton Design]] is a view that displays skeletons of existing proofs
 +
 
 +
* [[Auto-Completion Design]] proposes a list of names to the user editing a model
 +
 
 +
=== Event-B Component Library ===
 +
 
 +
Event-B models and all proof-related information are stored in the Rodin database. The syntax of the mathematical notation, that is, expressions, predicates, and assignments, are maintained in an [[Abstract Syntax Tree|abstract syntax tree]]. Abstract syntax trees are manipulated by means of a class library that can be used independently of Eclipse. They are saved in the database in human-readable form as Unicode character strings. Event-B constructs, such as contexts and machines, are not represented as abstract syntax trees. They are stored and retrieved directly from the database (by contrast, mathematical formulas need additional parsing). Well-formedness of Event-B constructs is verified by a [[Static Checker|static checker]]. The static checker has two main purposes: (1) it generates error messages for ill-formed constructs, and (2) it filters well-formed parts of components to be subjected to proof obligation generation. The [[Proof Obligation Generator|proof obligation generator]] uses those parts of constructs that are well-formed and generates proof obligations from them. Finally, the [[Proof Manager|proof manager]] attempts to prove proof obligations and maintains existing proofs associated with proof obligations. The proof manager works automatically and interactively. When new proof obligations have been generated it attempts to discharge them automatically. If it does not succeed, it permits interactive proof (by means of the [http://handbook.event-b.org/current/html/proving_perspective.html proving user interface]).
 +
 
 +
* [[Abstract Syntax Tree]]
 +
 
 +
* [[Static Checker]]
 +
 
 +
* [[Proof Obligation Generator]]
 +
 
 +
* [[Proof Manager]]
 +
 
 +
* [[Proof Simplification]]
 +
 
 +
== Extending Rodin ==
 +
 
 +
* [[Developer Documentation]]
 +
 
 +
* [[Plug-in Tutorial]]
 +
 
 +
* [[Extending the Rodin Database]]
 +
 
 +
* [[Extending the project explorer]]
 +
 
 +
* [[Extending the Structure Editor]]
 +
 
 +
* [[Extending the Pretty Print Page]]
 +
 
 +
* [[Extending the Proof Manager]]
 +
 
 +
* [[Extending the Index Manager]]
 +
 
 +
* [[Extending the Static Checker]]
 +
 
 +
* [[Index Query]]
 +
 
 +
== Useful Hints ==
 +
 
 +
=== Version Control ===
 +
 
 +
All sources of the core Rodin platform (and of some plug-ins) are managed under version control in SourceForge.  The repository currently used is Subversion and can be accessed using URL [https://rodin-b-sharp.svn.sourceforge.net/svnroot/rodin-b-sharp  https://rodin-b-sharp.svn.sourceforge.net/svnroot/rodin-b-sharp].
 +
 
 +
=== Building against a version of Rodin ===
 +
 
 +
To develop extensions to the Rodin platform your code build needs access to a consistent (version-wise) set of Rodin platform plug-ins. (Don't just check out the latest versions from 'Head' because it may be under development and in an inconsistent state). An easy way to set up your workspace is to import the Rodin platform source code from SVN into your workspace using the 'Releng' plug-in.
 +
See [http://wiki.event-b.org/index.php/Developer_FAQ#Installing_the_sources_from_Subversion_in_Eclipse Installing the sources from Subversion in Eclipse] for further instructions.
 +
 
 +
Alternatively, you can set your plugin development target platform to any Rodin installation you have installed (Eclipse-Preferences-Plug-in Development-Target Platform). This is useful as a final test that everything will work once installed into Rodin but because it uses a 'built' platform, you don't get access to the Rodin source code (e.g. for de-bugging).
 +
 
 +
=== Testing ===
 +
 
 +
=== Debugging ===
 +
 
 +
There is nothing special to the Rodin platform as concerns debugging. This is just like debugging any Eclipse plug-in. See for instance [http://eclipse.org/resources/?sort=date&category=Debugging Eclipse Debugging Resources].
 +
 
 +
=== Publishing ===
 +
 
 +
A Plug-in developed for the Rodin Platform will normally consist of a collection of eclipse 'plugin' projects and a single eclipse 'feature' project. The feature project contains branding information such as logo's icons and licensing details. It is also used to identify your Plug-in so that users can install it. To build your Plug-in use an eclipse 'site' project. This will build the jar files for your plugin projects and a jar for your feature. See eclipse documentation for more details.
 +
 
 +
Now you need to make your Plug-in available for users to install via the Main Rodin Update site (which comes built-in to the Rodin platform).
 +
 
 +
Create a new release folder in the FRS (On Sourceforge Rodin project website - Admin-file releases) noting the naming conventions (e.g. Plugin_<mypluginName>). Now you can upload your jar files using the controls on the releases webpage). Note that you should include a zip of the complete source projects to comply with Sourceforge rules.
 +
You should not repeat files that have not changed. The Feature jar will take care of unchanged plugin jars and use the existing links. Only new jars should be included in a particular release.
 +
See here for details:- http://alexandria.wiki.sourceforge.net/File+Release+System+-+Offering+Files+for+Download
 +
 
 +
Finally, the update site must be updated to redirect the update requests to the files on the FRS.
 +
# From the sourceforge SVN repository, check out the project org.rodinp.updateSite.
 +
# Edit the  file site.xml to add your feature and plug-in archive paths ([[Details for Maintaining Main Rodin Update Site]])
 +
# Test the changes by performing the install into a Rodin installation, via the local update site in your workspace.
 +
# Commit the changes back into SVN
 +
# Upload the new version of the update site onto the Rodin webspace ([[Details for Uploading Main Rodin Update Site]]).
 +
 
 +
 
 +
=== Upgrading and maintain ===
 +
 
 +
Please note that you should always keep an existing version of your plug-in for the antepenultimate version of Rodin when you want to perform some clean-up of your update site.
 +
Indeed, not all the users switch to the latest version of Rodin by the time of its release, and certainly would like to use your plug-ins anyway.
 +
 
 +
[[Category:Developer documentation]]
 +
[[Category:Rodin Platform]]

Revision as of 11:28, 28 October 2011

The Developer Support provides resources for developing plug-ins for the Rodin Platform.


Rodin Developer FAQ

see Developer FAQ.

Architecture of the Rodin Platform

Rodin Platform Core

Event-B User Interface

The Event-B User Interface of the Roding Platform has two major components that are concerned with either modelling in Event-B or proving properties of models.

Apart from these are more minor components.

Event-B Component Library

Event-B models and all proof-related information are stored in the Rodin database. The syntax of the mathematical notation, that is, expressions, predicates, and assignments, are maintained in an abstract syntax tree. Abstract syntax trees are manipulated by means of a class library that can be used independently of Eclipse. They are saved in the database in human-readable form as Unicode character strings. Event-B constructs, such as contexts and machines, are not represented as abstract syntax trees. They are stored and retrieved directly from the database (by contrast, mathematical formulas need additional parsing). Well-formedness of Event-B constructs is verified by a static checker. The static checker has two main purposes: (1) it generates error messages for ill-formed constructs, and (2) it filters well-formed parts of components to be subjected to proof obligation generation. The proof obligation generator uses those parts of constructs that are well-formed and generates proof obligations from them. Finally, the proof manager attempts to prove proof obligations and maintains existing proofs associated with proof obligations. The proof manager works automatically and interactively. When new proof obligations have been generated it attempts to discharge them automatically. If it does not succeed, it permits interactive proof (by means of the proving user interface).

Extending Rodin

Useful Hints

Version Control

All sources of the core Rodin platform (and of some plug-ins) are managed under version control in SourceForge. The repository currently used is Subversion and can be accessed using URL https://rodin-b-sharp.svn.sourceforge.net/svnroot/rodin-b-sharp.

Building against a version of Rodin

To develop extensions to the Rodin platform your code build needs access to a consistent (version-wise) set of Rodin platform plug-ins. (Don't just check out the latest versions from 'Head' because it may be under development and in an inconsistent state). An easy way to set up your workspace is to import the Rodin platform source code from SVN into your workspace using the 'Releng' plug-in. See Installing the sources from Subversion in Eclipse for further instructions.

Alternatively, you can set your plugin development target platform to any Rodin installation you have installed (Eclipse-Preferences-Plug-in Development-Target Platform). This is useful as a final test that everything will work once installed into Rodin but because it uses a 'built' platform, you don't get access to the Rodin source code (e.g. for de-bugging).

Testing

Debugging

There is nothing special to the Rodin platform as concerns debugging. This is just like debugging any Eclipse plug-in. See for instance Eclipse Debugging Resources.

Publishing

A Plug-in developed for the Rodin Platform will normally consist of a collection of eclipse 'plugin' projects and a single eclipse 'feature' project. The feature project contains branding information such as logo's icons and licensing details. It is also used to identify your Plug-in so that users can install it. To build your Plug-in use an eclipse 'site' project. This will build the jar files for your plugin projects and a jar for your feature. See eclipse documentation for more details.

Now you need to make your Plug-in available for users to install via the Main Rodin Update site (which comes built-in to the Rodin platform).

Create a new release folder in the FRS (On Sourceforge Rodin project website - Admin-file releases) noting the naming conventions (e.g. Plugin_<mypluginName>). Now you can upload your jar files using the controls on the releases webpage). Note that you should include a zip of the complete source projects to comply with Sourceforge rules. You should not repeat files that have not changed. The Feature jar will take care of unchanged plugin jars and use the existing links. Only new jars should be included in a particular release. See here for details:- http://alexandria.wiki.sourceforge.net/File+Release+System+-+Offering+Files+for+Download

Finally, the update site must be updated to redirect the update requests to the files on the FRS.

  1. From the sourceforge SVN repository, check out the project org.rodinp.updateSite.
  2. Edit the file site.xml to add your feature and plug-in archive paths (Details for Maintaining Main Rodin Update Site)
  3. Test the changes by performing the install into a Rodin installation, via the local update site in your workspace.
  4. Commit the changes back into SVN
  5. Upload the new version of the update site onto the Rodin webspace (Details for Uploading Main Rodin Update Site).


Upgrading and maintain

Please note that you should always keep an existing version of your plug-in for the antepenultimate version of Rodin when you want to perform some clean-up of your update site. Indeed, not all the users switch to the latest version of Rodin by the time of its release, and certainly would like to use your plug-ins anyway.