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
e283b28e
Commit
e283b28e
authored
1 year ago
by
Jan Rochel
Browse files
Options
Downloads
Patches
Plain Diff
[e-acsl] Translate_utils: cut comparison_to_exp into two
parent
c3a97b1e
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_utils.ml
+16
-22
16 additions, 22 deletions
src/plugins/e-acsl/src/code_generator/translate_utils.ml
with
16 additions
and
22 deletions
src/plugins/e-acsl/src/code_generator/translate_utils.ml
+
16
−
22
View file @
e283b28e
...
@@ -169,29 +169,9 @@ let gmp_to_sizet ~adata ~loc ~name ?(check_lower_bound=true) ?pp kf env t =
...
@@ -169,29 +169,9 @@ let gmp_to_sizet ~adata ~loc ~name ?(check_lower_bound=true) ?pp kf env t =
let
()
=
let
()
=
Memory_translate
.
gmp_to_sizet_ref
:=
gmp_to_sizet
Memory_translate
.
gmp_to_sizet_ref
:=
gmp_to_sizet
let
comparison_to_exp
let
exp_comparison_to_exp
~
adata
~
loc
kf
env
ity
bop
e1
e2
?
(
name
=
Misc
.
name_of_binop
bop
)
t_opt
=
~
loc
kf
env
ity
?
e1
bop
t1
t2
?
(
name
=
Misc
.
name_of_binop
bop
)
t_opt
=
let
e1
,
adata
,
env
=
match
e1
with
|
None
->
let
e1
,
adata
,
env
=
term_to_exp
~
adata
kf
env
t1
in
e1
,
adata
,
env
|
Some
e1
->
e1
,
adata
,
env
in
let
ty1
=
Cil
.
typeOf
e1
in
let
ty1
=
Cil
.
typeOf
e1
in
let
e2
,
adata
,
env
=
term_to_exp
~
adata
kf
env
t2
in
let
ty2
=
Cil
.
typeOf
e2
in
let
ty2
=
Cil
.
typeOf
e2
in
let
e
,
env
=
let
e
,
env
=
match
Logic_aggr
.
get_t
ty1
,
Logic_aggr
.
get_t
ty2
with
match
Logic_aggr
.
get_t
ty1
,
Logic_aggr
.
get_t
ty2
with
...
@@ -221,6 +201,20 @@ let comparison_to_exp
...
@@ -221,6 +201,20 @@ let comparison_to_exp
Printer
.
pp_typ
ty1
Printer
.
pp_typ
ty1
Printer
.
pp_typ
ty2
Printer
.
pp_typ
ty2
in
in
e
,
env
let
comparison_to_exp
~
adata
~
loc
kf
env
ity
?
e1
bop
t1
t2
?
name
t_opt
=
let
e1
,
adata
,
env
=
match
e1
with
|
None
->
let
e1
,
adata
,
env
=
term_to_exp
~
adata
kf
env
t1
in
e1
,
adata
,
env
|
Some
e1
->
e1
,
adata
,
env
in
let
e2
,
adata
,
env
=
term_to_exp
~
adata
kf
env
t2
in
let
e
,
env
=
exp_comparison_to_exp
~
loc
kf
env
ity
bop
e1
e2
?
name
t_opt
in
e
,
adata
,
env
e
,
adata
,
env
let
conditional_to_exp
?
(
name
=
"if"
)
~
loc
kf
t_opt
e1
(
e2
,
env2
)
(
e3
,
env3
)
=
let
conditional_to_exp
?
(
name
=
"if"
)
~
loc
kf
t_opt
e1
(
e2
,
env2
)
(
e3
,
env3
)
=
...
...
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