Commit 7bd27dc4 authored by Heiko Becker's avatar Heiko Becker

Fix errors introduced by merge with subdivision checks

parent 36ce0269
...@@ -110,6 +110,7 @@ Fixpoint validAffineBounds (e: expr Q) (A: analysisResult) P (validVars: NatSet. ...@@ -110,6 +110,7 @@ Fixpoint validAffineBounds (e: expr Q) (A: analysisResult) P (validVars: NatSet.
if (isSupersetIntv intv iv) && (isSupersetIntv iv intv) then if (isSupersetIntv intv iv) && (isSupersetIntv iv intv) then
Some (FloverMap.add e af' exprsAf', n') Some (FloverMap.add e af' exprsAf', n')
else None else None
| Let _ _ _ _ => None
end end
end. end.
...@@ -522,7 +523,8 @@ Qed. ...@@ -522,7 +523,8 @@ Qed.
Definition checked_expressions (A: analysisResult) E Gamma fVars dVars e iexpmap Definition checked_expressions (A: analysisResult) E Gamma fVars dVars e iexpmap
inoise map1 := inoise map1 :=
exists af vR aiv aerr, exists af vR aiv aerr,
NatSet.Subset (usedVars e) (NatSet.union fVars dVars) /\ (* WAS: usedVars e *)
NatSet.Subset (freeVars e) (NatSet.union fVars dVars) /\
FloverMap.find e A = Some (aiv, aerr) /\ FloverMap.find e A = Some (aiv, aerr) /\
isSupersetIntv (toIntv af) aiv = true /\ isSupersetIntv (toIntv af) aiv = true /\
FloverMap.find e iexpmap = Some af /\ FloverMap.find e iexpmap = Some af /\
...@@ -677,6 +679,7 @@ Proof. ...@@ -677,6 +679,7 @@ Proof.
lra. lra.
Qed. Qed.
(*
Lemma validAffineBounds_sound_var A P E Gamma fVars dVars n: Lemma validAffineBounds_sound_var A P E Gamma fVars dVars n:
forall (noise : nat) (exprAfs : expressionsAffine) (inoise : nat) forall (noise : nat) (exprAfs : expressionsAffine) (inoise : nat)
(iexpmap : FloverMap.t (affine_form Q)) (map1 : nat -> option noise_type), (iexpmap : FloverMap.t (affine_form Q)) (map1 : nat -> option noise_type),
...@@ -2597,3 +2600,4 @@ Proof. ...@@ -2597,3 +2600,4 @@ Proof.
split; eauto using Rle_trans. split; eauto using Rle_trans.
+ destruct vtyped; auto. + destruct vtyped; auto.
Qed. Qed.
*)
\ No newline at end of file
...@@ -30,7 +30,6 @@ Theorem Certificate_checking_is_sound_general (e:expr Q) (absenv:analysisResult) ...@@ -30,7 +30,6 @@ Theorem Certificate_checking_is_sound_general (e:expr Q) (absenv:analysisResult)
forall (E1 E2:env) DeltaMap, forall (E1 E2:env) DeltaMap,
(forall (v : R) (m' : mType), (forall (v : R) (m' : mType),
exists d : R, DeltaMap v m' = Some d /\ (Rabs d <= mTypeToR m')%R) -> exists d : R, DeltaMap v m' = Some d /\ (Rabs d <= mTypeToR m')%R) ->
eval_precond E1 P -> eval_precond E1 P ->
unsat_queries Qmap -> unsat_queries Qmap ->
(forall Qmap, In Qmap (queriesInSubdivs subdivs) -> unsat_queries Qmap) -> (forall Qmap, In Qmap (queriesInSubdivs subdivs) -> unsat_queries Qmap) ->
...@@ -45,6 +44,7 @@ Theorem Certificate_checking_is_sound_general (e:expr Q) (absenv:analysisResult) ...@@ -45,6 +44,7 @@ Theorem Certificate_checking_is_sound_general (e:expr Q) (absenv:analysisResult)
eval_expr E2 (toRExpMap Gamma) DeltaMap (toRExp e) vF m -> eval_expr E2 (toRExpMap Gamma) DeltaMap (toRExp e) vF m ->
(Rabs (vR - vF) <= Q2R err))%R /\ (Rabs (vR - vF) <= Q2R err))%R /\
validTypes e Gamma /\ validTypes e Gamma /\
getValidMap defVars e (FloverMap.empty mType) = Succes Gamma /\
validRanges e absenv E1 (toRTMap (toRExpMap Gamma)) /\ validRanges e absenv E1 (toRTMap (toRExpMap Gamma)) /\
validErrorBounds e E1 E2 absenv Gamma /\ validErrorBounds e E1 E2 absenv Gamma /\
validFPRanges e E2 Gamma absenv. validFPRanges e E2 Gamma absenv.
...@@ -81,7 +81,7 @@ Theorem Certificate_checking_is_sound (e:expr Q) (absenv:analysisResult) ...@@ -81,7 +81,7 @@ Theorem Certificate_checking_is_sound (e:expr Q) (absenv:analysisResult)
forall (E1 E2:env) DeltaMap, forall (E1 E2:env) DeltaMap,
(forall (v : R) (m' : mType), (forall (v : R) (m' : mType),
exists d : R, DeltaMap v m' = Some d /\ (Rabs d <= mTypeToR m')%R) -> exists d : R, DeltaMap v m' = Some d /\ (Rabs d <= mTypeToR m')%R) ->
eval_precond E1 P -> eval_precond E1 P ->
unsat_queries Qmap -> unsat_queries Qmap ->
(forall Qmap, In Qmap (queriesInSubdivs subdivs) -> unsat_queries Qmap) -> (forall Qmap, In Qmap (queriesInSubdivs subdivs) -> unsat_queries Qmap) ->
......
Require Import Flover.CertificateChecker Flover.floverParser. Require Import Flover.CertificateChecker Flover.floverParser.
Require Import Coq.extraction.ExtrOcamlString Coq.extraction.ExtrOcamlBasic Coq.extraction.ExtrOcamlNatBigInt Coq.extraction.ExtrOcamlZBigInt. Require Import Coq.extraction.ExtrOcamlString Coq.extraction.ExtrOcamlBasic
Coq.extraction.ExtrOcamlNatBigInt Coq.extraction.ExtrOcamlZBigInt.
Extraction Language Ocaml. Extraction Language OCaml.
(*
Extraction "./binary/CoqChecker.ml" runChecker. Extraction "./binary/CoqChecker.ml" runChecker.
*)
This diff is collapsed.
...@@ -4,14 +4,14 @@ From Coq ...@@ -4,14 +4,14 @@ From Coq
From Flover From Flover
Require Import Infra.Abbrevs Infra.RationalSimps Infra.RealRationalProps Require Import Infra.Abbrevs Infra.RationalSimps Infra.RealRationalProps
Infra.RealSimps Infra.Ltacs Commands Environments ErrorAnalysis Infra.RealSimps Infra.Ltacs Environments ErrorAnalysis
ExpressionSemantics IntervalValidation TypeValidator RealRangeValidator ErrorBounds ExpressionSemantics IntervalValidation TypeValidator RealRangeValidator ErrorBounds
ErrorValidation AffineForm AffineArithQ AffineArith. ErrorValidation AffineForm AffineArithQ AffineArith AffineValidation.
Definition mkErrorPolyQ (err: Q) noise := Definition mkErrorPolyQ (err: Q) noise :=
if Qeq_bool err 0 then if Qeq_bool err 0 then
Const 0 Const 0
else else
Noise noise err (Const 0). Noise noise err (Const 0).
Definition mkErrorPolyR (err: R) noise := Definition mkErrorPolyR (err: R) noise :=
...@@ -531,7 +531,7 @@ Proof. ...@@ -531,7 +531,7 @@ Proof.
reflexivity. reflexivity.
Qed. Qed.
Lemma RmaxAbsFun_pos iv: Lemma RmaxAbsFun_pos iv:
(0 <= RmaxAbsFun iv)%R. (0 <= RmaxAbsFun iv)%R.
Proof. Proof.
unfold RmaxAbsFun. unfold RmaxAbsFun.
...@@ -985,7 +985,7 @@ Lemma multiplication_error_af_evals ...@@ -985,7 +985,7 @@ Lemma multiplication_error_af_evals
(mult_aff (afQ2R af1) (afQ2R af2) (noise + 4))) (mult_aff (afQ2R af1) (afQ2R af2) (noise + 4)))
(mkErrorPolyR (mkErrorPolyR
(computeErrorR (Q2R (maxAbs (multIntv (widenIntv iv1 err1) (widenIntv iv2 err2)))) m) (computeErrorR (Q2R (maxAbs (multIntv (widenIntv iv1 err1) (widenIntv iv2 err2)))) m)
(noise + 5))) (noise + 5)))
(v__R1 * v__R2 - perturb (v__FP1 * v__FP2) m delta) noise_map'. (v__R1 * v__R2 - perturb (v__FP1 * v__FP2) m delta) noise_map'.
Proof. Proof.
intros. intros.
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment