Difference between pages "Plug-in Wishlist" and "The Use of Theories in Code Generation"

From Event-B
(Difference between pages)
Jump to navigationJump to search
imported>WikiSysop
 
imported>Andy
 
Line 1: Line 1:
== Introduction ==
+
== The Theory Plug-in ==
 +
The theory plug-in is used to add mathematical extensions to Rodin. The theories are created, and deployed, and can then be used in any models in the workspace. When dealing with implementation level models, such as in Tasking Event-B, we need to consider how to translate newly added types and operators into code. We have augmented the theory interface with a Translation Rules section. This enables a user to define translation rules that map Event-B formulas to code.
 +
=== Translation Rules===
 +
Figure 1 shows the interface, and some translations rules of the mapping to Ada.
  
This page has been created to give a wish list of tool plug-ins that cannot be resourced by [[Deploy]].
+
<div id="fig:Translation Rules">
These plug-ins could be developed by [[Deploy]] partners or by external partners.
+
<br/>
 +
[[Image:TheoryCGRules.png|center||caption text]]
 +
<center>'''Figure 1''': Translation Rules</center>
 +
<br/>
 +
</div>
  
== The Rodin Workshop 2009 Wishlist ==
+
The translation rules are templates used for pattern matching. The meta-variables are defined and typed, and used in the rules. Event-B expressions and predicates are defined on the left hand side of the rule, and the code to be output (as text) appears on the right hand side of the matching rule.
The following list has been established during the [[Rodin_Workshop_2009 | Rodin User and Developer Workshop 2009]] (July 15-17 2009):
 
 
 
* Enabledness POs
 
* Automatic refinement
 
* Support for probability
 
* Automated provers / SMT for set theory
 
** common context
 
** used hypothesis
 
** extensible operator
 
* Reasoned modeling support
 
* Flexible document management
 
 
 
== Structural Checker Plug-in ==
 
The idea of such a plug-in is to perform structural checks on Event-B models.
 
 
 
It could for example ensure that some good-usage rules are enforced, or produce a list of warnings to provide help when modeling (''eg.'' an anticipated event has been found in last refinement).
 
 
 
== Other items ==
 
 
 
* support for re-play of proofs on other POs
 

Revision as of 08:38, 15 May 2012

The Theory Plug-in

The theory plug-in is used to add mathematical extensions to Rodin. The theories are created, and deployed, and can then be used in any models in the workspace. When dealing with implementation level models, such as in Tasking Event-B, we need to consider how to translate newly added types and operators into code. We have augmented the theory interface with a Translation Rules section. This enables a user to define translation rules that map Event-B formulas to code.

Translation Rules

Figure 1 shows the interface, and some translations rules of the mapping to Ada.


caption text
Figure 1: Translation Rules


The translation rules are templates used for pattern matching. The meta-variables are defined and typed, and used in the rules. Event-B expressions and predicates are defined on the left hand side of the rule, and the code to be output (as text) appears on the right hand side of the matching rule.