Skip to content
Snippets Groups Projects
Commit d35b9d4d authored by Allan Blanchard's avatar Allan Blanchard
Browse files

[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
...@@ -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) {
}
*/
...@@ -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) ;
......
...@@ -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;
}
*/
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment