Skip to content
Snippets Groups Projects
Commit 3e4a1552 authored by David Bühler's avatar David Bühler
Browse files

Merge branch 'fix/kernel/1137-ast-diff-acsl-extension' into 'master'

compare acsl extensions in AST diff

Closes #1137

See merge request frama-c/frama-c!4579
parents 8a3797a7 e6dd341c
No related branches found
No related tags found
No related merge requests found
...@@ -37,6 +37,24 @@ type extension_visitor = ...@@ -37,6 +37,24 @@ type extension_visitor =
type extension_printer = type extension_printer =
Printer_api.extensible_printer_type -> Format.formatter -> Printer_api.extensible_printer_type -> Format.formatter ->
acsl_extension_kind -> unit acsl_extension_kind -> unit
type extension_same =
acsl_extension_kind -> acsl_extension_kind -> Ast_diff.is_same_env -> bool
type register_extension =
plugin:string -> string ->
?preprocessor:extension_preprocessor -> extension_typer ->
?visitor:extension_visitor ->
?printer:extension_printer -> ?short_printer:extension_printer ->
?is_same_ext:extension_same -> bool ->
unit
type register_extension_block =
plugin: string -> string ->
?preprocessor:extension_preprocessor_block -> extension_typer_block ->
?visitor:extension_visitor ->
?printer:extension_printer -> ?short_printer:extension_printer ->
?is_same_ext:extension_same -> bool -> unit
type extension_single = { type extension_single = {
preprocessor: extension_preprocessor ; preprocessor: extension_preprocessor ;
typer: extension_typer ; typer: extension_typer ;
...@@ -53,6 +71,7 @@ type extension_common = { ...@@ -53,6 +71,7 @@ type extension_common = {
printer: extension_printer ; printer: extension_printer ;
short_printer: extension_printer ; short_printer: extension_printer ;
plugin: string; plugin: string;
is_same_ext: extension_same;
} }
let default_printer printer fmt = function let default_printer printer fmt = function
...@@ -64,6 +83,19 @@ let default_printer printer fmt = function ...@@ -64,6 +83,19 @@ let default_printer printer fmt = function
let default_short_printer name _printer fmt _ext_kind = Format.fprintf fmt "%s" name let default_short_printer name _printer fmt _ext_kind = Format.fprintf fmt "%s" name
let rec default_is_same_ext ext1 ext2 env =
match ext1, ext2 with
| Ext_id n1, Ext_id n2 -> n1 = n2
| Ext_terms l1, Ext_terms l2 ->
Ast_diff.is_same_list Ast_diff.is_same_term l1 l2 env
| Ext_preds l1, Ext_preds l2 ->
Ast_diff.is_same_list Ast_diff.is_same_predicate l1 l2 env
| Ext_annot(s1,l1), Ext_annot(s2,l2) ->
s1 = s2 && Ast_diff.is_same_list default_is_same_ext_kind l1 l2 env
| (Ext_id _ | Ext_terms _ | Ext_preds _ | Ext_annot _), _ -> false
and default_is_same_ext_kind ext1 ext2 env =
default_is_same_ext ext1.ext_kind ext2.ext_kind env
let make let make
~plugin ~plugin
name category name category
...@@ -72,9 +104,10 @@ let make ...@@ -72,9 +104,10 @@ let make
?(visitor=fun _ _ -> Cil.DoChildren) ?(visitor=fun _ _ -> Cil.DoChildren)
?(printer=default_printer) ?(printer=default_printer)
?(short_printer=default_short_printer name) ?(short_printer=default_short_printer name)
?(is_same_ext=default_is_same_ext)
status : extension_single*extension_common = status : extension_single*extension_common =
{ preprocessor; typer; status}, { preprocessor; typer; status},
{ category; visitor; printer; short_printer; plugin } { category; visitor; printer; short_printer; plugin; is_same_ext }
let make_block let make_block
~plugin ~plugin
...@@ -84,9 +117,10 @@ let make_block ...@@ -84,9 +117,10 @@ let make_block
?(visitor=fun _ _ -> Cil.DoChildren) ?(visitor=fun _ _ -> Cil.DoChildren)
?(printer=default_printer) ?(printer=default_printer)
?(short_printer=default_short_printer name) ?(short_printer=default_short_printer name)
?(is_same_ext=default_is_same_ext)
status : extension_block*extension_common = status : extension_block*extension_common =
{ preprocessor; typer; status}, { preprocessor; typer; status},
{ category; visitor; printer; short_printer; plugin } { category; visitor; printer; short_printer; plugin; is_same_ext }
module Extensions = struct module Extensions = struct
(*hash table for category, visitor, printer and short_printer of extensions*) (*hash table for category, visitor, printer and short_printer of extensions*)
...@@ -119,10 +153,10 @@ module Extensions = struct ...@@ -119,10 +153,10 @@ module Extensions = struct
let is_extension_block = Hashtbl.mem ext_block_tbl let is_extension_block = Hashtbl.mem ext_block_tbl
let register cat ~plugin name let register cat ~plugin name
?preprocessor typer ?visitor ?printer ?short_printer status = ?preprocessor typer ?visitor ?printer ?short_printer ?is_same_ext status =
let info1,info2 = let info1,info2 =
make ~plugin name cat ?preprocessor typer make ~plugin name cat ?preprocessor typer
?visitor ?printer ?short_printer status ?visitor ?printer ?short_printer ?is_same_ext status
in in
if is_extension name then if is_extension name then
Kernel.warning ~wkey:Kernel.wkey_acsl_extension Kernel.warning ~wkey:Kernel.wkey_acsl_extension
...@@ -135,10 +169,10 @@ module Extensions = struct ...@@ -135,10 +169,10 @@ module Extensions = struct
end end
let register_block cat ~plugin name let register_block cat ~plugin name
?preprocessor typer ?visitor ?printer ?short_printer status = ?preprocessor typer ?visitor ?printer ?short_printer ?is_same_ext status =
let info1,info2 = let info1,info2 =
make_block ~plugin name cat ?preprocessor typer make_block ~plugin name cat ?preprocessor typer
?visitor ?printer ?short_printer status ?visitor ?printer ?short_printer ?is_same_ext status
in in
if is_extension name then if is_extension name then
Kernel.warning ~wkey:Kernel.wkey_acsl_extension Kernel.warning ~wkey:Kernel.wkey_acsl_extension
...@@ -207,6 +241,10 @@ module Extensions = struct ...@@ -207,6 +241,10 @@ module Extensions = struct
let pp = (find_common name).short_printer in let pp = (find_common name).short_printer in
Format.fprintf fmt "%a" (pp printer) kind Format.fprintf fmt "%a" (pp printer) kind
let is_same_ext name ext1 ext2 =
let is_same = (find_common name).is_same_ext in
is_same ext1 ext2
let extension_from name = (find_common name).plugin let extension_from name = (find_common name).plugin
end end
...@@ -245,4 +283,6 @@ let () = ...@@ -245,4 +283,6 @@ let () =
~visit: Extensions.visit ; ~visit: Extensions.visit ;
Cil_printer.set_extension_handler Cil_printer.set_extension_handler
~print: Extensions.print ~print: Extensions.print
~short_print:Extensions.short_print ~short_print:Extensions.short_print;
Ast_diff.set_extension_diff
~is_same_ext: Extensions.is_same_ext
...@@ -51,11 +51,15 @@ type extension_printer = ...@@ -51,11 +51,15 @@ type extension_printer =
Printer_api.extensible_printer_type -> Format.formatter -> Printer_api.extensible_printer_type -> Format.formatter ->
acsl_extension_kind -> unit acsl_extension_kind -> unit
(** type of functions that compare two extensions (with the same keyword)
to decide if they're identical or not. See {!Ast_diff} for more information.
@since Frama-C+dev
*)
type extension_same =
acsl_extension_kind -> acsl_extension_kind -> Ast_diff.is_same_env -> bool
(** [register_behavior (** type of functions that register new ACSL extensions to be used in place of
~plugin name ~preprocessor typer ~visitor ~printer ~short_printer status] various kinds of ACSL annotations.
registers new ACSL extension to be used in function contracts with name
[name] and plugin [plugin].
The labelled parameter [plugin] is used to specify which plugin registers The labelled parameter [plugin] is used to specify which plugin registers
this new extension. It can be used, together with the syntax this new extension. It can be used, together with the syntax
...@@ -84,6 +88,11 @@ type extension_printer = ...@@ -84,6 +88,11 @@ type extension_printer =
behavior for the ACSL extension. By default, it just prints the [name]. It behavior for the ACSL extension. By default, it just prints the [name]. It
is for example used for the filetree in the GUI. is for example used for the filetree in the GUI.
The optional [is_same_ext] parameter allows checking whether two versions
of the extended annotation are identical or not during a run of
{!Ast_diff.compare_ast}. By default, [Ast_diff] will compare the lists
of terms/predicates.
The [status] indicates whether the extension can be assigned a property The [status] indicates whether the extension can be assigned a property
status or not. status or not.
...@@ -100,89 +109,47 @@ type extension_printer = ...@@ -100,89 +109,47 @@ type extension_printer =
| [] -> let id = !count in incr count; Ext_id id | [] -> let id = !count in incr count; Ext_id id
| _ -> typing_context.error loc "expecting a predicate after keyword FOO" | _ -> typing_context.error loc "expecting a predicate after keyword FOO"
let () = let () =
Acsl_extension.register_behavior ~pugin:"myplugin" "FOO" foo_typer false Acsl_extension.register_behavior ~plugin:"myplugin" "FOO" foo_typer false
] ]
@before Frama-C+dev the parameter [plugin] was not present @before Frama-C+dev parameters [plugin] and [is_same_ext] were not present
@see <https://frama-c.com/download/frama-c-plugin-development-guide.pdf> @see <https://frama-c.com/download/frama-c-plugin-development-guide.pdf>
*) *)
val register_behavior: type register_extension =
plugin:string -> string -> plugin:string -> string ->
?preprocessor:extension_preprocessor -> extension_typer -> ?preprocessor:extension_preprocessor -> extension_typer ->
?visitor:extension_visitor -> ?visitor:extension_visitor ->
?printer:extension_printer -> ?short_printer:extension_printer -> bool -> ?printer:extension_printer -> ?short_printer:extension_printer ->
?is_same_ext:extension_same -> bool ->
unit unit
(** Registers extension for global annotation. See {!register_behavior}. (** same as {!register_extension}, but for extensions that parse an axiomatic
block, resulting in a {!Cil_types.Ext_annot}. *)
@before Frama-C+dev the parameter [plugin] was not present type register_extension_block =
@see <https://frama-c.com/download/frama-c-plugin-development-guide.pdf> plugin: string -> string ->
*)
val register_global:
plugin:string -> string ->
?preprocessor:extension_preprocessor -> extension_typer ->
?visitor:extension_visitor ->
?printer:extension_printer -> ?short_printer:extension_printer -> bool ->
unit
(** Registers extension for global block annotation. See {!register_behavior}.
@before Frama-C+dev the parameter [plugin] was not present
@see <https://frama-c.com/download/frama-c-plugin-development-guide.pdf>
*)
val register_global_block:
plugin:string -> string ->
?preprocessor:extension_preprocessor_block -> extension_typer_block -> ?preprocessor:extension_preprocessor_block -> extension_typer_block ->
?visitor:extension_visitor -> ?visitor:extension_visitor ->
?printer:extension_printer -> ?short_printer:extension_printer -> bool -> ?printer:extension_printer -> ?short_printer:extension_printer ->
unit ?is_same_ext:extension_same -> bool -> unit
(** Registers extension for code annotation to be evaluated at _current_
program point. See {!register_behavior}.
@before Frama-C+dev the parameter [plugin] was not present (** Register a behavior extension, i.e. new clauses of contracts *)
@see <https://frama-c.com/download/frama-c-plugin-development-guide.pdf> val register_behavior: register_extension
*)
val register_code_annot:
plugin:string -> string ->
?preprocessor:extension_preprocessor -> extension_typer ->
?visitor:extension_visitor ->
?printer:extension_printer -> ?short_printer:extension_printer -> bool ->
unit
(** Registers extension for code annotation to be evaluated for the _next_ (** Register extension for global annotation. *)
statement. See {!register_behavior}. val register_global: register_extension
@before Frama-C+dev the parameter [plugin] was not present (** Registers extension for global block annotation. *)
@see <https://frama-c.com/download/frama-c-plugin-development-guide.pdf> val register_global_block: register_extension_block
*)
val register_code_annot_next_stmt:
plugin:string -> string ->
?preprocessor:extension_preprocessor -> extension_typer ->
?visitor:extension_visitor ->
?printer:extension_printer -> ?short_printer:extension_printer -> bool ->
unit
(** Registers extension for loop annotation. See {!register_behavior}. (** Registers extension for code annotation to be evaluated at _current_
program point. *)
val register_code_annot: register_extension
@before Frama-C+dev the parameter [plugin] was not present (** Registers extension for code annotation to be evaluated for the _next_
@see <https://frama-c.com/download/frama-c-plugin-development-guide.pdf> statement. *)
*) val register_code_annot_next_stmt: register_extension
val register_code_annot_next_loop:
plugin:string -> string ->
?preprocessor:extension_preprocessor -> extension_typer ->
?visitor:extension_visitor ->
?printer:extension_printer -> ?short_printer:extension_printer -> bool ->
unit
(** Registers extension both for code and loop annotations. (** Registers extension for loop annotation. *)
See {!register_behavior}. val register_code_annot_next_loop: register_extension
@before Frama-C+dev the parameter [plugin] was not present (** Registers extension both for code and loop annotations. *)
@see <https://frama-c.com/download/frama-c-plugin-development-guide.pdf> val register_code_annot_next_both: register_extension
*)
val register_code_annot_next_both:
plugin:string -> string ->
?preprocessor:extension_preprocessor -> extension_typer ->
?visitor:extension_visitor ->
?printer:extension_printer -> ?short_printer:extension_printer -> bool ->
unit
...@@ -195,6 +195,17 @@ type is_same_env = ...@@ -195,6 +195,17 @@ type is_same_env =
enumitem: enumitem Cil_datatype.Enumitem.Map.t; enumitem: enumitem Cil_datatype.Enumitem.Map.t;
} }
let is_same_acsl_extension_kind:
(string->acsl_extension_kind->acsl_extension_kind->is_same_env->bool) ref
= Extlib.mk_fun "Ast_diff.is_same_acsl_extension"
let set_extension_diff ~is_same_ext =
is_same_acsl_extension_kind := is_same_ext
let is_same_acsl_extension ext1 ext2 env =
ext1.ext_name = ext2.ext_name &&
!is_same_acsl_extension_kind ext1.ext_name ext1.ext_kind ext2.ext_kind env
module type Correspondence_table = sig module type Correspondence_table = sig
include State_builder.Hashtbl include State_builder.Hashtbl
val pretty_data: Format.formatter -> data -> unit val pretty_data: Format.formatter -> data -> unit
...@@ -257,6 +268,9 @@ let make_correspondence candidate has_same_spec code_corres = ...@@ -257,6 +268,9 @@ let make_correspondence candidate has_same_spec code_corres =
| true, ((`Body_changed|`Callees_changed) as c) -> | true, ((`Body_changed|`Callees_changed) as c) ->
`Partial(candidate, c) `Partial(candidate, c)
let make_body_correspondence has_same_spec code_corres =
if has_same_spec then code_corres else `Body_changed
let (&&>) (res,env) f = let (&&>) (res,env) f =
match res with match res with
| `Body_changed -> `Body_changed, env | `Body_changed -> `Body_changed, env
...@@ -693,9 +707,8 @@ and is_same_behavior b b' env = ...@@ -693,9 +707,8 @@ and is_same_behavior b b' env =
is_same_list is_same_identified_predicate b.b_assumes b'.b_assumes env && is_same_list is_same_identified_predicate b.b_assumes b'.b_assumes env &&
is_same_list is_same_post_cond b.b_post_cond b'.b_post_cond env && is_same_list is_same_post_cond b.b_post_cond b'.b_post_cond env &&
is_same_assigns b.b_assigns b'.b_assigns env && is_same_assigns b.b_assigns b'.b_assigns env &&
is_same_allocation b.b_allocation b'.b_allocation env is_same_allocation b.b_allocation b'.b_allocation env &&
(* TODO: also consider ACSL extensions, with the help of the plugins is_same_list is_same_acsl_extension b.b_extended b'.b_extended env
that handle them. *)
and is_same_variant (v,m) (v',m') env = and is_same_variant (v,m) (v',m') env =
is_same_term v v' env && is_same_opt is_matching_logic_info m m' env is_same_term v v' env && is_same_opt is_matching_logic_info m m' env
...@@ -762,7 +775,10 @@ and is_same_code_annotation a a' env = ...@@ -762,7 +775,10 @@ and is_same_code_annotation a a' env =
| AAllocation(bhvs, a), AAllocation(bhvs',a') -> | AAllocation(bhvs, a), AAllocation(bhvs',a') ->
is_same_behavior_set bhvs bhvs' && is_same_allocation a a' env is_same_behavior_set bhvs bhvs' && is_same_allocation a a' env
| APragma p, APragma p' -> is_same_pragma p p' env | APragma p, APragma p' -> is_same_pragma p p' env
| AExtended _, AExtended _ -> true (*TODO: checks also for extended clauses*) | AExtended (bhvs, is_next, ext),
AExtended (bhvs', is_next', ext') ->
is_same_behavior_set bhvs bhvs' && is_next = is_next' &&
is_same_acsl_extension ext ext' env
| (AAssert _ | AStmtSpec _ | AInvariant _ | AVariant _ | AAssigns _ | (AAssert _ | AStmtSpec _ | AInvariant _ | AVariant _ | AAssigns _
| AAllocation _ | APragma _ | AExtended _), _ -> false | AAllocation _ | APragma _ | AExtended _), _ -> false
...@@ -1156,8 +1172,9 @@ and is_same_stmt s s' env = ...@@ -1156,8 +1172,9 @@ and is_same_stmt s s' env =
| _ -> `Body_changed, env | _ -> `Body_changed, env
end else `Body_changed, env end else `Body_changed, env
in in
let res = make_correspondence s' annot_res code_res in let corres = make_correspondence s' annot_res code_res in
Stmt.add s res; code_res, env let res = make_body_correspondence annot_res code_res in
Stmt.add s corres; res, env
(* is_same_block will return its modified environment in order (* is_same_block will return its modified environment in order
to update correspondence table with respect to locals, in case to update correspondence table with respect to locals, in case
...@@ -1537,9 +1554,8 @@ let rec gannot_correspondence = ...@@ -1537,9 +1554,8 @@ let rec gannot_correspondence =
ignore (logic_info_correspondence ~loc li empty_env) ignore (logic_info_correspondence ~loc li empty_env)
| Dmodel_annot (mi,loc) -> | Dmodel_annot (mi,loc) ->
ignore (model_info_correspondence ~loc mi) ignore (model_info_correspondence ~loc mi)
| Dextended _ -> () | Dextended _ -> () (* TODO: as for lemmas, we don't really have a structure
(* TODO: provide mechanism for extension themselves where to look for a matching extended annotation. *)
to give relevant information. *)
let global_correspondence g = let global_correspondence g =
match g with match g with
......
...@@ -117,6 +117,24 @@ module Fundec: ...@@ -117,6 +117,24 @@ module Fundec:
Correspondence_table Correspondence_table
with type key = fundec and type data = fundec correspondence with type key = fundec and type data = fundec correspondence
(** map of symbols currently under comparison,
with their correspondence status so far *)
type is_same_env
val is_same_list:
('a -> 'a -> is_same_env -> bool) -> 'a list -> 'a list -> is_same_env -> bool
val is_same_term: term -> term -> is_same_env -> bool
val is_same_predicate: predicate -> predicate -> is_same_env -> bool
(** access custom comparison functions for ACSL extensions *)
val set_extension_diff:
is_same_ext:
(string ->
acsl_extension_kind -> acsl_extension_kind -> is_same_env -> bool)
-> unit
(** performs a comparison of AST between the current and the original (** performs a comparison of AST between the current and the original
project, which must have been set beforehand. project, which must have been set beforehand.
*) *)
......
...@@ -36,14 +36,14 @@ let preprocess_foo_ptree_element kind = function ...@@ -36,14 +36,14 @@ let preprocess_foo_ptree_element kind = function
let preprocess_foo_ptree kind = List.map (preprocess_foo_ptree_element kind) let preprocess_foo_ptree kind = List.map (preprocess_foo_ptree_element kind)
let register registration ?visitor ?printer ?short_printer kind = let register registration ?visitor ?printer ?short_printer ?is_same_ext kind =
let registration ?preprocessor typer = let registration ?preprocessor typer =
registration registration
(kind ^ "_foo") ?preprocessor typer ?visitor ?printer ?short_printer false (kind ^ "_foo")
?preprocessor typer ?visitor ?printer ?short_printer ?is_same_ext false
in in
registration ~preprocessor:(preprocess_foo_ptree kind) (ext_typing kind) registration ~preprocessor:(preprocess_foo_ptree kind) (ext_typing kind)
let () = let () =
let open Acsl_extension in let open Acsl_extension in
register (register_behavior ~plugin:"test" ) "bhv"; register (register_behavior ~plugin:"test" ) "bhv";
......
/* run.config /* run.config
COMMENT: we need Eva for the loop unroll ACSL extension
PLUGIN: eva
MODULE: @PTEST_NAME@ MODULE: @PTEST_NAME@
OPT: -then -ast-diff %{dep:ast_diff_2.c} OPT: -then -ast-diff %{dep:ast_diff_2.c}
OPT: -then -ast-diff %{dep:ast_diff_2.c} -cpp-extra-args="-DADD_ENUM_TAG" OPT: -then -ast-diff %{dep:ast_diff_2.c} -cpp-extra-args="-DADD_ENUM_TAG"
...@@ -107,3 +109,13 @@ void se() { ...@@ -107,3 +109,13 @@ void se() {
struct s S; struct s S;
S.c[0] = 1; S.c[0] = 1;
} }
void with_loop_unroll_same() {
//@ loop unroll 5;
for (int i = 0; i < 5; i++);
}
void with_loop_unroll_diff() {
//@ loop unroll 4;
for (int i = 0; i < 5; i++);
}
open Cil_types
include Plugin.Register( include Plugin.Register(
struct struct
let name = "AST diff test" let name = "AST diff test"
...@@ -15,13 +17,36 @@ let show_fun kf c = ...@@ -15,13 +17,36 @@ let show_fun kf c =
Kernel_function.pretty kf Kernel_function.pretty kf
Ast_diff.Kernel_function.pretty_data c Ast_diff.Kernel_function.pretty_data c
let cmp_fun kf1 kf2 =
Datatype.String.compare
(Kernel_function.get_vi kf1).vname (Kernel_function.get_vi kf2).vname
let cmp_var v1 v2 =
let res = Datatype.String.compare v1.vname v2.vname in
if res <> 0 then res
else if v1.vglob && v2.vglob then 0
else if v1.vglob then -1
else if v2.vglob then 1
else if v1.vstorage = Static && v2.vstorage = Static then 0
else if v1.vstorage = Static then -1
else if v2.vstorage = Static then 1
else begin
let prj = Ast_diff.Orig_project.get() in
let kf1 = Project.on prj Kernel_function.find_defining_kf v1 in
let kf2 = Project.on prj Kernel_function.find_defining_kf v2 in
if Option.is_none kf1 || Option.is_none kf2 then
fatal "Variable %a(%a) is not global but has no associated function"
Cil_datatype.Varinfo.pretty v1 Cil_datatype.Location.pretty v1.vdecl;
cmp_fun (Option.get kf1) (Option.get kf2)
end
let show_correspondances () = let show_correspondances () =
if Kernel.AstDiff.get () then begin if Kernel.AstDiff.get () then begin
result "Showing correspondances between %s and %s" result "Showing correspondances between %s and %s"
(Project.get_name (Ast_diff.Orig_project.get())) (Project.get_name (Ast_diff.Orig_project.get()))
(Project.get_name (Project.current())); (Project.get_name (Project.current()));
Ast_diff.Varinfo.iter show_var; Ast_diff.Varinfo.iter_sorted ~cmp:cmp_var show_var;
Ast_diff.Kernel_function.iter show_fun; Ast_diff.Kernel_function.iter_sorted ~cmp:cmp_fun show_fun;
end end
let () = Boot.Main.extend show_correspondances let () = Boot.Main.extend show_correspondances
...@@ -102,3 +102,13 @@ void se() { ...@@ -102,3 +102,13 @@ void se() {
struct s S; struct s S;
S.c[0] = 1; S.c[0] = 1;
} }
void with_loop_unroll_same() {
//@ loop unroll 5;
for (int i = 0; i < 5; i++);
}
void with_loop_unroll_diff() {
//@ loop unroll 5;
for (int i = 0; i < 5; i++);
}
[kernel] Parsing ast_diff_1.i (no preprocessing) [kernel] Parsing ast_diff_1.i (no preprocessing)
[kernel] Parsing ast_diff_2.c (with preprocessing) [kernel] Parsing ast_diff_2.c (with preprocessing)
[AST diff test] Showing correspondances between orig_default and default [AST diff test] Showing correspondances between orig_default and default
[AST diff test] Variable i: => i [AST diff test] Variable S: => S
[AST diff test] Variable local_var_use: => local_var_use
[AST diff test] Variable v: => w
[AST diff test] Variable a: => q
[AST diff test] Variable x: => z
[AST diff test] Variable y: => t
[AST diff test] Variable s: => s
[AST diff test] Variable use_s: => use_s
[AST diff test] Variable x: => x
[AST diff test] Variable with_goto_changed: => with_goto_changed
[AST diff test] Variable X: => X [AST diff test] Variable X: => X
[AST diff test] Variable Y: N/A [AST diff test] Variable Y: N/A
[AST diff test] Variable __retres: => __retres
[AST diff test] Variable a: => q
[AST diff test] Variable c: => c [AST diff test] Variable c: => c
[AST diff test] Variable f: => f
[AST diff test] Variable with_goto_unchanged: => with_goto_unchanged
[AST diff test] Variable x: => x
[AST diff test] Variable c: => c [AST diff test] Variable c: => c
[AST diff test] Variable decl: => decl
[AST diff test] Variable f: => f
[AST diff test] Variable g: => g [AST diff test] Variable g: => g
[AST diff test] Variable se: => se
[AST diff test] Variable S: => S
[AST diff test] Variable has_static_local_x: => has_static_local_y
[AST diff test] Variable h: => h [AST diff test] Variable h: => h
[AST diff test] Variable __retres: => __retres [AST diff test] Variable has_static_local: => has_static_local
[AST diff test] Variable has_static_local_x: => has_static_local_y
[AST diff test] Variable i: => i
[AST diff test] Variable i_0: => i_0
[AST diff test] Variable local_var_use: => local_var_use
[AST diff test] Variable ptr_func: => ptr_func
[AST diff test] Variable s: => s
[AST diff test] Variable se: => se
[AST diff test] Variable use_logic_builtin: => use_logic_builtin [AST diff test] Variable use_logic_builtin: => use_logic_builtin
[AST diff test] Variable use_s: => use_s
[AST diff test] Variable used_in_decl: => used_in_decl
[AST diff test] Variable v: => w
[AST diff test] Variable with_goto_changed: => with_goto_changed
[AST diff test] Variable with_goto_unchanged: => with_goto_unchanged
[AST diff test] Variable with_loop_unroll_diff: => with_loop_unroll_diff
[AST diff test] Variable with_loop_unroll_same: => with_loop_unroll_same
[AST diff test] Variable x: => x
[AST diff test] Variable x: => z
[AST diff test] Variable x: => x
[AST diff test] Variable x: => x [AST diff test] Variable x: => x
[AST diff test] Variable y: => t
[AST diff test] Variable y: => y [AST diff test] Variable y: => y
[AST diff test] Variable has_static_local: => has_static_local [AST diff test] Function decl: => decl
[AST diff test] Variable decl: => decl [AST diff test] Function f: => f
[AST diff test] Variable used_in_decl: => used_in_decl [AST diff test] Function g: N/A
[AST diff test] Variable ptr_func: => ptr_func [AST diff test] Function h: -> h (body changed)
[AST diff test] Function has_static_local: => has_static_local
[AST diff test] Function i: => i [AST diff test] Function i: => i
[AST diff test] Function local_var_use: => local_var_use [AST diff test] Function local_var_use: => local_var_use
[AST diff test] Function se: => se
[AST diff test] Function use_logic_builtin: => use_logic_builtin
[AST diff test] Function use_s: => use_s [AST diff test] Function use_s: => use_s
[AST diff test] Function with_goto_changed: -> with_goto_changed (body changed) [AST diff test] Function with_goto_changed: -> with_goto_changed (body changed)
[AST diff test] Function f: => f
[AST diff test] Function with_goto_unchanged: => with_goto_unchanged [AST diff test] Function with_goto_unchanged: => with_goto_unchanged
[AST diff test] Function g: N/A [AST diff test] Function with_loop_unroll_diff: -> with_loop_unroll_diff (body changed)
[AST diff test] Function se: => se [AST diff test] Function with_loop_unroll_same: => with_loop_unroll_same
[AST diff test] Function h: -> h (body changed)
[AST diff test] Function use_logic_builtin: => use_logic_builtin
[AST diff test] Function has_static_local: => has_static_local
[AST diff test] Function decl: => decl
...@@ -2,42 +2,47 @@ ...@@ -2,42 +2,47 @@
[kernel] Parsing ast_diff_2.c (with preprocessing) [kernel] Parsing ast_diff_2.c (with preprocessing)
[kernel] Parsing ast_diff_1.i (no preprocessing) [kernel] Parsing ast_diff_1.i (no preprocessing)
[AST diff test] Showing correspondances between orig_default and default [AST diff test] Showing correspondances between orig_default and default
[AST diff test] Variable use_logic_builtin: => use_logic_builtin [AST diff test] Variable X: => X
[AST diff test] Variable x: => x [AST diff test] Variable Y: N/A
[AST diff test] Variable y: => y [AST diff test] Variable a: => q
[AST diff test] Variable has_static_local: => has_static_local [AST diff test] Variable c: => c
[AST diff test] Variable c: => c
[AST diff test] Variable decl: => decl [AST diff test] Variable decl: => decl
[AST diff test] Variable used_in_decl: => used_in_decl [AST diff test] Variable f: => f
[AST diff test] Variable ptr_func: => ptr_func [AST diff test] Variable g: => g
[AST diff test] Variable h: => h
[AST diff test] Variable has_static_local: => has_static_local
[AST diff test] Variable has_static_local_x: => has_static_local_y
[AST diff test] Variable i: => i [AST diff test] Variable i: => i
[AST diff test] Variable i_0: => i_0
[AST diff test] Variable local_var_use: => local_var_use [AST diff test] Variable local_var_use: => local_var_use
[AST diff test] Variable v: => w [AST diff test] Variable ptr_func: => ptr_func
[AST diff test] Variable a: => q
[AST diff test] Variable x: => z
[AST diff test] Variable y: => t
[AST diff test] Variable s: N/A [AST diff test] Variable s: N/A
[AST diff test] Variable se: => se
[AST diff test] Variable use_logic_builtin: => use_logic_builtin
[AST diff test] Variable use_s: N/A [AST diff test] Variable use_s: N/A
[AST diff test] Variable used_in_decl: => used_in_decl
[AST diff test] Variable v: => w
[AST diff test] Variable with_goto_changed: => with_goto_changed [AST diff test] Variable with_goto_changed: => with_goto_changed
[AST diff test] Variable X: => X
[AST diff test] Variable Y: N/A
[AST diff test] Variable c: => c
[AST diff test] Variable f: => f
[AST diff test] Variable with_goto_unchanged: => with_goto_unchanged [AST diff test] Variable with_goto_unchanged: => with_goto_unchanged
[AST diff test] Variable with_loop_unroll_diff: => with_loop_unroll_diff
[AST diff test] Variable with_loop_unroll_same: => with_loop_unroll_same
[AST diff test] Variable x: => x [AST diff test] Variable x: => x
[AST diff test] Variable c: => c [AST diff test] Variable x: => z
[AST diff test] Variable g: => g [AST diff test] Variable x: => x
[AST diff test] Variable se: => se [AST diff test] Variable y: => t
[AST diff test] Variable has_static_local_x: => has_static_local_y [AST diff test] Variable y: => y
[AST diff test] Variable h: => h
[AST diff test] Function use_logic_builtin: => use_logic_builtin
[AST diff test] Function has_static_local: => has_static_local
[AST diff test] Function decl: => decl [AST diff test] Function decl: => decl
[AST diff test] Function f: => f
[AST diff test] Function g: N/A
[AST diff test] Function h: -> h (body changed)
[AST diff test] Function has_static_local: => has_static_local
[AST diff test] Function i: => i [AST diff test] Function i: => i
[AST diff test] Function local_var_use: => local_var_use [AST diff test] Function local_var_use: => local_var_use
[AST diff test] Function se: -> se (body changed)
[AST diff test] Function use_logic_builtin: => use_logic_builtin
[AST diff test] Function use_s: N/A [AST diff test] Function use_s: N/A
[AST diff test] Function with_goto_changed: -> with_goto_changed (body changed) [AST diff test] Function with_goto_changed: -> with_goto_changed (body changed)
[AST diff test] Function f: => f
[AST diff test] Function with_goto_unchanged: => with_goto_unchanged [AST diff test] Function with_goto_unchanged: => with_goto_unchanged
[AST diff test] Function g: N/A [AST diff test] Function with_loop_unroll_diff: -> with_loop_unroll_diff (body changed)
[AST diff test] Function se: -> se (body changed) [AST diff test] Function with_loop_unroll_same: => with_loop_unroll_same
[AST diff test] Function h: -> h (body changed)
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