Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
Frama Clang
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
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 Clang
Commits
046ab65e
Commit
046ab65e
authored
4 years ago
by
Loïc Correnson
Committed by
Virgile Prevosto
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[kernel] merged axioms and lemmas
parent
54403a9e
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
convert_acsl.ml
+9
-8
9 additions, 8 deletions
convert_acsl.ml
with
9 additions
and
8 deletions
convert_acsl.ml
+
9
−
8
View file @
046ab65e
...
...
@@ -313,7 +313,7 @@ and convert_logic_expr_node env = function
let
l
=
convert_logic_label_opt
l
in
let
t
=
convert_logic_expr
env
t
in
PLoffset
(
l
,
t
)
|
TBlock_length
(
l
,
t
)
->
|
TBlock_length
(
l
,
t
)
->
let
l
=
convert_logic_label_opt
l
in
let
t
=
convert_logic_expr
env
t
in
PLblock_length
(
l
,
t
)
...
...
@@ -403,7 +403,7 @@ and convert_logic_offset env base = function
and
path_of_offset
env
=
function
|
TNoOffset
->
[]
|
TField
(
s
,
o
)
|
TModel
(
s
,
o
)
->
|
TField
(
s
,
o
)
|
TModel
(
s
,
o
)
->
let
path
=
path_of_offset
env
o
in
PLpathField
s
::
path
|
TBase
(
b
,
t
,
o
)
->
...
...
@@ -529,7 +529,7 @@ and convert_pred env = function
let
t1
=
convert_logic_expr
env
t1
in
let
t2
=
convert_logic_expr
env
t2
in
PLfresh
(
None
,
t1
,
t2
)
|
Pfresh
(
_
,_,_,_
)
->
Frama_Clang_option
.
fatal
|
Pfresh
(
_
,_,_,_
)
->
Frama_Clang_option
.
fatal
"zero or two labels needed in fresh construct"
|
Psubtype
_
->
Frama_Clang_option
.
not_yet_implemented
"subtyping relation"
...
...
@@ -593,10 +593,10 @@ let convert_assigns env = function
|
Intermediate_format
.
Writes
l
->
Logic_ptree
.
Writes
(
List
.
map
(
convert_from
env
)
l
)
let
convert_pred_tp
env
p
=
let
convert_pred_tp
env
?
(
kind
=
Cil_types
.
Assert
)
p
=
(* TODO: support check and admit in ACSL++. *)
let
tp_statement
=
convert_pred_named
env
p
in
{
tp_kind
=
Assert
;
tp_statement
}
{
tp_kind
=
kind
;
tp_statement
}
let
convert_termination_kind
=
function
|
Intermediate_format
.
Normal
->
Cil_types
.
Normal
...
...
@@ -766,8 +766,9 @@ let rec convert_annot env annot =
|
Dlemma
(
loc
,
name
,
is_axiom
,
labs
,
params
,
body
)
->
let
env
=
Convert_env
.
set_loc
env
loc
in
let
labs
=
List
.
map
convert_logic_label
labs
in
let
body
=
convert_pred_tp
env
body
in
LDlemma
(
name
,
is_axiom
,
labs
,
params
,
body
)
,
env
let
kind
=
if
is_axiom
then
Cil_types
.
Admit
else
Assert
in
let
body
=
convert_pred_tp
env
~
kind
body
in
LDlemma
(
name
,
labs
,
params
,
body
)
,
env
|
Dinvariant
(
loc
,
body
)
->
let
env
=
Convert_env
.
set_loc
env
loc
in
let
name
=
...
...
@@ -778,7 +779,7 @@ let rec convert_annot env annot =
env
body
.
li_name
TStandard
in
Mangling
.
mangle
body_name
t
None
in
let
body
=
let
body
=
match
body
.
fun_body
with
|
LBpred
p
->
convert_pred_named
env
p
...
...
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