You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Handle renaming of local variables in incremental analysis (AST) (#731)
* Added basic test cases for changed variable names.
* Rename detection works for simple cases
* Rename detection for method parameters, too
* Renaming of method params should work now.
* Renaming of results does work for the log files.
* Added multiple incremental runs test
* Renamed local vars are now also shown in g2html.
* Added incremental aware print statements and replaced traditional print statements with those in many places
* Renamed variable names are now displayed with their new name in g2html
* Cleanup print statements and added some docu.
* Renamed context to rename_mapping
* Replaced rename mapping lists with Hashtbls for increased performance
* cleanup print statements and code.
* cherry picked context -> rename mapping
* Replaced rename mapping lists with Hashtbls for increased performance
* Old locals are now renamed to the new local names.
* Fixed duplicate id tests
* Moved multiple incremental run tests to subdirectory.
* Removed unused currentFunctionName global state.
* Removed nothing test case
* Added include assert to tests. Removed useless test.c
* Replaced tupletostring with fancy syntax.
* Hashtbl.add is now replaced by Hashtbl.replace in many places.
* List optimization.
* method_rename_assumptions now uses varinfo map instead of string hashtable.
* Removed RenameMapping.
* Added documentation to tests in 04-var-rename
* Add comment to test-incremental-multiple.sh
* Removed syntactic noise introduced by addition and removal of RenameMapping
* Removed diffs directory in tests/incremental/04-var-rename
* function parameter names are now also updated. Cleanup code.
* eqF now uses empty rename mapping for header comparison.
* CFG comparison now verifies locals again.
leteq_glob (a: global) (b: global) (cfgs: (cfg * (cfg * cfg)) option) =match a, b with
61
-
|GFun (f,_), GFun (g,_) -> eqF f g cfgs
62
-
|GVar (x, init_x, _), GVar (y, init_y, _) -> eq_varinfo x y, false, None(* ignore the init_info - a changed init of a global will lead to a different start state *)
63
-
|GVarDecl (x, _), GVarDecl (y, _) -> eq_varinfo x y, false, None
94
+
leteq_glob (a: global) (b: global) (cfgs: (cfg * (cfg * cfg)) option) (global_rename_mapping: method_rename_assumptions) =match a, b with
95
+
|GFun (f,_), GFun (g,_) -> eqF f g cfgs global_rename_mapping
96
+
|GVar (x, init_x, _), GVar (y, init_y, _) -> eq_varinfo x y (StringMap.empty, VarinfoMap.empty), false, None(* ignore the init_info - a changed init of a global will lead to a different start state *)
97
+
|GVarDecl (x, _), GVarDecl (y, _) -> eq_varinfo x y (StringMap.empty, VarinfoMap.empty), false, None
64
98
|_ -> ignore @@Pretty.printf "Not comparable: %a and %a\n"Cil.d_global a Cil.d_global b; false, false, None
0 commit comments