(* Test Available Slots on Arvo Core * * Check what slots are available on the Arvo core we found *) open Nock_lib let test_slot slot arvo = try let value = Noun.slot (Z.of_int slot) arvo in Printf.printf " Slot %2d: exists (%s)\n" slot (if Noun.is_cell value then "cell" else "atom"); Some value with _ -> Printf.printf " Slot %2d: does not exist\n" slot; None let test_arvo_slots env = Printf.printf "🔍 Testing Available Slots on Arvo Core\n\n"; Eio.Switch.run @@ fun _sw -> let fs = Eio.Stdenv.fs env in (* Load solid pill *) let state = State.create () in match Boot.boot_from_file ~fs state "solid.pill" with | Error msg -> Printf.printf "✗ Failed to load pill: %s\n%!" msg | Ok () -> let pill_root = State.get_arvo state in Printf.printf "=== Testing PILL ROOT ===\n\n"; Printf.printf "Testing slots 2-30 on pill root:\n\n"; List.iter (fun slot -> ignore (test_slot slot pill_root)) (List.init 29 (fun i -> i + 2)); Printf.printf "\n\n=== Testing ARVO CORE (at depth 8) ===\n\n"; (* Navigate to real Arvo *) let path = [3; 3; 2; 3; 2; 3; 3; 2] in let rec navigate noun = function | [] -> noun | slot :: rest -> navigate (Noun.slot (Z.of_int slot) noun) rest in let arvo = navigate pill_root path in Printf.printf "Testing slots 2-30 on Arvo core:\n\n"; List.iter (fun slot -> ignore (test_slot slot arvo)) (List.init 29 (fun i -> i + 2)); Printf.printf "\nLooking for formula slots that might be poke...\n\n"; (* Check if any slot contains a formula (cell starting with opcode) *) for slot = 2 to 30 do match test_slot slot arvo with | Some value when Noun.is_cell value -> (match Noun.head value with | Noun.Atom z when Z.numbits z < 8 -> let opcode = Z.to_int z in if opcode >= 0 && opcode <= 11 then Printf.printf " Slot %d contains formula with opcode %d\n" slot opcode | _ -> ()) | _ -> () done let () = Printf.printf "\n"; Printf.printf "═══════════════════════════════════════════════════════════\n"; Printf.printf " Testing Arvo Core Slots\n"; Printf.printf "═══════════════════════════════════════════════════════════\n"; Printf.printf "\n"; Eio_main.run test_arvo_slots