diff --git a/src/plugins/alias/analysis.ml b/src/plugins/alias/analysis.ml index b3c4f07ffca70bb494afe89430f906dfc837bc08..6ef94e631561a3c6aec523f67ce0fa34158b5590 100644 --- a/src/plugins/alias/analysis.ml +++ b/src/plugins/alias/analysis.ml @@ -234,7 +234,7 @@ let doFunction (kf:kernel_function) = let final_state : Abstract_state.t option = try Stmt_table.find return_stmt 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 let summary: Abstract_state.summary = Abstract_state.make_summary final_state kf @@ -244,8 +244,8 @@ let doFunction (kf:kernel_function) = else begin (* summary by default *) - Options.warning "Function %a has no definition (summary empty)" - Kernel_function.pretty kf; + (* Options.warning "Function %a has no definition (summary empty)" + * Kernel_function.pretty kf; *) let summary: Abstract_state.summary = Abstract_state.make_summary (Some Abstract_state.initial_value) kf in diff --git a/src/plugins/alias/tests/basic/oracle/assignment1.res.oracle b/src/plugins/alias/tests/basic/oracle/assignment1.res.oracle index 5265a9c8a9a141547dd5f8dd69ef2b999fc3e8b7..0fe11e42da13634bb0afc0b94b6a56e16a254e6d 100644 --- a/src/plugins/alias/tests/basic/oracle/assignment1.res.oracle +++ b/src/plugins/alias/tests/basic/oracle/assignment1.res.oracle @@ -1,37 +1,36 @@ [kernel] Parsing assignment1.c (with preprocessing) [alias] Parsing done [alias] Functions done -After statement a = b; : +Before statement a = b; : <list of may-alias> -{ a; b } are aliased <end of list> -After statement b = c; : +Before statement b = c; : <list of may-alias> -{ a; b; c } are aliased +{ a; b } are aliased <end of list> -After statement *a = 4; : +Before statement *a = 4; : <list of may-alias> { a; b; c } are aliased <end of list> -After statement *c = e; : +Before statement *c = e; : <list of may-alias> { a; b; c } are aliased <end of list> -After statement a = d; : +Before statement a = d; : <list of may-alias> -{ a; b; c; d } are aliased +{ a; b; c } are aliased <end of list> -After statement __retres = 0; : +Before statement __retres = 0; : <list of may-alias> { a; b; c; d } are aliased <end of list> -After statement return __retres; : +Before statement return __retres; : <list of may-alias> { a; b; c; d } are aliased <end of list> diff --git a/src/plugins/alias/tests/basic/oracle/assignment2.res.oracle b/src/plugins/alias/tests/basic/oracle/assignment2.res.oracle index aaabce7aebc5fef10f58f0cadc6f3f48e13413c2..232301b92d3b08891d16e458af88033c0409c14d 100644 --- a/src/plugins/alias/tests/basic/oracle/assignment2.res.oracle +++ b/src/plugins/alias/tests/basic/oracle/assignment2.res.oracle @@ -1,27 +1,25 @@ [kernel] Parsing assignment2.c (with preprocessing) [alias] Parsing done [alias] Functions done -After statement *a = b; : +Before statement *a = b; : <list of may-alias> <end of list> -After statement *c = d; : +Before statement *c = d; : <list of may-alias> <end of list> -After statement a = c; : +Before statement a = c; : <list of may-alias> -{ a; c } are aliased -{ b; d } are aliased <end of list> -After statement __retres = 0; : +Before statement __retres = 0; : <list of may-alias> { a; c } are aliased { b; d } are aliased <end of list> -After statement return __retres; : +Before statement return __retres; : <list of may-alias> { a; c } are aliased { b; d } are aliased diff --git a/src/plugins/alias/tests/basic/oracle/assignment3.res.oracle b/src/plugins/alias/tests/basic/oracle/assignment3.res.oracle index 97a840081bc0a497e8c6f1c54a712ca28a06266a..a3e45ebfbfd63489e6a70c8fc8b50c924b9b4f57 100644 --- a/src/plugins/alias/tests/basic/oracle/assignment3.res.oracle +++ b/src/plugins/alias/tests/basic/oracle/assignment3.res.oracle @@ -1,19 +1,19 @@ [kernel] Parsing assignment3.c (with preprocessing) [alias] Parsing done [alias] Functions done -After statement a = & b; : +Before statement a = & b; : <list of may-alias> <end of list> -After statement *c = b; : +Before statement *c = b; : <list of may-alias> <end of list> -After statement __retres = 0; : +Before statement __retres = 0; : <list of may-alias> <end of list> -After statement return __retres; : +Before statement return __retres; : <list of may-alias> <end of list> diff --git a/src/plugins/alias/tests/basic/oracle/cast1.res.oracle b/src/plugins/alias/tests/basic/oracle/cast1.res.oracle index 5ce038e47f6e21cc643a24c553ab59f732720314..6f0872c16e1ba9a677c04e21afcd20c05f0477f9 100644 --- a/src/plugins/alias/tests/basic/oracle/cast1.res.oracle +++ b/src/plugins/alias/tests/basic/oracle/cast1.res.oracle @@ -1,24 +1,22 @@ [kernel] Parsing cast1.c (with preprocessing) [alias] Parsing done [alias] Functions done -After statement a = (int *)c; : +Before statement a = (int *)c; : <list of may-alias> -{ a; c } are aliased <end of list> -After statement d = (float *)b; : +Before statement d = (float *)b; : <list of may-alias> { a; c } are aliased -{ b; d } are aliased <end of list> -After statement __retres = 0; : +Before statement __retres = 0; : <list of may-alias> { a; c } are aliased { b; d } are aliased <end of list> -After statement return __retres; : +Before statement return __retres; : <list of may-alias> { a; c } are aliased { b; d } are aliased diff --git a/src/plugins/alias/tests/basic/oracle/conditional1.res.oracle b/src/plugins/alias/tests/basic/oracle/conditional1.res.oracle index 0556445f9b9f808fc5309972895acc97534d6104..5ec54307ed6fe789415f89ce0a953988e4125c1c 100644 --- a/src/plugins/alias/tests/basic/oracle/conditional1.res.oracle +++ b/src/plugins/alias/tests/basic/oracle/conditional1.res.oracle @@ -1,31 +1,29 @@ [kernel] Parsing conditional1.c (with preprocessing) [alias] Parsing 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> <end of list> -After statement a = b; : +Before statement a = b; : <list of may-alias> -{ a; b } are aliased <end of list> -After statement a = c; : +Before statement a = c; : <list of may-alias> -{ a; c } are aliased <end of list> -After statement *a = 4; : +Before statement *a = 4; : <list of may-alias> { a; b } are aliased <end of list> -After statement __retres = 0; : +Before statement __retres = 0; : <list of may-alias> { a; b } are aliased <end of list> -After statement return __retres; : +Before statement return __retres; : <list of may-alias> { a; b } are aliased <end of list> diff --git a/src/plugins/alias/tests/basic/oracle/function1.res.oracle b/src/plugins/alias/tests/basic/oracle/function1.res.oracle index 2506c2557304a1a3df317bdaacee05ecb9bcff0d..46b84b75a404452408db3fea133545fee037386a 100644 --- a/src/plugins/alias/tests/basic/oracle/function1.res.oracle +++ b/src/plugins/alias/tests/basic/oracle/function1.res.oracle @@ -1,44 +1,48 @@ [kernel] Parsing function1.c (with preprocessing) [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 -After statement z = x; : +Before statement z = x; : <list of may-alias> -{ x; z } are aliased <end of list> -After statement x = y; : +Before statement z = x; : <list of may-alias> -{ x; y; z } are aliased <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> { x; y; z } are aliased <end of list> -After statement swap(a,b); : +Before statement swap(a,b); : <list of may-alias> <end of list> -After statement swap(c,d); : +Before statement swap(c,d); : <list of may-alias> +{ a; b } are aliased <end of list> -After statement __retres = 0; : +Before statement __retres = 0; : <list of may-alias> +{ a; b } are aliased +{ c; d } are aliased <end of list> -After statement return; : +Before statement return; : <list of may-alias> { x; y; z } are aliased <end of list> -After statement return __retres; : +Before statement return __retres; : <list of may-alias> +{ a; b } are aliased +{ c; d } are aliased <end of list> [alias] Analysis complete diff --git a/src/plugins/alias/tests/basic/oracle/while_for1.res.oracle b/src/plugins/alias/tests/basic/oracle/while_for1.res.oracle index 9383a1891db6013dca39eeadd7fd4dda3ce44f8c..9d511ac7569aa2e50100525e3638d07fdd223fa0 100644 --- a/src/plugins/alias/tests/basic/oracle/while_for1.res.oracle +++ b/src/plugins/alias/tests/basic/oracle/while_for1.res.oracle @@ -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] Functions done -After statement while (1) { - idx = 0; - while (idx < 10) { - odata[idx] = 0.5 * idata[idx]; - idx ++; - } - } : +Before statement while (1) { + idx = 0; + while (idx < 10) { + odata[idx] = 0.5 * idata[idx]; + idx ++; + } + } : <list of may-alias> <end of list> -After statement idx = 0; - while (idx < 10) { - odata[idx] = 0.5 * idata[idx]; - idx ++; - } : +Before statement idx = 0; + while (idx < 10) { + odata[idx] = 0.5 * idata[idx]; + idx ++; + } : <list of may-alias> <end of list> -After statement idx = 0; : +Before statement idx = 0; : <list of may-alias> <end of list> -After statement idx = 0; : +Before statement idx = 0; : <list of may-alias> <end of list> -After statement while (idx < 10) { - odata[idx] = 0.5 * idata[idx]; - idx ++; - } : +Before statement while (idx < 10) { + odata[idx] = 0.5 * idata[idx]; + idx ++; + } : <list of may-alias> <end of list> -After statement while (idx < 10) { - odata[idx] = 0.5 * idata[idx]; - idx ++; - } : +Before statement while (idx < 10) { + odata[idx] = 0.5 * idata[idx]; + idx ++; + } : <list of may-alias> <end of list> -After statement if (! (idx < 10)) break; : +Before statement if (! (idx < 10)) break; : <list of may-alias> <end of list> -After statement break; : +Before statement break; : <list of may-alias> <end of list> -After statement odata[idx] = 0.5 * idata[idx]; : +Before statement odata[idx] = 0.5 * idata[idx]; : <list of may-alias> <end of list> -After statement odata[idx] = 0.5 * idata[idx]; : +Before statement odata[idx] = 0.5 * idata[idx]; : <list of may-alias> <end of list> -After statement odata[idx] = 0.5 * idata[idx]; : +Before statement odata[idx] = 0.5 * idata[idx]; : <list of may-alias> <end of list> -After statement idx ++; : +Before statement idx ++; : <list of may-alias> <end of list>