Skip to content

Commit afdf1b1

Browse files
Merge pull request #13 from goblint/reanalyze-dce
Run dead code analysis with reanalyze
2 parents 1c5b81f + 693a7c9 commit afdf1b1

File tree

14 files changed

+7
-237
lines changed

14 files changed

+7
-237
lines changed

src/DTreeView.re

Lines changed: 0 additions & 50 deletions
This file was deleted.

src/Menu.re

Lines changed: 0 additions & 29 deletions
This file was deleted.

src/bindings/dOMParser.ml

Lines changed: 0 additions & 20 deletions
This file was deleted.

src/bindings/dOMParser.mli

Lines changed: 0 additions & 7 deletions
This file was deleted.

src/state/gvDisplay.ml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ type func = Func.t
2626

2727
type t = File of file | Func of func
2828

29-
let file ~path ?contents () = File (File.make ~path ?contents ())
29+
let file ~path ?contents () = File (File.make ~path ?contents ()) (* TODO: contents argument never used *)
3030

31+
(* TODO: unused *)
3132
let func ~name ~file ?dot () = Func (Func.make ~name ~file ?dot ())

src/state/gvGoblint.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ let unmarshal spec cil =
171171
let (module G : Sig) =
172172
(module Make (Cfg) (Spec)
173173
(struct
174-
let increment = Analyses.empty_increment_data cil
174+
let increment = Analyses.empty_increment_data ()
175175
end))
176176
in
177177
G.wrap_solver_state ()

src/state/gvInspect.ml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
module Line = struct
22
type t = string * int
33

4-
let empty = ("", -1)
5-
6-
let make file num = (file, num)
7-
8-
let valid (_, n) = n != -1
9-
104
let of_location (loc : Cil.location) = (loc.file, loc.line)
115
end
126

@@ -22,6 +16,4 @@ type t = Line of line | Node of node
2216

2317
let line file num = Line (file, num)
2418

25-
let line_num = function Line ((_, n) as line) when Line.valid line -> Some n | _ -> None
26-
2719
let node id = Node id

src/state/gvMessages.ml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ end
1919

2020
type t = Message.t list
2121

22+
(* TODO: unused *)
2223
let filter_by_line (file, line) =
2324
let pred msg =
2425
match Message.location msg with

src/state/search.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ module Query = struct
66
type error = ParseError of string
77

88
let create ?(kind = CodeQuery.Var_k) ?(target = CodeQuery.Name_t "") ?(find = CodeQuery.Uses_f)
9-
?(structure = CodeQuery.None_s) ?(limitation = CodeQuery.None_c) ?(expression = "")
9+
?(structure = CodeQuery.None_s) ?(limitation = CodeQuery.None_c) ?(expression = "") (* TODO: limitation argument never used *)
1010
?(mode = `Must) () : t =
1111
{ kind; target; find; structure; limitation; expression; mode }
1212

@@ -30,7 +30,7 @@ module Query = struct
3030
let execute (q : t) cil =
3131
if is_semantic q then (
3232
ExpressionEvaluation.gv_query := Some q;
33-
Maingoblint.do_analyze (Analyses.empty_increment_data cil) cil;
33+
Maingoblint.do_analyze (Analyses.empty_increment_data ()) cil;
3434
let results = !ExpressionEvaluation.gv_results in
3535
let pred =
3636
if q.mode = `Must then snd %> Option.default false else snd %> Option.default true

src/ui/base/form.re

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)