239239module Flat = FlatConf (Printable. DefaultConf )
240240
241241
242- module LiftConf (Conf : Printable.LiftConf ) (Base : S ) =
242+ module LiftConf (Conf : Printable.LiftConf ) (Base : PO ) =
243243struct
244244 include Printable. LiftConf (Conf ) (Base )
245245
@@ -270,7 +270,7 @@ struct
270270 | (x , `Bot) -> x
271271 | (`Lifted x , `Lifted y ) ->
272272 try `Lifted (Base. join x y)
273- with TopValue -> `Top
273+ with TopValue | Uncomparable -> `Top
274274
275275 let meet x y =
276276 match (x,y) with
@@ -280,14 +280,14 @@ struct
280280 | (x , `Top) -> x
281281 | (`Lifted x , `Lifted y ) ->
282282 try `Lifted (Base. meet x y)
283- with BotValue -> `Bot
283+ with BotValue | Uncomparable -> `Bot
284284
285285 let widen x y =
286286 match (x,y) with
287287 | (`Lifted x , `Lifted y ) ->
288288 begin
289289 try `Lifted (Base. widen x y)
290- with TopValue -> `Top
290+ with TopValue | Uncomparable -> `Top
291291 end
292292 | _ -> y
293293
@@ -296,7 +296,7 @@ struct
296296 | (`Lifted x , `Lifted y ) ->
297297 begin
298298 try `Lifted (Base. narrow x y)
299- with BotValue -> `Bot
299+ with BotValue | Uncomparable -> `Bot
300300 end
301301 | (_ , `Bot) -> `Bot
302302 | (`Top, y ) -> y
305305
306306module Lift = LiftConf (Printable. DefaultConf )
307307
308- module LiftPO (Conf : Printable.LiftConf ) (Base : PO ) =
309- struct
310- include Printable. LiftConf (Conf ) (Base )
311-
312- let bot () = `Bot
313- let is_bot x = x = `Bot
314- let top () = `Top
315- let is_top x = x = `Top
316-
317- let leq x y =
318- match (x,y) with
319- | (_ , `Top) -> true
320- | (`Top, _ ) -> false
321- | (`Bot, _ ) -> true
322- | (_ , `Bot) -> false
323- | (`Lifted x , `Lifted y ) -> Base. leq x y
324-
325- let pretty_diff () ((x :t ),(y :t )): Pretty.doc =
326- match (x,y) with
327- | (`Lifted x , `Lifted y ) -> Base. pretty_diff () (x,y)
328- | _ -> if leq x y then Pretty. text " No Changes" else
329- Pretty. dprintf " %a instead of %a" pretty x pretty y
330-
331- let join x y =
332- match (x,y) with
333- | (`Top, _ ) -> `Top
334- | (_ , `Top) -> `Top
335- | (`Bot, x ) -> x
336- | (x , `Bot) -> x
337- | (`Lifted x , `Lifted y ) ->
338- try `Lifted (Base. join x y)
339- with Uncomparable | TopValue -> `Top
340-
341- let meet x y =
342- match (x,y) with
343- | (`Bot, _ ) -> `Bot
344- | (_ , `Bot) -> `Bot
345- | (`Top, x ) -> x
346- | (x , `Top) -> x
347- | (`Lifted x , `Lifted y ) ->
348- try `Lifted (Base. meet x y)
349- with Uncomparable | BotValue -> `Bot
350-
351- let widen x y =
352- match (x,y) with
353- | (`Lifted x , `Lifted y ) ->
354- begin
355- try `Lifted (Base. widen x y)
356- with Uncomparable | TopValue -> `Top
357- end
358- | _ -> y
359-
360- let narrow x y =
361- match (x,y) with
362- | (`Lifted x , `Lifted y ) ->
363- begin
364- try `Lifted (Base. narrow x y)
365- with Uncomparable | BotValue -> `Bot
366- end
367- | (_ , `Bot) -> `Bot
368- | (`Top, y ) -> y
369- | _ -> x
370- end
371-
372- module Lift2Conf (Conf : Printable.Lift2Conf ) (Base1 : S ) (Base2 : S ) =
308+ module Lift2Conf (Conf : Printable.Lift2Conf ) (Base1 : PO ) (Base2 : PO ) =
373309struct
374310 include Printable. Lift2Conf (Conf ) (Base1 ) (Base2 )
375311
0 commit comments