Commit 1a95eddd authored by Heiko Becker's avatar Heiko Becker
Browse files

Renaming in Coq dev, move attic files to separate folder

parent 9113b954
......@@ -14,7 +14,7 @@ coq/*.vo
coq/.*
coq/*.v.d
coq/*/*.v.d
coq/Makefile
coq/Makefile*
coq/*/*.glob
coq/*/.*
coq/*/*.vo
......
......@@ -3,8 +3,8 @@
used to verify analsysis result in the final theorem of a certificate.
**)
Require Import Coq.Reals.Reals.
Require Import Daisy.Infra.Abbrevs Daisy.Infra.RealConstruction Daisy.Infra.RealSimps.
Require Import Daisy.IntervalArith Daisy.Expressions Daisy.Commands.
Require Import Flover.Infra.Abbrevs Flover.Infra.RealConstruction Flover.Infra.RealSimps.
Require Import Flover.IntervalArith Flover.Expressions Flover.Commands.
Definition abs_env:Type := exp R -> interval -> err -> Prop.
......
(**
Formalization of the Abstract Syntax Tree of a subset used in the Daisy framework
Formalization of the Abstract Syntax Tree of a subset used in the Flover framework
**)
Require Import Coq.Reals.Reals.
Require Import Daisy.Infra.Abbrevs Daisy.Expressions.
Require Import Flover.Infra.Abbrevs Flover.Expressions.
(**
Next define what a program is.
Currently no loops, only conditionals and assignments
......@@ -15,7 +15,7 @@ Let: nat -> exp V -> cmd V -> cmd V
| Nop: cmd V.
(**
Small Step semantics for Daisy language, parametric by evaluation function.
Small Step semantics for Flover language, parametric by evaluation function.
**)
Inductive sstep : cmd R -> env_ty -> R -> cmd R -> env_ty -> Prop :=
let_s x e s env v eps:
......@@ -31,7 +31,7 @@ Inductive sstep : cmd R -> env_ty -> R -> cmd R -> env_ty -> Prop :=
eval_exp eps env e v ->
sstep (Ret R e) env eps (Nop R) (updEnv 0 v env).
(**
Analogously define Big Step semantics for the Daisy language,
Analogously define Big Step semantics for the Flover language,
parametric by the evaluation function
**)
Inductive bstep : cmd R -> env_ty -> R -> cmd R -> env_ty -> Prop :=
......
(**
Formalization of the base expression language for the daisy framework
Formalization of the base expression language for the flover framework
**)
Require Import Coq.Reals.Reals Coq.micromega.Psatz Coq.QArith.QArith Interval.Interval_tactic.
Require Import Daisy.Infra.RealConstruction Daisy.Infra.RealSimps Daisy.Infra.Abbrevs.
Require Import Flover.Infra.RealConstruction Flover.Infra.RealSimps Flover.Infra.Abbrevs.
Set Implicit Arguments.
Module Type Expression.
......
......@@ -2,7 +2,7 @@
Precondition agreement checker and its soundness proof
**)
Require Import Coq.Reals.Reals Coq.Lists.List Coq.QArith.QArith.
Require Import Daisy.Infra.Abbrevs Daisy.Expressions Daisy.Infra.RationalSimps Daisy.Infra.ExpressionAbbrevs Daisy.IntervalArithQ.
Require Import Flover.Infra.Abbrevs Flover.Expressions Flover.Infra.RationalSimps Flover.Infra.ExpressionAbbrevs Flover.IntervalArithQ.
Import Lists.List.ListNotations.
......
Require Import Daisy.CertificateChecker.
Require Import Flover.CertificateChecker.
(*
TODO: update according to:
[ Info ]
......
Require Import Daisy.CertificateChecker.
Require Import Flover.CertificateChecker.
(*
[ Info ]
......
Require Import Coq.Reals.Reals.
Require Import Daisy.Infra.abbrevs Daisy.daisy_lang Daisy.abs_err Daisy.exps.
Require Import Flover.Infra.abbrevs Flover.flover_lang Flover.abs_err Flover.exps.
(**
Notes:
......
Require Import Coq.Reals.Reals.
Require Import Interval.Interval_tactic.
Require Import Daisy.Infra.abbrevs.
Require Import Flover.Infra.abbrevs.
Definition min4 (a:R) (b:R) (c:R) (d:R) := Rmin a (Rmin b (Rmin c d)).
Definition max4 (a:R) (b:R) (c:R) (d:R) := Rmax a (Rmax b (Rmax c d)).
......
......@@ -2,7 +2,7 @@
Toy Example to understand what certificate we will need for a given program
**)
Require Import Coq.Reals.Reals.
Require Import Daisy.daisy_lang Daisy.exps Daisy.abs_err.
Require Import Flover.flover_lang Flover.exps Flover.abs_err.
Definition prg :cmd R :=
Ret R (Binop Mult (Const (3%R)) (Var R 1)).
......
......@@ -2,7 +2,7 @@ open preamble
open machine_ieeeTheory binary_ieeeTheory lift_ieeeTheory realTheory
open MachineTypeTheory ExpressionsTheory RealSimpsTheory DaisyTactics CertificateCheckerTheory
open MachineTypeTheory ExpressionsTheory RealSimpsTheory FloverTactics CertificateCheckerTheory
open FPRangeValidatorTheory IntervalValidationTheory TypingTheory ErrorValidationTheory IntervalArithTheory AbbrevsTheory
......
......@@ -5,15 +5,15 @@
as shown in the soundness theorem.
**)
Require Import Coq.Reals.Reals Coq.QArith.Qreals.
Require Import Daisy.Infra.RealSimps Daisy.Infra.RationalSimps Daisy.Infra.RealRationalProps Daisy.Infra.Ltacs.
Require Import Daisy.IntervalValidation Daisy.ErrorValidation Daisy.Environments Daisy.Typing Daisy.FPRangeValidator.
Require Import Flover.Infra.RealSimps Flover.Infra.RationalSimps Flover.Infra.RealRationalProps Flover.Infra.Ltacs.
Require Import Flover.IntervalValidation Flover.ErrorValidation Flover.Environments Flover.Typing Flover.FPRangeValidator.
Require Export Coq.QArith.QArith.
Require Export Daisy.Infra.ExpressionAbbrevs Daisy.Commands.
Require Export Flover.Infra.ExpressionAbbrevs Flover.Commands.
(** Certificate checking function **)
Definition CertificateChecker (e:exp Q) (absenv:analysisResult) (P:precond) (defVars:nat -> option mType) :=
let tMap := (typeMap defVars e (DaisyMap.empty mType)) in
let tMap := (typeMap defVars e (FloverMap.empty mType)) in
if (typeCheck e defVars tMap)
then
if (validIntervalbounds e absenv P NatSet.empty) && FPRangeValidator e absenv tMap NatSet.empty
......@@ -37,7 +37,7 @@ Theorem Certificate_checking_is_sound (e:exp Q) (absenv:analysisResult) P defVar
defVars v = Some m) ->
CertificateChecker e absenv P defVars = true ->
exists iv err vR vF m,
DaisyMap.find e absenv = Some (iv, err) /\
FloverMap.find e absenv = Some (iv, err) /\
eval_exp E1 (toRMap defVars) (toREval (toRExp e)) vR M0 /\
eval_exp E2 defVars (toRExp e) vF m /\
(forall vF m,
......@@ -67,12 +67,12 @@ Proof.
edestruct (validIntervalbounds_sound e (A:=absenv) (P:=P) (fVars:=usedVars e) (dVars:=NatSet.empty) (Gamma:=defVars) (E:=E1))
as [iv_e [ err_e [vR [ map_e [eval_real real_bounds_e]]]]]; eauto.
destruct iv_e as [elo ehi].
edestruct (validErrorbound_sound e (typeMap defVars e (DaisyMap.empty mType)) L approxE1E2 H0 eval_real R0 L1 H P_valid H1 map_e) as [[vF [mF eval_float]] err_bounded]; auto.
edestruct (validErrorbound_sound e (typeMap defVars e (FloverMap.empty mType)) L approxE1E2 H0 eval_real R0 L1 H P_valid H1 map_e) as [[vF [mF eval_float]] err_bounded]; auto.
exists (elo, ehi), err_e, vR, vF, mF; split; auto.
Qed.
Definition CertificateCheckerCmd (f:cmd Q) (absenv:analysisResult) (P:precond) defVars:=
let tMap := typeMapCmd defVars f (DaisyMap.empty mType) in
let tMap := typeMapCmd defVars f (FloverMap.empty mType) in
if (typeCheckCmd f defVars tMap && validSSA f (freeVars f))
then
if (validIntervalboundsCmd f absenv P NatSet.empty) &&
......@@ -92,7 +92,7 @@ Theorem Certificate_checking_cmds_is_sound (f:cmd Q) (absenv:analysisResult) P d
defVars v = Some m) ->
CertificateCheckerCmd f absenv P defVars = true ->
exists iv err vR vF m,
DaisyMap.find (getRetExp f) absenv = Some (iv,err) /\
FloverMap.find (getRetExp f) absenv = Some (iv,err) /\
bstep (toREvalCmd (toRCmd f)) E1 (toRMap defVars) vR M0 /\
bstep (toRCmd f) E2 defVars vF m /\
(forall vF m,
......
Require Import Daisy.CertificateChecker Daisy.daisyParser.
Require Import Flover.CertificateChecker Flover.floverParser.
Require Import Coq.extraction.ExtrOcamlString Coq.extraction.ExtrOcamlBasic Coq.extraction.ExtrOcamlNatBigInt Coq.extraction.ExtrOcamlZBigInt.
Extraction Language Ocaml.
......
(**
Formalization of the Abstract Syntax Tree of a subset used in the Daisy framework
Formalization of the Abstract Syntax Tree of a subset used in the Flover framework
**)
Require Import Coq.Reals.Reals Coq.QArith.QArith.
Require Import Daisy.Expressions.
Require Export Daisy.Infra.ExpressionAbbrevs Daisy.Infra.NatSet.
Require Import Flover.Expressions.
Require Export Flover.Infra.ExpressionAbbrevs Flover.Infra.NatSet.
(**
Next define what a program is.
......@@ -35,7 +35,7 @@ Fixpoint toREvalCmd (f:cmd R) :=
(*
UNUSED!
Small Step semantics for Daisy language
Small Step semantics for Flover language
Inductive sstep : cmd R -> env -> R -> cmd R -> env -> Prop :=
let_s x e s E v eps:
eval_exp eps E e v ->
......@@ -46,7 +46,7 @@ Inductive sstep : cmd R -> env -> R -> cmd R -> env -> Prop :=
*)
(**
Define big step semantics for the Daisy language, terminating on a "returned"
Define big step semantics for the Flover language, terminating on a "returned"
result value
**)
Inductive bstep : cmd R -> env -> (nat -> option mType) -> R -> mType -> Prop :=
......
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