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
f2146460
Commit
f2146460
authored
1 year ago
by
Thibault Martin
Committed by
Allan Blanchard
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix expr_to_term
parent
a336be9b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/spec/expr_to_term.ml
+3
-2
3 additions, 2 deletions
tests/spec/expr_to_term.ml
with
3 additions
and
2 deletions
tests/spec/expr_to_term.ml
+
3
−
2
View file @
f2146460
...
@@ -50,8 +50,8 @@ let treat_fct check fct =
...
@@ -50,8 +50,8 @@ let treat_fct check fct =
|
_
->
false
)
|
_
->
false
)
stmts
stmts
in
in
let
ensures
=
(
List
.
hd
(
Annotations
.
funspec
fct
)
.
spec_behavior
)
.
b_post_cond
let
ensures
=
(
List
.
hd
(
Annotations
.
funspec
fct
)
.
spec_behavior
)
.
b_post_cond
in
in
let
ensures
=
List
.
filter
(
fun
(
kind
,_
)
->
kind
=
Normal
)
ensures
in
(* A bit fragile, but should do the trick as long as the test itself does
(* A bit fragile, but should do the trick as long as the test itself does
not get too complicated (regarding the C code at least). *)
not get too complicated (regarding the C code at least). *)
if
not
(
List
.
length
stmts
=
List
.
length
ensures
)
then
if
not
(
List
.
length
stmts
=
List
.
length
ensures
)
then
...
@@ -70,6 +70,7 @@ let treat_fct_pred fct =
...
@@ -70,6 +70,7 @@ let treat_fct_pred fct =
stmts
stmts
in
in
let
ensures
=
(
List
.
hd
(
Annotations
.
funspec
fct
)
.
spec_behavior
)
.
b_post_cond
in
let
ensures
=
(
List
.
hd
(
Annotations
.
funspec
fct
)
.
spec_behavior
)
.
b_post_cond
in
let
ensures
=
List
.
filter
(
fun
(
kind
,_
)
->
kind
=
Normal
)
ensures
in
if
List
.
length
stmts
<>
List
.
length
ensures
then
if
List
.
length
stmts
<>
List
.
length
ensures
then
Kernel
.
fatal
"ill-formed test in function %a"
Kernel_function
.
pretty
fct
;
Kernel
.
fatal
"ill-formed test in function %a"
Kernel_function
.
pretty
fct
;
List
.
iter2
(
check_expr_pred
fct
)
stmts
ensures
;
List
.
iter2
(
check_expr_pred
fct
)
stmts
ensures
;
...
...
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