Skip to content
Snippets Groups Projects
Commit ee60a105 authored by Tristan Le Gall's avatar Tristan Le Gall
Browse files

[alias] functions still WIP

parent 863119d5
No related branches found
No related tags found
No related merge requests found
...@@ -234,7 +234,7 @@ let doFunction (kf:kernel_function) = ...@@ -234,7 +234,7 @@ let doFunction (kf:kernel_function) =
let final_state : Abstract_state.t option = let final_state : Abstract_state.t option =
try Stmt_table.find return_stmt try Stmt_table.find return_stmt
with with
Not_found -> failwith "Houston, we have a problem" Not_found -> Options.abort "Houston, we have a problem: %a has no return statement" Kernel_function.pretty kf
in in
let summary: Abstract_state.summary = let summary: Abstract_state.summary =
Abstract_state.make_summary final_state kf Abstract_state.make_summary final_state kf
...@@ -244,8 +244,8 @@ let doFunction (kf:kernel_function) = ...@@ -244,8 +244,8 @@ let doFunction (kf:kernel_function) =
else else
begin begin
(* summary by default *) (* summary by default *)
Options.warning "Function %a has no definition (summary empty)" (* Options.warning "Function %a has no definition (summary empty)"
Kernel_function.pretty kf; * Kernel_function.pretty kf; *)
let summary: Abstract_state.summary = let summary: Abstract_state.summary =
Abstract_state.make_summary (Some Abstract_state.initial_value) kf Abstract_state.make_summary (Some Abstract_state.initial_value) kf
in in
......
[kernel] Parsing assignment1.c (with preprocessing) [kernel] Parsing assignment1.c (with preprocessing)
[alias] Parsing done [alias] Parsing done
[alias] Functions done [alias] Functions done
After statement a = b; : Before statement a = b; :
<list of may-alias> <list of may-alias>
{ a; b } are aliased
<end of list> <end of list>
After statement b = c; : Before statement b = c; :
<list of may-alias> <list of may-alias>
{ a; b; c } are aliased { a; b } are aliased
<end of list> <end of list>
After statement *a = 4; : Before statement *a = 4; :
<list of may-alias> <list of may-alias>
{ a; b; c } are aliased { a; b; c } are aliased
<end of list> <end of list>
After statement *c = e; : Before statement *c = e; :
<list of may-alias> <list of may-alias>
{ a; b; c } are aliased { a; b; c } are aliased
<end of list> <end of list>
After statement a = d; : Before statement a = d; :
<list of may-alias> <list of may-alias>
{ a; b; c; d } are aliased { a; b; c } are aliased
<end of list> <end of list>
After statement __retres = 0; : Before statement __retres = 0; :
<list of may-alias> <list of may-alias>
{ a; b; c; d } are aliased { a; b; c; d } are aliased
<end of list> <end of list>
After statement return __retres; : Before statement return __retres; :
<list of may-alias> <list of may-alias>
{ a; b; c; d } are aliased { a; b; c; d } are aliased
<end of list> <end of list>
......
[kernel] Parsing assignment2.c (with preprocessing) [kernel] Parsing assignment2.c (with preprocessing)
[alias] Parsing done [alias] Parsing done
[alias] Functions done [alias] Functions done
After statement *a = b; : Before statement *a = b; :
<list of may-alias> <list of may-alias>
<end of list> <end of list>
After statement *c = d; : Before statement *c = d; :
<list of may-alias> <list of may-alias>
<end of list> <end of list>
After statement a = c; : Before statement a = c; :
<list of may-alias> <list of may-alias>
{ a; c } are aliased
{ b; d } are aliased
<end of list> <end of list>
After statement __retres = 0; : Before statement __retres = 0; :
<list of may-alias> <list of may-alias>
{ a; c } are aliased { a; c } are aliased
{ b; d } are aliased { b; d } are aliased
<end of list> <end of list>
After statement return __retres; : Before statement return __retres; :
<list of may-alias> <list of may-alias>
{ a; c } are aliased { a; c } are aliased
{ b; d } are aliased { b; d } are aliased
......
[kernel] Parsing assignment3.c (with preprocessing) [kernel] Parsing assignment3.c (with preprocessing)
[alias] Parsing done [alias] Parsing done
[alias] Functions done [alias] Functions done
After statement a = & b; : Before statement a = & b; :
<list of may-alias> <list of may-alias>
<end of list> <end of list>
After statement *c = b; : Before statement *c = b; :
<list of may-alias> <list of may-alias>
<end of list> <end of list>
After statement __retres = 0; : Before statement __retres = 0; :
<list of may-alias> <list of may-alias>
<end of list> <end of list>
After statement return __retres; : Before statement return __retres; :
<list of may-alias> <list of may-alias>
<end of list> <end of list>
......
[kernel] Parsing cast1.c (with preprocessing) [kernel] Parsing cast1.c (with preprocessing)
[alias] Parsing done [alias] Parsing done
[alias] Functions done [alias] Functions done
After statement a = (int *)c; : Before statement a = (int *)c; :
<list of may-alias> <list of may-alias>
{ a; c } are aliased
<end of list> <end of list>
After statement d = (float *)b; : Before statement d = (float *)b; :
<list of may-alias> <list of may-alias>
{ a; c } are aliased { a; c } are aliased
{ b; d } are aliased
<end of list> <end of list>
After statement __retres = 0; : Before statement __retres = 0; :
<list of may-alias> <list of may-alias>
{ a; c } are aliased { a; c } are aliased
{ b; d } are aliased { b; d } are aliased
<end of list> <end of list>
After statement return __retres; : Before statement return __retres; :
<list of may-alias> <list of may-alias>
{ a; c } are aliased { a; c } are aliased
{ b; d } are aliased { b; d } are aliased
......
[kernel] Parsing conditional1.c (with preprocessing) [kernel] Parsing conditional1.c (with preprocessing)
[alias] Parsing done [alias] Parsing done
[alias] Functions done [alias] Functions done
After statement if (a) a = b; else a = c; : Before statement if (a) a = b; else a = c; :
<list of may-alias> <list of may-alias>
<end of list> <end of list>
After statement a = b; : Before statement a = b; :
<list of may-alias> <list of may-alias>
{ a; b } are aliased
<end of list> <end of list>
After statement a = c; : Before statement a = c; :
<list of may-alias> <list of may-alias>
{ a; c } are aliased
<end of list> <end of list>
After statement *a = 4; : Before statement *a = 4; :
<list of may-alias> <list of may-alias>
{ a; b } are aliased { a; b } are aliased
<end of list> <end of list>
After statement __retres = 0; : Before statement __retres = 0; :
<list of may-alias> <list of may-alias>
{ a; b } are aliased { a; b } are aliased
<end of list> <end of list>
After statement return __retres; : Before statement return __retres; :
<list of may-alias> <list of may-alias>
{ a; b } are aliased { a; b } are aliased
<end of list> <end of list>
......
[kernel] Parsing function1.c (with preprocessing) [kernel] Parsing function1.c (with preprocessing)
[alias] Parsing done [alias] Parsing done
[alias] Skiping swap(a,b); (summary not found)
[alias] Skiping swap(a,b); (summary not found)
[alias] Skiping swap(c,d); (summary not found)
[alias] Skiping swap(c,d); (summary not found)
[alias] Functions done [alias] Functions done
After statement z = x; : Before statement z = x; :
<list of may-alias> <list of may-alias>
{ x; z } are aliased
<end of list> <end of list>
After statement x = y; : Before statement z = x; :
<list of may-alias> <list of may-alias>
{ x; y; z } are aliased
<end of list> <end of list>
After statement y = z; : Before statement x = y; :
<list of may-alias>
{ x; z } are aliased
<end of list>
Before statement y = z; :
<list of may-alias> <list of may-alias>
{ x; y; z } are aliased { x; y; z } are aliased
<end of list> <end of list>
After statement swap(a,b); : Before statement swap(a,b); :
<list of may-alias> <list of may-alias>
<end of list> <end of list>
After statement swap(c,d); : Before statement swap(c,d); :
<list of may-alias> <list of may-alias>
{ a; b } are aliased
<end of list> <end of list>
After statement __retres = 0; : Before statement __retres = 0; :
<list of may-alias> <list of may-alias>
{ a; b } are aliased
{ c; d } are aliased
<end of list> <end of list>
After statement return; : Before statement return; :
<list of may-alias> <list of may-alias>
{ x; y; z } are aliased { x; y; z } are aliased
<end of list> <end of list>
After statement return __retres; : Before statement return __retres; :
<list of may-alias> <list of may-alias>
{ a; b } are aliased
{ c; d } are aliased
<end of list> <end of list>
[alias] Analysis complete [alias] Analysis complete
...@@ -4,67 +4,67 @@ ...@@ -4,67 +4,67 @@
[alias] Skipping assignment odata[idx] = 0.5 * idata[idx] (not implemented) [alias] Skipping assignment odata[idx] = 0.5 * idata[idx] (not implemented)
[alias] Skipping assignment odata[idx] = 0.5 * idata[idx] (not implemented) [alias] Skipping assignment odata[idx] = 0.5 * idata[idx] (not implemented)
[alias] Functions done [alias] Functions done
After statement while (1) { Before statement while (1) {
idx = 0; idx = 0;
while (idx < 10) { while (idx < 10) {
odata[idx] = 0.5 * idata[idx]; odata[idx] = 0.5 * idata[idx];
idx ++; idx ++;
} }
} : } :
<list of may-alias> <list of may-alias>
<end of list> <end of list>
After statement idx = 0; Before statement idx = 0;
while (idx < 10) { while (idx < 10) {
odata[idx] = 0.5 * idata[idx]; odata[idx] = 0.5 * idata[idx];
idx ++; idx ++;
} : } :
<list of may-alias> <list of may-alias>
<end of list> <end of list>
After statement idx = 0; : Before statement idx = 0; :
<list of may-alias> <list of may-alias>
<end of list> <end of list>
After statement idx = 0; : Before statement idx = 0; :
<list of may-alias> <list of may-alias>
<end of list> <end of list>
After statement while (idx < 10) { Before statement while (idx < 10) {
odata[idx] = 0.5 * idata[idx]; odata[idx] = 0.5 * idata[idx];
idx ++; idx ++;
} : } :
<list of may-alias> <list of may-alias>
<end of list> <end of list>
After statement while (idx < 10) { Before statement while (idx < 10) {
odata[idx] = 0.5 * idata[idx]; odata[idx] = 0.5 * idata[idx];
idx ++; idx ++;
} : } :
<list of may-alias> <list of may-alias>
<end of list> <end of list>
After statement if (! (idx < 10)) break; : Before statement if (! (idx < 10)) break; :
<list of may-alias> <list of may-alias>
<end of list> <end of list>
After statement break; : Before statement break; :
<list of may-alias> <list of may-alias>
<end of list> <end of list>
After statement odata[idx] = 0.5 * idata[idx]; : Before statement odata[idx] = 0.5 * idata[idx]; :
<list of may-alias> <list of may-alias>
<end of list> <end of list>
After statement odata[idx] = 0.5 * idata[idx]; : Before statement odata[idx] = 0.5 * idata[idx]; :
<list of may-alias> <list of may-alias>
<end of list> <end of list>
After statement odata[idx] = 0.5 * idata[idx]; : Before statement odata[idx] = 0.5 * idata[idx]; :
<list of may-alias> <list of may-alias>
<end of list> <end of list>
After statement idx ++; : Before statement idx ++; :
<list of may-alias> <list of may-alias>
<end of list> <end of list>
......
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