Difference between pages "Tasking Event B Overview" and "User:Nicolas/Collections/ADVANCE D3.4 Model Checking"

From Event-B
(Difference between pages)
Jump to navigationJump to search
imported>Andy
 
imported>Ladenberger
 
Line 1: Line 1:
The following text can be read in conjunction with the slides<ref name = "Zurich2010Slides">http://deploy-eprints.ecs.soton.ac.uk/260/2/CGSlidesAndy%2520Edmunds%2520-%2520Code%2520Generation%2520Slides.pdf</ref> from the Deploy Plenary Meeting - Zurich 2010.
+
== Overview ==
 +
{{TODO}}
  
Tasking Event-B can be viewed as an extension of the existing Event-B language. We use the existing approaches of refinement and decomposition to structure a development that is suitable for construction of a Tasking Development. At some point during the modelling phase parameters may have to be introduced to facilitate decomposition. This constitutes a natural part of the refinement process as it moves towards decomposition and on to the implementation level. During decomposition parameters form part of the interface that enables event synchronization. We make use of this interface and add information (see [[#Implementing Events]]) to facilitate code generation.
+
== Motivations / Decisions ==
 +
'''B to TLA+'''
  
A Tasking Development is generated programmatically, at the direction of the user; the Tasking Development consists of a number of machines (and perhaps associated contexts). In our approach we make use of the Event-B EMF extension mechanism which allows addition of new constructs to a model. The tasking extension consists of the constructs in the following table.
+
'''LTL Fairness'''
  
<center>
+
'''Theory Support'''
{| border="1"
 
|Construct
 
|Options
 
|-
 
|Machine Type
 
|DeclaredTask, AutoTask, SharedMachine
 
|-
 
|Control
 
|Sequence, Loop, Branch, EventSynch
 
|-
 
|Task Type
 
|Periodic(n), Triggered, Repeating, OneShot
 
|-
 
|Priority
 
| -
 
|-
 
|Event Type
 
|Branch, Loop, ProcedureDef, ProcedureSynch
 
|-
 
|Parameter Type
 
|ActualIn, ActualOut, FormalIn, FormalOut
 
|}
 
</center>
 
  
The machines in the Tasking Development are extended with the constructs shown in the table, and may be viewed as keywords in a textual representation of the language. With extensions added, a Tasking Development can be translated to a common language model for mapping to implementation source code. There is also a translator that constructs new machines/contexts modelling the implementation, and these should refine/extend the existing elements of the Event-B project.
+
'''Physical Units'''
  
=== Tasking Machines ===
+
The physical units analysis has been further stabilised, several reported bugs have been fixed.
The following constructs relate only to Tasking Machines, and provide implementation details. Timing of periodic tasks is not modelled formally. Tasking Machines are related to the concept of an Ada task. These can be implemented in Ada using tasks, in C using the pthread library C, or in Java using threads.
+
Support for physical units has been extended to theories along with the general theory-related improvements of ProB mentioned in the previous paragraph.
 +
The plug-in was ported to Rodin 3, all bugfixes and changes could be back ported to Rodin 2 successfully.
  
* Tasking Machines may be characterised by the following types:
+
Further extension to the unit analysis include:
** AutoTasks - Singleton Tasks.
+
* Support for the analysis of units throughout refinement relations.
** Declared tasks - (Not currently used) A task template relating to an Ada ''tasktype'' declaration.
+
* Support for abstract units like "length" that can later be concretised to standard SI units.
** TaskType - Defines the scheduling, cycle and lifetime of a task. i.e. one-shot periodic or triggered.
 
** Priority - An integer value is supplied, the task with the highest value priority takes precedence when being scheduled.
 
  
=== Shared Machines ===
+
{{TODO}}
A Shared Machine corresponds to the concept of a protected resource, such as a monitor. They may be implemented in Ada as a Protected Object, in C using mutex locking, or in Java as a monitor.
 
  
* Applied to the Shared Machine we have:
+
== Available Documentation ==
** A SharedMachine ''keyword'' that identifies a machine as a Shared Machine.
 
  
=== Tasks and Events ===
+
'''ProB'''<br>
==== Control Constructs ====
+
The ProB Website<ref>http://www.stups.uni-duesseldorf.de/ProB</ref> is the place where we collect information on the ProB toolset. There are several tutorials on ProB available in the User manual section. We also supply documentation on extending ProB for developers.
Each Tasking Machine has a ''task body'' which contains the flow control, or algorithmic, constructs.  
 
  
* We have the following constructs available in the Tasking Machine body:
+
In addition we run a bug tracking system<ref>http://jira.cobra.cs.uni-duesseldorf.de/</ref> to document known bugs, workarounds and feature requests.
** Sequence - for imposing an order on events.
 
** Branch - choice between a number of mutually exclusive events.
 
** Loop - event repetition while it's guard remains true.
 
** Event Synchronisation - synchronization between an event in a Tasking Machine and an event in a Shared Machine. Synchronization corresponds to an subroutine call with atomic (with respect to an external viewer) updates. The updates in the protected resource are implemented by a procedure call to a protected object, and tasks do no share state.  The synchronization construct also provides the means to specify parameter passing, both in and out of the task.
 
** Event wrappers - The event synchronization construct is contained in an event wrapper. The wrapper may also contain a single event (we re-use the synchronization construct, but do not use it for synchronizing). The event may belong to the Tasking Machine, or to a Shared Machine that is visible to the task. Single events in a wrapper correspond to a subroutine call in an implementation.
 
  
==== Implementing Events ====
+
{{TODO}}
An event's role in the implementation is identified using the following extensions which are added to the event. Events used in task bodies are 'references' that make use of existing event definitions from the abstract development. The events are extended. to assist with translation, with a keyword indicating their role in the implementation.
 
  
* Event implementation.
+
== Conclusion ==
** Branch - In essence a task's event is split in the implementation; guards are mapped to branch conditions and actions are mapped to the branch body. If the branch refers to a Shared Machine event (procedureDef) then this is mapped to a simple procedure call.
+
{{TODO}}
** Loop - The task's event guard maps to the loop condition and actions to to loop body. If the loop refers to a Shared Machine event then it is mapped to a simple procedure call.
 
** ProcedureSych - This usually indicates to the translator that the event maps to a subroutine, but an event in a task may not require a subroutine implementation if its role is simply to provide parameters for a procedure call.
 
** ProcedureDef - Identifies an event that maps to a (potentially blocking) subroutine definition. Event guards are implemented as a conditional wait; in Ada this is an entry barrier, and in C may use a pthread condition variable .
 
 
 
In an implementation, when an subroutine is defined, its formal parameters are replaced by actual parameter values at run-time. To assist the code generator we extend the Event-B parameters. We identify formal and actual parameters in the implementation, and add the following keywords to the event parameters, as follows:
 
 
 
* Event parameter types
 
** FormalIn or FormalOut - event parameters are extended with the ParameterType construct. Extension with formal parameters indicates a mapping to formal parameters in the implementation.
 
** ActualIn or ActualOut - Extension with an actual parameter indicates a mapping to an actual parameter in the implementation.
 
  
 
== References ==
 
== References ==
 
 
<references/>
 
<references/>

Revision as of 13:03, 15 October 2014

Overview

TODO

Motivations / Decisions

B to TLA+

LTL Fairness

Theory Support

Physical Units

The physical units analysis has been further stabilised, several reported bugs have been fixed. Support for physical units has been extended to theories along with the general theory-related improvements of ProB mentioned in the previous paragraph. The plug-in was ported to Rodin 3, all bugfixes and changes could be back ported to Rodin 2 successfully.

Further extension to the unit analysis include:

  • Support for the analysis of units throughout refinement relations.
  • Support for abstract units like "length" that can later be concretised to standard SI units.

TODO

Available Documentation

ProB
The ProB Website[1] is the place where we collect information on the ProB toolset. There are several tutorials on ProB available in the User manual section. We also supply documentation on extending ProB for developers.

In addition we run a bug tracking system[2] to document known bugs, workarounds and feature requests.

TODO

Conclusion

TODO

References