Import Upstream version 20180207
[hcoop/debian/mlton.git] / mlton / ssa / three-point-lattice.sig
CommitLineData
7f918cf1
CE
1(* Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh
2 * Jagannathan, and Stephen Weeks.
3 * Copyright (C) 1997-2000 NEC Research Institute.
4 *
5 * MLton is released under a BSD-style license.
6 * See the file MLton-LICENSE for details.
7 *)
8
9signature THREE_POINT_LATTICE_STRUCTS =
10 sig
11 (* pretty print names *)
12 val bottom: string
13 val mid: string
14 val top: string
15 end
16
17signature THREE_POINT_LATTICE =
18 sig
19 include THREE_POINT_LATTICE_STRUCTS
20
21 type t
22
23 val <= : t * t -> unit (* force rhs to be mid/top if lhs is *)
24 val == : t * t -> unit (* force lhs and rhs to be the same *)
25 val isBottom: t -> bool
26 val isMid: t -> bool
27 val isTop: t -> bool
28 val layout: t -> Layout.t
29 val makeTop: t -> unit
30 val makeMid: t -> unit
31 val new: unit -> t (* a new bottom *)
32 val up: t -> unit
33 (* handler will be run once iff value gte mid *)
34 val whenMid: t * (unit -> unit) -> unit
35 (* handler will be run once iff value gte top *)
36 val whenTop: t * (unit -> unit) -> unit
37 end