Difference between pages "Tasking Event-B Tutorial" and "Theory Release History"

From Event-B
(Difference between pages)
Jump to navigationJump to search
imported>Andy
 
 
Line 1: Line 1:
THIS PAGE IS UNDER CONSTRUCTION !!!!!!
+
Back to [[Theory Plug-in]].
  
For more information contact Andy Edmunds - University of Southampton - mailto:ae2@ecs.soton.ac.uk
+
Follow this page for the latest on the Theory plug-in. The user manual is also provided together with the installation details.
=== Tasking Event-B Tutorial Overview ===
 
  
This code generation tutorial supplements the Heating Controller tutorial example, and makes use of example projects from the download site. The code generation stage produces implementable Ada code, and also an Event-B project which models the implementation. The Ada code is produced using a pretty printer tool from an intermediate model, the Common Language model (IL1), generated by a translation tool. An overview of Tasking Event-B can be found on the [[Tasking_Event-B_Overview]] page.
+
===News===
 +
* ''22th December 2020'': [[#Version_4.0.1|Version 4.0.1]] is released. It requires Rodin 3.5.
 +
* ''19th December 2014'': [[#Version_3.0.0|Version 3.0.o]] is released. It requires Rodin 3.1.
 +
* ''10th July 2014'': [[#Version_2.0.2|Version 2.0.2]] is released. It requires Rodin 2.8.
 +
* ''24th June 2014'': [[#Version_2.0.1|Version 2.0.1]] is released. It requires Rodin 2.8.
 +
* ''30th April 2014'': [[#Version_2.0.0|Version 2.0.0]] is released. It requires Rodin 2.8. This release contains major changes in the features and accessibilities.
 +
* ''20th April 2012'': [[#Version_1.3.2|Version 1.3.2]] is released. It requires Rodin 2.4.
 +
* ''15th August 2011'': [[#Version_1.2|Version 1.2]] is released. It requires Rodin 2.2.2.
 +
* ''6th August 2011'': [[#Version_1.1|Version 1.1]] is released. It requires Rodin 2.2.2.
 +
* ''8th July 2011'': [[#Version_1.0|Version 1.0]] is released. It requires Rodin 2.2.
 +
* ''22nd May 2011'': [[#Version_0.8|Version 0.8]] released. It is based on Rodin 2.1.1.
 +
* ''11th April 2011'': [[#Version_0.7|Version 0.7]] released. It is based on Rodin 2.1.1.
 +
* ''6th January 2011'': [[#Version_0.6|Version 0.6]] released. It is based on Rodin 2.0.1.
 +
* ''28th October 2010'': [[#Version_0.5|Version 0.5]] released. It is based on Rodin 2.0.
  
The Heating Controller development has been refined to the point where we wish to add implementation constructs. The Event-B language is not expressive enough to fully describe the implementation. Tasking Event-B facilitates this final step to implementation, by extending Event-B with the necessary constructs. Event-B machines that are to be implemented (and their seen Contexts) are selected and added to a ''Tasking Development''; the Tasking Development files have the file extension ''.tasking''. The machines in the Tasking Development are then extended with implementation details.
+
===Releases===
 +
===== Version 4.0.1 =====
 +
''22th December 2020''
  
The example/tutorial projects are,
+
Release target: Rodin 3.5
 +
* Bug fixes:
 +
** The theory plugin now takes into account updates in theories, as well as creating a theory after using it (there was a cache issue).
 +
** The error messages at launch about rule-based provers failing to find the context of the proof have been removed.
 +
** The dropdown list in theory imports is now usable (there was an off-by-one issue when selecting an element in the list).
 +
** Manually applying an inference rule no longer throws a NullPointerException.
 +
** It is now possible to rename theories.
 +
** The TheoryPath creation dialog box has been simplified.
 +
* Optimizations:
 +
** The proving interface is now much more responsive, even when a theory contains a lot of rewrite rules (we have implemented a cache of the places where a rewrite rule can apply).
 +
** The theory plugin now generates much simpler WD conditions, especially for the pred, succ, prj1, prj2, and id operators.
  
{| border="1"
+
===== Version 4.0.0-RC1 =====
|Heating_ControllerTutorial_Completed
+
''10th April 2017''
|An example project with a completed Tasking Development and IL1 model (post IL1 translation, but before Event-B translation).
 
|-
 
|Heating_ControllerTutorial_Completed_Gen
 
|Same as the example project above, but with Event-B model translations. The difference being that this development includes a model of the implementation. These are refinements that include a program counter to describe flow of execution in each task.
 
|-
 
|Heating_ControllerTutorial_Step1
 
|A bare project for step 1 of the [[Code_Generation_Tutorial#The_Tutorial |tutorial]].
 
|-
 
|Heating_ControllerTutorial_Step2
 
|A partially completed tasking development for steps 2, 3 and 4 of the [[Code_Generation_Tutorial#The_Tutorial |tutorial]].
 
|}
 
  
== Preliminaries ==
+
Release target: Rodin 3.2
Before further discussion of the modelling aspects, we take a look at the PrettyPrint viewers. The PrettyPrinters make the viewing of IL1 and tasking models easier; it also provides a route to generate source code. The source code can easily be pasted from the IL1 Pretty Printer window into an the Ada source file .  
+
* AST Extensions (4.0.0) Major API change.
==== The PrettyPrint View of a Tasking Development ====
+
** Compatibility upgrade to Rodin 3.2
To open the Tasking PrettyPrint viewer,
+
** Support for get operator position for INFIX extended predicate operators.
* from the top-menu select ''Window/Show View/Other/Tasking Pretty Printer''.
+
** Improve pattern matching for associative operators.
 +
* Theory plug-in Branding (0.0.1) Initial version
 +
* Theory Core (4.0.0) Internal implementation changes.
 +
** Compatibility upgrade to Rodin 3.2
 +
** Support for INFIX extended predicate operators.
 +
** Various bugs fixed.
 +
* Theory help (2.0.0) User documentations.
 +
* Theory Keyboard (0.0.1) Initial version (A special plug-in for typesetting Theory).
 +
** Support for typesetting Real arithmetics (plus, unary minus, multiply, divide, less than, less than or equal, greater than, greater than or equal).
 +
* Theory Rule-based Prover (4.0.0)
 +
** Reasoners' input does not contain the proof-obligation context.
 +
** Use the current sequent's origin to get the proof-obligation context.
 +
** Bug fixed: translate formula to ensure they have the same formula factory.
 +
** Added version numbers for reasoners.
 +
** Automatic rewrite and inference tactics are re-implemented so that each rule application is visible in proof trees.
 +
* Theory UI (3.0.0)
  
Note that the Tasking PrettyPrinter may have to be closed when editing the Tasking Development, since it can give rise to exceptions. The PrettyPrinter would need further work to make it robust, however it is intended only as a short-term solution.
+
===== Version 3.0.0 =====
 +
''17th December 2014''
  
* Open the ''Heating_ControllerTutorial_Completed'' Project and switch to the Resource Perspective.
+
Release target : Rodin 3.1
* Open the ''.tasking'' model and inspect it. Clicking on the Main, Machine or Event nodes updates the pretty print window.
+
* migration changes to Rodin 3.1
  
==== Viewing Source Code ====
+
===== Version 2.0.2 =====
aka. The PrettyPrint View of an IL1 Model.
+
''10th July 2014''
  
To view Ada source code,
+
Release target : Rodin 2.8
* from the top-menu select ''Window/Show View/Other/IL1 Pretty Printer''.
+
* bug fixes.  
* Open the ''Heating_ControllerTutorial_Completed'' Project and switch to the Resource Perspective.
 
* Open the ''.il1'' model and inspect it. Clicking on the Protected, Main Entry, or Task nodes updates the pretty print window.
 
  
==== Cleaning the Tasking Development ====
+
===== Version 2.0.1 =====
If the ''.tasking'' file has errors, then it may need cleaning. To do this right-click on the ''Main'' node, select ''Epsilon Translation/CleanUp''. If a model has errors it can still be viewed by clicking on the ''Selection'' tab at the bottom of the tasking editor window.
+
''24th June 2014''
  
== The Tutorial ==
+
Release target : Rodin 2.8
The steps needed to generate code from an Event-B model, in this tutorial, are as follows,
+
* bug fixes.  
* Step 1 - [[Tasking Event-B_Tutorial#Creating The Tasking Development|Create the tasking development]].
 
* Step 2 - [[Tasking Event-B_Tutorial#Providing the Annotations for Implementations|Add Tasking annotations]].
 
* Step 3 - [[Tasking Event-B_Tutorial#Optional Annotations for Addressed Variables|Add annotations for addressed variables (optional)]].
 
* Step 4 - [[Tasking Event-B_Tutorial#Invoking the Translation|Invoke translators]].
 
  
==== Creating The Tasking Development ====
+
===== Version 2.0.0 =====
* Change to the Event-B Perspective.
+
''30th April 2014''
* Open the ''Heating_ControllerTutorial_Step1'' Project.
 
* Select the following Machines: Display_Update_Task1, Envir1, Heater_Monitor_Task1, Shared_Object1, Temp_Ctrl_Task1 and HC_CONTEXT.
 
* Right-click and select ''Make Tasking Development/Generate Tasking Development''.
 
  
The new Tasking Development will not be visible in the Event-B perspective, change to the resource perspective, open and inspect the new ''.tasking'' file. The Tasking Development contains (the EMF representation of) the machines that we wish to provide implementations for. In order to introduce the new concepts we have prepared a partially complete development.  
+
Release target : Rodin 2.8
 +
* Major changes in the usability.
 +
* Important bug fixes.  
  
Change to the Project ''Heating_ControllerTutorial_Step2'' to begin the next step.
+
===== Version 1.3.2 =====
 +
''20th April 2012''
  
==== Providing the Annotations for Implementations ====
+
Release target : Rodin 2.4
* Close any Tasking Pretty Print Viewers that remain open. The incomplete model will give rise to exceptions.
+
* Important bug fixes.  
* Go to the to the Resource Perspective.
+
* Improvement of deployment and un-deployment wizards
* Open and inspect the ''.tasking'' machine.
 
  
The ''Display_Update_Task1'', ''Envir1'' and ''Shared_Object1'' machines are incomplete. We will take the necessary steps to provide implementation details.
+
===== Version 1.2 =====
 +
''15th August 2011''
  
===== The Display_Update_Task1 Machine =====
+
Release target : Rodin 2.2.2
In the partially complete tutorial project we already identified the ''Display_Update_Task1'' as an ''Auto Task'' Tasking Machine, by adding the ''Auto Task'' extension. ''Auto Tasks'' are tasks that will be declared and defined in the ''Main'' procedure of the implementation. The effect of this is that the ''Auto Tasks'' are created when the program first loads, and then activated (made ready to run) before the ''Main'' procedure body runs. We have added the ''Periodic Task'' extension to the ''Auto Task'', and set a period of 500 milliseconds. We will now complete the sequence that has been partially defined in the task body.
+
* Bug fixes.  
 +
* Added capability to instantiate multiple theorems at once.
 +
* Added automatic tactic for expanding operator definitions RbPxd·
  
TO HERE!!!
+
===== Version 1.1 =====
 +
''6th August 2011''
  
*'''Add Synchronisation between DIGet_Target_Temperature1 and SOGet_Target_Temperature1'''.
+
Release target : Rodin 2.2.2
** Expand the ''Auto Task Machine'' node.
+
* Theory library first version.  
** Expand the ''Seq'' sub-tree.
+
* Bug fixes.  
** Right-click on the ''Seq'' node and select ''New Child/Left Branch EventWrapper''.
+
* Improved UI.
** Provide the event label ''d1'' using the properties view.
 
** Right-click on Event Wrapper and select ''New Child/ Synch Events''.
 
** Select ''Synch Events'' and go to the drop-down menu of the ''Local Event'' property.
 
** At this point the drop-down box displays a number of event names, select the '''second''' ''DIGet_Target_Temperature1'' event.
 
** Go to the drop-down menu of the ''Remote Event'' property.
 
** From the list of events select the '''second''' ''SOGet_Target_Temperature1'' event.
 
  
The Synch Events construct is used to implement [[Tasking Event-B Overview#Control Constructs|Event Synchronisation]]. The next step wraps an event in an Event Wrapper in order to update the local state; there is no synchronisation as such but we will re-use the constructs that already exist.
+
===== Version 1.0 =====
 +
''8th July 2011''
  
*'''Add the Wrapped Event TcalcWVal'''.
+
Release target : Rodin 2.2
** Expand the sub-tree of the second ''Seq'' node.
 
** Right-click on the ''Seq'' node and select ''New Child/Left Branch EventWrapper''.
 
** Provide the event label ''w2'' using the properties view.
 
** Right-click on Event Wrapper and select ''New Child/ Synch Events''.
 
** Select ''Synch Events'' and go to the drop-down menu of the ''Local Event'' property.
 
** From the list of events select the ''TcalcWVal'' event.
 
  
We have now completed the task body, and it just remains to complete provide details for the ''TWrite'' event. The ''TWrite'' event in ''WriterTsk'' is to be synchronized with the ''SWrite'' event in the ''SharedObj''.
+
* Bug fixes.  
*'''Add Event Extensions'''.
+
* Added import relationships between theories.  
** Right-click on the ''TWrite'' Event node.
+
* Added experimental support for recursive definitions.
** Select ''New Child/Extension''.
+
* Improved project as well as workspace scope for mathematical and prover extensions.
** Right-click on the ''Extension'' node and select ''New Child/Implementation'' from the menu.
+
* Added tactic (xd) to expand all definitions.
** Go to the Implementation properties view and set the ''Implementation Type'' property to ''ProcedureSynch''.
+
* Fixed support for polymorphic theorems.
  
*'''Identify Incoming and Outgoing parameters'''.
+
===== Version 0.8 =====
** Right-click on the ''outAP'' node and add an ''Extension''.
+
''22nd May 2011''
** Right-click on the ''Extension'' and select''New Child/Parameter Type''.
 
** Go to the ''Parameter Type'' properties view and set the ''Parameter Type'' property to ''actualOut''.
 
** Right-click on the ''inAP'' node and add an ''Extension''.
 
** Right-click on the ''Extension'' and select''New Child/Parameter Type''.
 
** Go to the ''Parameter Type'' properties view and set the ''Parameter Type'' property to ''actualIn''.
 
  
===== The Shared Machine =====
+
Release target : Rodin 2.1.1
  
The next step is to identify the ''SharedObj'' machine as a ''Shared Machine''. The ''SharedObj'' Machine will be extended using the Event-B EMF extension mechanism.
+
* Bug fixes.  
* Right-click on the ''SharedObj'' Machine node in the ''.tasking'' file.
+
* Added import relationships between theories.  
* Select ''New Child/Extension''.
+
* Added experimental support for recursive definitions.
* Right-click on the ''Extension'' node and select ''New Child/Shared Machine'' from the menu.
+
* Added project as well as workspace scope for mathematical and prover extensions.
  
We now show how to extend the ''SWrite'' event of the Shared Machine with details about its implementation. The ''SWrite'' event in ''SharedObj'' is to be synchronized with the ''TWrite'' event in the ''WriterTsk''.
+
===== Version 0.7 =====
* '''Identify SWrite as a Syncronisation'''.
+
''11th April 2011''
** Right-click on the ''SWrite'' Event node.
 
** Select ''New Child/Extension''.
 
** Right-click on the ''Extension'' node and select ''New Child/Implementation'' from the menu.
 
** Go to the Implementation properties view and set the ''Implementation Type'' property to ''ProcedureSynch''.
 
  
* '''Identify incoming and outgoing parameters'''.
+
Bug fixes. Fixed for Rodin 2.1.1.
** Right-click on the ''inFP'' node and add an ''Extension''.
 
** Right-click on the ''Extension'' and select''New Child/Parameter Type''.
 
** Go to the ''Parameter Type'' properties view and set the ''Parameter Type'' property to ''formalIn''.
 
** Right-click on the ''outFP'' node and add an ''Extension''.
 
** Right-click on the ''Extension'' and select''New Child/Parameter Type''.
 
** Go to the ''Parameter Type'' properties view and set the ''Parameter Type'' property to ''formalOut''.
 
  
==== Optional Annotations for Addressed Variables ====
+
===== Version 0.6 =====
 +
''6th January 2011''
  
Link To Addressed Variables!!!!!
+
Minor bug fixes and improvements to theories pretty printer.
  
 +
===== Version 0.5 =====
 +
''28th October 2010''
  
===== A Summary of Steps =====
+
This is the first release of the Theory plug-in with support for mathematical as well as prover extensions.
  
For a Tasking Machine definition:
+
===Features Requests and Bugs===
# Add the Tasking Machine type (Auto etc).
+
Please do not hesitate to raise any issues with regards to usability as well as efficiency. Finally, please remember to report any bugs through the SourceForge portal.
# Add the task type (Periodic etc.).
 
# Define the task priority.
 
# Define the task body.
 
# For each event, add the Event Type.
 
# For each event parameter, add the Parameter Type.
 
# Optionally define addressed variables.
 
 
 
For a Shared Machine definition:
 
# Add the ''SharedMachine'' Machine type.
 
# For each event, define the Event Type.
 
# For each event parameter, define the Parameter Type.
 
 
 
==== Invoking the Translation ====
 
 
 
* To create the IL1 model,
 
** Right-Click on the Main node, select ''Epsilon Translation/Translate Task Mch 2 IL1 EMF''.
 
** Open the Resource Perspective.
 
** Right-click on the ''sharedbuffer20100819Tutorial2'' project folder.
 
** Select refresh, the ''.il1'' file should appear in the project.
 
** Open and inspect the file, and view the source code by opening the IL1 Pretty Print view if desired.
 
 
 
* To create the Event-B model of the implementation,
 
** Return to the Rodin Modelling Perspective.
 
** Right-Click on the Main node, select ''Epsilon Translation/Translate Task Mch 2 Event-B EMF''.
 
** The ''sharedbuffer20100819bTasking'' project is generated, it can be opened and inspected.
 
 
 
There are errors in the generated machines (not investigated the cause yet); these can be fixed in the following way.
 
* Open a Machine in the Event-B Machine Editor.
 
* Select the Edit tab.
 
* Open the REFINES section, the error lies here.
 
* The correct machine is refined, but choose a different machine to refine (any one, it doesn't matter).
 
* Select the original refined machine again.
 
* Save and clean the project, and the error should disappear.
 
* Repeat for the same errors in the other machines; save and clean again.
 
* The machines can viewed as normal using the Rodin editors.
 
 
 
[[Category:User documentation]]
 

Revision as of 14:31, 22 December 2020

Back to Theory Plug-in.

Follow this page for the latest on the Theory plug-in. The user manual is also provided together with the installation details.

News

  • 22th December 2020: Version 4.0.1 is released. It requires Rodin 3.5.
  • 19th December 2014: Version 3.0.o is released. It requires Rodin 3.1.
  • 10th July 2014: Version 2.0.2 is released. It requires Rodin 2.8.
  • 24th June 2014: Version 2.0.1 is released. It requires Rodin 2.8.
  • 30th April 2014: Version 2.0.0 is released. It requires Rodin 2.8. This release contains major changes in the features and accessibilities.
  • 20th April 2012: Version 1.3.2 is released. It requires Rodin 2.4.
  • 15th August 2011: Version 1.2 is released. It requires Rodin 2.2.2.
  • 6th August 2011: Version 1.1 is released. It requires Rodin 2.2.2.
  • 8th July 2011: Version 1.0 is released. It requires Rodin 2.2.
  • 22nd May 2011: Version 0.8 released. It is based on Rodin 2.1.1.
  • 11th April 2011: Version 0.7 released. It is based on Rodin 2.1.1.
  • 6th January 2011: Version 0.6 released. It is based on Rodin 2.0.1.
  • 28th October 2010: Version 0.5 released. It is based on Rodin 2.0.

Releases

Version 4.0.1

22th December 2020

Release target: Rodin 3.5

  • Bug fixes:
    • The theory plugin now takes into account updates in theories, as well as creating a theory after using it (there was a cache issue).
    • The error messages at launch about rule-based provers failing to find the context of the proof have been removed.
    • The dropdown list in theory imports is now usable (there was an off-by-one issue when selecting an element in the list).
    • Manually applying an inference rule no longer throws a NullPointerException.
    • It is now possible to rename theories.
    • The TheoryPath creation dialog box has been simplified.
  • Optimizations:
    • The proving interface is now much more responsive, even when a theory contains a lot of rewrite rules (we have implemented a cache of the places where a rewrite rule can apply).
    • The theory plugin now generates much simpler WD conditions, especially for the pred, succ, prj1, prj2, and id operators.
Version 4.0.0-RC1

10th April 2017

Release target: Rodin 3.2

  • AST Extensions (4.0.0) Major API change.
    • Compatibility upgrade to Rodin 3.2
    • Support for get operator position for INFIX extended predicate operators.
    • Improve pattern matching for associative operators.
  • Theory plug-in Branding (0.0.1) Initial version
  • Theory Core (4.0.0) Internal implementation changes.
    • Compatibility upgrade to Rodin 3.2
    • Support for INFIX extended predicate operators.
    • Various bugs fixed.
  • Theory help (2.0.0) User documentations.
  • Theory Keyboard (0.0.1) Initial version (A special plug-in for typesetting Theory).
    • Support for typesetting Real arithmetics (plus, unary minus, multiply, divide, less than, less than or equal, greater than, greater than or equal).
  • Theory Rule-based Prover (4.0.0)
    • Reasoners' input does not contain the proof-obligation context.
    • Use the current sequent's origin to get the proof-obligation context.
    • Bug fixed: translate formula to ensure they have the same formula factory.
    • Added version numbers for reasoners.
    • Automatic rewrite and inference tactics are re-implemented so that each rule application is visible in proof trees.
  • Theory UI (3.0.0)
Version 3.0.0

17th December 2014

Release target : Rodin 3.1

  • migration changes to Rodin 3.1
Version 2.0.2

10th July 2014

Release target : Rodin 2.8

  • bug fixes.
Version 2.0.1

24th June 2014

Release target : Rodin 2.8

  • bug fixes.
Version 2.0.0

30th April 2014

Release target : Rodin 2.8

  • Major changes in the usability.
  • Important bug fixes.
Version 1.3.2

20th April 2012

Release target : Rodin 2.4

  • Important bug fixes.
  • Improvement of deployment and un-deployment wizards
Version 1.2

15th August 2011

Release target : Rodin 2.2.2

  • Bug fixes.
  • Added capability to instantiate multiple theorems at once.
  • Added automatic tactic for expanding operator definitions RbPxd·
Version 1.1

6th August 2011

Release target : Rodin 2.2.2

  • Theory library first version.
  • Bug fixes.
  • Improved UI.
Version 1.0

8th July 2011

Release target : Rodin 2.2

  • Bug fixes.
  • Added import relationships between theories.
  • Added experimental support for recursive definitions.
  • Improved project as well as workspace scope for mathematical and prover extensions.
  • Added tactic (xd) to expand all definitions.
  • Fixed support for polymorphic theorems.
Version 0.8

22nd May 2011

Release target : Rodin 2.1.1

  • Bug fixes.
  • Added import relationships between theories.
  • Added experimental support for recursive definitions.
  • Added project as well as workspace scope for mathematical and prover extensions.
Version 0.7

11th April 2011

Bug fixes. Fixed for Rodin 2.1.1.

Version 0.6

6th January 2011

Minor bug fixes and improvements to theories pretty printer.

Version 0.5

28th October 2010

This is the first release of the Theory plug-in with support for mathematical as well as prover extensions.

Features Requests and Bugs

Please do not hesitate to raise any issues with regards to usability as well as efficiency. Finally, please remember to report any bugs through the SourceForge portal.