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
07edb064
Commit
07edb064
authored
3 years ago
by
BRUN Lelio
Browse files
Options
Downloads
Patches
Plain Diff
remove useless test and try to avoid useless casts in ACSL
parent
bd62f385
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
offline_tests/test2.lus
+0
-4
0 additions, 4 deletions
offline_tests/test2.lus
src/backends/C/c_backend_spec.ml
+7
-4
7 additions, 4 deletions
src/backends/C/c_backend_spec.ml
with
7 additions
and
8 deletions
offline_tests/test2.lus
deleted
100644 → 0
+
0
−
4
View file @
bd62f385
type
toto
=
enum
{
Up
,
Down
};
const
titi
=
[
1
,
2
];
This diff is collapsed.
Click to expand it.
src/backends/C/c_backend_spec.ml
+
7
−
4
View file @
07edb064
...
...
@@ -384,15 +384,18 @@ module PrintSpec = struct
fprintf
fmt
"%s.%a"
mem
pp_var_decl
x
let
not_var
v
=
match
v
.
value_desc
with
Var
_
->
false
|
_
->
true
let
is_const
v
=
match
v
.
value_desc
with
Cst
_
->
true
|
_
->
false
let
pp_expr
?
(
test_output
=
false
)
m
mem
fmt
=
function
|
Val
v
->
let
pp
=
pp_c_val
~
indirect
:
false
m
mem
(
pp_c_var_read
~
test_output
m
)
in
(
if
not_var
v
then
if
Types
.
is_bool_type
v
.
value_type
then
pp_bool_cast
pp
else
if
Types
.
is_real_type
v
.
value_type
then
pp_double_cast
pp
else
if
Types
.
is_int_type
v
.
value_type
then
pp_int_cast
pp
else
pp
if
Types
.
is_bool_type
v
.
value_type
then
pp_bool_cast
pp
else
if
is_const
v
then
if
Types
.
is_real_type
v
.
value_type
then
pp_double_cast
pp
else
if
Types
.
is_int_type
v
.
value_type
then
pp_int_cast
pp
else
pp
else
pp
else
pp
)
fmt
v
...
...
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