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
8dc4d8e9
Commit
8dc4d8e9
authored
4 years ago
by
Basile Desloges
Browse files
Options
Downloads
Patches
Plain Diff
[eacsl:codegen] Create a helper function to build a block statement from a list of statements
parent
8a36630f
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/plugins/e-acsl/src/code_generator/smart_stmt.ml
+1
-0
1 addition, 0 deletions
src/plugins/e-acsl/src/code_generator/smart_stmt.ml
src/plugins/e-acsl/src/code_generator/smart_stmt.mli
+3
-0
3 additions, 0 deletions
src/plugins/e-acsl/src/code_generator/smart_stmt.mli
with
4 additions
and
0 deletions
src/plugins/e-acsl/src/code_generator/smart_stmt.ml
+
1
−
0
View file @
8dc4d8e9
...
@@ -29,6 +29,7 @@ open Cil_types
...
@@ -29,6 +29,7 @@ open Cil_types
let
stmt
sk
=
Cil
.
mkStmt
~
valid_sid
:
true
sk
let
stmt
sk
=
Cil
.
mkStmt
~
valid_sid
:
true
sk
let
instr
i
=
stmt
(
Instr
i
)
let
instr
i
=
stmt
(
Instr
i
)
let
block_stmt
blk
=
stmt
(
Block
blk
)
let
block_stmt
blk
=
stmt
(
Block
blk
)
let
block_from_stmts
stmts
=
block_stmt
(
Cil
.
mkBlock
stmts
)
let
call
~
loc
?
result
e
args
=
instr
(
Call
(
result
,
e
,
args
,
loc
))
let
call
~
loc
?
result
e
args
=
instr
(
Call
(
result
,
e
,
args
,
loc
))
let
assigns
~
loc
~
result
e
=
instr
(
Set
(
result
,
e
,
loc
))
let
assigns
~
loc
~
result
e
=
instr
(
Set
(
result
,
e
,
loc
))
...
...
This diff is collapsed.
Click to expand it.
src/plugins/e-acsl/src/code_generator/smart_stmt.mli
+
3
−
0
View file @
8dc4d8e9
...
@@ -36,6 +36,9 @@ val block: stmt -> block -> stmt
...
@@ -36,6 +36,9 @@ val block: stmt -> block -> stmt
val
block_stmt
:
block
->
stmt
val
block_stmt
:
block
->
stmt
(** Create a block statement from a block *)
(** Create a block statement from a block *)
val
block_from_stmts
:
stmt
list
->
stmt
(** Create a block statement from a statement list. *)
val
assigns
:
loc
:
location
->
result
:
lval
->
exp
->
stmt
val
assigns
:
loc
:
location
->
result
:
lval
->
exp
->
stmt
(** [assigns ~loc ~result value] create a statement to assign the [value]
(** [assigns ~loc ~result value] create a statement to assign the [value]
expression to the [result] lval. *)
expression to the [result] lval. *)
...
...
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