From bb3156b8ab78b035ce886bbe3021ec7cbe269d03 Mon Sep 17 00:00:00 2001 From: Marcos Magueta Date: Sat, 11 Jul 2026 00:51:11 -0300 Subject: FOL: First Order Logic Execution Engine Co-authored-by: Estevan Castilho --- lib/abstract/Storage.ml | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) (limited to 'lib/abstract') diff --git a/lib/abstract/Storage.ml b/lib/abstract/Storage.ml index d0f2097..f456567 100644 --- a/lib/abstract/Storage.ml +++ b/lib/abstract/Storage.ml @@ -2,17 +2,28 @@ module type STORAGE = sig type connection type transaction - val connect: Concepts.Configuration.configuration -> connection + val connect : + Concepts.Configuration.configuration -> (connection, Concepts.Condition.condition) result (** begin a transaction within `connection` *) - val start: connection -> transaction + val start : connection -> (transaction, Concepts.Condition.condition) result + (** `commit` the current transaction *) - val commit: transaction -> () + val commit : transaction -> (unit, Concepts.Condition.condition) result + (** `abort` the current transaction *) - val abort: transaction -> () + val abort : transaction -> (unit, Concepts.Condition.condition) result (** within a transaction, fetch a blob from disk *) - val get: transaction -> Concepts.Hash.hash -> Concepts.Representation.blob + val get : + transaction -> + Concepts.Hash.hash -> + (Concepts.Representation.blob option, Concepts.Condition.condition) result + (** within a transaction, associate a hash with a blob on disk *) - val put: transaction -> Concepts.Hash.hash -> Concepts.Representation.blob -> () + val put : + transaction -> + Concepts.Hash.hash -> + Concepts.Representation.blob -> + (unit, Concepts.Condition.condition) result end -- cgit v1.2.3