From 6ed1f50733d86d0da2adbde9e650f53f828f638e Mon Sep 17 00:00:00 2001 From: Marcos Magueta Date: Wed, 9 Sep 2026 22:10:21 -0300 Subject: evaluator and program protocols --- lib/protocols/Evaluator.ml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 lib/protocols/Evaluator.ml (limited to 'lib/protocols/Evaluator.ml') diff --git a/lib/protocols/Evaluator.ml b/lib/protocols/Evaluator.ml new file mode 100644 index 0000000..95c2ef8 --- /dev/null +++ b/lib/protocols/Evaluator.ml @@ -0,0 +1,12 @@ +class type implementation = object + method capabilities : string BatSet.t + method admit : string -> (Handle.t, Concepts.Condition.condition) result +end + +type Handle.protocol += Evaluator of implementation +type t = implementation + +let make impl = Evaluator (impl :> implementation) +let from handle = Handle.into handle (function Evaluator impl -> Some impl | _ -> None) +let capabilities i = Handle.invoke i (fun o -> o#capabilities) +let admit i source = Handle.invoke i (fun o -> o#admit source) -- cgit v1.2.3