From 3235bcba70e0b9a5e9a8ed0fc18f96ce5c6beb57 Mon Sep 17 00:00:00 2001 From: Marcos Magueta Date: Sun, 24 Nov 2024 22:23:32 -0300 Subject: relation building --- bin/main.ml | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) (limited to 'bin/main.ml') diff --git a/bin/main.ml b/bin/main.ml index 8250c44..4ea66d0 100644 --- a/bin/main.ml +++ b/bin/main.ml @@ -1,28 +1,4 @@ -open Relational_engine.Disk - -let x() = - let command_write1: Command.t = - {kind = Command.WRITE; timestamp = 10.0; hash = "bca39cc55b19274133ce57d0bea1ff794589f025d4bcf670c44d5d2811837830"; content = "asd"; filename = "trash"} in - let command_write2: Command.t = - {kind = Command.WRITE; timestamp = 10.0; hash = "bca39cc55b19274133ce57d0bea1ff794589f025d4bcf670c44d5d2811837831"; content = "qwe"; filename = "trash2"} in - let command_write3: Command.t = - {kind = Command.WRITE; timestamp = 10.0; hash = "bca39cc55b19274133ce57d0bea1ff794589f025d4bcf670c44d5d2811837832"; content = "fgh"; filename = "trash"} in - let command_write4: Command.t = - {kind = Command.WRITE; timestamp = 10.0; hash = "bca39cc55b19274133ce57d0bea1ff794589f025d4bcf670c44d5d2811837833"; content = "rty"; filename = "trash2"} in - let command_write5: Command.t = - {kind = Command.WRITE; timestamp = 10.0; hash = "bca39cc55b19274133ce57d0bea1ff794589f025d4bcf670c44d5d2811837834"; content = "jkl"; filename = "trash"} in - let command_read: Command.t = {kind = Command.READ; timestamp = 0.0; hash = ""; content = ""; filename = "trash"} in - let stream: Executor.history = [{state = Executor._EMPTY_SHA_HASH_; files = Executor.StringMap.empty}] in - let locations: Executor.locations = Executor.StringMap.empty in - let open Relational_engine.Extensions.Result in - let+ (stream, locations) = Command.commit_and_perform stream locations command_write1 in - let+ (stream, locations) = Command.commit_and_perform stream locations command_write2 in - let+ (stream, locations) = Command.commit_and_perform stream locations command_write3 in - let+ (stream, locations) = Command.commit_and_perform stream locations command_write4 in - let+ (stream, locations) = Command.commit_and_perform stream locations command_write5 in - Command.commit_and_perform (List.tl stream) locations command_read - let () = begin - let _ = x() in () + let _ = Relational_engine.Relation.write_and_retrieve() in () end -- cgit v1.2.3