Difference between pages "D45 Code Generation" and "Event-B Examples"

From Event-B
(Difference between pages)
Jump to navigationJump to search
imported>Andy
 
imported>Steve
 
Line 1: Line 1:
= Overview =
+
{{TOCright}}
The Event-B method, and supporting tools have been developed during the DEPLOY project. A number of the industrial partners, are interested in the formal development of multi-tasking, embedded control systems. During the project, work has been undertaken to investigate automatic generation, from Event-B models, for these type of systems. Initially, we chose to translate to the Ada programming language, and use it as a basis for the abstractions used in our approach. The first version of the code generator supported translation to Ada, and the current version also has limited support for C.  
+
This page is for listing available example Event-B/Rodin projects.
  
We released a new version of the code generator on 22-03-2012. We have made changes to the methodology, user interface, and tooling. The code generators have been completely re-written. The translators are now implemented using Java only. In our previous work we attempted to make use of the latest model-to-model transformation technology, available in the Epsilon tool set, but we decided to revert to Java since Epsilon lacked the debugging and productivity features of the Eclipse Java editor. We have also updated the documentation, including the Tasking Event-B Overview, and Tutorial materials.
 
  
=Improved Tool Usability=
+
== Year 2009 ==
We described our previous code generation feature as a demonstrator tool; chiefly a tool designed as a proof of concept, used by us to validate the approach. In this sense, the tool as it stands now, is the first prototype intended to be used by developers. However, we can use the demonstrator as a baseline, and describe the new features as follows:
 
  
* Tasking Event-B is now integrated with the Event-B explorer. It uses the extensibility mechanism of Event-B EMF (In the previous version it was a separate model).
+
=== [http://deploy-eprints.ecs.soton.ac.uk/017/ Real-time controller for a water tank]===
* We have the ability to translate to C and Ada source code, and the source code is placed in appropriate files within the project.
+
By Michael Butler.
* We use theories to define translations of the Event-B mathematical language (Theories for Ada and C are supplied).
 
* We use the theory plug-in as a mechanism for defining new data types , and the translations to target data types.
 
* The Tasking Event-B to Event-B translator is fully integrated. The previous tool generated a copy of the project, but this is no longer the case.
 
* The translator is extensible.
 
* The Rose Editor is used for editing the Tasking Event-B. A text-based editor is provided, using the Rose extension, for editing the TaskBody.
 
* The composed machine component is used to store event 'synchronizations'.
 
* Minimal use is made of the EMF tree editor in Rose.
 
  
=== Tasking Event-B and Editing ===
+
The draft paper outlines an approach to treating continuous behaviour in Event-B by a discrete approximation.
A text-based task body editor was added, to minimize the amount of editing required with the EMF tree editor. The task body editor is associated with a parser-builder; after the text is entered in the editor the EMF representation is generated (by clicking a button) that is, assuming parsing is successful. If the parser detects an error, information about the parse error is displayed in an adjoining text box. When specifying events in the task body, there is no longer a need to specify two events involved in a synchronization. The code generator automatically finds the corresponding event of a synchronization, based on the event name, and using the composed machine component. Composed machines are used to store event 'synchronizations', and are generated automatically during the decomposition process. This reduces the amount of typing in the TaskBody editor, since we no longer need to specify both local and remote (synchronizing) events.  The new feature also overcomes the 'problem' that we previously experienced, with duplicate event names in a development, and event selection, when specifying the task body. The EMF tree editor in Rose is now only used minimally; to add annotations for Tasking, Shared and Environ Machines; typing annotations, and parameter direction information; and sensing/actuating annotations, where necessary. Further work is under way to integrate the code generation feature with the new Rodin editor.
+
An example of a water tank system is used to illustrate the proposed approach.  The archive containts the
 +
Event-B development for the water tank system.
  
=== Extensibility ===
+
=== [http://deploy-eprints.ecs.soton.ac.uk/95/ UML-B Development of an ATM]===
The code generation approach is now extensible; in that, new target language constructs can be added using the Eclipse extension mechanism. The translation of target's mathematical language is now specified in the theory plug-in. This improves clarity since the the translation from source to target is achieved by specifying pattern matching rules. The theory plug-in is used to specify new data-types, and how they are implemented. Translated code is deposited in a directory in the appropriate files. An Ada project file is generated for use with AdaCore's GPS workbench. Eventually this could be enabled/disabled in a preferences dialog box. The Tasking Event-B to Event-B translator is now properly integrated. Control variable updates to the Event-B model are made in a similar way to the equivalent updates in the state-machine plug-in. The additional elements are added to the Event-B model and marked as 'generated'. This prevents users from manually modifying them, and allows them to be removed through a menu choice.
+
By Mar Yah Said, Michael Butler and Colin Snook.
  
= Changes to Tooling =
+
This paper outlines support for refinement of classes and statemachines in UML-B and issustrates these
 +
with an Automated Teller Machine (ATM) example.  The ATM development is contained in a Rodin
 +
archive.  It consists of an abstract model focusing on bank account updates.  The ATM, pin cards and
 +
messaging between ATMs and a bank server are introduced in successive refinements.
 +
 
 +
=== [http://deploy-eprints.ecs.soton.ac.uk/84/ MIDAS: A Formally Constructed Virtual Machine]===
 +
By [[Steve]].
 +
 
 +
MIDAS (Microprocessor Instruction and Data Abstraction System) is a specification of an Instruction Set Architecture (ISA). It is refined to a usable Virtual Machine (VM) capable of executing binary images compiled from the C language. It was developed to demonstrate a methodology for formal construction of various ISAs in Event-B via a generic model. There are two variants: a stack-based machine and a randomly accessible register array machine. The two variants employ the same instruction codes, the differences being limited to register file behavior.
 +
 
 +
The archive supplied at the Deploy repository contains: C-coded prototypes of the MIDAS VMs, an Event-B model refinement constructing the same VMs, the B2C Event-B to C auto-generation tool, C compiler/assembler/linkers for the VMs, an example C test suite, and execution environments for running compiled C on the machines.
 +
 
 +
=== [http://deploy-eprints.ecs.soton.ac.uk/82/ Development of a Network Topology Discovery Algorithm]===
 +
By ''Hoang, Thai Son and Basin, David and Kuruma, Hironobu and Abrial, Jean-Raymond''.
 +
 
 +
This paper and this Rodin development is another version of the [[#Link State Routing Development|Link State Routing Development]] presented in 2008.
 +
 
 +
== Year 2008 ==
 +
=== [http://deploy-eprints.ecs.soton.ac.uk/31/ Link State Routing Development]===
 +
By ''Hoang, Thai Son and Basin, David and Kuruma, Hironobu and Abrial, Jean-Raymond''.
 +
 
 +
We present a formal development in Event-B of a distributed topology discovery algorithm. Distributed topology discovery is at the core several routing algorithms and is the problem of each node in a network discovering and maintaining information on the network topology. One of the key challenges in developing this algorithm is specifying the problem itself.We provide a specification that includes both safety properties, formalizing invariants that should hold in all system states, and liveness properties that characterize when the system reaches stable states. We specify these by appropriately combining invariants, event refinement, and proofs of event convergence and deadlock freedom. The combination of these features is novel and should be useful for formalizing and developing other kinds of semi-reactive systems, which are systems that react to, but do not modify, their environment.
 +
 
 +
=== [http://deploy-eprints.ecs.soton.ac.uk/22/ Modelling and proof of a Tree-structured File System] ===
 +
By ''Damchoom, Kriangsak and Butler, Michael and Abrial, Jean-Raymond''.
 +
 
 +
We present a verified model of a tree-structured file system which was carried out using Event-B and the Rodin platform. The model is focused on basic functionalities affecting the tree structure including create, copy, delete and move. This work is aimed at constructing a clear and accurate model with all proof obligations discharged. While constructing the model of a file system, we begin with an abstract model of a file system and subsequently refine it by adding more details through refinement steps.  We have found that careful formulation of invariants and useful theorems that can be reused for discharging similar proof obligations make models simpler and easier to prove.
 +
 
 +
=== [http://deploy-eprints.ecs.soton.ac.uk/56/ Deliverable D8 D10.1 "Teaching Materials"] ===
 +
By ''Abrial, Jean-Raymond and Hoang, Thai Son and Schmalz, Matthias''.
 +
 
 +
==Year 2007==
 +
=== [http://deploy-eprints.ecs.soton.ac.uk/9/ Redevelopment of an Industrial Case Study Using Event-B and Rodin]===
 +
From ''Rezazadeh, Abdolbaghi and Butler, Michael and Evans, Neil''.
 +
 
 +
CDIS is a commercial air traffic information system that was developed using formal methods 15 years ago by Praxis, and it is still in operation today. This system is an example of an industrial scale system that has been developed using formal methods. In particular, the functional requirements of the system were specified using VVSL -- a variant of VDM. A subset of the original specification has been chosen to be reconstructed on the Rodin platform based on the new Event-B formalism. The goal of our reconstruction was to overcome three key difficulties of the original formalisation, namely the difficulty of comprehending the original specification, the lack of any mechanical proof of the consistency of the specification and the difficulty of dealing with distribution and atomicity refinement. In this paper we elucidate how a new formal notation and tool can help to overcome these difficulties.
 +
 
 +
[[Category:Examples]]

Revision as of 12:39, 10 June 2009

This page is for listing available example Event-B/Rodin projects.


Year 2009

Real-time controller for a water tank

By Michael Butler.

The draft paper outlines an approach to treating continuous behaviour in Event-B by a discrete approximation. An example of a water tank system is used to illustrate the proposed approach. The archive containts the Event-B development for the water tank system.

UML-B Development of an ATM

By Mar Yah Said, Michael Butler and Colin Snook.

This paper outlines support for refinement of classes and statemachines in UML-B and issustrates these with an Automated Teller Machine (ATM) example. The ATM development is contained in a Rodin archive. It consists of an abstract model focusing on bank account updates. The ATM, pin cards and messaging between ATMs and a bank server are introduced in successive refinements.

MIDAS: A Formally Constructed Virtual Machine

By Steve.

MIDAS (Microprocessor Instruction and Data Abstraction System) is a specification of an Instruction Set Architecture (ISA). It is refined to a usable Virtual Machine (VM) capable of executing binary images compiled from the C language. It was developed to demonstrate a methodology for formal construction of various ISAs in Event-B via a generic model. There are two variants: a stack-based machine and a randomly accessible register array machine. The two variants employ the same instruction codes, the differences being limited to register file behavior.

The archive supplied at the Deploy repository contains: C-coded prototypes of the MIDAS VMs, an Event-B model refinement constructing the same VMs, the B2C Event-B to C auto-generation tool, C compiler/assembler/linkers for the VMs, an example C test suite, and execution environments for running compiled C on the machines.

Development of a Network Topology Discovery Algorithm

By Hoang, Thai Son and Basin, David and Kuruma, Hironobu and Abrial, Jean-Raymond.

This paper and this Rodin development is another version of the Link State Routing Development presented in 2008.

Year 2008

Link State Routing Development

By Hoang, Thai Son and Basin, David and Kuruma, Hironobu and Abrial, Jean-Raymond.

We present a formal development in Event-B of a distributed topology discovery algorithm. Distributed topology discovery is at the core several routing algorithms and is the problem of each node in a network discovering and maintaining information on the network topology. One of the key challenges in developing this algorithm is specifying the problem itself.We provide a specification that includes both safety properties, formalizing invariants that should hold in all system states, and liveness properties that characterize when the system reaches stable states. We specify these by appropriately combining invariants, event refinement, and proofs of event convergence and deadlock freedom. The combination of these features is novel and should be useful for formalizing and developing other kinds of semi-reactive systems, which are systems that react to, but do not modify, their environment.

Modelling and proof of a Tree-structured File System

By Damchoom, Kriangsak and Butler, Michael and Abrial, Jean-Raymond.

We present a verified model of a tree-structured file system which was carried out using Event-B and the Rodin platform. The model is focused on basic functionalities affecting the tree structure including create, copy, delete and move. This work is aimed at constructing a clear and accurate model with all proof obligations discharged. While constructing the model of a file system, we begin with an abstract model of a file system and subsequently refine it by adding more details through refinement steps. We have found that careful formulation of invariants and useful theorems that can be reused for discharging similar proof obligations make models simpler and easier to prove.

Deliverable D8 D10.1 "Teaching Materials"

By Abrial, Jean-Raymond and Hoang, Thai Son and Schmalz, Matthias.

Year 2007

Redevelopment of an Industrial Case Study Using Event-B and Rodin

From Rezazadeh, Abdolbaghi and Butler, Michael and Evans, Neil.

CDIS is a commercial air traffic information system that was developed using formal methods 15 years ago by Praxis, and it is still in operation today. This system is an example of an industrial scale system that has been developed using formal methods. In particular, the functional requirements of the system were specified using VVSL -- a variant of VDM. A subset of the original specification has been chosen to be reconstructed on the Rodin platform based on the new Event-B formalism. The goal of our reconstruction was to overcome three key difficulties of the original formalisation, namely the difficulty of comprehending the original specification, the lack of any mechanical proof of the consistency of the specification and the difficulty of dealing with distribution and atomicity refinement. In this paper we elucidate how a new formal notation and tool can help to overcome these difficulties.