Skip to content

Commit 32fc632

Browse files
committed
Expose conv from SpecLifters
1 parent 062e200 commit 32fc632

File tree

2 files changed

+27
-15
lines changed

2 files changed

+27
-15
lines changed

src/lifters/specLifters.ml

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,14 @@ module type LatticeLifter =
1919
val unlift: t -> L.t
2020
end
2121

22-
module DomainLifter (N: NameLifter) (F: LatticeLifter) (S:Spec)
23-
: Spec with module G = S.G
24-
and module C = S.C
25-
and module D = F (S.D)
22+
module DomainLifter (N: NameLifter) (F: LatticeLifter) (S:Spec):
23+
sig
24+
include Spec with module G = S.G
25+
and module C = S.C
26+
and module D = F (S.D)
27+
and module V = S.V
28+
val conv: (D.t, G.t, C.t, V.t) man -> (S.D.t, G.t, C.t, V.t) man
29+
end
2630
=
2731
struct
2832
module D = F (S.D)
@@ -105,10 +109,14 @@ struct
105109
D.lift @@ S.event (conv man) e (conv oman)
106110
end
107111

108-
module GlobalDomainLifter (N: NameLifter) (F: LatticeLifter) (S:Spec)
109-
: Spec with module D = S.D
110-
and module G = F (S.G)
111-
and module C = S.C
112+
module GlobalDomainLifter (N: NameLifter) (F: LatticeLifter) (S:Spec):
113+
sig
114+
include Spec with module D = S.D
115+
and module G = F (S.G)
116+
and module C = S.C
117+
and module V = S.V
118+
val conv: (D.t, G.t, C.t, V.t) man -> (D.t, S.G.t, C.t, V.t) man
119+
end
112120
=
113121
struct
114122
module D = S.D
@@ -213,10 +221,14 @@ module type PrintableLifter =
213221
val unlift: t -> P.t
214222
end
215223

216-
module ContextLifter (N: NameLifter) (F: PrintableLifter) (S:Spec)
217-
: Spec with module D = S.D
218-
and module G = S.G
219-
and module C = F (S.C)
224+
module ContextLifter (N: NameLifter) (F: PrintableLifter) (S:Spec):
225+
sig
226+
include Spec with module D = S.D
227+
and module G = S.G
228+
and module C = F (S.C)
229+
and module V = S.V
230+
val conv: (D.t, G.t, C.t, V.t) man -> (D.t, G.t, S.C.t, V.t) man
231+
end
220232
=
221233
struct
222234
module D = S.D

src/lifters/wideningDelay.ml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,12 @@ struct
6969
end
7070
include SpecLifters.DomainLifter (NameLifter) (DD) (S)
7171

72+
(* Redefine morphstate and paths_as_set to keep counter instead of resetting to 0. *)
73+
7274
let morphstate v (d, l) = (S.morphstate v d, l)
7375

7476
let paths_as_set man =
75-
let liftmap = List.map (fun (x, _) -> (x, snd man.local)) in
76-
(* TODO: expose conv from DomainLifter? *)
77-
liftmap (paths_as_set man)
77+
List.map (fun x -> (x, snd man.local)) @@ S.paths_as_set (conv man)
7878
end
7979

8080
(** Lift {!S} to use widening delay for global unknowns. *)

0 commit comments

Comments
 (0)