From f76392a009f620b1717718001250e47ac71c3c9c Mon Sep 17 00:00:00 2001 From: Marcos Magueta Date: Sun, 20 Sep 2026 02:13:31 -0300 Subject: generative protocol --- lib/protocols/Generative.mli | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 lib/protocols/Generative.mli (limited to 'lib/protocols/Generative.mli') diff --git a/lib/protocols/Generative.mli b/lib/protocols/Generative.mli new file mode 100644 index 0000000..14e2c13 --- /dev/null +++ b/lib/protocols/Generative.mli @@ -0,0 +1,24 @@ +type t + +(** values fixed for some of a relation's attributes, the attributes + absent from it being the ones left free. *) +type binding = Concepts.Value.value BatMap.String.t + +class type implementation = object + method modes : (Concepts.Mode.t, Concepts.Condition.condition) result + method generate : binding -> (Handle.t, Concepts.Condition.condition) result +end + +val make : #implementation -> Handle.protocol +val from : Handle.t -> t Handle.interface option +val require : Handle.t -> (t Handle.interface, Concepts.Condition.condition) result +val modes : t Handle.interface -> (Concepts.Mode.t, Concepts.Condition.condition) result + +(** a handle carrying a cursor over the members agreeing with the + binding and under the empty binding this is enumeration, so a + relation carrying enumerable answers the same members here. *) +val generate : t Handle.interface -> binding -> (Handle.t, Concepts.Condition.condition) result + +val nothing : binding +val bound : binding -> Concepts.Mode.attributes +val satisfies : binding -> Concepts.Tuple.t -> bool -- cgit v1.2.3