[kernel] Parsing min_call.c (with preprocessing) [kernel:typing:implicit-function-declaration] select_return.i:45: Warning: Calling undeclared function f. Old style K&R code? [eva] Analyzing an incomplete application starting at g [eva] Computing initial state [eva] Initial state computed [eva:initial-state] Values of globals at initialization G ∈ [--..--] H ∈ [--..--] I ∈ [--..--] [eva] computing for function k <- g. Called from select_return.i:44. [kernel:annot:missing-spec] select_return.i:35: Warning: Neither code nor specification for function get, generating default assigns from the prototype [eva] computing for function get <- k <- g. Called from select_return.i:35. [eva] using specification for function get [eva] Done for function get [kernel:annot:missing-spec] select_return.i:39: Warning: Neither code nor specification for function send_bis, generating default assigns from the prototype [eva] computing for function send_bis <- k <- g. Called from select_return.i:39. [eva] using specification for function send_bis [eva] Done for function send_bis [eva] Recording results for k [eva] Done for function k [eva] computing for function f <- g. Called from select_return.i:45. [eva] computing for function k <- f <- g. Called from select_return.i:49. [eva] computing for function get <- k <- f <- g. Called from select_return.i:35. [eva] Done for function get [eva] computing for function send_bis <- k <- f <- g. Called from select_return.i:39. [eva] Done for function send_bis [eva] Recording results for k [eva] Done for function k [eva] computing for function k <- f <- g. Called from select_return.i:50. [eva] computing for function get <- k <- f <- g. Called from select_return.i:35. [eva] Done for function get [eva] computing for function send_bis <- k <- f <- g. Called from select_return.i:39. [eva] Done for function send_bis [eva] Recording results for k [eva] Done for function k [eva] computing for function k <- f <- g. Called from select_return.i:51. [eva] computing for function get <- k <- f <- g. Called from select_return.i:35. [eva] Done for function get [eva] computing for function send_bis <- k <- f <- g. Called from select_return.i:39. [eva] Done for function send_bis [eva] Recording results for k [eva] Done for function k [kernel:annot:missing-spec] select_return.i:53: Warning: Neither code nor specification for function send, generating default assigns from the prototype [eva] computing for function send <- f <- g. Called from select_return.i:53. [eva] using specification for function send [eva] Done for function send [eva] Recording results for f [eva] Done for function f [eva] Recording results for g [eva] done for function g [from] Computing for function k [from] Computing for function get <-k [from] Done for function get [from] Computing for function send_bis <-k [from] Done for function send_bis [from] Done for function k [from] Computing for function f [from] Computing for function send <-f [from] Done for function send [from] Done for function f [from] Computing for function g [from] Done for function g [from] ====== DEPENDENCIES COMPUTED ====== These dependencies hold at termination for the executions that terminate: [from] Function get: \result FROM y [from] Function send: NO EFFECTS [from] Function send_bis: NO EFFECTS [from] Function k: G FROM b H FROM c \result FROM a [from] Function f: G FROM \nothing H FROM \nothing \result FROM y [from] Function g: G FROM \nothing H FROM \nothing [from] ====== END OF DEPENDENCIES ====== [slicing] initializing slicing ... [pdg] computing for function k [pdg] done for function k [slicing] applying all slicing requests... [slicing] applying 1 actions... [slicing] applying actions: 1/1... [pdg] computing for function g [pdg] done for function g [pdg] computing for function f [pdg] done for function f Project1 - result1 : [slicing] exporting project to 'Sliced code'... [slicing] applying all slicing requests... [slicing] applying 0 actions... [sparecode] remove unused global declarations from project 'Sliced code tmp' [sparecode] removed unused global declarations in new project 'Sliced code' /* Generated by Frama-C */ int get(int y); /*@ assigns \nothing; */ void send_bis(int x); void k_slice_1(int d) { int cond = get(d); if (cond) send_bis(d); return; } void f_slice_1(void); void g(void) { k_slice_1(0); f_slice_1(); return; } void f_slice_1(void) { k_slice_1(0); k_slice_1(0); k_slice_1(0); return; } Project1 - result2 : int G; int H; int I; /*@ assigns \result; assigns \result \from y; */ int get(int y); /*@ assigns \nothing; */ void send(int x); /*@ assigns \nothing; */ void send_bis(int x); Print slice = k_slice_2: (InCtrl: <[ S ], [---]>) (In4: <[--d], [---]>) /**/int k(/* <[---], [---]> */ int a, /* <[---], [---]> */ int b, /* <[---], [---]> */ int c, /* <[--d], [---]> */ int d) { /* sig call: (InCtrl: <[ S ], [---]>) (In1: <[ S ], [---]>) (OutRet: <[ S ], [---]>) */ /* undetermined call */ /* <[ S ], [---]> */ /* <[ S ], [---]> */ int cond = get(d); /* <[---], [---]> */ G = b; /* <[---], [---]> */ H = c; /* <[ S ], [---]> */ if (cond) { /* sig call: (InCtrl: <[ S ], [---]>) (In1: <[ S ], [---]>) */ /* undetermined call */ /* <[ S ], [---]> */ send_bis(d); } /* <[---], [---]> */ return a; } Print slice = k_slice_1: (InCtrl: <[ S ], [ S ]>) (In4: <[--d], [ S ]>) /**/int k(/* <[---], [---]> */ int a, /* <[---], [---]> */ int b, /* <[---], [---]> */ int c, /* <[--d], [ S ]> */ int d) { /* sig call: (InCtrl: <[ S ], [ S ]>) (In1: <[ S ], [ S ]>) (OutRet: <[ S ], [ S ]>) */ /* call to source function */ /* <[ S ], [ S ]> */ /* <[ S ], [ S ]> */ int cond = get(d); /* <[---], [---]> */ G = b; /* <[---], [---]> */ H = c; /* <[ S ], [ S ]> */ if (cond) { /* sig call: (InCtrl: <[ S ], [ S ]>) (In1: <[ S ], [ S ]>) */ /* call to source function */ /* <[ S ], [ S ]> */ send_bis(d); } /* <[---], [---]> */ return a; } int f(int y); Print slice = g_slice_1: (InCtrl: <[--d], [ S ]>) /**/void g(/* <[---], [---]> */ int b, /* <[---], [---]> */ int c) { /* <[---], [---]> */ int r; /* sig call: (InCtrl: <[--d], [ S ]>) (In4: <[--d], [ S ]>) */ /* call to k_slice_1: (InCtrl: <[ S ], [ S ]>) (In4: <[--d], [ S ]>) */ /* <[--d], [ S ]> */ /* <[---], [---]> */ int r = k(0,0,c,0); /* sig call: (InCtrl: <[--d], [ S ]>) */ /* call to f_slice_1: (InCtrl: <[--d], [ S ]>) */ /* <[--d], [ S ]> */ f(b); /* <[---], [---]> */ return; } Print slice = f_slice_1: (InCtrl: <[--d], [ S ]>) /**/int f(/* <[---], [---]> */ int y) { /* <[---], [---]> */ int r; /* <[---], [---]> */ int z; /* sig call: (InCtrl: <[--d], [ S ]>) (In4: <[--d], [ S ]>) */ /* call to k_slice_1: (InCtrl: <[ S ], [ S ]>) (In4: <[--d], [ S ]>) */ /* <[--d], [ S ]> */ k(0,0,0,0); /* sig call: (InCtrl: <[--d], [ S ]>) (In4: <[--d], [ S ]>) */ /* call to k_slice_1: (InCtrl: <[ S ], [ S ]>) (In4: <[--d], [ S ]>) */ /* <[--d], [ S ]> */ /* <[---], [---]> */ int r = k(0,y,0,0); /* sig call: (InCtrl: <[--d], [ S ]>) (In4: <[--d], [ S ]>) */ /* call to k_slice_1: (InCtrl: <[ S ], [ S ]>) (In4: <[--d], [ S ]>) */ /* <[--d], [ S ]> */ /* <[---], [---]> */ int z = k(G,0,0,0); /*@ slice pragma expr z; */ /* <[---], [---]> */ ; /* invisible call */ /* <[---], [---]> */ send(z); /* <[---], [---]> */ return z; } Slicing project worklist [default] = [k_slice_2 = choose_call for call 6][k_slice_2 = choose_call for call 1] [slicing] exporting project to 'Sliced code'... [slicing] applying all slicing requests... [slicing] applying 2 actions... [slicing] applying actions: 1/2... [slicing] applying actions: 2/2... [sparecode] remove unused global declarations from project 'Sliced code tmp' [sparecode] removed unused global declarations in new project 'Sliced code' /* Generated by Frama-C */ int get(int y); /*@ assigns \nothing; */ void send_bis(int x); void k_slice_2(int d) { int cond = get(d); if (cond) send_bis(d); return; } void k_slice_1(int d) { int cond = get(d); if (cond) send_bis(d); return; } void f_slice_1(void); void g(void) { k_slice_1(0); f_slice_1(); return; } void f_slice_1(void) { k_slice_1(0); k_slice_1(0); k_slice_1(0); return; } [slicing] reinitializing slicing ... Slicing project worklist [default] = [k = (n:17 ,<[--d], [---]>)] [slicing] applying all slicing requests... [slicing] applying 1 actions... [slicing] applying actions: 1/1... Project3 - result : int G; int H; int I; /*@ assigns \result; assigns \result \from y; */ int get(int y); /*@ assigns \nothing; */ void send(int x); /*@ assigns \nothing; */ void send_bis(int x); Print slice = k_slice_1: (InCtrl: <[--d], [ S ]>) (In4: <[--d], [ S ]>) /**/int k(/* <[---], [---]> */ int a, /* <[---], [---]> */ int b, /* <[---], [---]> */ int c, /* <[--d], [ S ]> */ int d) { /* sig call: (InCtrl: <[--d], [ S ]>) (In1: <[--d], [ S ]>) (OutRet: <[--d], [ S ]>) */ /* call to source function */ /* <[--d], [ S ]> */ /* <[--d], [ S ]> */ int cond = get(d); /* <[---], [---]> */ G = b; /* <[---], [---]> */ H = c; /* <[--d], [ S ]> */ if (cond) { /* sig call: (InCtrl: <[--d], [ S ]>) (In1: <[---], [ S ]>) */ /* call to source function */ /* <[--d], [ S ]> */ send_bis(d); } /* <[---], [---]> */ return a; } int f(int y); Print slice = g_slice_1: (InCtrl: <[--d], [ S ]>) /**/void g(/* <[---], [---]> */ int b, /* <[---], [---]> */ int c) { /* <[---], [---]> */ int r; /* sig call: (InCtrl: <[--d], [ S ]>) (In4: <[--d], [ S ]>) */ /* call to k_slice_1: (InCtrl: <[--d], [ S ]>) (In4: <[--d], [ S ]>) */ /* <[--d], [ S ]> */ /* <[---], [---]> */ int r = k(0,0,c,0); /* sig call: (InCtrl: <[--d], [ S ]>) */ /* call to f_slice_1: (InCtrl: <[--d], [ S ]>) */ /* <[--d], [ S ]> */ f(b); /* <[---], [---]> */ return; } Print slice = f_slice_1: (InCtrl: <[--d], [ S ]>) /**/int f(/* <[---], [---]> */ int y) { /* <[---], [---]> */ int r; /* <[---], [---]> */ int z; /* sig call: (InCtrl: <[--d], [ S ]>) (In4: <[--d], [ S ]>) */ /* call to k_slice_1: (InCtrl: <[--d], [ S ]>) (In4: <[--d], [ S ]>) */ /* <[--d], [ S ]> */ k(0,0,0,0); /* sig call: (InCtrl: <[--d], [ S ]>) (In4: <[--d], [ S ]>) */ /* call to k_slice_1: (InCtrl: <[--d], [ S ]>) (In4: <[--d], [ S ]>) */ /* <[--d], [ S ]> */ /* <[---], [---]> */ int r = k(0,y,0,0); /* sig call: (InCtrl: <[--d], [ S ]>) (In4: <[--d], [ S ]>) */ /* call to k_slice_1: (InCtrl: <[--d], [ S ]>) (In4: <[--d], [ S ]>) */ /* <[--d], [ S ]> */ /* <[---], [---]> */ int z = k(G,0,0,0); /*@ slice pragma expr z; */ /* <[---], [---]> */ ; /* invisible call */ /* <[---], [---]> */ send(z); /* <[---], [---]> */ return z; } Slicing project worklist [default] = [slicing] exporting project to 'Sliced code'... [slicing] applying all slicing requests... [slicing] applying 0 actions... [sparecode] remove unused global declarations from project 'Sliced code tmp' [sparecode] removed unused global declarations in new project 'Sliced code' /* Generated by Frama-C */ int get(int y); /*@ assigns \nothing; */ void send_bis(int x); void k_slice_1(int d) { int cond = get(d); if (cond) send_bis(d); return; } void f_slice_1(void); void g(void) { k_slice_1(0); f_slice_1(); return; } void f_slice_1(void) { k_slice_1(0); k_slice_1(0); k_slice_1(0); return; } [slicing] reinitializing slicing ... [slicing] applying all slicing requests... [slicing] applying 0 actions... Slicing project worklist [default] = [f = (n:45 ,<[acd], [---]>)(n:52 ,<[acd], [---]>)(n:60 ,<[acd], [---]>)][g = (n:27 , <[acd], [---]>)] Slicing project worklist [default] = [f_slice_1 = choose_call for call 17][f_slice_1 = choose_call for call 16][f_slice_1 = choose_call for call 15][g = propagate (n:35 , <[acd], [---]>)][Appli : calls to f][g = (n:27 ,<[acd], [---]>)] [slicing] applying all slicing requests... [slicing] applying 6 actions... [slicing] applying actions: 1/6... [slicing] applying actions: 2/6... [slicing] applying actions: 3/6... [slicing] applying actions: 4/6... [slicing] applying actions: 5/6... [slicing] applying actions: 6/6... Project3 - result : int G; int H; int I; /*@ assigns \result; assigns \result \from y; */ int get(int y); /*@ assigns \nothing; */ void send(int x); /*@ assigns \nothing; */ void send_bis(int x); Print slice = k_slice_1: /**/int k(/* <[---], [---]> */ int a, /* <[---], [---]> */ int b, /* <[---], [---]> */ int c, /* <[---], [---]> */ int d) { /* invisible call */ /* <[---], [---]> */ /* <[---], [---]> */ int cond = get(d); /* <[---], [---]> */ G = b; /* <[---], [---]> */ H = c; /* <[---], [---]> */ if (cond) { /* invisible call */ /* <[---], [---]> */ send_bis(d); } /* <[---], [---]> */ return a; } int f(int y); Print slice = g_slice_1: (InCtrl: <[acd], [---]>) /**/void g(/* <[---], [---]> */ int b, /* <[---], [---]> */ int c) { /* <[---], [---]> */ int r; /* sig call: (InCtrl: <[acd], [---]>) */ /* call to k_slice_1: */ /* <[acd], [---]> */ /* <[---], [---]> */ int r = k(0,0,c,0); /* sig call: (InCtrl: <[acd], [---]>) */ /* call to f_slice_1: (InCtrl: <[acd], [---]>) */ /* <[acd], [---]> */ f(b); /* <[---], [---]> */ return; } Print slice = f_slice_1: (InCtrl: <[acd], [---]>) /**/int f(/* <[---], [---]> */ int y) { /* <[---], [---]> */ int r; /* <[---], [---]> */ int z; /* sig call: (InCtrl: <[acd], [---]>) */ /* call to k_slice_1: */ /* <[acd], [---]> */ k(0,0,0,0); /* sig call: (InCtrl: <[acd], [---]>) */ /* call to k_slice_1: */ /* <[acd], [---]> */ /* <[---], [---]> */ int r = k(0,y,0,0); /* sig call: (InCtrl: <[acd], [---]>) */ /* call to k_slice_1: */ /* <[acd], [---]> */ /* <[---], [---]> */ int z = k(G,0,0,0); /*@ slice pragma expr z; */ /* <[---], [---]> */ ; /* invisible call */ /* <[---], [---]> */ send(z); /* <[---], [---]> */ return z; } Slicing project worklist [default] = [slicing] exporting project to 'Sliced code'... [slicing] applying all slicing requests... [slicing] applying 0 actions... [sparecode] remove unused global declarations from project 'Sliced code tmp' [sparecode] removed unused global declarations in new project 'Sliced code' /* Generated by Frama-C */ void k_slice_1(void) { return; } void f_slice_1(void); void g(void) { k_slice_1(); f_slice_1(); return; } void f_slice_1(void) { k_slice_1(); k_slice_1(); k_slice_1(); return; }