Difference between pages "ADVANCE D3.2 General Platform Maintenance" and "The Proving Perspective (Rodin User Manual)"

From Event-B
(Difference between pages)
Jump to navigationJump to search
imported>Tommy
 
imported>Tommy
 
Line 1: Line 1:
This part concerns the general maintenance performed on the Rodin toolset within the first ten months of the ADVANCE project. As the maintenance is a task that concerns the whole toolset, and to ease the reading of this part of the deliverable, the maintenance section has been decomposed in a list of subsections corresponding to scopes of the toolset. These sections are: core Rodin platform, UML-B improvements, code generation, ProR and Camille. All these subsections maintain the template previously defined in the introduction.
+
{{Navigation|Previous= [[The_Event-B_Explorer_(Rodin_User_Manual)|The Event-B Explorer]]|Next= [[The_Mathematical_Language_(Rodin_User_Manual)|The Mathematical Language]]|Up= [[index_(Rodin_User_Manual)|User_Manual_index]]}}
 +
{{TOCright}}
 +
== Overview ==
 +
When proof obligations (POs) are not discharged automatically the user can attempt to discharge them interactively using the Proving Perspective. This page provides an overview of the Proving Perspective and its use. If the Proving Perspective is not visible as a tab on the top right-hand corner of the main interface, the user can switch to it via "Window -> Open Perspective".
 +
 
 +
The Proving Perspective consists of a number of views: the Proof Tree, the Goal, the Selected Hypotheses, the Proof Control, the Search Hypotheses, the Cache Hypotheses and the Proof Information. In the discussion that follows we look at each of these views individually. Below is a screenshot of the Proving Perspective:
 +
 
 +
[[Image:ProvPers.png|center]]
 +
 
 +
== Loading a Proof ==
 +
To work on an un-discharged PO it is necessary to load the proof into the Proving Perspective. To do this switch to the Proving Perspective; select the project from the Event-B Explorer; select and expand the component (context or machine); and finally select (double-click) the proof obligation of interest. A number of views will be updated with details of the corresponding proof.
 +
[[Image:ExplorerView.png|center]]
 +
 
 +
Note that pressing [[Image:Discharged.gif]] button on the top left hand side of the Event-B Explorer will remove all discharged proof obligations (PO's) from the view.
 +
 
 +
== The Proof Tree ==
 +
The proof tree view provides a graphical representation of each individual proof step, as seen in the following screenshot:
 +
 
 +
[[Image:ProTree.png|center]]
 +
 
 +
Each node in the tree corresponds to a sequent. A line is right shifted when the corresponding node is a direct descendant of the node of the previous line. Each node is labelled with a comment which indicates which rule has been applied, or which prover discharged the proof. By selecting a node in the proof tree, the corresponding sequent is loaded: the hypotheses of the sequent are loaded to the Selected Hypotheses window, and the goal of the sequent is loaded to the Goal view.
 +
 
 +
=== Decoration===
 +
The leaves of the tree are decorated with one of three icons:
 +
 
 +
* [[Image:Discharged.gif]] means that this leaf is discharged,
 +
* [[Image:Pending.gif]] means that this leaf is not discharged,
 +
* [[Image:Reviewed.gif]] means that this leaf has been reviewed.
 +
 
 +
Internal nodes in the proof tree are decorated in reverse colours. Note that a "reviewed" leaf is one that is not discharged yet by the prover. Instead, it has been "seen" by the user who decided to postpone the proof. Marking nodes as "reviewed" is very convenient since the provers will ignore these leaves and focus on specific areas of interest. This allows interactive proof in a gradual fashion. In order to discharge a "reviewed" node, select it and prune the tree at that node: the node will become "brown" again (undischarged) and you can now try to discharge it.
 +
 
 +
=== Navigation within the Proof Tree===
 +
On top of the proof tree view, one can see three buttons:
 +
 
 +
* the "'''G'''" buttons allows you to see the goal of the sequent corresponding to each node,
 +
* the "'''+'''" button allows you to fully expand the proof tree,
 +
* the "'''-'''" allows you to fully collapse the tree: only the root stays visible.
 +
 
 +
=== Manipulating the Proof Tree===
 +
 
 +
==== Hiding ====
 +
The little square (with a "+" or "-" inside) next to each node in the proof tree allows you to expand or collapse the subtree starting at that node.
 +
 
 +
==== Pruning ====
 +
The proof tree can be pruned at a selected node; the subtree of the selected node is removed from the proof tree. The selected node becomes a leaf and is decorated with [[Image:Pending.gif]] . The proof activity can then be resumed from this node. After selecting a node in the proof tree pruning can be performed in two ways:
 +
* by right-clicking and then selecting "Prune",
 +
* by clicking on the [[Image:Pn_prover.gif]] button in the proof control view.
  
= Core Rodin platform =
+
Note that after pruning, the post-tactic is not applied to the new current sequent. The post-tactic should be applied manually, if required, by clicking on the post-tactic button in the Proof Control view. This is useful, in particular, when you want to redo a proof from the beginning. The proof tree can be pruned at its root node and then the proof can proceed again, with invocation of internal or external provers; or with interactive proof.
  
== Overview ==
+
Before pruning a particular node, the node (and its subtree) can be copied to the clipboard. If the new proof strategy subsequently fails, the copied version can be pasted back into the pruned node (see the next section).
The Rodin platform versions concerned by this deliverable are:
+
 
* 2.4 (released on 31.01.2012),
+
==== Copy/Paste ====
* 2.5 (released on 02.05.2012),
+
 
* 2.6 (released on 31.07.2012).
+
By selecting a node in the proof tree and then right-clicking with the mouse, you can copy the part of the proof tree starting at that sequent (the node and its subtree). Pasting the node and subtree back in is done in a similar manner, with a right mouse click on a proof node. This allows reuse of part of a proof tree in the same, or even in another, proof.
 +
 
 +
== Goal and Selected Hypotheses ==
 +
The nodes in the proof tree view correspond to sequents. A user will work with one selected node, and thus one sequent, at a time; attempting various strategies in an effort to show that the sequent goal is true. The "Goal" and "Selected Hypotheses" views provide information to the user about the currently selected sequent. Here is an example:
 +
[[Image:GoalHyp.png|center]]
 +
 
 +
A hypothesis can be removed from the list of selected hypotheses by selecting the check the box situated next to it (you can click on several boxes) and then by clicking on the [[Image:remove.gif]] button at the top of the selected hypotheses window:
 +
 
 +
[[Image:GoalHypSelect.png|center]]
 +
 
 +
Here is the result:
 +
 
 +
[[Image:GoalHypSelectRes.png|center]]
 +
 
 +
Note that the deselected hypotheses are not lost: you can find them again using the Search Hypotheses [[Image:sh_prover.gif]] button in the Proof Control view. Other buttons are used as follows:
 +
 
 +
 
 +
* [[Image:select_all_prover.gif]] select all hypotheses.
 +
 
 +
 
 +
* [[Image:inv_prover.gif]] invert the selection.
 +
 
 +
 
 +
* [[Image:falsify_prover.gif]] next to the goal - proof by contradiction 1: The negation of the '''goal''' becomes a selected hypothesis and the goal becomes "'''⊥'''".
 +
 
 +
 
 +
* [[Image:falsify_prover.gif]] next to a selected hypothesis - proof by contradiction 2: The negation of the '''hypothesis''' becomes the goal and the negated goal becomes a selected hypothesis.
 +
 
 +
 
 +
=== Applying Proof Rules ===
 +
A user wishing to attempt an interactive proof has a number of proof rules available, and these may be either rewrite rules or inference rules. In the Goal and the Selected Hypotheses views various operators may appear in red coloured font. The red font indicates that some interactive proof rule(s) are applicable and may be applied as a step in the proof attempt. When the mouse hovers over such an operator a number of applicable rules may be displayed; the user may choose to apply one of the rules by clicking on it.
 +
 
 +
Other proof rules can be applied when green buttons appear in the Goal and Selected Hypotheses views. Examples are proof by contradiction [[Image:falsify_prover.gif]], that we have already encountered; and [[Image:ConjI_prover.gif]] for conjunction introduction in the goal.
 +
 
 +
[[Image:ApplyRewRule.png|center]]
 +
 
 +
To instantiate a quantifier the user enters the desired expression in the box behind the quantifier and clicks on the quantifier:
 +
 
 +
[[Image:InstQuantifier.png|center]]
 +
 
 +
==== Rewrite Rules ====
 +
Rewrite rules are one-directional equalities (and equivalences) that can be used to simplify formulas (the goal or a single hypothesis). A rewrite rule is applied from left to right when its ''side condition'' holds; it can be applied either in the goal predicate, or in one of the selected hypotheses.
 +
 
 +
A rewrite rule is applied either automatically ('''A''') or manually ('''M'''):
 +
* automatically, when post-tactics are run.
 +
* automatically, when auto-tactics are run.
 +
* manually, through an interactive command. These rules gather non equivalence laws, definition laws, distributivity laws and derived laws.
 +
 
 +
Automatic rewrite rules are equivalence simplification laws.
 +
 
 +
Each rule name indicates the rule's characteristics according to the following convention:
 +
 
 +
* the law category: simplification law (SIMP), definition law (DEF), distributivity law (DISTRI), or else derived law (DERIV).
 +
* the root operator of the formula on the left-hand side of the rule, e.g. predicate AND, expression BUNION.
 +
* (optionally) the terminal elements on the left-hand side of the rule: special element (SPECIAL) such as the empty-set, type expression (TYPE), same element occurring more than once (MULTI), literal (LIT). A type expression is either a basic type (<math>\intg, \Bool</math>, any carrier set), or <math>\pow</math>(type expression), or type expression<math>\cprod</math>type expression.
 +
* (optionally) some other description of a characteristic, e.g. left (L), right (R).
 +
 
 +
Rewrite rules having a symmetric operator on the left-hand side may also describe other rules. eg: the rule:
 +
 
 +
<center><math>  \True  = \False  \;\;\defi\;\;  \bfalse </math></center>
 +
 
 +
should also produce the rule:
 +
 
 +
<center><math>  \False  = \True  \;\;\defi\;\;  \bfalse </math></center>
 +
 
 +
For associative operators in connection with distributive laws as in:
 +
 
 +
<center><math> P  \land (Q~ {\color{red}{\lor}} \ldots \lor R) </math></center>
 +
 
 +
it has been decided to highlight the first associative/commutative operator (the <math>{\color{red}{\lor}} </math>). A menu is presented when hovering the mouse over the operator: the first menu option distributes all associative/commutative operators, the second option distributes only the first associative/commutative operator. In order to simplify the explanation we write associative/commutative operators with two parameters only. However, ''we must emphasise here'', that generally we may have a sequence of more than two parameters. So, we write <math> Q \lor R </math> instead of <math> Q \lor \ldots \lor R </math>. Rules are sorted according to their purpose.
 +
 
 +
Rules marked with a star in the first column are implemented in the current prover.  Rules without a star are planned for implementation.
 +
 
 +
Rewrite rules are split into:
 +
 
 +
* [[Set Rewrite Rules]]
 +
* [[Relation Rewrite Rules]]
 +
* [[Arithmetic Rewrite Rules]]
 +
 
 +
They are also available in a single large page [[All Rewrite Rules]].
 +
 
 +
==== Inference Rules ====
 +
Inference rules (see [[Proof Rules]]) are applied either automatically (A) or manually (M).
 +
 
 +
Inference rules applied automatically are applied at the end of each proof step. They have the following possible effects:
 +
 
 +
* they discharge the goal,
 +
* they simplify the goal and add a selected hypothesis,
 +
* they simplify the goal by decomposing it into several simpler goals,
 +
* they simplify a selected hypothesis,
 +
* they simplify a selected hypothesis by decomposing it into several simpler selected hypotheses.
 +
 
 +
Inference rules applied manually are used to perform an interactive proof. They can be invoked by clicking on the red highlighted operators in the goal or the hypotheses. A menu is presented when there are several options.
 +
 
 +
See [[Inference Rules]] list.
 +
 
 +
== The Proof Control View==
 +
 
 +
The Proof Control view contains the buttons which you can use to perform an interactive proof.
 +
 
 +
[[Image:PControl.png|center]]
 +
 
 +
The Proof Control view offers a number of buttons whose effects we briefly describe next; moving from left to right on the toolbar:
 +
 
 +
* ('''nPP''') invokes the new predicate prover, a drop-down list indicates alternative strategies.
 +
* ('''R''') indicates that a node has been reviewed: in an attempt by the user to carry out proofs in a stepwise fashion, they might decide to postpone the task of discharging some proofs until a later stage. To do this the proofs can be marked as reviewed by choosing the proof node and clicking on this button. This indicates that by visually checking the proof the user is convinced that they can discharge it later, but they do not want to do it right now.
 +
* ('''p0''') the PP and ML provers can be invoked from the drop-down list using different forces.
 +
* ('''dc''') do proof by cases: the proof is split into two branches. In the first branch:- the predicate supplied by the user is added to the Selected Hypotheses, and the user attempts to discharge this branch. In the second branch :- the predicate supplied by the user is negated and added to the Selected Hypotheses; the user then attempts to discharge this branch.
 +
 
 +
* ('''ah''') add a new lemma: the predicate in the editing area should be proved by the user. It is then added as a new selected hypothesis.
 +
* ('''ae''') abstract expression: the expression in the editing area is given a fresh name.
 +
* '''the robot''': invokes the auto-prover which attempts to discharge the goal. The auto-prover is applied automatically on all proof obligations after a "save" without any intervention of the user. Using this button, you can invoke the auto-prover within an interactive proof.
 +
* the '''post-tactic''' is executed ,
 +
* '''lasoo''': load into the Selected Hypotheses window those hidden hypotheses that contain identifiers in common with the goal, and with the selected hypotheses.
 +
* '''backtrack''' form the current node (i.e., prune its parent),
 +
* '''scissors''': prune the proof tree from the node selected in the proof tree,
 +
* '''Search Hypotheses''': find hypotheses containing the character string in the editing area, and display in the Search Hypothesis view.
 +
* '''Cache Hypotheses''': press this to display the ''"Cache Hypotheses"'' view. This view displays all hypotheses that are related to the current goal.
 +
* load the '''previous''' undischarged proof obligation,
 +
* load the '''next''' undischarged proof obligation,
 +
* '''(i)''' show information corresponding to the current proof obligation in the corresponding window. This information correspond to the elements that directly took part in the proof obligation generation (events, invariant, etc.),
 +
* goto the next '''pending''' node of the current proof tree,
 +
* load the next '''reviewed''' node of the current proof tree.
 +
* '''Disable/Enable Post-tactics''': allows the user to choose whether post-tactics run after each interactive proof step.
 +
=== The Smiley ===
 +
The smiley can be one of three different colors: (1) red, indicates that the proof tree contains one or more undischarged sequents, (2) blue, indicates that all undischarged sequents of the proof tree have been reviewed, (3) green, indicates that all sequents of the proof tree are discharged.
 +
 
 +
=== The Editing Area ===
 +
The editing area allows the user to supply parameters for proof commands. For example, when the user attempts to add a new hypothesis (by clicking on the lemma '''ah''' button), the new hypothesis should have been written by the user in the editing area.
 +
 
 +
=== ML/PP and Hypotheses ===
 +
 
 +
==== ML ====
 +
ML (mono-lemma) prover appears in the drop-down list under the button ('''pp''') as M0, M1, M2, M3, ML.
 +
The different configuration (e.g., M0) refer to the proof force of the ML prover. '''All hypotheses''' are passed to ML.
 +
 
 +
==== PP ====
 +
PP (predicate prover) appears in the drop-down list under the button ('''pp''') as P0, P1, PP.
 +
* P0 uses '''all selected hypotheses''' (the ones in '''Selected Hypotheses''' window).
 +
* P1 employs a '''lasoo''' operation to the selected hypotheses and the goal, and uses the resulting hypotheses.
 +
* PP uses '''all hypotheses'''.
 +
 
 +
== The Search Hypotheses View==
 +
By typing a string in the '''Proof Control''' window and pressing the '''Search Hypotheses''' button a window is provided which contains the hypotheses having a character string in common with the one entered by the user in the editing area. For example, if we search for hypotheses involving the character string "cr", then after pressing the '''Search Hypothesis''' button on the proof control window, we obtain the following:
 +
 
 +
[[Image:um-0102.png|center]]
 +
 
 +
This view also integrates a "quick search" area (A), that allows us to search quickly hypotheses involving short character strings such as "cr". A '''search hypothesis button (B)''' that behaves the same as the button of the proving window, a '''refresh button (C)''' that updates the window manually for more control, and a '''drop down menu (D)''' to set the preferences of the view up.  
  
The core Rodin platform maintenance task focused on fixing the identified bugs and mitigating usability issues. During DEPLOY, many features and contributions were added to the toolset as users wishes and requests were collected along. At the same time, the Event-B models and proof got bigger and bigger, in the same way as the experience of the users involved constantly increased ergo the size of the systems they modelled. Scalability issues occured at some point when feature addition was favoured to design refactorings.  As the DEPLOY project was nearing its end, it appeared mandatory for the development team, to address the specific bugs and issues reported by the DEPLOY partners and related to scalability or usability, and wished resolved by the end of the project. The various tasks to be performed were scheduled, prioritized and regularly updated during bi-weekly teleconferences.
+
By pressing '''return''' key or the button (B) (once a short string has been given in the input area (A)), hypotheses can be searched quickly as if we used the '''Proof Control''' as described before.
  
The following paragraphs will give an overview of the the work that has been performed concerning maintenance on the existing platform components (i.e. core platform and plug-ins).
+
The drop down menu (D) is accessible to set some preferences over the searched hypotheses :
Release Notes<ref name="relNotes">http://wiki.event-b.org/index.php/Rodin_Platform_Releases</ref> and the SourceForge trackers<ref>http://sourceforge.net/projects/rodin-b-sharp/</ref> (bugs and feature requests) are available for more details about the previous and upcoming releases of the Rodin platform.
 
  
== Motivations / Decisions ==
+
[[Image:SearchHyp_view_menu.png|center]]
'''Provide 64-bit versions of the Rodin platform on Linux and Windows systems'''<br>
 
End users asked the Rodin team to provide 32-bit and 64-bit versions of the Rodin platform for Linux and Windows operating systems. Before Rodin 2.4, the only 64-bit version of Rodin was available on Mac platforms as 32-bit Mac (early 2006) platforms are no longer maintained by Apple. The motivation that would push forward 64-bit architectures is the possibility to increase the available java heap size which is, for example, extensively used during the automated proof. After a phase of testing on Rodin 2.4 and despite the drawbacks of assembling and maintaining five platforms instead of three, Linux and Windows 64-bit as well as 32-bit platforms are now made available.
 
  
'''The Rodin Editor and the Theory plug-in in the Rodin core platform'''<br>
+
If we change preferences for the search, we might need to "update" manually the view with the button (C).
According to their role in the Rodin toolset, and their stabilization, the Rodin Editor,<ref>http://wiki.event-b.org/index.php/Rodin_Editor</ref> and later the Theory plug-in<ref>http://wiki.event-b.org/index.php/Theory_Plug-in</ref> were reintegrated into the core platform. The Rodin Editor was released in the core platform since Rodin 2.4, and the Theory plug-in is planned to be integrated in Rodin 2.7.
+
By selecting "Consider hidden hypotheses in search" option, we can review all hypotheses that have been unselected in the selected hypotheses window(more info about[[Rodin_Proving_Perspective#Goal and Selected Hypotheses| selected/hidden hypotheses]]...).
  
== Available Documentation ==
+
[[Image:SearchHyp.png|center]]
The release notes, that appear and are maintained on the wiki, and that accompany each release, give useful information about the Rodin platforms. Moreover, two web trackers list and detail the known bugs and open feature requests:
 
* a sourceforge bug tracker,<ref>http://sourceforge.net/tracker/?group_id=108850&atid=651669</ref>
 
* a sourceforge feature requests tracker.<ref>http://sourceforge.net/tracker/?group_id=108850&atid=651672</ref>
 
The Event-B wiki,<ref name="rodinWiki">http://wiki.event-b.org/</ref> basic source of documentation for the users and developers of the Rodin toolset, was completed by the Rodin handbook, an ultimate source of documentation which reached completion by the end of the DEPLOY project. The handbook aimed to overcome the lack of a centralized source of information providing the necessary assistance to an engineer in the need to be productive using Event-B and minimize the access to an expert user.  It is continuously maintained by the various actors involved in the environment of the Rodin toolset and is available as a PDF version, a HTML version, and help contents within Rodin. Both the Rodin handbook and the Event-B wiki represent the main source of documentation about Event-B and the Rodin toolset.
 
Finally, a channel has been created on Youtube, in order to provide video tutorials about the use of the platform.<ref>http://www.youtube.com/user/EventBTv</ref>
 
  
== Planning ==
+
To move any of these hypotheses to the '''Selected Hypotheses''' window, select those required (using the check boxes) and press the [[Image:Add.gif]] button. Adding these hypotheses to the selected hypotheses means that they will be visible to the prover. They can then be used during the next interactive proof phase.  
The platforms 2.7 and 3.0 have been scheduled, and their contents have been set. The platform 2.7 is intended to be released by the end of October 2012, and will be a corrective release. Indeed, the coming release 3.0, is an evolutive release that will be prepared since the release 2.6 but would require too much time to be scheduled in place of the release 2.7. Here is a non exhaustive list of the main improvements and refactorings that will be part of the Rodin 3.0 release:
 
*Binders will be allowed in extensions.
 
*The platform will be based on Eclipse 4.
 
*The AST will be made stronger.
 
*The sequent prover will be enhanced.
 
*Parent-child element relationship extension points will be moved from the UI plug-in to the EventB core plug-in.
 
*The Event-B keyboard plug-in will be refactored to separate the UI code from the ASCII/Math translation mechanism.
 
*The statistics view will be refactored to handle other kinds of component files (currently just Contexts and Machines are supported).
 
  
= UML-B Improvements =
+
To remove hypotheses from the '''Search Hypotheses''' window use the [[Image:Remove.gif]] button. This button also appears above the selected hypotheses, and allows the user to remove any hypothesis from the '''Selected Hypotheses''' window.
  
== Overview ==
+
The other button, situated to the left each hypotheses, is the [[Image:falsify_prover.gif]] button. clicking on this will attempt a proof by contradiction. The effect is the same as if the hypothesis were in the '''Selected Hypotheses'''.
  
The UML-B plug-in and associated frameworks are developed and maintained by Dr Colin Snook at the University of Southampton. Significant contributions (to the latest version) have been made by Vitaly Savicks (State-machines) and Gintautas Sulskus (Class Diagrams). The UML-B plugin provides UML-like diagrammatic modelling as an extension to Event-B and the Rodin platform. UML-B is an established plug-in which will be developed and improved to support the aims of the ADVANCE project. UML-B was redeveloped during the DEPLOY project to provide closer integration with Event-B. A state-machine diagram editor is already released in this integrated version and a class diagram editor is now being developed as a prototype. Other improvements will include new diagrammatic notations which are directly related to the aims of ADVANCE, such as component diagrams, as well as more general improvements, such as usability, and any features required by the projects industrial partners.
+
== The Cache Hypotheses Window ==
  
== Motivations / Decisions ==
+
This window allows the user to keep track of recently manipulated (e.g., used, removed, selected) hypotheses for any PO. For example, when the user applies a rewrite to an hypothesis, a new hypothesis (after the rewriting) is selected, and the original hypothesis is deselected and put in the '''Cache Hypotheses''' window.
  
The implementation of the UML-B tool is structured to provide re-usable features as much as possible. To achieve this, wherever possible, generic frameworks are developed and the implementation of specific diagram tools is minimised by utilising these frameworks. The following frameworks are now in use by UML-B and available as a basis for future diagrammatic modelling notations.
+
Similar operations (to that of the '''Selected Hypotheses''' and '''Search Hypotheses''' windows) such as removing, selecting and proof by contradiction ('''ct''') are also available for the cached hypotheses. Interactive proof steps (e.g., rewriting) can also be carried out from the '''Cache Hypotheses''' window as well as the '''Search Hypotheses''' window.
  
* The ''Event-B EMF framework'' provides an EMF basis for Event-B models (developed during the DEPLOY project). Indeed, it provides an EMF representation of Event-B models with persistence into the Rodin database.
+
== Proof Information View ==
* The ''Event-B EMF Support for Modelling Extensions framework'' provides support for extending Event-B with new modelling features (initially developed during the DEPLOY project and now being extended in the ADVANCE project). It provides Navigator support for EMF-only model elements, a persistence mechanism for model extensions that are not needed to be processed by Rodin and a Generic Refiner for modelling extensions (which has recently been added).
 
* ''The Event-B GMF Diagrams Generic Support framework'' provides support for developing new diagram notations (started in the DEPLOY project but mostly developed during the ADVANCE project). It provides generic support for diagrammatic aspects of modelling extensions, and a generic validation and Event-B generation service (which has recently been added).
 
 
A new release of the State-machine diagram editor has been made. This release corrected some problems and improved use of the generic framework features.
 
  
Work is in progress on a new version of the UML-B Class Diagram editor. This takes the same approach as the State-machines editor in that the models are contained within Machines (and, in this case, also Contexts) and that diagrammatic model features link to and enhance existing Event-B elements rather than generate everything. The Class diagram editor is currently a prototype and has not been released.
+
This view displays information so that the user can relate a proof obligation to the model. For example, typical information for an event invariant preservation PO includes the event; as well as the invariant in question. In the following example, the hyperlinks 'CreateToken' and 'inv2' can be used to navigate to the containing machine.  
  
== Available Documentation ==
+
[[Image:PInfo.png|center]]
  
A paper exists about the framework for diagrammatic modelling extension in Rodin:
+
== Rule Details View ==
Savicks, Vitaly, Snook, Colin (2012) ''A Framework for Diagrammatic Modelling Extensions in Rodin'' in Rodin User & Developer Workshop 2012 Proceedings. Newcastle University. (Unpublished) <ref>http://deploy-eprints.ecs.soton.ac.uk/382/</ref>
 
  
Wiki pages are available for developers using the Generic extensions and Diagrams frameworks:<br>
+
This view displays the information relative to a given proof tree node, on which a rule was applied.<br>
http://wiki.event-b.org/index.php/EMF_framework_for_Event-B<br>
+
A command is available when right-clicking on a proof tree node, in order to reveal the Rule Details View (See picture below).
http://wiki.event-b.org/index.php/Generic_Event-B_EMF_extensions (Under Construction)
 
  
A paper exists about the Event-B Statemachines:
+
[[Image:ShowRuleDetailsView.png|center]]
Savicks, Vitaly, Snook, Colin and Butler, Michael (2009) ''Animation of UML-B State-machines'' in Rodin User & Developer Workshop 2010 Proceedings. Düsseldorf University, 2010.<ref>http://eprints.soton.ac.uk/268261/</ref>
 
  
Wiki pages are available for users of UML-B, everything starts from http://wiki.event-b.org/index.php/UML-B<ref>http://wiki.event-b.org/index.php/UML-B</ref>
+
By default, this view is a fast view. A button (identified by the view's icon) is then available at the bottom left of the workbench, to show up this view.
  
== Planning ==
+
Here is an overview of the Rule details view :
  
The following work is planned:
+
[[Image:RuleDetailsView.png|center]]
* Re-base the Event-B EMF framework on the EMF model of the Rodin database (which is now available as a result of the development of a new Rodin editor to replace the form based editor).
 
* Re-write the Event-B generator of the State-machine diagram editor so that it uses the generic generator from the Event-B GMF Support for Generic Diagrams framework. This will improve performance.
 
* Improve the State-machine diagram animation interface so that it supports animation of multiple diagrams.
 
* Complete the development of the new version of the UML-B Class Diagram editor.
 
* Develop Animation interface for the Class diagram editor.
 
* Develop a Component diagram editor and associated simulation tools.
 
  
= Code generation =
+
A quick view on the applied rule contents is provided. On the picture above, we display the contents of the rule named "∀ hyp mp" where an input has been used to instantiate an hypothesis.<br> One can see quickly which was the input used by the instanciation (following '''instantiated with'''), and which was the hypothesis considered by this rule (this is given by the hypothesis of '''Input Sequent''').<br>
 +
Furthermore, it is possible to view the antecedents created by this rule in details (i.e. child proof tree nodes) and the actions performed on hypotheses : selection, deselection, etc.
  
== Overview ==
+
== Auto-tactic and Post-tactic ==
We released the latest Code Generation Feature on 30th May 2012.
 
New features include code generation from state-machine diagrams.
 
  
== Motivations / Decisions ==
+
The auto-tactic applies a combination (i.e. ordered list) of ''rewrite'', ''inference'' tactics and ''external provers'' automatically to newly generated proof obligations. However, they can also be invoked by the user by clicking on the [[Image:auto_prover.png]] button in the '''Proof Control''' view. Note that the automatic application of the auto-prover can be quickly toggled with the ''Prove automatically'' menu item available from the ''Project'' menu. See the picture below.
State machines are frequently used to describe the behaviour of embedded systems. It is a relatively new feature in Event-B, and we augment the tool with the ability to generate code from state-machine diagrams in version 0.2.3 of the code generation feature plug-in. Implementation 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-machines are created, using the existing state-machine plug-in, subject to the limitations described after.
+
[[Image:AutoPostTactics_Preference_Capture7.png|center]]
  
The current code generation tool is restricted to generating code for a single Event-B machine, which may contain 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, or the elements of state-machines, distributed between them.
+
The post-tactic is also a combination of ''rewrite'', ''inference'' tactics and ''external provers'', and is applied <u>automatically after each interactive proof step</u>. However, it can also be invoked manually by clicking on the [[Image:Broom_prover.gif]] button in the '''Proof Control''' view.
Another limitation is that we do not handle nested state-machines, although this should be feasible.
 
Only the state-machines of tasking/environ machines generate code. State-machines of shared machines do not generate code. This should be explored further during research into decomposition.
 
  
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 (analogous to switch) 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/switch statements in Ada, C and Java.
+
Note that the post-tactic can be disabled quickly by clicking on the little arrow (marked with an A on the figure below) of the '''Proof Control''' view (right upper corner) and then on "Disable post-tactic" (B):
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.
+
[[Image:Disable_xp_prover.png|center]]
  
== Available Documentation ==
+
=== Principles ===
A specific page on the Event-B wiki<ref>http://wiki.event-b.org/index.php/Code_Generation_Activity</ref> is dedicated to Code Generation Updates.
 
  
== Planning ==
+
The ordered list of  ''rewrite'', ''inference'' tactics and ''external provers'' that should be applied is called a '''profile'''. There are two default profiles, one for the auto-tactic and one for the post-tactic. These default profiles are immutable in time, but can be duplicated for further modification by the user. Indeed, the user can edit a profile and select it to run as automatic or post tactic. The idea is to have a set of available tactic profiles to be used as needed.
Efforts will be concentrated on using the existing code generator techniques, and new techniques in the simulation of cyber-physical systems.
+
Moreover, these edited profiles are shipped with projects if defined at this scope, or can be imported or exported if defined at a workspace level, which is very useful to share them.  
  
= ProR =
+
There are two ways to run the automatic or post tactics:
 +
* the manual way consists into clicking on the [[Image:auto_prover.png]] button, or the [[Image:Broom_prover.gif]] button in the Proof Control view, to respectively launch the auto-tactic (with the selected auto-tactic profile) and the post-tactic (with the selected post-tactic profile).
 +
* the automatical way if such preference is activated. (Auto-tactic after each proof step, and post-tactic at each step and rebuild) The mandatory condition for post-tactics or auto-tactics to automatically run is that they should be activated from their preference or property.
  
== Overview ==
+
The user can separately define tactic profiles and assign them to post and auto tactics. Therefore, there are two tabs in the "Auto/Post Tactic" preference page to address these choices. These tabs will be descibed in the two next sections.
  
The Rodin/ProR integration plugin is developed and maintained by Lukas Ladenberger and Michael Jastram at the University of Duesseldorf. ProR is a tool for working with requirements in natural language. It is part of the Eclipse Requirements Modeling Framework (RMF).<ref>http://www.eclipse.org/rmf/</ref>
+
=== Preferences for the selected auto and post tactic profile ===
 +
This section describes the "Auto/Post Tactic" tab of the "Auto/Post Tactic" preference page.
  
The following paragraphs will give an overview of the the work that has been performed concerning maintenance on the Rodin/ProR plugin.
+
There are two scopes to set up preferences for the auto and post tactics : at workspace level, and at project level.
 +
Note that if the automatic application of tactics (auto or post) is decided only at workspace level, and this choice is held at project level.
  
== Motivations / Decisions ==
+
To access these preferences, one as to go open the "Auto/Post Tactic" preference page that can be found after "Window > Preference > Sequent Prover".
  
The motivation of the Rodin/ProR integration plugin was to bring two complimentary fields of research, requirements engineering and formal modelling, closer together. Especially, the traceability within a system description is a challenging problem of requirements engineering. In particular, formal models of the system are often based on informal requirements, but creating and maintaining the traceability between the two can be challenging. In ''A Method and Tool for Tracing Requirements into Specifications''<ref name="req1ref">http://www.stups.uni-duesseldorf.de/w/Special:Publication/HalJasLad2012</ref>, we presented an incremental approach for producing a system description from an initial set of requirements. The foundation of the approach is a classification of requirements into artefacts W (domain properties), R (requirements) and S (specification). In addition, the approach uses designated phenomena as the vocabulary employed by the artefacts. The central idea is that adequacy of the system description must be justified, meaning that W ∧ S ⇒ R. The approach establishes a traceability, and the resulting system description may consist of formal and informal artefacts. We created tool support for this approach by integrating Rodin and ProR. We designed it with the goal to support the approach described in <ref name="req1ref"/>, and to ease the integration of natural language requirements and Event-B.
+
The figure below shows the "Auto/Post Tactic" preference page:
  
== Available Documentation ==
+
[[Image:AutoPostTactic_Preference_Capture1.png|650px|center]]
  
* ''A Method and Tool for Tracing Requirements into Specifications''.<ref name="req1ref"/> The paper has been submitted to Science of Computer Programming.
+
The buttons 1 and 2 are activating/deactivating the automatic use of respectively auto and post tactics.
* ''Requirements Traceability between Textual Requirements and Formal Models Using ProR''.<ref>http://www.stups.uni-duesseldorf.de/w/Special:Publication/LadenbergerJastram_iFMABZ2012</ref> The paper has been accepted for iFM'2012 & ABZ'2012.
+
One can also see on this picture the selected profile to be use as auto and post tactic.<br>
 +
'''Note that there is always a profile selected, and this profile can be changed whether the tactic are automatically launched or not, as there is alway a way to manually launch auto and post tactics.'''<br>
 +
On the preference appearing above, the ''Default Auto Tactic Profile'' is used to compose the automatic tactic, and the ''Default Post Tactic Profile'' is used to compose the post-tactic.
  
* A Tutorial for the Rodin/ProR integration<ref>http://wiki.event-b.org/index.php/ProR</ref> can be found on the Event-B wiki.
+
The figure below shows the "Auto/Post Tactic" Preference page with both auto-tactic and post-tactic to automatically run, and where the user selects the profile "MyFirstTacticProfile" to be used as auto-tactic profile.
* The User Guide<ref>http://wiki.eclipse.org/RMF/User_Guide</ref> is available on the Event-B wiki and contains an additional tutorials for ProR.
 
  
== Planning ==
+
[[Image:AutoPostTactic_Preference_Capture4.png|650px|center]]
  
There are still some limitations on the ProR/Rodin integration plugin, however. While all required data structures exist, the plugin would benefit from more sophisticated reporting. In particular, <ref name="req1ref"/> lists a number of properties of a correct system description. While the presence of these properties does not guarantee correctness, their absence indicates a problem. Reporting on the state of these properties would be valuable.  
+
=== Preferences for available profiles ===
 +
This section describes the "Profile" tab of the "Auto/Post Tactic" preference page.
  
Furthermore, the plugin does not support classifying phenomena. In a next step we will work on a concept for classifying and maintaining phenomena with ProR.
+
[[Image:AutoPostTactic_Preference_Capture2.png|650px|center]]
 +
The figure above shows the contents of the profile tab.  
 +
There are two visible lists : a list of profiles on the left the tactics or provers that compose these profiles (Profile Details). Here one can see the contents of the Defaut Auto Tactic Profile.
  
= Camille =
+
There are 4 buttons available to the user :
 +
*New : to create a new profile "from scratch", 
 +
*Edit : to edit an existing (editable) profile,
 +
*Remove : to remove a profile definitively,
 +
*Duplicate : to duplicate a selected profile for further slight modification,
  
== Overview ==
+
Default profiles can not be edited nor removed. That is why they are greyed on the image above.
The Camille plug-in provides a textual editor for Rodin.
 
Though such a text editor is prefered by many users, Camille currently has the drawback of not supporting extensibility.
 
It only supports the core Event-B language and plug-in-specific additions are simply ignored. Such extensions can not be edited through Camille.
 
Consequently, users have to switch back to Rodin's native Editor to edit plug-in-specific modelling extensions.
 
This has become a major issue during the last years, since many plug-ins have been developed in the meantime that are widely used by many users.
 
  
This issue is currently being adressed by Ingo Weigelt at the University of Duesseldorf.
+
On the picture below appears the dialog available to edit or create a profile. Here we create a profile named 'MyFirstTacticProfile'.
 +
[[Image:AutoPostTactic_Preference_Capture3.png|650px|center]]
  
== Motivations / Decisions ==
+
The list of the right represents the available and unselected tactics. The list of the left is the profile contents, and represents the selected tactics to be '''applied from the top to down'''.  
A new version of Camille will be implemented during the ADVANCE project to enable users to edit extended Event-B models solely through a text editor.  
+
The user can select some available tactic from the list of the right using the ">>" button or unselect some tactics from the list of the left using the "<<" button.
To plan the new version, the problem and a number of possible solutions have been analysed and related in a technical report<ref name="Architectures_for_an_Extensible_Text_Editor_for_Rodin">http://www.stups.uni-duesseldorf.de/mediawiki/images/0/0a/Pub-Weigelt2012.pdf</ref> from Ingo Weigelt.
+
The user can re-order contiguous selection of selected tactics using the "Up" and "Down" button.
The results of this work have been dicussed in the Rodin community and one of the proposed solution (a blockparser) has been selected to be implemented during the next months.
+
By clicking on "Finish" the profile will be saved and available for use in the auto and post tactics.
The dedicated solution promises to provide Camille extensibility with minimal extra workload required from plug-in developers while still being very flexible regarding future, yet unknown, requirements.
 
  
== Available Documentation ==
+
=== Project specific settings ===
 +
The user can select profiles locally to project.
 +
To do so, one has to select the "Auto/Post Tactic" property page available from '''right-click > Properties''' on a project, or by clicking the '''Configure project specific settings''' link on the "Auto/Post Tactic" preference page. This property page appears on the picture below, opened on the Auto/Post tactic tab.
 +
[[Image:AutoPostTactic_Preference_Capture5.png|600px|center]]
 +
Note that the enablement of automatic use of post and auto tactics is decided at a workspace level.
  
* ''Architectures for an Extensible Text Editor for Rodin''.<ref name="Architectures_for_an_Extensible_Text_Editor_for_Rodin"/> Bachelor thesis analysing the problem and discussing possible solutions.
+
The picture below shows the Profiles tab of the Auto/Post Tactic page for a project specific setting:  
* An earlier version of the thesis has been published as a technical report<ref>http://www.stups.uni-duesseldorf.de/w/Special:Publication/Weigelt2012></ref> that has been discussed on the Roding Developers Mailing List and the ADVANCE Progress Meeting in May 2012 in Paris.
 
  
== Planning ==
+
At the project level, there is a contextual menu available on right click from the list of defined profiles.
The new Camille version will be implemented at the University of Duesseldorf during 2012. The final version is expected in January or February 2013.
+
[[Image:AutoPostTactic_Preference_Capture6.png|600px|center]]
  
= References =
+
This contextual menu offers two options to the user :
<references/>
+
*'''Import Workspace Profiles''' to retrieve all the defined profiles in the workspace,
 +
*'''Export to Workspace Profiles''' to push a selected profile up in the list of workspace profiles.
  
[[Category:ADVANCE D3.2 Deliverable]]
+
[[Category:User documentation|The Proving Perspective]]
 +
[[Category:Rodin Platform|The Proving Perspective]]
 +
[[Category:User manual|The Proving Perspective]]

Revision as of 16:28, 25 July 2011

Overview

When proof obligations (POs) are not discharged automatically the user can attempt to discharge them interactively using the Proving Perspective. This page provides an overview of the Proving Perspective and its use. If the Proving Perspective is not visible as a tab on the top right-hand corner of the main interface, the user can switch to it via "Window -> Open Perspective".

The Proving Perspective consists of a number of views: the Proof Tree, the Goal, the Selected Hypotheses, the Proof Control, the Search Hypotheses, the Cache Hypotheses and the Proof Information. In the discussion that follows we look at each of these views individually. Below is a screenshot of the Proving Perspective:

ProvPers.png

Loading a Proof

To work on an un-discharged PO it is necessary to load the proof into the Proving Perspective. To do this switch to the Proving Perspective; select the project from the Event-B Explorer; select and expand the component (context or machine); and finally select (double-click) the proof obligation of interest. A number of views will be updated with details of the corresponding proof.

ExplorerView.png

Note that pressing Discharged.gif button on the top left hand side of the Event-B Explorer will remove all discharged proof obligations (PO's) from the view.

The Proof Tree

The proof tree view provides a graphical representation of each individual proof step, as seen in the following screenshot:

ProTree.png

Each node in the tree corresponds to a sequent. A line is right shifted when the corresponding node is a direct descendant of the node of the previous line. Each node is labelled with a comment which indicates which rule has been applied, or which prover discharged the proof. By selecting a node in the proof tree, the corresponding sequent is loaded: the hypotheses of the sequent are loaded to the Selected Hypotheses window, and the goal of the sequent is loaded to the Goal view.

Decoration

The leaves of the tree are decorated with one of three icons:

  • Discharged.gif means that this leaf is discharged,
  • Pending.gif means that this leaf is not discharged,
  • Reviewed.gif means that this leaf has been reviewed.

Internal nodes in the proof tree are decorated in reverse colours. Note that a "reviewed" leaf is one that is not discharged yet by the prover. Instead, it has been "seen" by the user who decided to postpone the proof. Marking nodes as "reviewed" is very convenient since the provers will ignore these leaves and focus on specific areas of interest. This allows interactive proof in a gradual fashion. In order to discharge a "reviewed" node, select it and prune the tree at that node: the node will become "brown" again (undischarged) and you can now try to discharge it.

Navigation within the Proof Tree

On top of the proof tree view, one can see three buttons:

  • the "G" buttons allows you to see the goal of the sequent corresponding to each node,
  • the "+" button allows you to fully expand the proof tree,
  • the "-" allows you to fully collapse the tree: only the root stays visible.

Manipulating the Proof Tree

Hiding

The little square (with a "+" or "-" inside) next to each node in the proof tree allows you to expand or collapse the subtree starting at that node.

Pruning

The proof tree can be pruned at a selected node; the subtree of the selected node is removed from the proof tree. The selected node becomes a leaf and is decorated with Pending.gif . The proof activity can then be resumed from this node. After selecting a node in the proof tree pruning can be performed in two ways:

  • by right-clicking and then selecting "Prune",
  • by clicking on the Pn prover.gif button in the proof control view.

Note that after pruning, the post-tactic is not applied to the new current sequent. The post-tactic should be applied manually, if required, by clicking on the post-tactic button in the Proof Control view. This is useful, in particular, when you want to redo a proof from the beginning. The proof tree can be pruned at its root node and then the proof can proceed again, with invocation of internal or external provers; or with interactive proof.

Before pruning a particular node, the node (and its subtree) can be copied to the clipboard. If the new proof strategy subsequently fails, the copied version can be pasted back into the pruned node (see the next section).

Copy/Paste

By selecting a node in the proof tree and then right-clicking with the mouse, you can copy the part of the proof tree starting at that sequent (the node and its subtree). Pasting the node and subtree back in is done in a similar manner, with a right mouse click on a proof node. This allows reuse of part of a proof tree in the same, or even in another, proof.

Goal and Selected Hypotheses

The nodes in the proof tree view correspond to sequents. A user will work with one selected node, and thus one sequent, at a time; attempting various strategies in an effort to show that the sequent goal is true. The "Goal" and "Selected Hypotheses" views provide information to the user about the currently selected sequent. Here is an example:

GoalHyp.png

A hypothesis can be removed from the list of selected hypotheses by selecting the check the box situated next to it (you can click on several boxes) and then by clicking on the Remove.gif button at the top of the selected hypotheses window:

GoalHypSelect.png

Here is the result:

GoalHypSelectRes.png

Note that the deselected hypotheses are not lost: you can find them again using the Search Hypotheses Sh prover.gif button in the Proof Control view. Other buttons are used as follows:


  • Select all prover.gif select all hypotheses.


  • Inv prover.gif invert the selection.


  • Falsify prover.gif next to the goal - proof by contradiction 1: The negation of the goal becomes a selected hypothesis and the goal becomes "".


  • Falsify prover.gif next to a selected hypothesis - proof by contradiction 2: The negation of the hypothesis becomes the goal and the negated goal becomes a selected hypothesis.


Applying Proof Rules

A user wishing to attempt an interactive proof has a number of proof rules available, and these may be either rewrite rules or inference rules. In the Goal and the Selected Hypotheses views various operators may appear in red coloured font. The red font indicates that some interactive proof rule(s) are applicable and may be applied as a step in the proof attempt. When the mouse hovers over such an operator a number of applicable rules may be displayed; the user may choose to apply one of the rules by clicking on it.

Other proof rules can be applied when green buttons appear in the Goal and Selected Hypotheses views. Examples are proof by contradiction Falsify prover.gif, that we have already encountered; and ConjI prover.gif for conjunction introduction in the goal.

ApplyRewRule.png

To instantiate a quantifier the user enters the desired expression in the box behind the quantifier and clicks on the quantifier:

InstQuantifier.png

Rewrite Rules

Rewrite rules are one-directional equalities (and equivalences) that can be used to simplify formulas (the goal or a single hypothesis). A rewrite rule is applied from left to right when its side condition holds; it can be applied either in the goal predicate, or in one of the selected hypotheses.

A rewrite rule is applied either automatically (A) or manually (M):

  • automatically, when post-tactics are run.
  • automatically, when auto-tactics are run.
  • manually, through an interactive command. These rules gather non equivalence laws, definition laws, distributivity laws and derived laws.

Automatic rewrite rules are equivalence simplification laws.

Each rule name indicates the rule's characteristics according to the following convention:

  • the law category: simplification law (SIMP), definition law (DEF), distributivity law (DISTRI), or else derived law (DERIV).
  • the root operator of the formula on the left-hand side of the rule, e.g. predicate AND, expression BUNION.
  • (optionally) the terminal elements on the left-hand side of the rule: special element (SPECIAL) such as the empty-set, type expression (TYPE), same element occurring more than once (MULTI), literal (LIT). A type expression is either a basic type (\intg, \Bool, any carrier set), or \pow(type expression), or type expression\cprodtype expression.
  • (optionally) some other description of a characteristic, e.g. left (L), right (R).

Rewrite rules having a symmetric operator on the left-hand side may also describe other rules. eg: the rule:

  \True  = \False  \;\;\defi\;\;  \bfalse

should also produce the rule:

  \False  = \True  \;\;\defi\;\;  \bfalse

For associative operators in connection with distributive laws as in:

 P   \land (Q~ {\color{red}{\lor}} \ldots \lor R)

it has been decided to highlight the first associative/commutative operator (the {\color{red}{\lor}} ). A menu is presented when hovering the mouse over the operator: the first menu option distributes all associative/commutative operators, the second option distributes only the first associative/commutative operator. In order to simplify the explanation we write associative/commutative operators with two parameters only. However, we must emphasise here, that generally we may have a sequence of more than two parameters. So, we write  Q \lor R instead of  Q \lor \ldots \lor R . Rules are sorted according to their purpose.

Rules marked with a star in the first column are implemented in the current prover. Rules without a star are planned for implementation.

Rewrite rules are split into:

They are also available in a single large page All Rewrite Rules.

Inference Rules

Inference rules (see Proof Rules) are applied either automatically (A) or manually (M).

Inference rules applied automatically are applied at the end of each proof step. They have the following possible effects:

  • they discharge the goal,
  • they simplify the goal and add a selected hypothesis,
  • they simplify the goal by decomposing it into several simpler goals,
  • they simplify a selected hypothesis,
  • they simplify a selected hypothesis by decomposing it into several simpler selected hypotheses.

Inference rules applied manually are used to perform an interactive proof. They can be invoked by clicking on the red highlighted operators in the goal or the hypotheses. A menu is presented when there are several options.

See Inference Rules list.

The Proof Control View

The Proof Control view contains the buttons which you can use to perform an interactive proof.

PControl.png

The Proof Control view offers a number of buttons whose effects we briefly describe next; moving from left to right on the toolbar:

  • (nPP) invokes the new predicate prover, a drop-down list indicates alternative strategies.
  • (R) indicates that a node has been reviewed: in an attempt by the user to carry out proofs in a stepwise fashion, they might decide to postpone the task of discharging some proofs until a later stage. To do this the proofs can be marked as reviewed by choosing the proof node and clicking on this button. This indicates that by visually checking the proof the user is convinced that they can discharge it later, but they do not want to do it right now.
  • (p0) the PP and ML provers can be invoked from the drop-down list using different forces.
  • (dc) do proof by cases: the proof is split into two branches. In the first branch:- the predicate supplied by the user is added to the Selected Hypotheses, and the user attempts to discharge this branch. In the second branch :- the predicate supplied by the user is negated and added to the Selected Hypotheses; the user then attempts to discharge this branch.
  • (ah) add a new lemma: the predicate in the editing area should be proved by the user. It is then added as a new selected hypothesis.
  • (ae) abstract expression: the expression in the editing area is given a fresh name.
  • the robot: invokes the auto-prover which attempts to discharge the goal. The auto-prover is applied automatically on all proof obligations after a "save" without any intervention of the user. Using this button, you can invoke the auto-prover within an interactive proof.
  • the post-tactic is executed ,
  • lasoo: load into the Selected Hypotheses window those hidden hypotheses that contain identifiers in common with the goal, and with the selected hypotheses.
  • backtrack form the current node (i.e., prune its parent),
  • scissors: prune the proof tree from the node selected in the proof tree,
  • Search Hypotheses: find hypotheses containing the character string in the editing area, and display in the Search Hypothesis view.
  • Cache Hypotheses: press this to display the "Cache Hypotheses" view. This view displays all hypotheses that are related to the current goal.
  • load the previous undischarged proof obligation,
  • load the next undischarged proof obligation,
  • (i) show information corresponding to the current proof obligation in the corresponding window. This information correspond to the elements that directly took part in the proof obligation generation (events, invariant, etc.),
  • goto the next pending node of the current proof tree,
  • load the next reviewed node of the current proof tree.
  • Disable/Enable Post-tactics: allows the user to choose whether post-tactics run after each interactive proof step.

The Smiley

The smiley can be one of three different colors: (1) red, indicates that the proof tree contains one or more undischarged sequents, (2) blue, indicates that all undischarged sequents of the proof tree have been reviewed, (3) green, indicates that all sequents of the proof tree are discharged.

The Editing Area

The editing area allows the user to supply parameters for proof commands. For example, when the user attempts to add a new hypothesis (by clicking on the lemma ah button), the new hypothesis should have been written by the user in the editing area.

ML/PP and Hypotheses

ML

ML (mono-lemma) prover appears in the drop-down list under the button (pp) as M0, M1, M2, M3, ML. The different configuration (e.g., M0) refer to the proof force of the ML prover. All hypotheses are passed to ML.

PP

PP (predicate prover) appears in the drop-down list under the button (pp) as P0, P1, PP.

  • P0 uses all selected hypotheses (the ones in Selected Hypotheses window).
  • P1 employs a lasoo operation to the selected hypotheses and the goal, and uses the resulting hypotheses.
  • PP uses all hypotheses.

The Search Hypotheses View

By typing a string in the Proof Control window and pressing the Search Hypotheses button a window is provided which contains the hypotheses having a character string in common with the one entered by the user in the editing area. For example, if we search for hypotheses involving the character string "cr", then after pressing the Search Hypothesis button on the proof control window, we obtain the following:

Um-0102.png

This view also integrates a "quick search" area (A), that allows us to search quickly hypotheses involving short character strings such as "cr". A search hypothesis button (B) that behaves the same as the button of the proving window, a refresh button (C) that updates the window manually for more control, and a drop down menu (D) to set the preferences of the view up.

By pressing return key or the button (B) (once a short string has been given in the input area (A)), hypotheses can be searched quickly as if we used the Proof Control as described before.

The drop down menu (D) is accessible to set some preferences over the searched hypotheses :

SearchHyp view menu.png

If we change preferences for the search, we might need to "update" manually the view with the button (C). By selecting "Consider hidden hypotheses in search" option, we can review all hypotheses that have been unselected in the selected hypotheses window(more info about selected/hidden hypotheses...).

SearchHyp.png

To move any of these hypotheses to the Selected Hypotheses window, select those required (using the check boxes) and press the Add.gif button. Adding these hypotheses to the selected hypotheses means that they will be visible to the prover. They can then be used during the next interactive proof phase.

To remove hypotheses from the Search Hypotheses window use the Remove.gif button. This button also appears above the selected hypotheses, and allows the user to remove any hypothesis from the Selected Hypotheses window.

The other button, situated to the left each hypotheses, is the Falsify prover.gif button. clicking on this will attempt a proof by contradiction. The effect is the same as if the hypothesis were in the Selected Hypotheses.

The Cache Hypotheses Window

This window allows the user to keep track of recently manipulated (e.g., used, removed, selected) hypotheses for any PO. For example, when the user applies a rewrite to an hypothesis, a new hypothesis (after the rewriting) is selected, and the original hypothesis is deselected and put in the Cache Hypotheses window.

Similar operations (to that of the Selected Hypotheses and Search Hypotheses windows) such as removing, selecting and proof by contradiction (ct) are also available for the cached hypotheses. Interactive proof steps (e.g., rewriting) can also be carried out from the Cache Hypotheses window as well as the Search Hypotheses window.

Proof Information View

This view displays information so that the user can relate a proof obligation to the model. For example, typical information for an event invariant preservation PO includes the event; as well as the invariant in question. In the following example, the hyperlinks 'CreateToken' and 'inv2' can be used to navigate to the containing machine.

PInfo.png

Rule Details View

This view displays the information relative to a given proof tree node, on which a rule was applied.
A command is available when right-clicking on a proof tree node, in order to reveal the Rule Details View (See picture below).

ShowRuleDetailsView.png

By default, this view is a fast view. A button (identified by the view's icon) is then available at the bottom left of the workbench, to show up this view.

Here is an overview of the Rule details view :

RuleDetailsView.png

A quick view on the applied rule contents is provided. On the picture above, we display the contents of the rule named "∀ hyp mp" where an input has been used to instantiate an hypothesis.
One can see quickly which was the input used by the instanciation (following instantiated with), and which was the hypothesis considered by this rule (this is given by the hypothesis of Input Sequent).
Furthermore, it is possible to view the antecedents created by this rule in details (i.e. child proof tree nodes) and the actions performed on hypotheses : selection, deselection, etc.

Auto-tactic and Post-tactic

The auto-tactic applies a combination (i.e. ordered list) of rewrite, inference tactics and external provers automatically to newly generated proof obligations. However, they can also be invoked by the user by clicking on the Auto prover.png button in the Proof Control view. Note that the automatic application of the auto-prover can be quickly toggled with the Prove automatically menu item available from the Project menu. See the picture below.

AutoPostTactics Preference Capture7.png

The post-tactic is also a combination of rewrite, inference tactics and external provers, and is applied automatically after each interactive proof step. However, it can also be invoked manually by clicking on the Broom prover.gif button in the Proof Control view.

Note that the post-tactic can be disabled quickly by clicking on the little arrow (marked with an A on the figure below) of the Proof Control view (right upper corner) and then on "Disable post-tactic" (B):

Disable xp prover.png

Principles

The ordered list of rewrite, inference tactics and external provers that should be applied is called a profile. There are two default profiles, one for the auto-tactic and one for the post-tactic. These default profiles are immutable in time, but can be duplicated for further modification by the user. Indeed, the user can edit a profile and select it to run as automatic or post tactic. The idea is to have a set of available tactic profiles to be used as needed. Moreover, these edited profiles are shipped with projects if defined at this scope, or can be imported or exported if defined at a workspace level, which is very useful to share them.

There are two ways to run the automatic or post tactics:

  • the manual way consists into clicking on the Auto prover.png button, or the Broom prover.gif button in the Proof Control view, to respectively launch the auto-tactic (with the selected auto-tactic profile) and the post-tactic (with the selected post-tactic profile).
  • the automatical way if such preference is activated. (Auto-tactic after each proof step, and post-tactic at each step and rebuild) The mandatory condition for post-tactics or auto-tactics to automatically run is that they should be activated from their preference or property.

The user can separately define tactic profiles and assign them to post and auto tactics. Therefore, there are two tabs in the "Auto/Post Tactic" preference page to address these choices. These tabs will be descibed in the two next sections.

Preferences for the selected auto and post tactic profile

This section describes the "Auto/Post Tactic" tab of the "Auto/Post Tactic" preference page.

There are two scopes to set up preferences for the auto and post tactics : at workspace level, and at project level. Note that if the automatic application of tactics (auto or post) is decided only at workspace level, and this choice is held at project level.

To access these preferences, one as to go open the "Auto/Post Tactic" preference page that can be found after "Window > Preference > Sequent Prover".

The figure below shows the "Auto/Post Tactic" preference page:

AutoPostTactic Preference Capture1.png

The buttons 1 and 2 are activating/deactivating the automatic use of respectively auto and post tactics. One can also see on this picture the selected profile to be use as auto and post tactic.
Note that there is always a profile selected, and this profile can be changed whether the tactic are automatically launched or not, as there is alway a way to manually launch auto and post tactics.
On the preference appearing above, the Default Auto Tactic Profile is used to compose the automatic tactic, and the Default Post Tactic Profile is used to compose the post-tactic.

The figure below shows the "Auto/Post Tactic" Preference page with both auto-tactic and post-tactic to automatically run, and where the user selects the profile "MyFirstTacticProfile" to be used as auto-tactic profile.

AutoPostTactic Preference Capture4.png

Preferences for available profiles

This section describes the "Profile" tab of the "Auto/Post Tactic" preference page.

AutoPostTactic Preference Capture2.png

The figure above shows the contents of the profile tab. There are two visible lists : a list of profiles on the left the tactics or provers that compose these profiles (Profile Details). Here one can see the contents of the Defaut Auto Tactic Profile.

There are 4 buttons available to the user :

  • New : to create a new profile "from scratch",
  • Edit : to edit an existing (editable) profile,
  • Remove : to remove a profile definitively,
  • Duplicate : to duplicate a selected profile for further slight modification,

Default profiles can not be edited nor removed. That is why they are greyed on the image above.

On the picture below appears the dialog available to edit or create a profile. Here we create a profile named 'MyFirstTacticProfile'.

AutoPostTactic Preference Capture3.png

The list of the right represents the available and unselected tactics. The list of the left is the profile contents, and represents the selected tactics to be applied from the top to down. The user can select some available tactic from the list of the right using the ">>" button or unselect some tactics from the list of the left using the "<<" button. The user can re-order contiguous selection of selected tactics using the "Up" and "Down" button. By clicking on "Finish" the profile will be saved and available for use in the auto and post tactics.

Project specific settings

The user can select profiles locally to project. To do so, one has to select the "Auto/Post Tactic" property page available from right-click > Properties on a project, or by clicking the Configure project specific settings link on the "Auto/Post Tactic" preference page. This property page appears on the picture below, opened on the Auto/Post tactic tab.

AutoPostTactic Preference Capture5.png

Note that the enablement of automatic use of post and auto tactics is decided at a workspace level.

The picture below shows the Profiles tab of the Auto/Post Tactic page for a project specific setting:

At the project level, there is a contextual menu available on right click from the list of defined profiles.

AutoPostTactic Preference Capture6.png

This contextual menu offers two options to the user :

  • Import Workspace Profiles to retrieve all the defined profiles in the workspace,
  • Export to Workspace Profiles to push a selected profile up in the list of workspace profiles.