Skip to content

Commit 9eeff41

Browse files
committed
Flip Lattice.HConsed arguments for convenient lifting
1 parent e7a3412 commit 9eeff41

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/domain/lattice.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ struct
145145
end
146146

147147
(* HAS SIDE-EFFECTS ---- PLEASE INSTANCIATE ONLY ONCE!!! *)
148-
module HConsed (Base:S) (Arg: sig val assume_idempotent: bool end) =
148+
module HConsed (Arg: sig val assume_idempotent: bool end) (Base:S) =
149149
struct
150150
include Printable.HConsed (Base)
151151

src/domain/mapDomain.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ module HConsed (M: S) : S with
263263
type key = M.key and
264264
type value = M.value =
265265
struct
266-
include Lattice.HConsed (M) (struct let assume_idempotent = false end)
266+
include Lattice.HConsed (struct let assume_idempotent = false end) (M)
267267

268268
type key = M.key
269269
type value = M.value

src/lifters/specLifters.ml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,16 +101,16 @@ struct
101101
end
102102

103103
(** Lifts a [Spec] so that the domain is [Hashcons]d *)
104-
module HashconsLifter (S: Spec) =
104+
module HashconsLifter (S: Spec) = (* keep functor eta-expanded to look up option when lifter is actually used *)
105105
struct
106106
module HConsedArg =
107107
struct
108108
(* We do refine int values on narrow and meet {!IntDomain.IntDomTupleImpl}, which can lead to fixpoint issues if we assume x op x = x *)
109109
(* see https://github.com/goblint/analyzer/issues/1005 *)
110110
let assume_idempotent = GobConfig.get_string "ana.int.refinement" = "never"
111111
end
112-
module F (L: Lattice.S) = Lattice.HConsed (L) (HConsedArg)
113-
include DomainLifter (F) (S)
112+
113+
include DomainLifter (Lattice.HConsed (HConsedArg)) (S)
114114
end
115115

116116
module type PrintableLifter =

0 commit comments

Comments
 (0)