Commit 6e784890 authored by POTTIER Francois's avatar POTTIER Francois
Browse files

More uniformity between [CompletedNat] and [CompletedNatWitness].

parent c9ae71cd
...@@ -20,6 +20,12 @@ let equal p1 p2 = ...@@ -20,6 +20,12 @@ let equal p1 p2 =
let bottom = let bottom =
Infinity Infinity
let epsilon =
Finite 0
let singleton _ =
Finite 1
let is_maximal p = let is_maximal p =
match p with match p with
| Finite 0 -> | Finite 0 ->
...@@ -42,6 +48,13 @@ let min_lazy p1 p2 = ...@@ -42,6 +48,13 @@ let min_lazy p1 p2 =
| _ -> | _ ->
min p1 (Lazy.force p2) min p1 (Lazy.force p2)
let until_finite p1 p2 =
match p1 with
| Finite _ ->
p1
| Infinity ->
Lazy.force p2
let add p1 p2 = let add p1 p2 =
match p1, p2 with match p1, p2 with
| Finite i1, Finite i2 -> | Finite i1, Finite i2 ->
......
...@@ -7,10 +7,15 @@ type t = ...@@ -7,10 +7,15 @@ type t =
include Fix.PROPERTY with type property = t include Fix.PROPERTY with type property = t
val epsilon: t
val singleton: 'a -> t
val min: t -> t -> t val min: t -> t -> t
val add: t -> t -> t val add: t -> t -> t
val min_lazy: t -> t Lazy.t -> t val min_lazy: t -> t Lazy.t -> t
val add_lazy: t -> t Lazy.t -> t val add_lazy: t -> t Lazy.t -> t
val until_finite: t -> t Lazy.t -> t
val print: t -> string val print: t -> string
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment