Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Lustrec - public version
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LustreC
Lustrec - public version
Commits
d800b9c3
Commit
d800b9c3
authored
2 years ago
by
BRUN Lelio
Browse files
Options
Downloads
Patches
Plain Diff
do not generate ghost reset functions for stateless machines
parent
a0d40496
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/backends/C/c_backend_header.ml
+11
-4
11 additions, 4 deletions
src/backends/C/c_backend_header.ml
src/backends/C/c_backend_spec.ml
+8
-5
8 additions, 5 deletions
src/backends/C/c_backend_spec.ml
with
19 additions
and
9 deletions
src/backends/C/c_backend_header.ml
+
11
−
4
View file @
d800b9c3
...
...
@@ -307,7 +307,9 @@ struct
let
pp_alloc_header
header_fmt
basename
machines
dependencies
=
(* Include once: start *)
let
machines'
=
List
.
filter
(
fun
m
->
not
m
.
mis_contract
)
machines
in
let
machines'
=
List
.
filter
(
fun
m
->
not
m
.
mis_contract
&&
not
(
fst
(
get_stateless_status
m
))
)
machines
in
let
baseNAME
=
file_to_module_name
basename
in
let
self_dep
=
{
...
...
@@ -452,7 +454,7 @@ struct
~
pp_prologue
:
(
pp_print_endcut
"/* Struct declarations */"
)
pp_machine_struct_top_decl_from_header
~
pp_epilogue
:
pp_print_cutcut
)
nodes
(
List
.
filter
(
fun
td
->
not
(
fst
(
get_stateless_status_top_decl
td
)))
nodes
)
(* Print the prototypes of all machines *)
(
pp_print_list
~
pp_open_box
:
pp_open_vbox0
...
...
@@ -464,7 +466,9 @@ struct
let
pp_memory_header
header_fmt
basename
machines
dependencies
=
(* Include once: start *)
let
machines'
=
List
.
filter
(
fun
m
->
not
m
.
mis_contract
)
machines
in
let
machines'
=
List
.
filter
(
fun
m
->
not
m
.
mis_contract
&&
not
(
fst
(
get_stateless_status
m
))
)
machines
in
let
baseNAME
=
file_to_module_name
basename
in
fprintf
header_fmt
...
...
@@ -501,6 +505,9 @@ struct
pp
~
pp_epilogue
:
pp_print_cutcut
in
let
machines'
=
List
.
filter
(
fun
m
->
not
(
fst
(
get_stateless_status
m
)))
machines
in
fprintf
header_fmt
"@[<v>%a@,#ifndef _%s_SPEC@,#define _%s_SPEC@,@,%a@,%a#endif@]@."
...
...
@@ -515,7 +522,7 @@ struct
(
pp_preds
"/* Monolithic ghost `reset` functions */"
(
fun
fmt
m
->
let
mem
=
mk_mem
m
in
Src
.
pp_ghost_reset_spec_code
machines
mem
fmt
m
))
machines
machines
'
end
(* Local Variables: *)
(* compile-command:"make -C ../../.." *)
...
...
This diff is collapsed.
Click to expand it.
src/backends/C/c_backend_spec.ml
+
8
−
5
View file @
d800b9c3
...
...
@@ -1075,23 +1075,26 @@ module HdrMod = struct
pp
~
pp_epilogue
:
pp_print_cutcut
in
let
machines'
=
List
.
filter
(
fun
m
->
not
(
fst
(
get_stateless_status
m
)))
machines
in
fprintf
fmt
"%a%a%a%a%a%a%a"
(
pp_preds
"/* ACSL `valid` predicates */"
pp_mem_valid_def
)
machines
machines
'
(
pp_preds
"/* ACSL ghost structures */"
pp_machine_ghost_struct
)
machines
machines
'
(
pp_preds
"/* ACSL initialization annotations */"
pp_initialization_def
)
machines
machines
'
(
pp_preds
"/* ACSL `memory pack` simulations */"
pp_memory_pack_defs
)
machines
machines
'
(
pp_preds
"/* ACSL transition annotations */"
pp_transition_defs
)
machines
(
pp_preds
"/* ACSL transition memory footprints lemmas */"
pp_transition_footprint_lemmas
)
machines
machines
'
(
pp_preds
"/* k-induction predicates and lemmas */"
(
fun
fmt
m
->
let
c
,
m_c
=
contract_of
machines
m
in
pp_print_option
(
pp_proof_annotation
m
m_c
)
fmt
c
))
...
...
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