feat(phl): support backward ecall on bdHoare/phoare goals#1031
feat(phl): support backward ecall on bdHoare/phoare goals#1031mbbarbosa wants to merge 1 commit into
Conversation
|
Pushed a few changes on top of this: 1. Reject out-of-scope phoare goals up-front. The trivial probability split in 2. Dropped the unused 3. Fixed the stale header comment on 4. Added |
Extend backward `ecall` to bdHoare statement goals, so a bdHoare/phoare contract can be applied to the last call of a phoare goal — mirroring the existing hoare backward `ecall`. - ecPhlExists.ml: add `t_ecall_bdhoare_bwd` / `process_ecall_bdhoare`, and dispatch `FbdHoareS` in `process_ecall` (phoare added to the no-xhl error kinds). Program-variable contract arguments are handled via the existing ecall abstraction machinery; a trivial probability split routes the suffix call through `t_bdhoare_seq`, lifting the hoare prefix subgoal via `t_hoareS_conseq_bdhoare`. The split is sound only for lossless [= 1%r] goals and contracts, so both are checked up-front and out-of-scope uses are rejected with an explanatory message instead of failing deep inside t_call. - ecPhlConseq.mli: expose `t_hoareS_conseq_bdhoare`. - tests/phoare-ecall-bwd.ec: cover the lossless backward ecall plus the forward/side/non-lossless rejections.
Extend backward
ecallto bdHoare statement goals, so a bdHoare/phoare contract can be applied to the last call of a phoare goal — mirroring the existing hoare backwardecall.t_ecall_bdhoare_bwd/process_ecall_bdhoare, and dispatchFbdHoareSinprocess_ecall(phoare added to the no-xhl error kinds). Program-variable contract arguments are handled via the existing ecall abstraction machinery; a trivial probability split routes the suffix call throught_bdhoare_seq, lifting the hoare prefix subgoal viat_hoareS_conseq_bdhoare.t_hoareS_conseq_bdhoare/t_hoareF_conseq_bdhoare.