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
8eeef292
Commit
8eeef292
authored
3 years ago
by
Basile Desloges
Browse files
Options
Downloads
Patches
Plain Diff
[eacsl] Add not_yet for lambda abstractions
parent
a429a057
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/e-acsl/src/code_generator/translate.ml
+24
-16
24 additions, 16 deletions
src/plugins/e-acsl/src/code_generator/translate.ml
with
24 additions
and
16 deletions
src/plugins/e-acsl/src/code_generator/translate.ml
+
24
−
16
View file @
8eeef292
...
...
@@ -1018,22 +1018,30 @@ and at_to_exp_no_lscope env kf t_opt label e =
res
,
!
env_ref
,
Typed_number
.
C_number
and
env_of_li
~
adata
li
kf
env
loc
=
let
t
=
Misc
.
term_of_li
li
in
let
lenv
=
Env
.
Local_vars
.
get
env
in
let
ty
=
Typing
.
get_typ
~
lenv
t
in
let
vi
,
vi_e
,
env
=
Env
.
Logic_binding
.
add
~
ty
env
kf
li
.
l_var_info
in
let
e
,
adata
,
env
=
term_to_exp
~
adata
kf
env
t
in
let
stmt
=
match
Typing
.
get_number_ty
~
lenv
t
with
|
Typing
.(
C_integer
_
|
C_float
_
|
Nan
)
->
Smart_stmt
.
assigns
~
loc
~
result
:
(
Cil
.
var
vi
)
e
|
Typing
.
Gmpz
->
Gmp
.
init_set
~
loc
(
Cil
.
var
vi
)
vi_e
e
|
Typing
.
Rational
->
Rational
.
init_set
~
loc
(
Cil
.
var
vi
)
vi_e
e
|
Typing
.
Real
->
Error
.
not_yet
"real number"
in
adata
,
Env
.
add_stmt
env
kf
stmt
match
li
.
l_var_info
.
lv_type
with
|
Ctype
_
|
Linteger
|
Lreal
->
let
t
=
Misc
.
term_of_li
li
in
let
lenv
=
Env
.
Local_vars
.
get
env
in
let
ty
=
Typing
.
get_typ
~
lenv
t
in
let
vi
,
vi_e
,
env
=
Env
.
Logic_binding
.
add
~
ty
env
kf
li
.
l_var_info
in
let
e
,
adata
,
env
=
term_to_exp
~
adata
kf
env
t
in
let
stmt
=
match
Typing
.
get_number_ty
~
lenv
t
with
|
Typing
.(
C_integer
_
|
C_float
_
|
Nan
)
->
Smart_stmt
.
assigns
~
loc
~
result
:
(
Cil
.
var
vi
)
e
|
Typing
.
Gmpz
->
Gmp
.
init_set
~
loc
(
Cil
.
var
vi
)
vi_e
e
|
Typing
.
Rational
->
Rational
.
init_set
~
loc
(
Cil
.
var
vi
)
vi_e
e
|
Typing
.
Real
->
Error
.
not_yet
"real number"
in
adata
,
Env
.
add_stmt
env
kf
stmt
|
Ltype
_
->
Env
.
not_yet
env
"user-defined logic type"
|
Lvar
_
->
Env
.
not_yet
env
"type variable"
|
Larrow
_
->
Env
.
not_yet
env
"lambda-abstraction"
(* Convert an ACSL predicate into a corresponding C expression (if any) in the
given environment. Also extend this environment which includes the generating
...
...
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