Skip to content

Commit ea029bc

Browse files
committed
Simplify default Lattice.Flat usage
1 parent b71518c commit ea029bc

File tree

20 files changed

+29
-38
lines changed

20 files changed

+29
-38
lines changed

src/analyses/loopTermination.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ let check_bounded ctx varinfo =
1919
(** We want to record termination information of loops and use the loop
2020
* statements for that. We use this lifting because we need to have a
2121
* lattice. *)
22-
module Statements = Lattice.Flat (Printable.DefaultConf) (CilType.Stmt)
22+
module Statements = Lattice.Flat (CilType.Stmt)
2323

2424
(** The termination analysis considering loops and gotos *)
2525
module Spec : Analyses.MCPSpec =

src/analyses/mCPRegistry.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ end
426426

427427
module DomVariantLattice (DLSpec : DomainListLatticeSpec) =
428428
struct
429-
include Lattice.Lift (Printable.DefaultConf) (DomVariantLattice0 (DLSpec))
429+
include Lattice.Lift (DomVariantLattice0 (DLSpec))
430430
let name () = "MCP.G"
431431
end
432432

src/analyses/threadId.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ struct
3131

3232
module N =
3333
struct
34-
include Lattice.Flat (struct include Printable.DefaultConf let bot_name = "unknown node" let top_name = "unknown node" end) (VNI)
34+
include Lattice.FlatConf (struct include Printable.DefaultConf let bot_name = "unknown node" let top_name = "unknown node" end) (VNI)
3535
let name () = "wrapper call"
3636
end
3737
module TD = Thread.D

src/analyses/tutorials/signs.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ end
3636
* We then lift the above operations to the lattice. *)
3737
module SL =
3838
struct
39-
include Lattice.Flat (Printable.DefaultConf) (Signs)
39+
include Lattice.Flat (Signs)
4040
let of_int i = `Lifted (Signs.of_int i)
4141

4242
let lt x y = match x, y with

src/analyses/wrapperFunctionAnalysis0.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ module ThreadCreateUniqueCount =
3636
MakeUniqueCount (val unique_count_args_from_config "ana.thread.unique_thread_id_count")
3737

3838
(* since the query also references NodeFlatLattice, it also needs to reside here *)
39-
module NodeFlatLattice = Lattice.Flat (struct
39+
module NodeFlatLattice = Lattice.FlatConf (struct
4040
include Printable.DefaultConf
4141
let top_name = "Unknown node"
4242
let bot_name = "Unreachable node"

src/cdomains/intDomain.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1713,7 +1713,7 @@ end
17131713
module Flat (Base: IkindUnawareS) = (* identical to Lift, but goes to `Top/`Bot if Base raises Unknown/Error *)
17141714
struct
17151715
type int_t = Base.int_t
1716-
include Lattice.Flat (struct
1716+
include Lattice.FlatConf (struct
17171717
include Printable.DefaultConf
17181718
let top_name = "Unknown int"
17191719
let bot_name = "Error int"

src/cdomains/mutexAttrDomain.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ struct
1818
end)
1919
end
2020

21-
include Lattice.Flat (struct include Printable.DefaultConf let bot_name = "Uninitialized" let top_name = "Top" end) (MutexKind)
21+
include Lattice.FlatConf (struct include Printable.DefaultConf let bot_name = "Uninitialized" let top_name = "Top" end) (MutexKind)
2222

2323
(* Needed because OS X is weird and assigns different constants than normal systems... :( *)
2424
let recursive_int = lazy (

src/cdomains/regionDomain.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,4 +252,4 @@ struct
252252
end
253253

254254
(* TODO: remove Lift *)
255-
module RegionDom = Lattice.Lift (struct include Printable.DefaultConf let top_name = "Unknown" let bot_name = "Error" end) (RegMap)
255+
module RegionDom = Lattice.LiftConf (struct include Printable.DefaultConf let top_name = "Unknown" let bot_name = "Error" end) (RegMap)

src/cdomains/stackDomain.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ struct
3030

3131
module VarLat = Lattice.Fake (Basetype.Variables)
3232

33-
module Var = Lattice.Lift (struct include Printable.DefaultConf let top_name="top" let bot_name="" end) (VarLat)
33+
module Var = Lattice.LiftConf (struct include Printable.DefaultConf let top_name="top" let bot_name="" end) (VarLat)
3434
include Lattice.Liszt (Var)
3535

3636
let top () : t = []

src/cdomains/threadIdDomain.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ module ThreadLiftNames = struct
202202
end
203203
module Lift (Thread: S) =
204204
struct
205-
include Lattice.Flat (ThreadLiftNames) (Thread)
205+
include Lattice.FlatConf (ThreadLiftNames) (Thread)
206206
let name () = "Thread"
207207
end
208208

0 commit comments

Comments
 (0)