-
Notifications
You must be signed in to change notification settings - Fork 88
Expand file tree
/
Copy pathanalysisResult.ml
More file actions
61 lines (51 loc) · 1.39 KB
/
analysisResult.ml
File metadata and controls
61 lines (51 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
(** Analysis results. *)
open GoblintCil
open Pretty
open GobConfig
module ResultNode: Printable.S with type t = MyCFG.node =
struct
include Printable.Std
include Node
let name () = "resultnode"
let show a =
(* Not using Node.location here to have updated locations in incremental analysis.
See: https://github.com/goblint/analyzer/issues/290#issuecomment-881258091. *)
let x = UpdateCil.getLoc a in
let f = Node.find_fundec a in
CilType.Location.show x ^ "(" ^ f.svar.vname ^ ")"
include Printable.SimpleShow (
struct
type nonrec t = t
let show = show
end
)
end
module type ResultConf =
sig
val result_name: string
end
module type Result =
sig
include ResultConf
module Range: Printable.S
module H: BatHashtbl.S with type key := ResultNode.t
include BatHashtbl.S with type 'a t := 'a H.t and type key := ResultNode.t
type t = Range.t H.t
end
module Result (Range: Printable.S) (C: ResultConf): Result with module Range = Range =
struct
include C
module Range = Range
module H = BatHashtbl.Make (ResultNode)
include H
type t = Range.t H.t
end
module ResultType2 (S: Analyses.Spec) =
struct
open S
include Printable.Prod3 (C) (D) (CilType.Fundec)
let show (es,x,f:t) = D.show x
let pretty () (_,x,_) = D.pretty () x
let printXml f (c,d,fd) =
BatPrintf.fprintf f "<context>\n%a</context>\n%a" C.printXml c D.printXml d
end