Improved WD Lemma Generation: Difference between revisions
imported>Desaperh No edit summary |
imported>Desaperh Replace example C (issue already corrected) by a new example of predicate subsumed by another, that will not be fixed |
||
Line 22: | Line 22: | ||
In the well-definedness lemma, | In the well-definedness lemma, | ||
<math> \forall x, P(x) \limp Q(x) \land (... \land P(a) \land ... \limp Q(a)) </math>, the sub-predicate <math> Q(x) \land (... \land P( | <math> \forall x, P(x) \limp Q(x) \land (... \land P(a) \land ... \limp Q(a)) </math>, the sub-predicate <math> (... \land P(a) \land ... \limp Q(a)) </math> by <math> \forall x, P(x) \limp Q(x) </math>. | ||
In the same way, the well-definedness lemma, | |||
<math> \forall x, P(x) \limp Q(x) \land (\forall y, ... \land P(y) \land ... \limp Q(y)) </math>, the sub-predicate <math> (\forall y,... \land P(y) \land ... \limp Q(y)) </math> by <math> \forall x, P(x) \limp Q(x) </math>. | |||
This issue will not be fixed by the improved generation. | |||
Line 28: | Line 34: | ||
To fix the issues shown in the above examples, we need that the tool produces a WD lemma equivalent (in the logical sense) to the predicate obtained through the <math>\mathcal{L}</math> operator and satisfying the following constraints: | To fix the issues shown in the above examples, we need that the tool produces a WD lemma equivalent (in the logical sense) to the predicate obtained through the <math>\mathcal{L}</math> operator and satisfying the following constraints: | ||
# No sub-predicate subsumes another sub-predicate | # No sub-predicate subsumes another sub-predicate (exception : example C) | ||
. | . | ||
{{TODO|Is there any other constraint to add?}} | {{TODO|Is there any other constraint to add?}} |
Revision as of 10:58, 20 May 2010
This page describes work in progress for optimising well-definedness lemmas generated by the Core Rodin platform.
The lemmas are generated according to the operator defined in Well-definedness in Event-B. However, this operator being defined as a syntactic transformation, it sometimes generates lemmas that are unnecessarily complicated. We first give some motivating examples showing cases where this happens, then we describe what result shall be produced by the tool. Finally, we describe the design retained for development.
Motivating Examples
All examples corresponds to the behavior of Rodin 1.3
Example A
The well-definedness lemma generated for predicate is
This predicate is sub-optimal as it contains twice the same sub-predicate (). Consequently, when the prover is fed with the generated lemma, it will have to prove twice the same goal.
Example B
The well-definedness lemma generated for predicate is
This predicate is sub-optimal as the sub-predicate is subsumed by the sub-predicate . The prover doesn't need to prove if has been proved.
Example C
In the well-definedness lemma,
, the sub-predicate by .
In the same way, the well-definedness lemma,
, the sub-predicate by .
This issue will not be fixed by the improved generation.
Improved Generation
To fix the issues shown in the above examples, we need that the tool produces a WD lemma equivalent (in the logical sense) to the predicate obtained through the operator and satisfying the following constraints:
- No sub-predicate subsumes another sub-predicate (exception : example C)
. TODO: Is there any other constraint to add?
Constraint 1 covers both examples A and B.
Design for Improved Generation
TODO: Do the design