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.
if (isSupersetIntv intv iv) && (isSupersetIntv iv intv) then
Some (FloverMap.add e af' exprsAf', n')
else None
| Let _ _ _ _ => None
end
end.
......@@ -522,7 +523,8 @@ Qed.
Definition checked_expressions (A: analysisResult) E Gamma fVars dVars e iexpmap
inoise map1 :=
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) /\
isSupersetIntv (toIntv af) aiv = true /\
FloverMap.find e iexpmap = Some af /\
......@@ -677,6 +679,7 @@ Proof.
lra.
Qed.
(*
Lemma validAffineBounds_sound_var A P E Gamma fVars dVars n:
forall (noise : nat) (exprAfs : expressionsAffine) (inoise : nat)
(iexpmap : FloverMap.t (affine_form Q)) (map1 : nat -> option noise_type),
......@@ -2597,3 +2600,4 @@ Proof.
split; eauto using Rle_trans.
+ destruct vtyped; auto.
Qed.
*)
\ No newline at end of file
......@@ -30,7 +30,6 @@ Theorem Certificate_checking_is_sound_general (e:expr Q) (absenv:analysisResult)
forall (E1 E2:env) DeltaMap,
(forall (v : R) (m' : mType),
exists d : R, DeltaMap v m' = Some d /\ (Rabs d <= mTypeToR m')%R) ->
eval_precond E1 P ->
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)
eval_expr E2 (toRExpMap Gamma) DeltaMap (toRExp e) vF m ->
(Rabs (vR - vF) <= Q2R err))%R /\
validTypes e Gamma /\
getValidMap defVars e (FloverMap.empty mType) = Succes Gamma /\
validRanges e absenv E1 (toRTMap (toRExpMap Gamma)) /\
validErrorBounds e E1 E2 absenv Gamma /\
validFPRanges e E2 Gamma absenv.
......@@ -81,7 +81,7 @@ Theorem Certificate_checking_is_sound (e:expr Q) (absenv:analysisResult)
forall (E1 E2:env) DeltaMap,
(forall (v : R) (m' : mType),
exists d : R, DeltaMap v m' = Some d /\ (Rabs d <= mTypeToR m')%R) ->
eval_precond E1 P ->
unsat_queries Qmap ->
(forall Qmap, In Qmap (queriesInSubdivs subdivs) -> unsat_queries Qmap) ->
......
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.
*)
This diff is collapsed.
......@@ -4,14 +4,14 @@ From Coq
From Flover
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
ErrorValidation AffineForm AffineArithQ AffineArith.
ErrorValidation AffineForm AffineArithQ AffineArith AffineValidation.
Definition mkErrorPolyQ (err: Q) noise :=
if Qeq_bool err 0 then
Const 0
else
else
Noise noise err (Const 0).
Definition mkErrorPolyR (err: R) noise :=
......@@ -531,7 +531,7 @@ Proof.
reflexivity.
Qed.
Lemma RmaxAbsFun_pos iv:
Lemma RmaxAbsFun_pos iv:
(0 <= RmaxAbsFun iv)%R.
Proof.
unfold RmaxAbsFun.
......@@ -985,7 +985,7 @@ Lemma multiplication_error_af_evals
(mult_aff (afQ2R af1) (afQ2R af2) (noise + 4)))
(mkErrorPolyR
(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'.
Proof.
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