From e9b6d8a3f0582504587aaff31acc432601dd8979 Mon Sep 17 00:00:00 2001 From: Marcos Magueta Date: Sun, 20 Sep 2026 02:07:22 -0300 Subject: mode concept for affordances --- lib/concepts/Mode.mli | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 lib/concepts/Mode.mli (limited to 'lib/concepts/Mode.mli') diff --git a/lib/concepts/Mode.mli b/lib/concepts/Mode.mli new file mode 100644 index 0000000..57b079f --- /dev/null +++ b/lib/concepts/Mode.mli @@ -0,0 +1,26 @@ +type attribute = string +type attributes = BatSet.String.t + +(** what asking a relation under a given set of bound attributes + affords. The answer is to whether anything satisfies the binding, + or the bindings of the attributes left free together with the + class of what is produced. *) +type affordance = Decides | Generates of Cardinality.t + +type mode = {bound: attributes; affords: affordance} +type t + +val attributes_of_list : attribute list -> attributes +val decides_when : attribute list -> mode +val generates_when : attribute list -> Cardinality.t -> mode +val enumerable : Cardinality.t -> mode +val empty : t +val declare : mode -> t -> t +val of_list : mode list -> t +val to_list : t -> mode list + +(** the tightest class declared for generating under [bound]. A mode + declared for fewer bound attributes applies to more, since the + attributes left free are then fewer and no more numerous. *) +val generation : t -> attributes -> Cardinality.t option +val decision : t -> attributes -> bool -- cgit v1.2.3