Chapter 7
Patchprover: adding rules directly to the prover
This system can be used in the following way:
- Create a file called PatchProver in the bdp of the project
- Program in this file with the Logic solver language, while keeping in mind that:
- The rules of the PatchProverBi theory, where i is the force, will be applied by
the force i BEFORE the prover rules and mechanisms.
- The rules of the PatchProverAi theory, where i is the force, will be applied
by the force i AFTER the prover rules and mechanisms (just before failure).
- The rules of the PatchProverHi theory will be applied on the conjunctive form
of each group of hypotheses that is loaded in force i.
- The Fast force is not equipped with the PatchProver mechanism.
In PatchProverBi, B stands for ”Before” and in PatchProverAi, A stands for
”After”.
- These theories are initially empty in the prover:
- PatchProverH0 PatchProverH1 PatchProverH2 PatchProverH3
- PatchProverB0 PatchProverB1 PatchProverB2 PatchProverB3
- PatchProverA0 PatchProverA1 PatchProverA2 PatchProverA3
- NO NORMALISATION IS MADE IN THIS FILE. So the user should not use the
formulae of the left row of the normalisation table. Particularly, as far as the inner
notation used by the prover is concerned, {e} must always be a singleton. Otherwise, the
subsequent behaviour is not guaranteed.
- All these theories are “backward”. The PatchProverHi theories must contain rewrite
rules. They are applied to each group of hypotheses by
bguard((PatchProveri~;RES): bresult(H), Q)
Other theories can be created, bcall and bguard, etc. can be used, In order to display
messages, use
bcall(WRITE: bwritef(...))
- BEWARE : THE USE OF PATCHPROVER IS RESERVED TO THOSE WHO KNOW
THE LOGIC SOLVER LANGUAGE. THIS IS NOT A SECURE METHOD. PatchProver
is only read when the automatic or interactive prover starts. Once the file has been
modified, it is better to unprove all the proof obligations and replay the proof
commands.
- If PatchProver contains syntax errors, it isn’t taken into account, and has no influence on
the proof.
The rules and calls to the mechanisms must be equipped with the trace system (see chapter 10
page ) , if the trace system is to be used during demonstrations, and the proof tree is to be
obtained. If the PatchProver rules are applied, and aren’t traced, the behaviour of the proof
generation tree is no longer guaranteed.