Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frama-c
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pub
frama-c
Commits
cbed8092
Commit
cbed8092
authored
4 years ago
by
Loïc Correnson
Committed by
Virgile Prevosto
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[wp] don't put check lemma in proof context
parent
cf255eef
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/plugins/wp/LogicUsage.ml
+8
-7
8 additions, 7 deletions
src/plugins/wp/LogicUsage.ml
with
8 additions
and
7 deletions
src/plugins/wp/LogicUsage.ml
+
8
−
7
View file @
cbed8092
...
@@ -199,7 +199,7 @@ let ip_lemma l =
...
@@ -199,7 +199,7 @@ let ip_lemma l =
il_args
=
l
.
lem_types
;
il_loc
=
(
l
.
lem_position
,
l
.
lem_position
);
il_args
=
l
.
lem_types
;
il_loc
=
(
l
.
lem_position
,
l
.
lem_position
);
il_pred
=
l
.
lem_property
}
il_pred
=
l
.
lem_property
}
let
lemma_of_global
proof
=
function
let
lemma_of_global
~
context
=
function
|
Dlemma
(
name
,
axiom
,
labels
,
types
,
pred
,_,
loc
)
->
|
Dlemma
(
name
,
axiom
,
labels
,
types
,
pred
,_,
loc
)
->
let
kind
=
if
axiom
then
`Axiom
else
let
kind
=
if
axiom
then
`Axiom
else
if
pred
.
tp_only_check
then
`Check
else
`Lemma
in
if
pred
.
tp_only_check
then
`Check
else
`Lemma
in
...
@@ -210,14 +210,14 @@ let lemma_of_global proof = function
...
@@ -210,14 +210,14 @@ let lemma_of_global proof = function
lem_labels
=
labels
;
lem_labels
=
labels
;
lem_kind
=
kind
;
lem_kind
=
kind
;
lem_property
=
pred
.
tp_statement
;
lem_property
=
pred
.
tp_statement
;
lem_depends
=
proof
;
lem_depends
=
context
;
}
}
|
_
->
assert
false
|
_
->
assert
false
let
populate
a
proof
=
function
let
populate
a
~
context
=
function
|
Dfun_or_pred
(
l
,_
)
->
a
.
ax_logics
<-
l
::
a
.
ax_logics
|
Dfun_or_pred
(
l
,_
)
->
a
.
ax_logics
<-
l
::
a
.
ax_logics
|
Dtype
(
t
,_
)
->
a
.
ax_types
<-
t
::
a
.
ax_types
|
Dtype
(
t
,_
)
->
a
.
ax_types
<-
t
::
a
.
ax_types
|
Dlemma
_
as
g
->
a
.
ax_lemmas
<-
lemma_of_global
proof
g
::
a
.
ax_lemmas
|
Dlemma
_
as
g
->
a
.
ax_lemmas
<-
lemma_of_global
~
context
g
::
a
.
ax_lemmas
|
_
->
()
|
_
->
()
let
ip_of_axiomatic
g
=
let
ip_of_axiomatic
g
=
...
@@ -225,7 +225,7 @@ let ip_of_axiomatic g =
...
@@ -225,7 +225,7 @@ let ip_of_axiomatic g =
|
None
->
assert
false
|
None
->
assert
false
|
Some
ip
->
ip
|
Some
ip
->
ip
let
axiomatic_of_global
proof
=
function
let
axiomatic_of_global
~
context
=
function
|
Daxiomatic
(
name
,
globals
,_,
loc
)
as
g
->
|
Daxiomatic
(
name
,
globals
,_,
loc
)
as
g
->
let
a
=
{
let
a
=
{
ax_name
=
name
;
ax_name
=
name
;
...
@@ -234,7 +234,7 @@ let axiomatic_of_global proof = function
...
@@ -234,7 +234,7 @@ let axiomatic_of_global proof = function
ax_reads
=
Varinfo
.
Set
.
empty
;
ax_reads
=
Varinfo
.
Set
.
empty
;
ax_types
=
[]
;
ax_lemmas
=
[]
;
ax_logics
=
[]
;
ax_types
=
[]
;
ax_lemmas
=
[]
;
ax_logics
=
[]
;
}
in
}
in
List
.
iter
(
populate
a
proof
)
globals
;
List
.
iter
(
populate
a
~
context
)
globals
;
a
.
ax_types
<-
List
.
rev
a
.
ax_types
;
a
.
ax_types
<-
List
.
rev
a
.
ax_types
;
a
.
ax_logics
<-
List
.
rev
a
.
ax_logics
;
a
.
ax_logics
<-
List
.
rev
a
.
ax_logics
;
a
.
ax_lemmas
<-
List
.
rev
a
.
ax_lemmas
;
a
.
ax_lemmas
<-
List
.
rev
a
.
ax_lemmas
;
...
@@ -407,7 +407,8 @@ class visitor =
...
@@ -407,7 +407,8 @@ class visitor =
|
Dlemma
_
->
|
Dlemma
_
->
let
lem
=
lemma_of_global
database
.
proofcontext
global
in
let
lem
=
lemma_of_global
database
.
proofcontext
global
in
register_lemma
database
self
#
section
lem
;
register_lemma
database
self
#
section
lem
;
database
.
proofcontext
<-
lem
::
database
.
proofcontext
;
if
lem
.
lem_kind
<>
`Check
then
database
.
proofcontext
<-
lem
::
database
.
proofcontext
;
SkipChildren
SkipChildren
|
Dtype
(
t
,_
)
->
|
Dtype
(
t
,_
)
->
...
...
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