Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FloVer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AVA
FloVer
Commits
8414e5ff
Commit
8414e5ff
authored
7 years ago
by
Heiko Becker
Browse files
Options
Downloads
Patches
Plain Diff
Extract general RoundoffErrorValidator
parent
c8684a1e
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
coq/CertificateChecker.v
+3
-3
3 additions, 3 deletions
coq/CertificateChecker.v
coq/RoundoffErrorValidator.v
+33
-0
33 additions, 0 deletions
coq/RoundoffErrorValidator.v
with
36 additions
and
3 deletions
coq/CertificateChecker.v
+
3
−
3
View file @
8414e5ff
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
**
)
**
)
Require
Import
Coq
.
Reals
.
Reals
Coq
.
QArith
.
Qreals
.
Require
Import
Coq
.
Reals
.
Reals
Coq
.
QArith
.
Qreals
.
Require
Import
Flover
.
Infra
.
RealSimps
Flover
.
Infra
.
RationalSimps
Flover
.
Infra
.
RealRationalProps
Flover
.
Infra
.
Ltacs
.
Require
Import
Flover
.
Infra
.
RealSimps
Flover
.
Infra
.
RationalSimps
Flover
.
Infra
.
RealRationalProps
Flover
.
Infra
.
Ltacs
.
Require
Import
Flover
.
RealRangeValidator
Flover
.
ErrorValidat
ion
Flover
.
Environments
Flover
.
Typing
Flover
.
FPRangeValidator
.
Require
Import
Flover
.
RealRangeValidator
Flover
.
Roundoff
ErrorValidat
or
Flover
.
Environments
Flover
.
Typing
Flover
.
FPRangeValidator
.
Require
Export
Coq
.
QArith
.
QArith
.
Require
Export
Coq
.
QArith
.
QArith
.
Require
Export
Flover
.
Infra
.
ExpressionAbbrevs
Flover
.
Commands
.
Require
Export
Flover
.
Infra
.
ExpressionAbbrevs
Flover
.
Commands
.
...
@@ -17,7 +17,7 @@ Definition CertificateChecker (e:expr Q) (absenv:analysisResult) (P:precond) (de
...
@@ -17,7 +17,7 @@ Definition CertificateChecker (e:expr Q) (absenv:analysisResult) (P:precond) (de
if
(
typeCheck
e
defVars
tMap
)
if
(
typeCheck
e
defVars
tMap
)
then
then
if
RangeValidator
e
absenv
P
&&
FPRangeValidator
e
absenv
tMap
NatSet
.
empty
if
RangeValidator
e
absenv
P
&&
FPRangeValidator
e
absenv
tMap
NatSet
.
empty
then
(
validErrorbound
e
tMap
absenv
NatSet
.
empty
)
then
RoundoffErrorValidator
e
tMap
absenv
NatSet
.
empty
else
false
else
false
else
false
.
else
false
.
...
@@ -67,7 +67,7 @@ Proof.
...
@@ -67,7 +67,7 @@ Proof.
edestruct
(
RangeValidator_sound
e
absenv
(
P
:=
P
)
(
Gamma
:=
defVars
)
(
E
:=
E1
))
edestruct
(
RangeValidator_sound
e
absenv
(
P
:=
P
)
(
Gamma
:=
defVars
)
(
E
:=
E1
))
as
[
iv_e
[
err_e
[
vR
[
map_e
[
eval_real
real_bounds_e
]]]]];
eauto
.
as
[
iv_e
[
err_e
[
vR
[
map_e
[
eval_real
real_bounds_e
]]]]];
eauto
.
destruct
iv_e
as
[
elo
ehi
].
destruct
iv_e
as
[
elo
ehi
].
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
.
edestruct
(
RoundoffErrorValidator
_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
.
exists
(
elo
,
ehi
),
err_e
,
vR
,
vF
,
mF
;
split
;
auto
.
Qed
.
Qed
.
...
...
This diff is collapsed.
Click to expand it.
coq/RoundoffErrorValidator.v
0 → 100644
+
33
−
0
View file @
8414e5ff
From
Coq
Require
Import
Reals
.
Reals
QArith
.
Qreals
.
From
Flover
Require
Export
Infra
.
ExpressionAbbrevs
ErrorValidation
.
Definition
RoundoffErrorValidator
(
e
:
expr
Q
)
(
tMap
:
FloverMap
.
t
mType
)
(
A
:
analysisResult
)
(
dVars
:
NatSet
.
t
)
:=
(
*
if
*
)
validErrorbound
e
tMap
A
dVars
.
(
*
then
true
*
)
(
*
else
validAffineErrorBounds
e
A
tMap
dVars
*
)
Theorem
RoundoffErrorValidator_sound
:
forall
(
e
:
expr
Q
)
(
E1
E2
:
env
)
(
fVars
dVars
:
NatSet
.
t
)
(
A
:
analysisResult
)
(
nR
:
R
)
(
err
:
error
)
(
P
:
precond
)
(
elo
ehi
:
Q
)
(
Gamma
:
FloverMap
.
t
mType
)
(
defVars
:
nat
->
option
mType
),
Typing
.
typeCheck
e
defVars
Gamma
=
true
->
Environments
.
approxEnv
E1
defVars
A
fVars
dVars
E2
->
NatSet
.
Subset
(
usedVars
e
--
dVars
)
fVars
->
eval_expr
E1
(
toRMap
defVars
)
(
toREval
(
toRExp
e
))
nR
REAL
->
RoundoffErrorValidator
e
Gamma
A
dVars
=
true
->
IntervalValidation
.
validIntervalbounds
e
A
P
dVars
=
true
->
IntervalValidation
.
dVars_range_valid
dVars
E1
A
->
IntervalValidation
.
fVars_P_sound
fVars
E1
P
->
IntervalValidation
.
vars_typed
(
fVars
∪
dVars
)
defVars
->
FloverMap
.
find
(
elt
:=
intv
*
error
)
e
A
=
Some
(
elo
,
ehi
,
err
)
->
(
exists
(
nF
:
R
)
(
m
:
mType
),
eval_expr
E2
defVars
(
toRExp
e
)
nF
m
)
/
\
(
forall
(
nF
:
R
)
(
m
:
mType
),
eval_expr
E2
defVars
(
toRExp
e
)
nF
m
->
(
Rabs
(
nR
-
nF
)
<=
Q2R
err
)
%
R
).
Proof
.
intros
.
cbn
in
*
.
eapply
validErrorbound_sound
;
eauto
.
Qed
.
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment