Skip to content

Commit bbe86ae

Browse files
committed
Simplify SymbLocks.A.E printing
1 parent c1e1632 commit bbe86ae

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

src/analyses/symbLocks.ml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -106,20 +106,20 @@ struct
106106

107107
module A =
108108
struct
109-
module E = struct
110-
include Printable.Either (CilType.Offset) (ILock)
111-
112-
let pretty () = function
113-
| `Left o -> Pretty.dprintf "p-lock:%a" (d_offset (text "*")) o
114-
| `Right addr -> Pretty.dprintf "i-lock:%a" ILock.pretty addr
109+
module PLock =
110+
struct
111+
include CilType.Offset
112+
let name () = "p-lock"
115113

114+
let pretty = d_offset (text "*")
116115
include Printable.SimplePretty (
117116
struct
118117
type nonrec t = t
119118
let pretty = pretty
120119
end
121120
)
122121
end
122+
module E = Printable.Either (PLock) (ILock)
123123
include SetDomain.Make (E)
124124

125125
let name () = "symblock"

src/cdomains/symbLocksDomain.ml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,7 @@ struct
306306
end
307307

308308
include AddressDomain.AddressPrintable (Mval.MakePrintable (Offset.MakePrintable (Idx)))
309+
let name () = "i-lock"
309310

310311
let rec conv_const_offset x =
311312
match x with

0 commit comments

Comments
 (0)