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
d35b9d4d
Commit
d35b9d4d
authored
5 years ago
by
Allan Blanchard
Browse files
Options
Downloads
Patches
Plain Diff
[Test] Adds some tests related to insertion of formals in ghost functions
parent
63efb9da
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
tests/cil/insert_formal.i
+37
-0
37 additions, 0 deletions
tests/cil/insert_formal.i
tests/cil/insert_formal.ml
+10
-3
10 additions, 3 deletions
tests/cil/insert_formal.ml
tests/cil/oracle/insert_formal.res.oracle
+49
-0
49 additions, 0 deletions
tests/cil/oracle/insert_formal.res.oracle
with
96 additions
and
3 deletions
tests/cil/insert_formal.i
+
37
−
0
View file @
d35b9d4d
...
@@ -102,3 +102,40 @@ void a_ghost_b_c_a ( int a )/*@ ghost (int b, int c) */ {
...
@@ -102,3 +102,40 @@ void a_ghost_b_c_a ( int a )/*@ ghost (int b, int c) */ {
void
b_ghost_a_c_a
(
int
b
)
/*@ ghost (int a, int c) */
{
void
b_ghost_a_c_a
(
int
b
)
/*@ ghost (int a, int c) */
{
}
}
/*@ ghost
// v
void g_void_circumflex( void ) {
}
// v
void g_void_dollar( void ) {
}
// v
void g_a_circumflex( int a ) {
}
// v
void g_a_dollar( int a ) {
}
// v
void g_a_a( int a ){
}
// v
void g_a_b_c_a (int a, int b, int c) {
}
// v
void g_b_a_c_a (int b, int a, int c) {
}
*/
This diff is collapsed.
Click to expand it.
tests/cil/insert_formal.ml
+
10
−
3
View file @
d35b9d4d
...
@@ -20,12 +20,16 @@ let update_func f =
...
@@ -20,12 +20,16 @@ let update_func f =
let
circ_g_list
=
[
let
circ_g_list
=
[
"void_circumflex_g"
;
"void_circumflex_g"
;
"a_circumflex_g"
;
"a_circumflex_g"
;
"ghost_a_circumflex_g"
"ghost_a_circumflex_g"
;
"g_void_circumflex"
;
"g_a_circumflex"
]
in
]
in
let
dollar_g_list
=
[
let
dollar_g_list
=
[
"void_dollar_g"
;
"void_dollar_g"
;
"a_dollar_g"
;
"a_dollar_g"
;
"ghost_a_dollar_g"
"ghost_a_dollar_g"
;
"g_void_dollar"
;
"g_a_dollar"
]
in
]
in
let
a_list
=
[
let
a_list
=
[
"a_a"
;
"a_a"
;
...
@@ -37,7 +41,10 @@ let update_func f =
...
@@ -37,7 +41,10 @@ let update_func f =
"ghost_a_a"
;
"ghost_a_a"
;
"all_ghost_a_b_c_a"
;
"all_ghost_a_b_c_a"
;
"all_ghost_b_a_c_a"
;
"all_ghost_b_a_c_a"
;
"b_ghost_a_c_a"
"b_ghost_a_c_a"
;
"g_a_a"
;
"g_a_b_c_a"
;
"g_b_a_c_a"
]
in
]
in
if
List
.
mem
f
.
svar
.
vname
circ_list
then
ignore
(
insert_circ
f
)
;
if
List
.
mem
f
.
svar
.
vname
circ_list
then
ignore
(
insert_circ
f
)
;
if
List
.
mem
f
.
svar
.
vname
dollar_list
then
ignore
(
insert_dollar
f
)
;
if
List
.
mem
f
.
svar
.
vname
dollar_list
then
ignore
(
insert_dollar
f
)
;
...
...
This diff is collapsed.
Click to expand it.
tests/cil/oracle/insert_formal.res.oracle
+
49
−
0
View file @
d35b9d4d
...
@@ -100,4 +100,53 @@ void b_ghost_a_c_a(int b) /*@ ghost (int a, int x, int c) */
...
@@ -100,4 +100,53 @@ void b_ghost_a_c_a(int b) /*@ ghost (int a, int x, int c) */
return;
return;
}
}
/*@ ghost void g_void_circumflex(int x)
{
return;
}
*/
/*@ ghost void g_void_dollar(int x)
{
return;
}
*/
/*@ ghost void g_a_circumflex(int x, int a)
{
return;
}
*/
/*@ ghost void g_a_dollar(int a, int x)
{
return;
}
*/
/*@ ghost void g_a_a(int a, int x)
{
return;
}
*/
/*@ ghost void g_a_b_c_a(int a, int x, int b, int c)
{
return;
}
*/
/*@ ghost void g_b_a_c_a(int b, int a, int x, int c)
{
return;
}
*/
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