No edit summary |
No edit summary |
||
| Line 18: | Line 18: | ||
Transitions for these rules are displayed in orange / with a question mark. This indicates that the subsequent state is not computed in advance, either because the execution depends on user input, so they cannot be precomputed or it is a transition for an external provers (where no parameters are expected). | Transitions for these rules are displayed in orange / with a question mark. This indicates that the subsequent state is not computed in advance, either because the execution depends on user input, so they cannot be precomputed or it is a transition for an external provers (where no parameters are expected). | ||
(img0) | |||
==== Input Syntax ==== | ==== Input Syntax ==== | ||
| Line 25: | Line 25: | ||
<tt>finite(S)</tt> is an Event-B operator and is entered as <tt>S:FIN(S)</tt>. | <tt>finite(S)</tt> is an Event-B operator and is entered as <tt>S:FIN(S)</tt>. | ||
To illustrate a valid input, this is an example predicate for a hypothesis to be added: | To illustrate a valid input, this is an example predicate for a hypothesis to be added (x ≠ 0 ∧ s ∪ t ⊂ ℕ): | ||
[[File:Sequent prover add hyp.png|700px]] | |||
==== Saving Proofs ==== | ==== Saving Proofs ==== | ||
| Line 33: | Line 33: | ||
To save a proof, the proof trace can be stored as a <tt>.prob2trace</tt> file (1a), which can later be reloaded and reused (1b). This option allows proofs to be revised, for example by interactively replaying the trace and modifying some steps. Alternatively, proofs can be exported as HTML documents (2): | To save a proof, the proof trace can be stored as a <tt>.prob2trace</tt> file (1a), which can later be reloaded and reused (1b). This option allows proofs to be revised, for example by interactively replaying the trace and modifying some steps. Alternatively, proofs can be exported as HTML documents (2): | ||
[[File:Sequent prover proof saving.png|800px]] | |||
==== Automatic Provers ==== | ==== Automatic Provers ==== | ||
Using ProB, sequents can be proven interactively. For the construction of a formal proof, rules for rewriting expressions or decomposing proof goals into simpler subgoals are applied. To discharge a proof obligation one has to prove one or more sequents, consisting of hypotheses and a goal that must be derived from the hypotheses.
Currently, .pl files with proof obligations can be loaded which are exported from Rodin. To generate these files, an Event-B machine must be selected in Rodin and the option ProB Standalone > Export POs for ProB must be invoked.
All rules that are applicable to the current sequent are displayed in the Operations View. The implemented rules include the inference and rewrite rules available in Rodin:
The State View shows the current sequent, including its hypotheses and goal, as well as important state properties. Furthermore, the State Visualisation presents both the current state and the preceding state, allowing a comparison between consecutive steps. By right-clicking on a predicate within this visualisation, the user can see rules that are applicable to that selected element.
(Overview img)
Some rules require additional user input, i.e. an expression or a predicate. This is necessary, for example when it is necessary to add a new hypothesis to advance the proof, to instantiate quantifiers like the existential quantifier or perform a case distinction.
Transitions for these rules are displayed in orange / with a question mark. This indicates that the subsequent state is not computed in advance, either because the execution depends on user input, so they cannot be precomputed or it is a transition for an external provers (where no parameters are expected).
(img0)
User input has to be provided in B Syntax. Due to syntactic differences between B and Event-B, certain operators must be adapted accordingly. For instance, a cartesian product is written as S ** T, exponentiation as a^b and set difference as S \\ T (note that it is written as \\ in the input because of the escape character \). finite(S) is an Event-B operator and is entered as S:FIN(S).
To illustrate a valid input, this is an example predicate for a hypothesis to be added (x ≠ 0 ∧ s ∪ t ⊂ ℕ):
To save a proof, the proof trace can be stored as a .prob2trace file (1a), which can later be reloaded and reused (1b). This option allows proofs to be revised, for example by interactively replaying the trace and modifying some steps. Alternatively, proofs can be exported as HTML documents (2):
In addition to interactive proving, ProB allows the invocation of external automatic provers. This can be useful for determining whether a given sequent is provable at all. The following provers can be called:
To use the Atelier B provers, the path to the krt tool must be set via File > Preferences > ATELIERB_KRT_PATH. If the provers from Atelier B were installed in Rodin, the krt executable might be found within Rodin's configuration directory (path is possibly /Users/.../rodin/configuration/org.eclipse.osgi/.../krt).
The question mark shown on transitions for external provers also indicates that they may not be executable. It is the case if too many or unsuitable hypotheses are selected for proving the goal.