We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b9a63b1 commit 6656cb6Copy full SHA for 6656cb6
2 files changed
src/fixpoint/dune
@@ -1,3 +1,4 @@
1
(library
2
(name fixpoint)
3
+ (libraries domain)
4
(preprocess (pps ppx_deriving.std)))
src/fixpoint/fixpoint.ml
@@ -31,3 +31,17 @@ struct
31
let closure_strict_distr (f: D.t -> D.t) (initial: D.t): D.t =
32
failwith "TODO"
33
end
34
+
35
+(** Püsipunktid üle domeenide. *)
36
+module MakeDomain (D: Domain.S) =
37
+struct
38
+ include Make (D)
39
40
+ (** Leiab funktsiooni vähima püsipunkti. *)
41
+ let lfp (f: D.t -> D.t): D.t =
42
+ fp f D.bot
43
44
+ (** Leiab funktsiooni sulundi, mis sisaldab antud domeeni elementi. *)
45
+ let closure (f: D.t -> D.t) (initial: D.t): D.t =
46
+ lfp (fun x -> D.join initial (f x))
47
+end
0 commit comments