Difference between pages "Rodin Proof Tactics" and "Single View Design"

From Event-B
(Difference between pages)
Jump to navigationJump to search
imported>Benoit
 
imported>Maria
 
Line 1: Line 1:
This page contains descriptions of the available proof tactics within the RODIN Platform.
+
==Purpose==
 +
The purpose of the Single View Design is to present everything in a single view in Rodin.
  
For each tactic, the descriptions is as follows:
+
==Specification==
 +
The Single View Design uses the [http://wiki.eclipse.org/index.php/Common_Navigator_Framework Common Navigator Framework] that is provided by Eclipse.
  
* '''Description''': A high-level description of the tactic. This will be the description appeared in the RODIN Platform preferences.
+
===The Navigator===
 +
The navigator presents all projects and their contents. The users can choose between to ways how the machines and contexts will be presented:
 +
*A simple structure where all machines and contexts are presented on the same level
 +
*A complex structure where the machines and contexts are presented as a tree. Thus dependencies between machines and contexts (like ''refines'' or ''sees'') are made visible.
  
* '''Additional details''': Details explanation of the tactic, when it is applicable, give the associated proof rule. See [[Inference Rules|Inference rules]] list and [[All Rewrite Rules | Rewriting rules]] list.
 
  
* '''ID''': An unique ID associated with the tactic.
+
==User guide==
 +
===Customizing the Navigator===
 +
Click on the little triangle in the upper right corner of the navigator view and select ''Customize View''. This opens a dialog that allows you to choose ''Filters'' and ''Content''.
  
* '''Auto-tactic''': ''No'': the tactic cannot be added as an auto-tactic. ''Yes'': the tactic can be added as an auto-tactic. ''Default'': the tactic is a default auto-tactic.
+
[[Image:Customize.jpg]]
  
* '''[[The Proving Perspective (Rodin User Manual)#The Automatic Post-tactic|Post-tactic]]''': ''No'': the tactic cannot be added as a post-tactic. ''Yes'': the tactic can be added as a post-tactic. ''Default'': the tactic is a default post-tactic.
+
====Content====
 +
Here you can choose what content should be shown in the navigator.
 +
*'''Resources''': All projects, files and folder (keep this one checked!).
 +
*'''Working Sets''': Allows you to see the working sets as top level elements. If you're not familiar with working sets, consult [http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.platform.doc.user/concepts/cworkset.htm eclipse help].
 +
*'''Simple Context Structure''': Lists all contexts of a project.
 +
*'''Complex Context Structure''': Lists all contexts of a project. Contexts that extend another context are attached to it as children in the tree. Contexts that are seen by a machine are attached to the machine as children. Choose either the complex or the simple structure. It is not recommended to have both active at the same time.
 +
*'''Simple Machines Structure''': Lists all machines of a project.
 +
*'''Complex Context Structure''': Lists all machines of a project. Machines that refine another machine are attached to it as children in the tree. Choose either the complex or the simple structure. It is not recommended to have both active at the same time.
 +
*'''Carrier Sets'''
 +
*'''Constants'''
 +
*'''Variables'''
 +
*'''Axioms'''
 +
*'''Invariants'''
 +
*'''Theorems'''
 +
*'''Events'''
 +
*'''Proof Obligations''': All proof obligations of a machine, context, axiom, invariant, theorem or event.
  
* '''Preference display''': (Optional) If the tactic can be used as an auto-tactic or a post-tactic, information on how the tactic is displayed in the auto-tactic preference or the [[The Proving Perspective (Rodin User Manual)#Preferences for the Post-tactic|post-tactic preference]].
+
Here's an example of what the same projects looks like once using the complex machine and context structure (left) and once using the simple version (right).
  
* '''Interactive''': ''No'': the tactic cannot be invoked interactively from the [[The Proving Perspective (Rodin User Manual)|proving interface]]. ''Global'': The tactic can be invoked interactively from the [[The Proving Perspective (Rodin User Manual)#The Proof Control Window|Proof Control View]]. ''Goal'': The tactic can be invoked from the [[The Proving Perspective (Rodin User Manual)#Goal and Selected Hypotheses|Goal view]]. ''Hypothesis'': The tactic can be invoked from the [[The Proving Perspective (Rodin User Manual)#Goal and Selected Hypotheses| Hypothesis view]].  If the tactic can be invoked interactively (i.e. either ''Global'', ''Goal'' or ''Hypothesis''), more information about how this could be done will be given. Note that since the '''Post-tactics''' can be launched manually, any tactics that can be included in the post-tactic in principle can be invoked interactively via the post-tactic. Here ''No'' only means that there is no separate invocation for this specific tactic.
+
[[Image:Complex.jpg]][[Image:Simple.jpg]]
  
* '''Proving interface display''': Example(s) on how applications of this tactic can be seen from the [[The Proving Perspective (Rodin User Manual)|proving interface]] of the RODIN Platform.
+
====Filters====
 +
The filters let you choose what to hide in the navigator.
 +
*'''File extensions''': There are various filters to hide certain types of files.
 +
*'''All files and folders''': Hides all files and subfolders.
 +
*'''Non Rodin Projects''': Hides all non Rodin projects. Also hides closed Rodin Projects.
 +
*'''Closed Projects''': Hides all closed projects.
  
== True Goal ==
+
There are some additional filters that can be found on top of the navigator:
* '''Description''': Discharges any sequent whose goal is '⊤' (logical true).
 
  
* '''Additional details''': {{InfRule|TRUE_GOAL|<math>\frac{}{\mathsf{H} \;\;\vdash \;\; \btrue}</math>}}
+
[[Image:PoFilters.JPG]]
  
* '''ID''': org.eventb.core.seqprover.trueGoalTac
+
Enter a text into the field and only proof obligations containing the string will be shown. If you push the green button, all discharged proof obligations will be hidden.
  
* '''Auto-tactic''': ''Default''
 
  
* '''Post-tactic''': ''Default''
+
==Developer guide==
 +
===Extending Single View Design===
 +
Single View Design uses the [http://wiki.eclipse.org/index.php/Common_Navigator_Framework Common Navigator Framework] and [http://help.eclipse.org/stable/index.jsp?topic=/org.eclipse.platform.doc.isv/guide/forms_master_details.htm the Master/Details pattern]. The part on the left (the navigator) is the master part. You can add custom filters, content providers and action providers in a plug-in of your own. Add the extension <code>org.eclipse.ui.navigator.viewer</code>. There you can add viewerContentBindings and viewerActionBindings with viewerId <code>fr.systerel.explorer.navigator.view</code>. This binds your custom content, actions and filters to the navigator. The part on the right is the details part. You can add tabs of your own by extending <code>fr.systerel.explorer.masterDetails</code>.
  
* '''Preference display''': True Goal (Discharge)
+
In the picture you can see what types the nodes in the navigator have.
  
* '''Interactive''': ''No''
+
[[Image:Tree.jpg]]
  
* '''Proving interface display''': ⊤ goal
+
====Adding a content provider to the navigator====
 +
To add a custom content provider you have to use the <code>org.eclipse.ui.navigator.navigatorContent</code> extension. There you add a new navigatorContent. Example: You want to add a new child under the IMachineFile nodes. Define a navigatorContent and add triggerPoints. There you add a new <code>instanceof</code> with value <code>org.eventb.core.IMachineFile</code>. The priority of the navigatorContent decides in what order the content is shown with respect to other content providers. (For example the content provider for the variables has a higher priority than the one for invariants, that's why the variables appear before the invariants in the tree.) You need to provide a contentProvider and a labelProvider class. For more information read the extension point description of [http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/extension-points/org_eclipse_ui_navigator_navigatorContent.html navigatorContent]. Finally include your navigatorContent in your viewerContentBindings.
  
[[Image:TrueGoalExp1.png]]
+
<code>
 +
  <extension
 +
        point="org.eclipse.ui.navigator.navigatorContent">
 +
      <navigatorContent
 +
            contentProvider="example.ContentProvider"
 +
            id="example.navigatorContent"
 +
            labelProvider="example.LabelProvider"
 +
            name="Example Content">
 +
        <triggerPoints>
 +
            <instanceof
 +
                  value="org.eventb.core.IMachineFile">
 +
            </instanceof>
 +
        </triggerPoints>
 +
      </navigatorContent>
 +
  </extension>
 +
</code>
  
== False Hypothesis ==
+
<code>
* '''Description''': Discharges any sequent containing a '⊥' hypothesis
+
  <extension
 +
        point="org.eclipse.ui.navigator.viewer">
 +
      <viewerContentBinding
 +
            viewerId="fr.systerel.explorer.navigator.view">
 +
        <includes>
 +
            <contentExtension
 +
                  pattern="example.navigatorContent">
 +
            </contentExtension>
 +
        </includes>
 +
      </viewerContentBinding>
 +
  </extension>
 +
</code>
  
* '''Additional details''': {{InfRule|FALSE_HYP|<math>\frac{}{\mathsf{H}, \bfalse \;\;\vdash \;\; \mathit{P}}</math>}}
 
  
* '''ID''': org.eventb.core.seqprover.falseHypTac
+
====Adding a filter to the navigator====
 +
To add a custom filter you have to use the <code>org.eclipse.ui.navigator.navigatorContent</code> extension. There you add a new commonFilter. You can either provide an implementation for <code>ViewerFilter</code> or use xml filterExpressions. For more information read the extension point description of [http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/extension-points/org_eclipse_ui_navigator_navigatorContent.html navigatorContent]. Finally include your commonFilter in your viewerContentBindings.
  
* '''Auto-tactic''': ''Default''
+
====Adding an action provider to the navigator====
 +
To add a custom filter you use again the <code>org.eclipse.ui.navigator.navigatorContent</code> extension. There you add a new actionProvider. You have to provide an implementation for <code>org.eclipse.ui.navigator.CommonActionProvider</code>. To decide on what nodes in the tree your action provider should be invoked, use the enablement expression. Finally include your commonFilter in your viewerActionBindings.
  
* '''Post-tactic''': ''Default''
+
====Adding a tab with custom content to the details part====
 +
To add a custom tab use  the <code>fr.systerel.explorer.masterDetails</code> extension. Add a new detailsTab and provide a class that implements <code>INavigatorDetailsTab</code>.
  
* '''Preference display''': False Hypothesis (Discharge)
+
[[Category:Work in progress]]
 
 
* '''Interactive''': ''No''
 
 
 
* '''Proving interface display''': ⊥ hyp
 
 
 
[[Image: FalseHypExp1.png]]
 
 
 
== Goal in Hypotheses ==
 
* '''Description''': Discharges any sequent whose goal is contained in its hypotheses
 
 
 
* '''Additional details''': {{InfRule|HYP|<math>\frac{}{\mathsf{H}, \mathit{P} \;\;\vdash \;\; \mathit{P}}</math>}}
 
 
 
* '''ID''': org.eventb.core.seqprover.goalInHypTac
 
 
 
* '''Auto-tactic''': ''Default''
 
 
 
* '''Post-tactic''': ''Default''
 
 
 
* '''Preference display''': Goal in Hypotheses (Discharge)
 
 
 
* '''Interactive''': ''No''
 
 
 
* '''Proving interface display''': hyp
 
 
 
[[Image: GoalInHypExp1.png]]
 
 
 
== Goal Disjunct in Hypothesis ==
 
* '''Description''': Discharges any sequent whose goal is a disjunction and one of whose disjuncts is present in the hypotheses.
 
 
 
* '''Additional details''': {{InfRule|HYP_OR|<math>\frac{}{\mathsf{H}, \mathit{Q} \;\;\vdash \;\; \mathit{P} \lor \ldots \lor \mathit{Q} \lor \ldots \lor \mathit{R}}</math>}}
 
 
 
* '''ID''': org.eventb.core.seqprover.goalDisjInHypTac
 
 
 
* '''Auto-tactic''': ''No''
 
 
 
* '''Post-tactic''': ''Default''
 
 
 
* '''Preference display''': Goal Disjunct in Hypotheses (Discharge)
 
 
 
* '''Interactive''': ''No''
 
 
 
* '''Proving interface display''': ∨ goal in hyp
 
 
 
[[Image: GoalDisjInHypExp1.png]]
 
 
 
== Functional Goal ==
 
* '''Description''': Tries to discharge a sequent whose goal states that an expression is a function (i.e. f ∈ T1 ⇸ T2, where T1 and T2 are type expressions).
 
 
 
* '''Additional details''': The sequent is discharged if there is a hypothesis specifying that f is a function of any kind (i.e. partial function, total function, partial injection, total injection, partial surjection,  total surjection, bijection). More information about type expressions in Event-B is in the [[FAQ#What are type expressions in Event-B?|FAQ]] page. The corresponding proof rule is as follows.
 
 
 
{{InfRule|FUN_GOAL|<math>\frac{}{\mathsf{H}, f \in E \; op \; F \;\;\vdash \;\; f \in T_1 \pfun T_2}</math>}}
 
 
 
where <math>op</math> is either <math>\pfun, \tfun, \pinj, \tinj, \psur, \tsur, \tbij </math>.
 
 
 
* '''ID''': org.eventb.core.seqprover.funGoalTac
 
 
 
* '''Auto-tactic''': ''Default''
 
 
 
* '''Post-tactic''': ''Default''
 
 
 
* '''Preference display''': Functional Goal (Discharge)
 
 
 
* '''Interactive''': ''No''
 
 
 
* '''Proving interface display''': functional goal
 
 
 
[[Image:FunctionalGoalExp1.png]]
 
 
 
== Simplification Rewriter ==
 
* '''Description''': Tries to simplify all predicates in a sequent using pre-defined simplification rewriting rules.
 
 
 
* '''Additional details''': The list of rewriting rules are in the following page [[All Rewrite Rules | rewriting rules]], which are marked as ''Automatic''.
 
 
 
The corresponding proof rule is as follows.
 
 
 
{{InfRule|SIM|<math>\frac{\mathsf{H}, \mathsf{H^\prime} \;\;\vdash \;\; \mathit{P^\prime}}{\mathsf{H} \;\;\vdash \;\; \mathit{P}}</math>}}
 
 
 
where <math>\mathsf{H^\prime}</math> are the set of new hypotheses obtained by rewriting some of the original hypothesis in <math>\mathsf{H}</math>, and <math>\mathit{P}</math> is the rewriting of the original goal <math>\mathit{P}</math>.
 
 
 
* '''ID''': org.eventb.core.seqprover.autoRewriteTac
 
 
 
* '''Auto-tactic''': ''Default''
 
 
 
* '''Post-tactic''': ''Default''
 
 
 
* '''Preference display''': Simplification Rewriter (Simplify)
 
 
 
* '''Interactive''': ''No''
 
 
 
* '''Proving interface display''': simplification rewrites
 
 
 
The example below shows the screen-shots of the step before the application of the tactic and the step just after the application of the tactic.  There are 3 rewritings have been done as follows.
 
 
 
<math>
 
\begin{array}{rcl}
 
a + 0  & \Longrightarrow & a \\
 
a = a & \Longrightarrow & \btrue \\
 
c * 1 & \Longrightarrow & c \\
 
\end{array}
 
</math>
 
 
 
Note that <math>\btrue</math> hypothesis is always ''dropped'' in the RODIN Platform.
 
 
 
Before [[Image:SimplifcationRewritesExp1.png]]
 
 
 
After [[Image:SimplifcationRewritesExp2.png]]
 
 
 
== Type Rewriter ==
 
* '''Description''': Simplifies predicates containing type expressions such as E ∈ T to ⊤ and T = ∅ to ⊥.
 
 
 
* '''Additional details''': More information about type expressions in Event-B is in the [[FAQ#What are type expressions in Event-B?|FAQ]] page.
 
The rewriting rules are SIMP_TYPE_EQUAL_EMPTY and SIMP_TYPE_IN  in the [[All Rewrite Rules | rewriting rules]] page.
 
 
 
The corresponding proof rule is as follows.
 
 
 
{{InfRule|SIM|<math>\frac{\mathsf{H}, \mathsf{H^\prime} \;\;\vdash \;\; \mathit{P^\prime}}{\mathsf{H} \;\;\vdash \;\; \mathit{P}}</math>}}
 
 
 
where <math>\mathsf{H^\prime}</math> are the set of new hypotheses obtained by rewriting some of the original hypothesis in <math>\mathsf{H}</math>, and <math>\mathit{P}</math> is the rewriting of the original goal <math>\mathit{P}</math>.
 
 
 
* '''ID''': org.eventb.core.seqprover.typeRewriteTac
 
 
 
* '''Auto-tactic''': ''Default''
 
 
 
* '''Post-tactic''': ''Default''
 
 
 
* '''Preference display''': Type Rewriter (Simplify)
 
 
 
* '''Interactive''': ''No''
 
 
 
* '''Proving interface display''': type rewrites
 
 
 
The example below shows the screen-shots of the step before the application of the tactic and the step just after the application of the tactic.
 
 
 
Before [[Image: TypeRewritesExp1.png]]
 
 
 
After [[Image: TypeRewritesExp2.png]]
 
 
 
== Implication Goal ==
 
* '''Description''': Simplifies any sequent with an implicative goal by adding the left hand side of the implication to the hypotheses and making its right hand side the new goal.
 
 
 
* '''Additional details''':
 
 
 
{{InfRule|IMP_R|<math>\frac{\mathsf{H}, \mathit{P} \;\;\vdash \;\; \mathit{Q}}{\mathsf{H} \;\;\vdash \;\; \mathit{P} \limp \mathit{Q}}</math>}}
 
 
 
* '''ID''': org.eventb.core.seqprover.impGoalTac
 
 
 
* '''Auto-tactic''': ''No''
 
 
 
* '''Post-tactic''': ''Default''
 
 
 
* '''Preference display''': Implicative Goal (Simplify)
 
 
 
* '''Interactive''': ''Goal''. The <math>\limp</math> symbol in the implicative goal is <font color=red>''redden''</font>. When the mouse hovers the red symbol, the label of the tactic in the context menu is ''Deduction''.
 
 
 
[[Image: ImpGoalInteractive1.png]]
 
 
 
* '''Proving interface display''': ⇒ goal
 
 
 
The example below shows the screen-shots of the step before the application of the tactic and the step just after the application of the tactic.
 
 
 
Before [[Image: ImpGoalExp1.png]]
 
 
 
After [[Image: ImpGoalExp2.png]]
 
 
 
== For-all Goal ==
 
* '''Description''': Simplifies any sequent with a universally quantified goal by freeing all its bound variables.
 
 
 
* '''Additional details''': The bound variables will be renaming accordingly to avoid name collision.
 
 
 
{{InfRule|ALL_R|<math>\frac{\mathsf{H} \;\;\vdash \;\; \mathit{P(x)}}{\mathsf{H} \;\;\vdash \;\; \forall x \qdot \mathit{P(x)}}</math>}}
 
 
 
where <math>x</math> does not appear freely in <math>\mathsf{H}</math>.
 
 
 
* '''ID''': org.eventb.core.seqprover.forallGoalTac
 
 
 
* '''Auto-tactic''': ''No''
 
 
 
* '''Post-tactic''': ''Yes''
 
 
 
* '''Preference display''': For-all Goal (Simplify)
 
 
 
* '''Interactive''': ''Goal''. The  symbol <math>\forall</math> in the universal quantified goal is <font color=red>''redden''</font>. When the mouse hovers the red symbol, the label of the tactic in the context menu is ''Forall instantiation''.
 
 
 
[[Image: ForallGoalInteractive1.png]]
 
 
 
* '''Proving interface display''': ∀ goal (frees ''list-of-bounded-identifiers'')
 
 
 
The first example below shows the screen-shots of the step before the application of the tactic and the step just after the application of the tactic.  There is no renaming of the bound variable.
 
 
 
Before [[Image: ForallGoalExp1.png]]
 
 
 
After [[Image: ForallGoalExp2.png]]
 
 
 
The second example below shows the screen-shots of the step before the application of the tactic and the step just after the application of the tactic. The bound variable <math>x</math> is not renamed, but the bound variable <math>z</math> is renamed to <math>z0</math> to avoid capture of the existing variable <math>z</math>.
 
 
 
Before [[Image: ForallGoalExp3.png]]
 
 
 
After [[Image: ForallGoalExp4.png]]
 
 
 
== Exists Hypothesis ==
 
* '''Description''': In automatic mode (as an auto-tactic or post-tactic), this tactic simplifies any sequent containing existentially quantified hypotheses by freeing their bound variables. In interactive mode, only the selected hypothesis is simplified by freeing its bound variables.
 
 
 
* '''Additional details''': The bound variables will be renaming if necessary to avoid name collision. After freeing their bound variables, if the resulting predicate is a conjunction then it is split into several hypotheses.
 
 
 
{{InfRule|XST_L|<math>\frac{\mathsf{H}, \mathit{P(x)}, \ldots, \mathit{Q(x)} \;\;\vdash \;\; \mathit{R}}{\mathsf{H}, \exists x \qdot \mathit{P(x)} \land \ldots \land \mathit{Q(x)} \;\;\vdash \;\; \mathit{R}}</math>}}
 
 
 
where <math>x</math> does not appear freely in <math>\mathsf{H}</math> and <math>\mathit{R}</math>.
 
 
 
* '''ID''': org.eventb.core.seqprover.existHypTac
 
 
 
* '''Auto-tactic''': ''No''
 
 
 
* '''Post-tactic''': ''Default''
 
 
 
* '''Preference display''': Exists Hypotheses (Simplify)
 
 
 
* '''Interactive''': ''Hypothesis''. The symbol <math>\exists</math> in the existential quantified hypothesis is redden. When the mouse hovers the red symbol, the label of the tactic in the context menu is ''Free existential variables''.
 
 
 
[[Image: ExistsHypInteractive1.png]]
 
 
 
* '''Proving interface display''':
 
 
 
The first example below shows the screen-shots of the step before the application of the tactic and the step just after the application of the tactic. There is no renaming of the bound variable.
 
 
 
Before [[Image: ExistHypExp1.png]]
 
 
 
After [[Image: ExistHypExp2.png]]
 
 
 
The second example below shows the screen-shots of the step before the application of the tactic and the step just after the application of the tactic. The bound variable x is not renamed, but the bound variable z is renamed to z0 to avoid capture of the existing variable z.
 
 
 
Before [[Image: ExistHypExp3.png]]
 
 
 
After [[Image: ExistHypExp4.png]]
 
 
 
== Find Contradictory Hypothesis ==
 
* '''Description''': Discharges a sequent by finding contradictory hypotheses, i.e. <math>P</math> and <math>\neg P </math>.
 
 
 
* '''Additional details''': This tactic tries to find a contradiction using each selected hypothesis that is a negation.
 
 
 
{{InfRule|CNTR|<math>\frac{}{\mathsf{H}, \mathit{P}, \neg\mathit{P} \;\;\vdash \;\; \mathit{Q}}</math>}}
 
 
 
* '''ID''': org.eventb.core.seqprover.findContrHypsTac
 
 
 
* '''Auto-tactic''': ''Default''
 
 
 
* '''Post-tactic''': ''Default''
 
 
 
* '''Preference display''': Find Contradictory Hypotheses (Discharge)
 
 
 
* '''Interactive''': ''No''
 
 
 
* '''Proving interface display''': ct in hyps (''the negated hypothesis'')
 
 
 
[[Image: FindContrHypsExp1.png]]
 
 
 
== Use Equality Hypothesis ==
 
* '''Description''': Simplifies a sequent by rewriting all selected hypotheses and the goal using a (selected) hypothesis that is an equality between a free variable and an expression that does not contain the free variable. The used equality remains in the selected hypotheses to be used again.
 
 
 
* '''Additional details''': Each application of the tactic take only one equality hypothesis into account. If there are several equality hypotheses, they require several applications of the tactic. Moreover, in the case where there are several equality hypotheses, the choice of which hypothesis will be chosen is non-deterministic.  This tactic behaves as [[#Use Equality Hypothesis from Left to Right]] or [[#Use Equality Hypothesis from Right to Left]] depending on if the free variable is on the left or on the right of the equality.
 
 
 
{{InfRule|EQL_LR|<math>\frac{\mathsf{H(E)}, \mathit{x} = \mathit{E} \;\;\vdash \;\; \mathit{P(E)}}{\mathsf{H(x)}, \mathit{x} = \mathit{E} \;\;\vdash \;\; \mathit{P(x)}}</math>}}
 
 
 
{{InfRule|EQL_RL|<math>\frac{\mathsf{H(E)}, \mathit{E} = \mathit{x} \;\;\vdash \;\; \mathit{P(E)}}{\mathsf{H(x)}, \mathit{E} = \mathit{x} \;\;\vdash \;\; \mathit{P(x)}}</math>}}
 
 
 
* '''ID''': org.eventb.core.seqprover.eqHypTac
 
 
 
* '''Auto-tactic''': ''Default''
 
 
 
* '''Post-tactic''': ''Default''
 
 
 
* '''Preference display'': Use Equals Hypotheses (Simplify)
 
 
 
* '''Interactive''': ''Hypothesis''. See [[#Use Equality Hypothesis from Left to Right]] and [[#Use Equality Hypothesis from Right to Left]]
 
 
 
* '''Proving interface display''': eh (''the equal hypothesis'') in the case where the free variable is on the left-hand side or he (''the equal hypothesis'') in the case where the free variable is on the right-hand side.
 
 
 
The  example below shows the screen-shots of the step before the application of the tactic, the step after the first application of the tactic with hypothesis <math>x = y + 1</math> and the step just after the second application of the tactic with hypothesis <math>1 = y</math>.
 
 
 
Before [[Image:UseEqualityHypExp1.png]]
 
 
 
After the first application [[Image:UseEqualityHypExp2.png]]
 
 
 
After the second application [[Image:UseEqualityHypExp3.png]]
 
 
 
== Use Equality Hypothesis from Left to Right ==
 
 
 
* '''Description''': Rewriting all selected hypotheses and the goal using a (selected) hypothesis that is an equality between two expressions. The used equality remains in the selected hypotheses to be used again.
 
 
 
* '''ID''':
 
 
 
* '''Auto-tactic''': See [[#Use Equality Hypothesis]]
 
 
 
* '''Post-tactic''': See [[#Use Equality Hypothesis]]
 
 
 
* '''Interactive''': ''Hypothesis''
 
 
 
* '''Proving interface display''':
 
 
 
== Shrink Implicative Hypothesis ==
 
* '''Description''': Simplifies the (visible) implicative hypotheses in a sequent by removing predicates from their left hand sides that are (selected) hypotheses.
 
 
 
* '''Additional details''':
 
{{InfRule|AUTO_MH|<math>\frac{
 
\textbf{H},\textbf{P},\;\textbf{Q}\limp \textbf{R}\;\;\vdash \;\; \textbf{S} }{\textbf{H},\;\textbf{P},\; \textbf{P} \land  \textbf{Q} \limp \textbf{R}  \;\;\vdash \;\; \textbf{S}}</math>}}
 
 
 
* '''ID''': org.eventb.core.seqprover.shrinkImpHypTac
 
 
 
* '''Auto-tactic''': ''Default''
 
 
 
* '''Post-tactic''': ''Default''
 
 
 
* '''Preference Display''': Shrink Implicative Hypotheses (Simplify)
 
 
 
* '''Interactive''': ''No''
 
 
 
* '''Proving interface display''': auto ImpE
 
 
 
Before [[Image: ShrinkImpHypBefore.png]]
 
 
 
After [[Image: ShrinkImpHypAfter.png]]
 
 
 
== Shrink Enumerated Set ==
 
* '''Description''': Simplifies (selected) hypotheses of the form e ∈ {a,b,c} to e ∈ {a,c} after finding the hypothesis ¬ e = b.
 
 
 
* '''Additional details''': TODO
 
 
 
* '''ID''': org.eventb.core.seqprover.shrinkEnumHypTac
 
 
 
* '''Auto-tactic''': ''No''
 
 
 
* '''Post-tactic''': ''Default''
 
 
 
* '''Preference Display''': Shrink Enumerated Set (Simplify)
 
 
 
* '''Interactive''': ''No''
 
 
 
* '''Proving Interface Display''': negEnum ''<hypotheses names>''
 
 
 
Before [[Image: ShrinkEnumHypBefore.png]]
 
 
 
After Before [[Image: ShrinkEnumHypAfter.png]]
 
 
 
== Implicative Hypothesis with Conjunctive RHS ==
 
* '''Description''': Simplifies all (selected) hypotheses of the form P ⇒ Q ∧ R into multiple implications P ⇒ Q , P ⇒ R.
 
 
 
* '''Additional details''':
 
{{InfRule|IMP_AND_L|<math>\frac{\textbf{H},\textbf{P} \limp \textbf{Q},  \textbf{P} \limp \textbf{R}\;\;\vdash \;\; \textbf{S}}{\textbf{H},\;\textbf{P} \limp  \textbf{Q} \land \textbf{R}  \;\;\vdash \;\; \textbf{S}}</math>}}
 
 
 
* '''ID''': org.eventb.core.seqprover.splitRightConjImpHypTac
 
 
 
* '''Auto-tactic''': ''No''
 
 
 
* '''Post-tactic''': ''Yes''
 
 
 
* '''Preference Display''': Implicative Hypotheses with Conjunctive RHS (Simplify)
 
 
 
* '''Interactive''': ''Hypothesis''
 
The operator <span style="color:red">⇒</span> is redden in the hypotheses. When the mouse hovers the red symbol, the label of the tactic in the context menu is ''Implication with conjunction rewrites''.
 
 
 
* '''Proving Interface Display''': ⇒ with ∧ in hyp ''<hypothesis name>''
 
 
 
Before [[Image: SplitRightConjImpHypBefore.png]]
 
 
 
After [[Image: SplitRightConjImpHypAfter.png]]
 
 
 
== Implicative Hypothesis with Disjunctive LHS ==
 
* '''Description''': Simplifies all (selected) hypotheses of the form P ∨ Q ⇒ R into multiple implications P ⇒ R , Q ⇒ R.
 
 
 
* '''Additional details''':
 
{{InfRule|IMP_OR_L|<math>\frac{
 
\textbf{H},\textbf{P} \limp \textbf{R},  \textbf{Q} \limp \textbf{R}\;\;\vdash \;\; \textbf{S} }{\textbf{H},\;\textbf{P} \lor  \textbf{Q} \limp \textbf{R}  \;\;\vdash \;\; \textbf{S}}</math>}}
 
 
 
* '''ID''': org.eventb.core.seqprover.splitLeftDisjImpHypTac
 
 
 
* '''Auto-tactic''': ''No''
 
 
 
* '''Post-tactic''': ''Yes''
 
 
 
* '''Preference Display''': Implicative Hypotheses with Disjunctive LHS (Simplify)
 
 
 
* '''Interactive''': ''Hypothesis''
 
The operator <span style="color:red">⇒</span> is redden in the hypotheses. When the mouse hovers the red symbol, the label of the tactic in the context menu is ''Implication with disjunction rewrites''.
 
 
 
* '''Proving Interface Display''': ⇒ with ∨ in hyp ''<hypothesis name>''
 
 
 
Before [[Image: SplitLeftDisjImpHypBefore.png]]
 
 
 
After [[Image: SplitLeftDisjImpHypAfter.png]]
 
 
 
== Conjunctive Goal ==
 
* '''Description''': Splits a sequent with a conjunctive goal into multiple subgoals.
 
 
 
* '''Additional details''':
 
{{InfRule|AND_R|<math>\frac{\textbf{H} \; \; \vdash \; \;  \textbf{P} \qquad \textbf{H} \; \; \vdash \; \; \textbf{Q}}{\textbf{H} \; \; \vdash \; \;  \textbf{P} \; \land \; \textbf{Q}}</math>}}
 
 
 
* '''ID''': org.eventb.core.seqprover.conjGoalTac
 
 
 
* '''Auto-tactic''': ''No''
 
 
 
* '''Post-tactic''': ''Yes''
 
 
 
* '''Preference display''': Conjunctive Goal (Split)
 
 
 
* '''Interactive''': ''Goal''
 
 
 
[[Image: ConjGoalInteractive.png]]
 
 
 
* '''Proving interface display''': ∧ goal
 
The example below shows the screen-shots of the step before the application of the tactic and the step just after the application of the tactic.
 
 
 
Before [[Image: ConjGoalBefore.png]]
 
 
 
After [[Image: ConjGoalAfter.png]]
 
 
 
== Clarify Goal ==
 
* '''Description''': Clarifies the goal by repeatedly by:
 
** splitting conjunctions,
 
** simplifying implications,
 
** simplifying universal quantifiers,
 
** discharging sequents with a true goal, a false hypothesis and where the goal is contained in the hypotheses.
 
 
 
* '''Additional details''': This tactic applies a composition of tactics [[#Conjunctive Goal]], [[#Implication Goal]] and [[#For-all Goal]] followed by a looping of tactics [[#True Goal]] and [[#False Hypothesis]].
 
 
 
* '''ID''': org.eventb.core.seqprover.clarifyGoalTac
 
 
 
* '''Auto-tactic''': ''Default''
 
 
 
* '''Post-tactic''': ''Default''
 
 
 
* '''Preference Display''': Clarify Goal (Mixed)
 
 
 
* '''Interactive''': ''No''
 
 
 
== Functional Overriding in Goal ==
 
* '''Description''': TODO
 
 
 
* '''Additional details''':
 
 
 
* '''ID''': TODO
 
 
 
* '''Auto-tactic''': ''Default''
 
 
 
* '''Post-tactic''': ''No''
 
 
 
* '''Preference Display''': Functional Overriding in Goal (Split)
 
 
 
* '''Interactive''': TODO
 
 
 
* '''Proving Interface Display''': TODO
 
 
 
== Functional Overriding in Hypothesis ==
 
* '''Description''': TODO
 
 
 
* '''ID''': TODO
 
 
 
* '''Display''': TODO
 
 
 
* '''Auto-tactic''': TODO
 
 
 
* '''Post-tactic''': TODO
 
 
 
* '''Interactive''': TODO
 
 
 
* '''Example''': TODO
 
 
 
== Partition Rewriter ==
 
* '''Description''': TODO
 
 
 
* '''ID''': TODO
 
 
 
* '''Display''': TODO
 
 
 
* '''Auto-tactic''': TODO
 
 
 
* '''Post-tactic''': TODO
 
 
 
* '''Interactive''': TODO
 
 
 
* '''Example''': TODO
 
 
 
== One-Point Rule in Goal ==
 
* '''Description''': Applies automatically the OnePointGoal tactic to the goal.
 
 
 
* '''Additional details''':
 
{{InfRule|ONE_POINT_R|<math>\frac{\textbf{H} \;\;\vdash \;\; {WD}(E) \qquad  \textbf{H} \;\;\vdash \;\; \forall x, \ldots, \ldots,z \qdot [y \bcmeq E]\textbf{P} \land \ldots \land \ldots \land [y \bcmeq E]\textbf{Q} \limp [y \bcmeq E]\textbf{R} }{ \textbf{H}  \;\;\vdash\;\; \forall x, \ldots, y, \ldots, z \qdot \textbf{P} \land \ldots \land y = E \land \ldots \land \textbf{Q} \limp \textbf{R} }</math>}}
 
 
 
The rule can be applied with ∀ as well as with ∃.
 
 
 
* '''ID''': org.eventb.core.seqprover.onePointGoalTac
 
 
 
* '''Auto-tactic''': ''Yes''
 
 
 
* '''Post-tactic''': ''Yes''
 
 
 
* '''Preference Display''': One Point Rule in Goal (Split)
 
 
 
* '''Interactive''': ''No''
 
 
 
* '''Proving Interface Display''': One Point Rule in goal
 
 
 
Before [[Image: OnePointGoalBefore.png]]
 
 
 
After [[Image: OnePointGoalAfter.png]]
 
 
 
== One-Point Rule in Hypothesis ==
 
* '''Description''': Applies automatically the OnePointHyp tactic to the selected hypotheses.
 
 
 
* '''Additional details''':
 
{{InfRule|ONE_POINT_L|<math>\frac{\textbf{H} \;\;\vdash \;\; {WD}(E) \qquad  \textbf{H}, \forall x, \ldots, \ldots,z \qdot [y \bcmeq E]\textbf{P} \land \ldots \land \ldots \land [y \bcmeq E]\textbf{Q} \limp [y \bcmeq E]\textbf{R} \;\;\vdash \;\; \textbf{G}}{ \textbf{H}, \forall x, \ldots, y, \ldots, z \qdot \textbf{P} \land \ldots \land y = E \land \ldots \land \textbf{Q} \limp \textbf{R}  \;\;\vdash\;\; \textbf{G}}</math>}}
 
 
 
The rule can be applied with ∀ as well as with ∃.
 
 
 
* '''ID''': org.eventb.core.seqprover.onePointHypTac
 
 
 
* '''Auto-tactic''': ''Yes''
 
 
 
* '''Post-tactic''': ''Yes''
 
 
 
* '''Preference Display''': One Point Rule in Hypotheses (Split)
 
 
 
* '''Interactive''': ''No''
 
 
 
* '''Proving Interface Display''': One Point Rule in ''hypothesis name''
 
 
 
Before [[Image: OnePointHypBefore.png]]
 
 
 
After [[Image: OnePointHypAfter.png]]
 
 
 
== Bounded Goal with Finite Hypothesis ==
 
* '''Description''': Discharges a sequent whose goal states that an expression E has a lower or a upper bound (e.g. '∃n·(∀x·x ∈ S ⇒ x ≤ n)'), when there is an hypothesis that states the finiteness of E (i.e. 'finite(S)').
 
 
 
* '''Additional details''': TODO
 
 
 
* '''ID''': org.eventb.core.seqprover.finiteHypBoundedGoalTac
 
 
 
* '''Auto-tactic''': TODO
 
 
 
* '''Post-tactic''': TODO
 
 
 
* '''Preference Display''': TODO
 
 
 
* '''Interactive''': TODO
 
 
 
* '''Proving Interface Display''':
 
 
 
== Falsify Goal ==
 
 
 
== conjI ==
 
 
 
== allI ==
 
 
 
== exI ==
 
 
 
== Remove Negation ==
 
 
 
== Review ==
 
 
 
== Proof by cases ==
 
 
 
== Add Hypothesis ==
 
 
 
== Abstract Expression ==
 
 
 
== Automatic Prover ==
 
 
 
== Post tactic ==
 
 
 
== Lasoo ==
 
 
 
== Back Tracking ==
 
 
 
== Prune ==
 
 
 
== Search Hypothesis ==
 
 
 
== Cache Hypothesis ==
 
 
 
== Previous ==
 
 
 
== Next ==
 
 
 
== Information ==
 
 
 
== Falsify Hypothesis ==
 
 
 
== Modus Ponens ==
 
 
 
== conjE ==
 
 
 
== disjE ==
 
 
 
== allE ==
 
 
 
== exE ==
 
 
 
 
 
 
 
== Double Implication Hypothesis ==
 
 
 
== cont Implication Hypothesis ==
 
 
 
== Functional Overriding ==
 
 
 
 
 
 
 
== Modus Tollens ==
 
 
 
== Remove Membership ==
 
 
 
== Remove Inclusion ==
 
 
 
== Remove Strict-Inclusion ==
 
 
 
== Inclusion Set Minus Right ==
 
 
 
== Remove Inclusion Universal ==
 
 
 
== Implication Introduction ==
 
 
 
== Disjunction to Implication ==
 
 
 
== Forall Modus Ponens ==
 
 
 
== Next Pending Sub-goal ==
 
 
 
== Next Reviewed Sub-goal ==
 
 
 
== impAndHyp ==
 
 
 
== impAndGoal ==
 
 
 
== impOrHyp ==
 
 
 
== impOrGoal ==
 
 
 
== relImgUnionRight ==
 
 
 
== relImgUnionLeft ==
 
 
 
== Set Equality ==
 
 
 
== Equivalent ==
 
 
 
== Functional Intersection Image ==
 
 
 
== Functional Set Minus Image ==
 
 
 
== Functional Singleton Image ==
 
 
 
== Converse Relation ==
 
 
 
== Domain Distribution to the Left ==
 
 
 
== Domain Distribution to the Right ==
 
 
 
== Range Distribution to the Left ==
 
 
 
== Range Distribution to the Right ==
 
 
 
== Set Minus ==
 
 
 
== Conjunction and Disjunction Distribution ==
 
 
 
== Union Conjunction Distribution ==
 
 
 
== compUnionDist ==
 
 
 
== Domain/Range Union Distribution ==
 
 
 
== Relational Overriding ==
 
 
 
== Composition Image ==
 
 
 
== Domain Composition ==
 
 
 
== Range Composition ==
 
 
 
== Functional Composition Image ==
 
 
 
== Finite Set in Goal ==
 
 
 
== Finite Intersection in Goal ==
 
 
 
== Finite Set Minus in Goal ==
 
 
 
== Finite Relation in Goal ==
 
 
 
== Finite Relation Image in Goal ==
 
 
 
== Finite Domain in Goal ==
 
 
 
== Finite Range in Goal ==
 
 
 
== Finite Function in Goal ==
 
 
 
== Finite Function Converse in Goal ==
 
 
 
== Finite Functional Relational Image in Goal ==
 
 
 
== Finite Functional Range in Goal ==
 
 
 
== Finite Functional Domain in Goal ==
 
 
 
== Finite Minimum in Goal ==
 
 
 
== Finite Maximum in Goal ==
 
 
 
== Finite Negative in Goal ==
 
 
 
== Finite Positive in Goal ==
 
 
 
== Cardinality Comparison in Goal ==
 
 
 
== Cardinality Up to ==
 
 
 
== Partition Rewrite ==
 
 
 
== Arithmetic Rewrite ==
 
 
 
== Total Domain in Hypothesis / Goal ==
 

Revision as of 15:23, 15 October 2008

Purpose

The purpose of the Single View Design is to present everything in a single view in Rodin.

Specification

The Single View Design uses the Common Navigator Framework that is provided by Eclipse.

The Navigator

The navigator presents all projects and their contents. The users can choose between to ways how the machines and contexts will be presented:

  • A simple structure where all machines and contexts are presented on the same level
  • A complex structure where the machines and contexts are presented as a tree. Thus dependencies between machines and contexts (like refines or sees) are made visible.


User guide

Customizing the Navigator

Click on the little triangle in the upper right corner of the navigator view and select Customize View. This opens a dialog that allows you to choose Filters and Content.

Customize.jpg

Content

Here you can choose what content should be shown in the navigator.

  • Resources: All projects, files and folder (keep this one checked!).
  • Working Sets: Allows you to see the working sets as top level elements. If you're not familiar with working sets, consult eclipse help.
  • Simple Context Structure: Lists all contexts of a project.
  • Complex Context Structure: Lists all contexts of a project. Contexts that extend another context are attached to it as children in the tree. Contexts that are seen by a machine are attached to the machine as children. Choose either the complex or the simple structure. It is not recommended to have both active at the same time.
  • Simple Machines Structure: Lists all machines of a project.
  • Complex Context Structure: Lists all machines of a project. Machines that refine another machine are attached to it as children in the tree. Choose either the complex or the simple structure. It is not recommended to have both active at the same time.
  • Carrier Sets
  • Constants
  • Variables
  • Axioms
  • Invariants
  • Theorems
  • Events
  • Proof Obligations: All proof obligations of a machine, context, axiom, invariant, theorem or event.

Here's an example of what the same projects looks like once using the complex machine and context structure (left) and once using the simple version (right).

Complex.jpgSimple.jpg

Filters

The filters let you choose what to hide in the navigator.

  • File extensions: There are various filters to hide certain types of files.
  • All files and folders: Hides all files and subfolders.
  • Non Rodin Projects: Hides all non Rodin projects. Also hides closed Rodin Projects.
  • Closed Projects: Hides all closed projects.

There are some additional filters that can be found on top of the navigator:

PoFilters.JPG

Enter a text into the field and only proof obligations containing the string will be shown. If you push the green button, all discharged proof obligations will be hidden.


Developer guide

Extending Single View Design

Single View Design uses the Common Navigator Framework and the Master/Details pattern. The part on the left (the navigator) is the master part. You can add custom filters, content providers and action providers in a plug-in of your own. Add the extension org.eclipse.ui.navigator.viewer. There you can add viewerContentBindings and viewerActionBindings with viewerId fr.systerel.explorer.navigator.view. This binds your custom content, actions and filters to the navigator. The part on the right is the details part. You can add tabs of your own by extending fr.systerel.explorer.masterDetails.

In the picture you can see what types the nodes in the navigator have.

Tree.jpg

Adding a content provider to the navigator

To add a custom content provider you have to use the org.eclipse.ui.navigator.navigatorContent extension. There you add a new navigatorContent. Example: You want to add a new child under the IMachineFile nodes. Define a navigatorContent and add triggerPoints. There you add a new instanceof with value org.eventb.core.IMachineFile. The priority of the navigatorContent decides in what order the content is shown with respect to other content providers. (For example the content provider for the variables has a higher priority than the one for invariants, that's why the variables appear before the invariants in the tree.) You need to provide a contentProvider and a labelProvider class. For more information read the extension point description of navigatorContent. Finally include your navigatorContent in your viewerContentBindings.

  <extension
        point="org.eclipse.ui.navigator.navigatorContent">
     <navigatorContent
           contentProvider="example.ContentProvider"
           id="example.navigatorContent"
           labelProvider="example.LabelProvider"
           name="Example Content">
        <triggerPoints>
           <instanceof
                 value="org.eventb.core.IMachineFile">
           </instanceof>
        </triggerPoints>
     </navigatorContent>
  </extension>

  <extension
        point="org.eclipse.ui.navigator.viewer">
     <viewerContentBinding
           viewerId="fr.systerel.explorer.navigator.view">
        <includes>
           <contentExtension
                 pattern="example.navigatorContent">
           </contentExtension>
        </includes>
     </viewerContentBinding>
  </extension>


Adding a filter to the navigator

To add a custom filter you have to use the org.eclipse.ui.navigator.navigatorContent extension. There you add a new commonFilter. You can either provide an implementation for ViewerFilter or use xml filterExpressions. For more information read the extension point description of navigatorContent. Finally include your commonFilter in your viewerContentBindings.

Adding an action provider to the navigator

To add a custom filter you use again the org.eclipse.ui.navigator.navigatorContent extension. There you add a new actionProvider. You have to provide an implementation for org.eclipse.ui.navigator.CommonActionProvider. To decide on what nodes in the tree your action provider should be invoked, use the enablement expression. Finally include your commonFilter in your viewerActionBindings.

Adding a tab with custom content to the details part

To add a custom tab use the fr.systerel.explorer.masterDetails extension. Add a new detailsTab and provide a class that implements INavigatorDetailsTab.