Difference between pages "State-Machines and Code Generation" and "Theory Release History"

From Event-B
(Difference between pages)
Jump to navigationJump to search
imported>Andy
 
 
Line 1: Line 1:
= Generating Code from State-Machine Diagrams =
+
Back to [[Theory Plug-in]].
We introduce the ability to generate code from state-machine diagrams in version 0.2.3 of the code generation feature plug-in. Code is generated from the diagram itself, and no additional mark-up of the model is required; that is, nothing over and above the usual mark-up required for Tasking Event-B, such as identifying non-typing/typing invariants, and guards etc. State-machine(s) are created in a machine using the existing state-machine plug-in, subject to the limitations described below.
 
== Limitations/What Can Be Translated ==
 
The current code generation tool is restricted to generating code for a single Event-B machine containing one or more state-machines. We have yet to explore the decomposition/composition of machines containing state-machines. In principal we should be able to apply decomposition techniques to decompose the single Event-B machine with state-machines into a number of machines, with the state-machines distributed between them.
 
  
Another limitation is that we do not handle nested state-machines, although this should be feasible.
+
Follow this page for the latest on the Theory plug-in. The user manual is also provided together with the installation details.
  
== Translations ==
+
===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.
  
< Diagram here >
+
===Releases===
 +
===== Version 4.0.1 =====
 +
''22th December 2020''
  
The translation of the diagrammatic elements to code has been hard-coded in the code generation plug-in. We have introduced new types to the translator's common language model (IL1). We add case-statements and a container for them, since these are commonly used to implement state-machines. The code generator navigates through each state of a state-machine, generating an internal representation of the state-machine which is used to create the IL1 model. The IL1 model is then used to generate code for the various target languages that may have been implemented. We have also updated the IL1-to-target code generators, to generate case statements in Ada, C and Java.  
+
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.
  
Each state-machine has an Enumerated type whose elements take the names of the states. A state variable is created in the target that keeps track of the current state, and has the type of the enumeration.
+
===== Version 4.0.0-RC1 =====
 +
''10th April 2017''
  
In the event that a state has a single outgoing transition,
+
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
  
In the event that a state has multiple outgoing transitions, then each outgoing transition of the state gives rise to a case statement. Each outgoing transition is linked to an event, and the guards of the outgoing transitions must be disjoint and complete. Each outgoing transition maps to a case statement guarded by the state variable. In the diagram above, the code is
+
===== Version 2.0.2 =====
 +
''10th July 2014''
  
case sm_state is
+
Release target : Rodin 2.8
when A then <body> ; sm_state := B;
+
* bug fixes.  
when ...  
 
  
So, if the case branch is true then the actions of the branch are performed, and the state variable is updated. Additional guards and actions of <body> are translated from the event associated with the transition.  
+
===== Version 2.0.1 =====
 +
''24th June 2014''
  
Initial state
+
Release target : Rodin 2.8
 +
* bug fixes.
  
== Tooling ==
+
===== 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''
  
== TODO - list ==
+
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.

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.