Difference between pages "D32 General Platform Maintenance" and "Event-B Classdiagrams"

From Event-B
(Difference between pages)
Jump to navigationJump to search
imported>Tommy
 
imported>Colin
 
Line 1: Line 1:
= Overview =
+
[[Image:IUMLB_big.png|frame|left]]
The main goal of the platform corrective and evolutive maintenance is to fix the listed known bugs, and implement some new requested features. As in the previous years of DEPLOY, these bugs and features are reported either by mail or through dedicated SourceForge trackers.
+
{{TOCright}}
 +
==Introduction==
 +
In iUML-B, Class diagrams are used to define and visualize entity-relationship data models. They can be added to Event-B Machines and Event-B Contexts and visualize given sets , constants and variables. Diagram elements elaborate pre-existing user data in order to visualize it. The diagram defines type, sub-type and further constraint information for the data by generating invariants or axioms.
  
The terse list below gives an overwiew of the noteworthy features added in the main platform during the past year:
+
==Principles of Operation==
* Proof replay on undischarged POs (since release 1.3)
 
: It often happens, while modifying a model, that a set of previously manually discharged POs have slightly changed and need to be discharged again. However, replaying the proof for these POs could most of the time be enough to discharge it. Hence, a command was added to manually try replaying the proofs for a set of undischarged POs. This request comes directly from end users<ref>https://sourceforge.net/tracker/?func=detail&aid=2949606&group_id=108850&atid=651672</ref>. See <ref>http://wiki.event-b.org/index.php/Proof_Obligation_Commands</ref>.
 
* Rule Details View (since release 2.0)
 
: When doing an interactive proof, one is guided by the proof tree appearing on the proof tree view. However, it is sometimes needed to get more information about the rules involved in a proof, such as instantiation details, used hypotheses, etc. The Rule Details View<ref>http://wiki.event-b.org/index.php/Rodin_Proving_Perspective#Rule_Details_View</ref> displaying such details has been added.
 
* Refactory plug-in (since release 1.2)
 
: The Refactory<ref>http://wiki.event-b.org/index.php/Refactoring_Framework</ref> plug-in allows users of the Rodin platform to rename modelling elements. With a unique operation, both declaration and occurrences of an element are renamed. Moreover, renaming an element also modifies the corresponding proof, so that renaming does not change the proof status (no loss of proof).
 
* Mathematical extensions (since release 2.0)
 
: The integration of mathematical extensions required a major rework of the deep internals of the platform (in particular all code related to the manipulation of mathematical formulas). See <ref>http://wiki.event-b.org/index.php/D32_Mathematical_Extensions</ref>.
 
* Documentation
 
: Plug-in developers expressed their need to get a detailed documentation about Rodin extension ability. A dedicated tutorial<ref>http://wiki.event-b.org/index.php/Plug-in_Tutorial </ref><ref name="documentation">http://wiki.event-b.org/index.php/D23_General_Platform_Maintenance#Available_Documentation</ref> has been written accordingly, and was the support of a full-day tutorial session given at the Rodin User and Developer Workshop<ref>http://www.event-b.org/rodin10.html </ref> in Düsseldorf this year.
 
: The user manual, user tutorial and other developer documentation on the wiki<ref>http://wiki.event-b.org</ref> are continuously, and collaboratively updated and enhanced. Moreover, as soon as a new feature is added to the platform, the corresponding user documentation is created on the Wiki.
 
  
See the Release Notes<ref name="documentation">http://wiki.event-b.org/index.php/D32_General_Platform_Maintenance#Available_Documentation</ref> and the SourceForge<ref name=documentation>http://wiki.event-b.org/index.php/D32_General_Platform_Maintenance#Available_Documentation</ref> databases (bugs and feature requests) for details about the previous and upcoming releases of the Rodin platform.
+
Classes, Attributes and Associations are all model elements that represent data. They can be linked to existing Event-B data elements: Variables, Constants or (for Classes only) Carrier Sets. This relationship is called ''Elaborates'' because the diagram element elaborates properties of the data item. Any data element within scope, locally within the same machine or context, or via sees and extends, can be elaborated. As a short cut, a button is provided to create a new data item and link to it in one step.  
  
= Motivations =
+
Class diagrams can be added to Machines or Contexts, but note that some features are not available when in a Context (e.g. only constants and sets are within scope to link to and methods cannot be used in classes).
The evolutive maintenance (resp. corrective maintenance) has its origin in the DEPLOY description of work, and the various requests (resp. bug reports) listed by WP1-4 partners, developers and users. Since the DEPLOY project inception, various streams have been used to request new features or track known bugs:
 
: - dedicated trackers<ref name="documentation">http://wiki.event-b.org/index.php/D23_General_Platform_Maintenance#Available_Documentation</ref>,
 
: - platform user mailing list{{TODO|Need reference here}}
 
: - DEPLOY WP9 mailing list.
 
Maintenance tasks to perform are collected from the aforementioned streams and scheduled during WP9 meetings. These tasks are processed in the same way as the task planned in the description of work.
 
  
The following table describes the main tasks (either performed or scheduled) motivating the evolutive maintenance:
+
Methods can be placed inside Classes and link (elaborate) one or more events in the containing Machine. This means that the elaborated events are given a paramter representing the class instance (similar to 'this' or 'self' in programming languages). When in variable classes (i.e. a class that elaborates a variable) methods may be constructors or destructors.
{{SimpleHeader}}
 
|-
 
! scope=col | Origin || Maintenance Task || Done in 2010 || Scheduled in 2011
 
|-
 
| DoW / WP1-4 partners || Prover efficiency and integrity || x || x
 
|-
 
| Qualoss assessment {{TODO|Put Deliverable number, rather}}|| Test reports and test coverage <ref>http://bscw.cs.ncl.ac.uk/bscw/bscw.cgi/105531</ref> ||  || x
 
|-
 
| WP1-4 partners|| Updating fields of records || x ||
 
|-
 
| WP1-4 partners|| Team work || x ||
 
|-
 
| WP1-4 partners|| Edition ||  || x
 
|-
 
| WP1-4 partners|| Increase platform stability ||  || x
 
|-
 
| WP1-4 partners|| Comments everywhere <ref>https://sourceforge.net/tracker/index.php?func=detail&aid=3007797&group_id=108850&atid=651672</ref> ||  || x
 
|-
 
| WP1-4 partners|| Plug-in incompatibilities ||  || x
 
|-
 
| WP1-4 partners|| Search in goal window <ref>https://sourceforge.net/tracker/?func=detail&atid=651672&aid=3092835&group_id=108850</ref> ||  || x
 
|-
 
| WP1-4 partners|| Preferences for the automatic tactics <ref>http://sourceforge.net/tracker/index.php?func=detail&aid=1581775&group_id=108850&atid=651672</ref> ||  || x
 
|-
 
| WP1-4 partners|| Hierarchy / refinement view ||  || x
 
|-
 
| Plug-in developers|| API to extend the Pretty Printer view <ref>http://sourceforge.net/tracker/?func=detail&aid=2926238&group_id=108850&atid=651672</ref> || x ||
 
|-
 
| Plug-in developers|| View the error log <ref>http://sourceforge.net/tracker/?func=detail&aid=2990974&group_id=108850&atid=651672</ref> || x ||
 
|-
 
| Plug-in developers|| Prover API || x ||
 
|-
 
| Plug-in developers|| A different update site for unstable plug-ins ||  || x
 
|-
 
| End Users|| 64-bit Rodin for Mac || x ||
 
|-
 
| End Users|| Adding a replay proof command in the Event-B explorer <ref>http://sourceforge.net/tracker/?func=detail&aid=2949606&group_id=108850&atid=651672</ref> || x ||
 
|-
 
| End Users|| Having auto-completion in proof control <ref>http://sourceforge.net/tracker/?func=detail&aid=2979367&group_id=108850&atid=651672</ref> || x ||
 
|- 
 
| End Users|| Displaying instantiated hypotheses <ref>http://sourceforge.net/tracker/?func=detail&aid=3008636&group_id=108850&atid=651672</ref> || x ||
 
|- 
 
| End Users || Displaying the inherited elements || || x
 
|}
 
  
= Choices / Decisions =
+
===Main Data Elements of a Class Diagram===
* Task priority
+
The main data elements of a class diagram are ''class'', ''association'' and ''attribute''. These elements all visualize Event-B data items (carrier sets, constants or variables) in the Event-B model. Only a class can visualize a carrier set. The class diagram also visualizes the relationships between these data items and generates constraints (invariants and axioms as appropriate) as follows.
: Listed tasks are being given a priority during WP9 bi-weekly meetings, and then assigned to partners in charge of their processing. A higher priority is given to requests originating from deployment parteners.
+
* '''Class Supertype''' relationships between classes represent that the source is a sub-set of the target superset.  
* 64-bit release of Rodin for Mac platforms
+
* '''Association''' relationships represent that the association data is a relation between instances of the source and target classesCardinality may be used to further constrain the relationship to be for example a function, injection or surjection.
: A major UI bug, due to some incompatibilities between Eclipse 3.5 and Java 1.6 on Mac platforms motivated the migration to the Eclipse 3.6 as basis for the Rodin 2.0 platform. In the meantime, as the 32-bit Java Virtual Machine is no longer supported on Mac platforms, Rodin migrated to Java 1.6, so that the release 2.0 of Rodin became a 64-bit Mac platform only.
+
* '''Attributes''' are similar to associations except that the target is given by a text string (the attribute type property).
: The Rodin platforms family is then composed of three executables : 32-bit platforms for Linux and Windows environments and a 64-bit platform for Mac computers.
 
* Rodin sources
 
: The sources of Rodin are now bundled together with the binary platformIt provides developers with a convenient alternative to the available sources<ref>http://wiki.event-b.org/index.php/Using_Rodin_as_Target_Platform</ref> on SourceForge.
 
* Release notes
 
: The release notes contain information about the released plug-ins and centralise the requirements or existing issues which could not be stated at the main platform release date. Thus, since Rodin 2.0 release, it has been chosen to link the contents of the release notes text file included in Rodin releases, with the contents of the dedicated Wiki page.
 
  
= Available Documentation =
+
===Other Elements of a Class Diagram===
The following pages give useful information about the Rodin platform releases:
+
* '''Constraints''' can be added to classes. The constraint is automatically universally quantified for all instances of the class. The user is expected to use the class' ''self name'' to represent the quantifier local variable. (By default the self name is ''this_<className>'' but it can be altered in the properties of the class). The constraint will generate an axiom or an invariant depending on wheter the class diagram is owned by a context or machine.
* Release notes<ref>http://wiki.event-b.org/index.php/Rodin_Platform_Releases</ref>.
+
* For class diagrams that are owned by a machine, '''methods''' may be placed in classes. Methods are linked to events of the machine and a parameter is generated to represent the contextual instance, using the class' self-name. The user is expected to use the self name in guards and actions of the method. Note that the method-event elaborates relationship is many to many. Hence several methods in different classes could elaborate the same event. Conversely the same method may contribute its behaviour to several different events.
* Bugs<ref>http://sourceforge.net/tracker/?atid=651669&group_id=108850</ref>.
 
* Feature requests<ref>http://sourceforge.net/tracker/?group_id=108850&atid=651672</ref>.
 
  
= Planning =
+
===Scope===
During the coming year, WP9 partners will favour work on the following topics, which were pointed out at the last plenary meeting by the WP1-WP4 partners and encompass end-user requests (see scheduled tasks in <ref>http://wiki.event-b.org/index.php/D32_General_Platform_Maintenance#Motivations</ref>):
+
Elements of the class diagram can define data in the containing Event-B component and can visualize data in any Event-B component that is visible to the containing Event-B component (including itself). Hence a class diagram in a context may visualize sets and constants in the containing context and visualize sets and constants in any context which is (transitively) extended by the containing context. A class diagram in a machine may define/visualize variables in the containing machine, visualize variables in any machine it (transitively) refines and visualize sets and constants in any context that is seen by the machine or any Context that is (transitively) extended by a context that is seen by the machine.
* Platform stability and performances
 
: Currently, users struggle through performance flows in the Rodin platform while editing or proving a model. Solving these flows represents a real challenge for the coming year and will be mandatory for the industrial adoption of the Event-B methodology and Rodin.
 
* Prover efficiency and integrity
 
: Having all models automatically proved is the ideal to get close to. Thus, enhancing provers is a continuous task that will be performed until the DEPLOY project's end. However, ensuring their correctness and getting more confidence into them, will be a necessary task performed during this coming year.
 
* Plug-in incompatibilities
 
: The problem occurs when several plug-ins are installed and conflicts exist between them. The cumbersome behaviour often spawned by such incompatibilities leads to user's disappointment, or even to the impossility to use the platform. Particular efforts will be given to identify the sources of incompatibilities among plug-ins and coordinate the assignment and processing of the necessary corrective maintenance tasks.
 
  
===References===
+
===Secondary information===
<references/>
+
Colour is used to indicate whether a diagram element has been linked to data. Icons are used to indicate the kind (set, constant or variable) of elaborated data.
  
[[Category:D32 Deliverable]]
+
==Examples==
 +
For example when a class diagram is first drawn and has not been linked to data it looks like this:
 +
 
 +
[[File:Cd1_unlinked.png]]
 +
 
 +
 
 +
Generating this diagram produces no output to the Event-B.
 +
The diagram elements must first be linked to data using the '''Link Data''' or '''Create & Link''' buttons in the properties sheet.
 +
The followng screenshot shows the association being linked to a variable ''b'' that already exists in the machine.
 +
 
 +
[[File:LinkData.png|800px]]
 +
 
 +
 
 +
The following screenshot shows the class A being used to create and link to a carrier set in the seen context X0. Note that the carrier set is created in X0 immediately. It is not necessary to generate.
 +
 
 +
[[File:CreatLink.png|800px]]
 +
 
 +
 
 +
After linking these diagram elements they are automatically rendered differently including icons for variables (b) and sets (A). Generating at this stage introduces an invariant for the association variable b to say that it is a relation between A and B. Since B only exists in the diagram and is not yet linked to any data, this causes an error in the machine. However, note that the invariant is still generated using the class name, B. In fact we could replace the class name with any valid expression (e.g. NAT) representing a set of instances.
 +
 
 +
[[File:ClassDiagGen.png|800px]]
 +
 
 +
 
 +
In the following screenshot, B has been linked to a constant in the context X0. The supertype relation from B to A generates the axiom, B ∈ ℙ(A).
 +
A method (with a parameter, guard and action) and an invariant have been added to class A and their translations are shown in the machine m0.
 +
 
 +
[[File:ClassDiagGen2.png|800px]]

Latest revision as of 05:07, 6 October 2015

IUMLB big.png

Introduction

In iUML-B, Class diagrams are used to define and visualize entity-relationship data models. They can be added to Event-B Machines and Event-B Contexts and visualize given sets , constants and variables. Diagram elements elaborate pre-existing user data in order to visualize it. The diagram defines type, sub-type and further constraint information for the data by generating invariants or axioms.

Principles of Operation

Classes, Attributes and Associations are all model elements that represent data. They can be linked to existing Event-B data elements: Variables, Constants or (for Classes only) Carrier Sets. This relationship is called Elaborates because the diagram element elaborates properties of the data item. Any data element within scope, locally within the same machine or context, or via sees and extends, can be elaborated. As a short cut, a button is provided to create a new data item and link to it in one step.

Class diagrams can be added to Machines or Contexts, but note that some features are not available when in a Context (e.g. only constants and sets are within scope to link to and methods cannot be used in classes).

Methods can be placed inside Classes and link (elaborate) one or more events in the containing Machine. This means that the elaborated events are given a paramter representing the class instance (similar to 'this' or 'self' in programming languages). When in variable classes (i.e. a class that elaborates a variable) methods may be constructors or destructors.

Main Data Elements of a Class Diagram

The main data elements of a class diagram are class, association and attribute. These elements all visualize Event-B data items (carrier sets, constants or variables) in the Event-B model. Only a class can visualize a carrier set. The class diagram also visualizes the relationships between these data items and generates constraints (invariants and axioms as appropriate) as follows.

  • Class Supertype relationships between classes represent that the source is a sub-set of the target superset.
  • Association relationships represent that the association data is a relation between instances of the source and target classes. Cardinality may be used to further constrain the relationship to be for example a function, injection or surjection.
  • Attributes are similar to associations except that the target is given by a text string (the attribute type property).

Other Elements of a Class Diagram

  • Constraints can be added to classes. The constraint is automatically universally quantified for all instances of the class. The user is expected to use the class' self name to represent the quantifier local variable. (By default the self name is this_<className> but it can be altered in the properties of the class). The constraint will generate an axiom or an invariant depending on wheter the class diagram is owned by a context or machine.
  • For class diagrams that are owned by a machine, methods may be placed in classes. Methods are linked to events of the machine and a parameter is generated to represent the contextual instance, using the class' self-name. The user is expected to use the self name in guards and actions of the method. Note that the method-event elaborates relationship is many to many. Hence several methods in different classes could elaborate the same event. Conversely the same method may contribute its behaviour to several different events.

Scope

Elements of the class diagram can define data in the containing Event-B component and can visualize data in any Event-B component that is visible to the containing Event-B component (including itself). Hence a class diagram in a context may visualize sets and constants in the containing context and visualize sets and constants in any context which is (transitively) extended by the containing context. A class diagram in a machine may define/visualize variables in the containing machine, visualize variables in any machine it (transitively) refines and visualize sets and constants in any context that is seen by the machine or any Context that is (transitively) extended by a context that is seen by the machine.

Secondary information

Colour is used to indicate whether a diagram element has been linked to data. Icons are used to indicate the kind (set, constant or variable) of elaborated data.

Examples

For example when a class diagram is first drawn and has not been linked to data it looks like this:

Cd1 unlinked.png


Generating this diagram produces no output to the Event-B. The diagram elements must first be linked to data using the Link Data or Create & Link buttons in the properties sheet. The followng screenshot shows the association being linked to a variable b that already exists in the machine.

LinkData.png


The following screenshot shows the class A being used to create and link to a carrier set in the seen context X0. Note that the carrier set is created in X0 immediately. It is not necessary to generate.

CreatLink.png


After linking these diagram elements they are automatically rendered differently including icons for variables (b) and sets (A). Generating at this stage introduces an invariant for the association variable b to say that it is a relation between A and B. Since B only exists in the diagram and is not yet linked to any data, this causes an error in the machine. However, note that the invariant is still generated using the class name, B. In fact we could replace the class name with any valid expression (e.g. NAT) representing a set of instances.

ClassDiagGen.png


In the following screenshot, B has been linked to a constant in the context X0. The supertype relation from B to A generates the axiom, B ∈ ℙ(A). A method (with a parameter, guard and action) and an invariant have been added to class A and their translations are shown in the machine m0.

ClassDiagGen2.png