@@ -45,9 +45,6 @@ exception BotValue
4545(* * Exception raised by a bottomless lattice in place of a bottom value.
4646 Surrounding lattice functors may handle this on their own. *)
4747
48- exception Unsupported of string
49- let unsupported x = raise (Unsupported x)
50-
5148exception Invalid_widen of Pretty. doc
5249
5350let () = Printexc. register_printer (function
@@ -93,10 +90,10 @@ struct
9390 include Base
9491 let leq = equal
9592 let join x y =
96- if equal x y then x else raise ( Unsupported " fake join " ) (* TODO: TopValue? *)
93+ if equal x y then x else raise TopValue
9794 let widen = join
9895 let meet x y =
99- if equal x y then x else raise ( Unsupported " fake meet " ) (* TODO: BotValue? *)
96+ if equal x y then x else raise BotValue
10097 let narrow = meet
10198 include NoBotTop
10299
@@ -394,11 +391,11 @@ struct
394391 | (x , `Bot) -> x
395392 | (`Lifted1 x , `Lifted1 y ) -> begin
396393 try `Lifted1 (Base1. join x y)
397- with Unsupported _ | TopValue -> `Top
394+ with TopValue -> `Top
398395 end
399396 | (`Lifted2 x , `Lifted2 y ) -> begin
400397 try `Lifted2 (Base2. join x y)
401- with Unsupported _ | TopValue -> `Top
398+ with TopValue -> `Top
402399 end
403400 | _ -> `Top
404401
@@ -410,11 +407,11 @@ struct
410407 | (x , `Top) -> x
411408 | (`Lifted1 x , `Lifted1 y ) -> begin
412409 try `Lifted1 (Base1. meet x y)
413- with Unsupported _ | BotValue -> `Bot
410+ with BotValue -> `Bot
414411 end
415412 | (`Lifted2 x , `Lifted2 y ) -> begin
416413 try `Lifted2 (Base2. meet x y)
417- with Unsupported _ | BotValue -> `Bot
414+ with BotValue -> `Bot
418415 end
419416 | _ -> `Bot
420417
581578module Liszt (Base : S ) =
582579struct
583580 include Printable. Liszt (Base )
584- let bot () = raise (Unsupported " bot?" )
585- let is_top _ = false
586- let top () = raise (Unsupported " top?" )
587- let is_bot _ = false
581+ include NoBotTop
588582
589583 let leq =
590584 let f acc x y = Base. leq x y && acc in
0 commit comments