Variations in HYP, CNTR and GenMP
This page describes the introduction of variations in the HYP, HYP_OR, CNTR and GENMP reasoners.
The reasoners implementing the inference rules
look for exact matches of a predicate. But, quite often, a similar predicate that does not match exactly (e.g., because it has been normalized) would suffice. There is also the possibility that a variation which is equivalent to the predicate would be present. For instance, "¬ a = b" is equivalent to "¬ b = a". Finally, the reasoners shall also consider variations which are a sufficient condition for the rule. For instance, if the goal is "a ≤ b", then a hypothesis "a < b" is a sufficient condition to discharge the goal with
The point of this enhancement is therefore to increase the proof power of the considered reasoners by having them consider variations of the sought predicate.
The variations in the Inference Rules page have been generated such that the following facts hold:
Moreover, we consider only variations that are in normal form (that is invariant under rewriting by the auto-rewriter of the sequent prover). This is why the table does not contain predicates such as , but contain instead.
This section explains how the generation of variation of the sought predicate has been implemented.
In order to simplify and optimize the generation of variation of the sought predicate, 4 functions (common to HYP, HYP_OR, CNTR and GenMP reasoners) have been implemented. Each function takes as input a predicate and returns a list of predicates generated by applying their corresponding rule.
These functions have been defined as follows:
A rule can be written in 2 implications, one for each sign of the predicate P.
Some optimisations, to reduce the number of implication to implement, have been implemented. Indeed, only the implications have been implemented because they cover all cases. For instance, if the function StongerPositive takes a negative predicate as an input, the function returns a list of predicates stronger (e.g which infer) than the input. But it's also performed by the function StongerNegative. So this function applies the predicate negation and call to StongerNegative function.
Note: These functions assume the operators such as '' have been removed by the normalization. Moreover, as explained in the convention part, the list of predicates returned contains only predicates in a normal form.
The HYP reasoner calls to StongerPositive function in order to generate a list of predicates that infer the goal. Thus, the sequent is discharged if and only if at least one hypothesis is contained into this list.
The HYP_OR reasoner proceeds the same, for each disjunct a list of stronger predicates is generated and then the sequent is dicharged if at least one hypothesis is contained into these lists.
Checks if the predicate, that we would contradict, is not null and it is contained into the hypotheses.
To generate the predicates contradicting the given hypothesis, a list of predicates inferring the predicate is generated if the given hypothesis is a positive predicate. Else, the reasoner splits a possible conjunctive hypothesis, into its conjuncts and computes for each conjunct a list of predicates inferring the negation of the predicate (or conjunct). Finally, the sequent is dicharged if at least one predicate computed is contained into the hypotheses. If so, all hypotheses needed to achieve it are stored in the list named neededHyps.
For each predicate extracted (unless predicates ) from the hypotheses the reasoner computes:
- a list of predicates which could be remplaced by and which are weaker than the hypothesis.
- a list of predicates which could be remplaced by and which are stronger than the negation of the hypothesis.
Then, it extracts the goal or the disjuncts if the sequent contain a goal in a disjunctive form. For each predicate extracted its computes:
- a list of predicates which could be remplaced by and which are stronger than the hypothesis.
- a list of predicates which could be remplaced by and which are weaker than the negation of the hypothesis.
For each possible substitution computed the following informations are stored:
- predicate original (hypothesis or goal)
- a boolean tells if the substitution comes from the goal
- the sub-predicate to substitute
- the substitue
Note: In order to simplify and avoid to make a distinction about the predicate sign in the reasoner algorithm, the sub-predicate should be positive.
Afterwards, the hypotheses and the goal are traversed in order to get the list of possible applications of substitutes. Indeed, for each predicate traversed, we retrieve the corresponding substitute previously computed and we ensure that the given predicate won't be rewrite by himself. We store the substitute and the position in the predicate which corresponding to an application of substitutes into the list.
Finally, all applications of substitutes are applied into the sequent, first on the goal and then on the hypotheses. Thus, if the goal is re-written, the re-written goal and the hypotheses needed to achieve it are stored. If the hypotheses are re-written we produce new hypothesis actions.
Note: This improvement corresponds to the level 2 of GenMP.
- Intel(R) Core(TM) i7-4770 CPU @ (8* 3.40GHz)
- 24 Go RAM
- Ubuntu 12.04.3 LTS
- linux kernel 3.5.0-43
- VM arguments
- Indigo (3.7.2)
The Rodin projects have been taken from the Deploy archives.
A measurement is launched using the plug-in org.eventb.seqprover.core.perf.app. Tests are run from a launched eclipse application.
Launch Configuration must include exactly the following plug-ins:
Add the following program argument:
- -application org.eventb.smt.core.perf.app.main <project-dir>
where <project-dir> is the path of the directory where is contained the Rodin projects.
Verify that 1024 Mo are free when tests are ready for launch.
First, it checks that the program argument is a directory and then it imports all Rodin projects from the directory into a workspace. The Auto-prover is applied on all Rodin projects. For each Rodin project the following informations are displayed : "Project: Number of POs discharged/Number of POs". Finally, the proof files are strored into a directory named "Results" at the same level as the directory where is contained the Rodin projects.
- Previous version : commit 69e0ae43a1
- New version : commit 2ea1cf6ffe
The following results are averages of measures on the Auto-prover
|Projects||Number Of POs||Number Of POs discharged (previous version)||Number Of POs discharged (new version)|
|Projects||Number Of POs||Time (previous version)||Time (new version)|
|DepSatSpec015Model000||1858||2192,036 s (~36 min)||1811,398 s (~30 min)|
We measured that we had an overall 19,3 % increase in number of POs discharged compared to the previous version. A less time of few minutes has been observed for discharge the POs. Only one time measurement has been taken into account because the others are too short. Moreover, this result is not really significiant because even if the new version discharges more sequent than the previous, it decharges earlier than the previous version.