Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
AVA
FloVer
Commits
1a95eddd
Commit
1a95eddd
authored
Feb 28, 2018
by
Heiko Becker
Browse files
Renaming in Coq dev, move attic files to separate folder
parent
9113b954
Changes
42
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
1a95eddd
...
...
@@ -14,7 +14,7 @@ coq/*.vo
coq/.*
coq/*.v.d
coq/*/*.v.d
coq/Makefile
coq/Makefile
*
coq/*/*.glob
coq/*/.*
coq/*/*.vo
...
...
coq/
attic/AbsoluteError.v
→
attic/
coq/
AbsoluteError.v
View file @
1a95eddd
...
...
@@ -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
.
...
...
coq/
attic/Commands_old.v
→
attic/
coq/
Commands_old.v
View file @
1a95eddd
(
**
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
:=
...
...
coq/
attic/ErrorValidationTests.v
→
attic/
coq/
ErrorValidationTests.v
View file @
1a95eddd
File moved
coq/
attic/ModuleExpressions.v
→
attic/
coq/
ModuleExpressions.v
View file @
1a95eddd
(
**
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
.
...
...
coq/
attic/PreconditionValidation.v
→
attic/
coq/
PreconditionValidation.v
View file @
1a95eddd
...
...
@@ -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
.
...
...
coq/
attic/RationalConstruction.v
→
attic/
coq/
RationalConstruction.v
View file @
1a95eddd
File moved
coq/
attic/SimpleDoppler.v
→
attic/
coq/
SimpleDoppler.v
View file @
1a95eddd
Require
Import
Daisy
.
CertificateChecker
.
Require
Import
Flover
.
CertificateChecker
.
(
*
TODO:
update
according
to
:
[
Info
]
...
...
coq/
attic/SimpleMultiplication.v
→
attic/
coq/
SimpleMultiplication.v
View file @
1a95eddd
Require
Import
Daisy
.
CertificateChecker
.
Require
Import
Flover
.
CertificateChecker
.
(
*
[
Info
]
...
...
coq/
attic/Typing_old.v
→
attic/
coq/
Typing_old.v
View file @
1a95eddd
File moved
coq/
attic/abstraction_thm.v
→
attic/
coq/
abstraction_thm.v
View file @
1a95eddd
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:
...
...
coq/
attic/interval_arith.v
→
attic/
coq/
interval_arith.v
View file @
1a95eddd
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
)).
...
...
coq/
attic/mult_abs
→
attic/
coq/
mult_abs
View file @
1a95eddd
File moved
coq/
attic/random_Q_props.v
→
attic/
coq/
random_Q_props.v
View file @
1a95eddd
File moved
coq/
attic/toy_example.v
→
attic/
coq/
toy_example.v
View file @
1a95eddd
...
...
@@ -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
)).
...
...
hol4/
attic/IEEE_unusedScript.sml
→
attic
/hol4
/IEEE_unusedScript.sml
View file @
1a95eddd
...
...
@@ -2,7 +2,7 @@ open preamble
open
machine_ieeeTheory
binary_ieeeTheory
lift_ieeeTheory
realTheory
open
MachineTypeTheory
ExpressionsTheory
RealSimpsTheory
Daisy
Tactics
CertificateCheckerTheory
open
MachineTypeTheory
ExpressionsTheory
RealSimpsTheory
Flover
Tactics
CertificateCheckerTheory
open
FPRangeValidatorTheory
IntervalValidationTheory
TypingTheory
ErrorValidationTheory
IntervalArithTheory
AbbrevsTheory
...
...
hol4/
attic/ieeeEquivScript.sml
→
attic
/hol4
/ieeeEquivScript.sml
View file @
1a95eddd
File moved
coq/CertificateChecker.v
View file @
1a95eddd
...
...
@@ -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
(
Daisy
Map
.
empty
mType
))
in
let
tMap
:=
(
typeMap
defVars
e
(
Flover
Map
.
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
,
Daisy
Map
.
find
e
absenv
=
Some
(
iv
,
err
)
/
\
Flover
Map
.
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
(
Daisy
Map
.
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
(
Flover
Map
.
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
(
Daisy
Map
.
empty
mType
)
in
let
tMap
:=
typeMapCmd
defVars
f
(
Flover
Map
.
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
,
Daisy
Map
.
find
(
getRetExp
f
)
absenv
=
Some
(
iv
,
err
)
/
\
Flover
Map
.
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
,
...
...
coq/Checker_extraction.v
View file @
1a95eddd
Require
Import
Daisy
.
CertificateChecker
Daisy
.
daisy
Parser
.
Require
Import
Flover
.
CertificateChecker
Flover
.
flover
Parser
.
Require
Import
Coq
.
extraction
.
ExtrOcamlString
Coq
.
extraction
.
ExtrOcamlBasic
Coq
.
extraction
.
ExtrOcamlNatBigInt
Coq
.
extraction
.
ExtrOcamlZBigInt
.
Extraction
Language
Ocaml
.
...
...
coq/Commands.v
View file @
1a95eddd
(
**
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
:=
...
...
Prev
1
2
3
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment