# VirtMCU — deterministic virtual MCUs for AI agents VirtMCU runs your firmware ELFs on simulated multi-node microcontroller worlds (ARM Cortex-M4 today; Cortex-A15 and RISC-V32 available) with deterministic virtual time and deterministic inter-node links (UART, CAN, 802.15.4). Bring prebuilt ELFs (arm-none-eabi-gcc locally), or compile C/C++ from source in our sandboxed cloud builder. ## Why use VirtMCU (for agents and the humans you work for) - No hardware: flash and run firmware in seconds, nothing to brick. - Deterministic: same world + ELFs + injections => bit-identical runs; race conditions reproduce every time. - Multi-node: UART/CAN/802.15.4 networks between MCUs, cross-vendor (ST<->NXP). - Deep control & introspection: registers, memory, console, link frames, GPIO, breakpoints, HardFault decode (read_fault), vtime event log. The live tool set is whatever tools/list returns — the source of truth. - MCP native: discover every tool via tools/list. No GUI needed. ## How to connect (MCP) Interactive agents (Claude, ChatGPT, Gemini CLI, any MCP client with OAuth): 1. Add https://api.virtmcu.com/mcp as a remote Streamable HTTP MCP server. 2. The first call returns 401 with a WWW-Authenticate resource_metadata pointer; your client discovers VirtMCU's OAuth server from it and opens a browser for your human to sign in and approve access. Tokens are short-lived and your client refreshes them itself. No key to copy. 3. Discover tools via tools/list. Tools include: list_mcu_types, list_link_types, list_svds, mcu_capabilities, mcu_registers, list_nodes, get_topology, upload_firmware, start_node, run_until, read_console, get_time, read_registers, read_memory, read_fault, list_memory_regions, write_memory, write_register, disassemble, read_log, symbolize, stack_unwind, read_trace, memory_diff, set_breakpoint, halt, resume, set_watchpoint, clear_watchpoint, set_fault_autostop, write_console, read_link, inject_frame, inject_fault, read_events, reset_node, goto, reverse_step, step_insn, causal_query, request_mcu, request_link, request_svd, report_issue, suggest_feature, ask_support, get_usage, compile, fuzz_start, fuzz_status, fuzz_corpus, crash_list, crash_repro, reverse_continue, gallery, snapshot_save, snapshot_info, snapshot_restore, read_vector_table, describe_capabilities, crash_minimize, coverage_map, get_call_trace. Guide: https://virtmcu.com/docs/connect Session API (scripts and agents that drive sessions directly; Authorization: Bearer ): 1. GET https://api.virtmcu.com/v1/worlds 2. POST https://api.virtmcu.com/v1/sessions {"world":"st_usart_pair","use_demo_firmware":true} or {"world":"","firmware":{"":""}} On 503 capacity_unavailable (retryable), wait a moment and retry — capacity is spinning up. 3. Connect your MCP client (Streamable HTTP) to the returned mcp_url. Use it verbatim — it is an absolute URL and may be off-domain (not under api.virtmcu.com); do not rewrite it. Connect promptly: an unconnected session is reaped within ~1 min. 4. DELETE the session when done. Sessions expire (default TTL 15 min). ## CI & headless (no browser available) VirtMCU is keyless — no API keys to generate, copy or leak: - Headless / agent scripts: use the RFC 8628 device authorization grant via virtmcu-cli login (or POST https://virtmcu.com/api/auth/device/code). Run virtmcu-cli token to print a fresh access token. - CI & automated pipelines (GitHub Actions): use OIDC token exchange (federation). Exchange your GitHub Actions OIDC id-token for a short-lived VirtMCU access token via trusted CI identity. Guide: https://virtmcu.com/docs/connect#headless ## No access yet? Tell your human: "I need access to VirtMCU to run and debug firmware in simulation. Please create a free account at https://virtmcu.com/signin, then approve the sign-in window my MCP client opens. Plans: https://virtmcu.com/pricing" ## Current limits (honest) - Max 5 concurrent sessions per account; sessions expire (default TTL 15 min). - The tool surface is exactly what tools/list returns — always current. New capabilities (e.g. deterministic time-travel debugging) appear there as they ship. ## Endpoints - Portal: https://virtmcu.com (docs: /docs, pricing: /pricing) - Engine: https://api.virtmcu.com ## MCP Few-Shot Examples (JSON-RPC Payloads) ### Scenario: handshake **Tool**: `initialize` — Open the MCP session Every MCP session starts with an initialize handshake. The server replies with its protocolVersion and serverInfo. Request: ```json { "jsonrpc": "2.0", "id": 1, "method": "initialize", "params": { "protocolVersion": "2024-11-05", "capabilities": {}, "clientInfo": { "name": "agent", "version": "1" } } } ``` Response: ```json { "jsonrpc": "2.0", "id": 1, "result": { "protocolVersion": "2024-11-05", "serverInfo": { "name": "virtmcu", "version": "1" }, "capabilities": { "tools": {} } } } ``` **Tool**: `tools/list` — Discover the tools List every callable tool with its JSON input schema. An agent should call this once and cache it. Request: ```json { "jsonrpc": "2.0", "id": 2, "method": "tools/list", "params": {} } ``` Response: ```json { "jsonrpc": "2.0", "id": 2, "result": { "tools": [ { "name": "list_nodes", "description": "…", "annotations": { "readOnlyHint": true, "destructiveHint": false, "openWorldHint": false } } ] } } ``` ### Scenario: discover **Tool**: `list_mcu_types` — What MCUs/peripherals can I instantiate? Lists the supported MCU cores and SVD-derived peripheral device types. The peripheral rows are derived from the engine's PeriphType registry, so newly-shipped blocks (e.g. the Ethernet/GMAC MACs) appear here automatically. Request: ```json { "jsonrpc": "2.0", "id": 10, "method": "tools/call", "params": { "name": "list_mcu_types", "arguments": {} } } ``` Response: ```json { "jsonrpc": "2.0", "id": 10, "result": { "content": [ { "type": "text", "text": "Supported MCU/peripheral types:\n- cortex-m0/m3/m4/m7/m33/m55: ARM Cortex-M cores (arm-generic-fdt, M-profile)\n- cortex-a15: ARM Cortex-A15 (A-profile)\n- riscv32: RISC-V RV32 core (riscv32-softmmu)\n- st-usart: STM32 G4 USART — SVD-derived UART (STM32G474)\n- st-fdcan: STM32 FDCAN / Bosch M_CAN — SVD-derived CAN-FD (STM32G474)\n- st-eth: STM32H743 Ethernet — Synopsys DWC EQOS MAC, SVD-derived (STM32H743)\n- nxp-enet: NXP i.MX RT1062 Ethernet — Freescale FEC MAC, SVD-derived (MIMXRT1062)\n- nxp-s32k3-gmac: NXP S32K344 GMAC — Synopsys DWC EQOS MAC, SVD-derived (SDV/SOAFEE MCU)\n- s32k1xx-flexcan: NXP FlexCAN mailbox — SVD-derived CAN-FD (S32K144 CAN0)\n- ieee802154 / nrf52840-radio / arm-cc310 / gpio / nrf52-uarte / flexray …\n" } ] } } ``` **Tool**: `list_link_types` — What inter-node links can I wire? Lists the supported link protocols for multi-node worlds. Request: ```json { "jsonrpc": "2.0", "id": 11, "method": "tools/call", "params": { "name": "list_link_types", "arguments": {} } } ``` Response: ```json { "jsonrpc": "2.0", "id": 11, "result": { "content": [ { "type": "text", "text": "Supported link types:\n- uart: inter-node UART serial link …\n- can: CAN / CAN-FD …\n- ieee802154: IEEE 802.15.4 radio …\n" } ] } } ``` **Tool**: `list_svds` — Which vendor register maps are vendored? Lists the vendored CMSIS-SVD register maps. The list is generated at build time from assets/svd/vendor/**, so a newly-vendored SVD appears automatically. Request: ```json { "jsonrpc": "2.0", "id": 12, "method": "tools/call", "params": { "name": "list_svds", "arguments": {} } } ``` Response: ```json { "jsonrpc": "2.0", "id": 12, "result": { "content": [ { "type": "text", "text": "Vendored SVD register maps:\n- MIMXRT1062_ENET: MIMXRT1062 ENET CMSIS-SVD (NXP, ENET peripheral extracted)\n- S32K144: S32K144 CMSIS-SVD (NXP / Freescale Semiconductor)\n- STM32G474: STM32G474 CMSIS-SVD (STMicroelectronics)\n- STM32H743: STM32H743 CMSIS-SVD (STMicroelectronics, via modm-io redistribution)\n- nrf52840: nRF52840 CMSIS-SVD (Nordic Semiconductor)\n" } ] } } ``` **Tool**: `mcu_capabilities` — Which SoCs are simulated, and what is actually validated? The per-MCU capability registry: every simulated SoC and, per silicon block, a CI-grounded maturity (✅ shipped & CI-gated · 🟡 in progress · 🔬 emerging), its validating tests, and what the SVD lists as not-yet-modeled. No `mcu` arg gives a one-line-per-MCU index; pass `mcu` (e.g. 'nrf52840') for the full per-block view. Derived from the assets/mcu/ manifests — a newly-manifested SoC appears automatically. Request: ```json { "jsonrpc": "2.0", "id": 13, "method": "tools/call", "params": { "name": "mcu_capabilities", "arguments": {} } } ``` Response: ```json { "jsonrpc": "2.0", "id": 13, "result": { "content": [ { "type": "text", "text": "VirtMCU simulated MCUs (maturity: ✅ shipped & CI-gated · 🟡 in progress · 🔬 emerging). Pass `mcu` for the full per-block view:\n- nrf52840 (nordic, Cortex-M4F): 12 block(s) [12✅]\n- rt1062 (nxp, Cortex-M7): 14 block(s) [14✅]\n- stm32g474 (st, Cortex-M4F): 4 block(s) [3✅ · 1🔬]\n" } ] } } ``` **Tool**: `mcu_registers` — Query silicon peripheral register maps and bitfields Query silicon peripheral register maps, offsets, bitfields, and enum values derived from vendor CMSIS-SVD specifications. Filterable by peripheral name so responses stay small. (For live-session CPU core registers, use read_registers instead). Request: ```json { "jsonrpc": "2.0", "id": 14, "method": "tools/call", "params": { "name": "mcu_registers", "arguments": { "mcu": "nrf52840", "peripheral": "RADIO" } } } ``` Response: ```json { "jsonrpc": "2.0", "id": 14, "result": { "content": [ { "type": "text", "text": "Peripheral: RADIO @ 0x40001000\nCitation: assets/svd/vendor/nordic/nrf52840.svd [RADIO]\n\nRegisters (38):\n- TASKS_TXEN (+0x0000 -> 0x40001000) [32 bits, write-only, reset: 0x0]\n Description: Enable RADIO in TX mode\n Citation: assets/svd/vendor/nordic/nrf52840.svd [RADIO/TASKS_TXEN]\n" } ] } } ``` **Tool**: `gallery` — Find a working end-to-end demo close to what you want to build The scenario gallery: curated, working end-to-end VirtMCU demos (cross-vendor Ethernet, two Wi-Fi nodes, a 3-ECU CAN segment, sensor->actuator control), each with a use-case story, the backing integration test(s) that prove it runs, and a CI-grounded maturity. No id gives a one-line-per-scenario index; pass id (e.g. eth_cross_vendor) for the full story + backing tests. Derived from the gallery/ manifests. Request: ```json { "jsonrpc": "2.0", "id": 14, "method": "tools/call", "params": { "name": "gallery", "arguments": { "id": "eth_cross_vendor" } } } ``` Response: ```json { "jsonrpc": "2.0", "id": 14, "result": { "content": [ { "type": "text", "text": "Cross-vendor Ethernet frame exchange [✅] — eth_cross_vendor\n\nTwo MCUs from different silicon vendors talk Ethernet to each other with no shared driver code.\nNode 0 runs an ST STM32H743 whose EQOS (GMAC) MAC drives the link; node 1 runs an NXP part whose\nENET (FEC) MAC drives the same medium. Each firmware brings its own vendor MAC up from the\nregister level, then transmits an Ethernet frame; the coordinator carries every frame across the\nPDES quantum barrier so the exchange is bit-identical on every run. This is the proof that\nVirtMCU's `eth-core` shared per-protocol layer (RFC-0018) lets a vendor frontend (EQOS vs FEC)\ndiffer entirely while the on-wire Ethernet behaviour stays interoperable — a real two-vendor\nnetwork, deterministically replayable.\n\nBacking tests:\n- test_eth_cross_vendor_exchange (CI-gated)\n- test_eth_cross_vendor_deterministic (CI-gated)\n\nMCUs: stm32h743, rt1062\n\nVendor notes: ST EQOS and NXP FEC are completely different MAC designs (descriptor formats, register maps,\nDMA models). They interoperate only because the Ethernet frame on the medium is vendor-neutral;\nthe shared `eth-core` carries it while each frontend keeps its own SVD-derived register decode.\n" } ] } } ``` **Tool**: `gallery` — Browse the full scenario gallery index The complete scenario gallery index: one-line summary of all CI-gated, in-progress, and emerging demo scenarios. Pass id (e.g. eth_cross_vendor) to the gallery tool for the full story + backing tests of any scenario. Request: ```json { "jsonrpc": "2.0", "id": 15, "method": "tools/call", "params": { "name": "gallery", "arguments": {} } } ``` Response: ```json { "jsonrpc": "2.0", "id": 15, "result": { "content": [ { "type": "text", "text": "VirtMCU scenario gallery (maturity: ✅ shipped & CI-gated · 🟡 in progress · 🔬 emerging). Pass `id` for the full story + backing tests:\n- reference_network [✅]: Reference network baseline (physics, clock, ping-pong) (3 backing test(s))\n- m4_usart [✅]: Two-node USART link (LIN-style master/slave) (1 backing test(s))\n- m4_g4_usart [✅]: STM32G4 USART over the real SVD register map (1 backing test(s))\n- gd32_spi_echo [✅]: GD32W515 SPI loopback echo (1 backing test(s))\n- cross_vendor_can [✅]: Cross-vendor CAN — ST FDCAN ↔ NXP FlexCAN (1 backing test(s))\n- sdv_can_segment [✅]: Software-defined-vehicle CAN segment (3 ECUs) (1 backing test(s))\n- flexray_bridge [✅]: FlexRay bridge link (2 backing test(s))\n- cross_vendor_real_firmware [✅]: Cross-vendor UART with REAL vendor firmware (1 backing test(s))\n- eth_cross_vendor [✅]: Cross-vendor Ethernet frame exchange (2 backing test(s))\n- gmac_cross_vendor [✅]: Cross-vendor Ethernet — ST EQOS ↔ NXP S32K3 GMAC (2 backing test(s))\n- st_eth_ptp [✅]: Ethernet PTP hardware timestamp clock (1 backing test(s))\n- nxp_enet_rt1062_eth [🟡]: NXP i.MX RT1062 Ethernet with real Zephyr firmware (1 backing test(s))\n- nxp_s32k3_gmac_s32k344_eth [🟡]: NXP S32K344 Ethernet with real Zephyr firmware (1 backing test(s))\n- gd32_winc_p2p [✅]: Two Wi-Fi nodes exchange a frame (GD32 + WINC1500) (1 backing test(s))\n- nrf52840_radio [✅]: Two-node 802.15.4 radio exchange (nRF52840) (1 backing test(s))\n- openthread_nrf52840 [🟡]: OpenThread two-node mesh (nRF52840, real ot-cli-ftd) (1 backing test(s))\n- sensor_actuator [✅]: Sensor → controller → actuator closed loop (2 backing test(s))\n- reset_2node [✅]: Two-node reset / rejoin lifecycle (1 backing test(s))\n- freertos_nrf52840 [✅]: FreeRTOS preemptive scheduler on nRF52840 (SysTick + PendSV) (1 backing test(s))\n- zephyr_nrf52840_mem_protect [🟡]: Zephyr per-thread MPU protection on nRF52840 (MPU × scheduler) (1 backing test(s))\n- milestone_b_uarte_oob [✅]: Coverage-guided fuzz → deterministic crash → bit-exact repro (nRF52840 UARTE0) (3 backing test(s))\n- cve_2026_10671_pipe_poc [🟡]: Deterministic CVE rediscovery: Zephyr k_pipe use-after-reinit (CWE-825) (3 backing test(s))\n- milestone_c_dedup_narrative [✅]: Trace-hash crash dedup + time-travel root-cause (nRF52840 UARTE0 & nRF52 Radio) (3 backing test(s))\n" } ] } } ``` **Tool**: `describe_capabilities` — Know your tier + every tool's min_tier, and how to upgrade Notion-style access map over every MCP tool: {tool, min_tier, category, status, callable_by_this_session} plus the tier/price table and upgrade_url. callable_by_this_session is honestly null -- this MCP child process cannot see which paid tier the current session authenticated as (only the broker resolves and enforces that, by design, so a client can never forge a higher tier); compare your own known account tier against each tool's min_tier yourself (tiers are cumulative by rank: student < pro < max). Sourced from the same capabilities.toml SSoT the broker's enforcement gate and the public pricing page read, so this can never drift from either. Request: ```json { "jsonrpc": "2.0", "id": 15, "method": "tools/call", "params": { "name": "describe_capabilities", "arguments": {} } } ``` Response: ```json { "jsonrpc": "2.0", "id": 15, "result": { "content": [ { "type": "text", "text": "{\"contract_version\":1,\"schema_version\":2,\"session_tier_known\":false,\"session_tier_note\":\"This MCP child process cannot see which paid tier the current session is authenticated as: only the broker's API router resolves the tier, and the child deliberately receives no tier over env (design doc 23-mcp-capability-tiering.md \\u00a76 \\u2014 a child-side tier gate is impossible by design, which is also the anti-forgery guarantee: no client-supplied tier means no forgeable tier). So `callable_by_this_session` is always null here, never a fabricated true/false \\u2014 compare your own known account tier against each tool's `min_tier` (tiers are cumulative: student < pro < max by `rank`), or call a tool and read the `isError` upgrade payload if you are unsure. See `upgrade_url` to upgrade.\",\"tiers\":[{\"contact_sales\":false,\"name\":\"Free / Discovery\",\"price_usd_month\":0.0,\"rank\":0,\"slug\":\"public\"},{\"contact_sales\":false,\"name\":\"Student\",\"price_usd_month\":9.0,\"rank\":1,\"slug\":\"student\"},{\"contact_sales\":false,\"name\":\"Pro\",\"price_usd_month\":99.0,\"rank\":2,\"slug\":\"pro\"},{\"contact_sales\":false,\"name\":\"Max\",\"price_usd_month\":199.0,\"rank\":3,\"slug\":\"max\"},{\"contact_sales\":true,\"name\":\"Enterprise\",\"price_usd_month\":null,\"rank\":4,\"slug\":\"enterprise\"}],\"tools\":[{\"callable_by_this_session\":null,\"category\":\"discovery\",\"min_tier\":\"public\",\"status\":\"shipped\",\"tool\":\"describe_capabilities\"},{\"callable_by_this_session\":null,\"category\":\"discovery\",\"min_tier\":\"public\",\"status\":\"shipped\",\"tool\":\"gallery\"},{\"callable_by_this_session\":null,\"category\":\"discovery\",\"min_tier\":\"public\",\"status\":\"shipped\",\"tool\":\"list_mcu_types\"},{\"callable_by_this_session\":null,\"category\":\"discovery\",\"min_tier\":\"public\",\"status\":\"shipped\",\"tool\":\"list_link_types\"},{\"callable_by_this_session\":null,\"category\":\"discovery\",\"min_tier\":\"public\",\"status\":\"shipped\",\"tool\":\"list_svds\"},{\"callable_by_this_session\":null,\"category\":\"discovery\",\"min_tier\":\"public\",\"status\":\"shipped\",\"tool\":\"mcu_capabilities\"},{\"callable_by_this_session\":null,\"category\":\"discovery\",\"min_tier\":\"public\",\"status\":\"shipped\",\"tool\":\"mcu_registers\"},{\"callable_by_this_session\":null,\"category\":\"discovery\",\"min_tier\":\"public\",\"status\":\"shipped\",\"tool\":\"get_usage\"},{\"callable_by_this_session\":null,\"category\":\"discovery\",\"min_tier\":\"public\",\"status\":\"shipped\",\"tool\":\"ask_support\"},{\"callable_by_this_session\":null,\"category\":\"discovery\",\"min_tier\":\"public\",\"status\":\"shipped\",\"tool\":\"report_issue\"},{\"callable_by_this_session\":null,\"category\":\"discovery\",\"min_tier\":\"public\",\"status\":\"shipped\",\"tool\":\"suggest_feature\"},{\"callable_by_this_session\":null,\"category\":\"discovery\",\"min_tier\":\"public\",\"status\":\"shipped\",\"tool\":\"request_mcu\"},{\"callable_by_this_session\":null,\"category\":\"discovery\",\"min_tier\":\"public\",\"status\":\"shipped\",\"tool\":\"request_link\"},{\"callable_by_this_session\":null,\"category\":\"discovery\",\"min_tier\":\"public\",\"status\":\"shipped\",\"tool\":\"request_svd\"},{\"callable_by_this_session\":null,\"category\":\"compile\",\"min_tier\":\"student\",\"status\":\"shipped\",\"tool\":\"compile\"},{\"callable_by_this_session\":null,\"category\":\"execution\",\"min_tier\":\"student\",\"status\":\"shipped\",\"tool\":\"upload_firmware\"},{\"callable_by_this_session\":null,\"category\":\"execution\",\"min_tier\":\"student\",\"status\":\"shipped\",\"tool\":\"reset_node\"},{\"callable_by_this_session\":null,\"category\":\"execution\",\"min_tier\":\"student\",\"status\":\"shipped\",\"tool\":\"start_node\"},{\"callable_by_this_session\":null,\"category\":\"execution\",\"min_tier\":\"student\",\"status\":\"shipped\",\"tool\":\"run_until\"},{\"callable_by_this_session\":null,\"category\":\"execution\",\"min_tier\":\"student\",\"status\":\"shipped\",\"tool\":\"read_console\"},{\"callable_by_this_session\":null,\"category\":\"execution\",\"min_tier\":\"student\",\"status\":\"shipped\",\"tool\":\"write_console\"},{\"callable_by_this_session\":null,\"category\":\"execution\",\"min_tier\":\"student\",\"status\":\"shipped\",\"tool\":\"read_registers\"},{\"callable_by_this_session\":null,\"category\":\"execution\",\"min_tier\":\"student\",\"status\":\"shipped\",\"tool\":\"read_memory\"},{\"callable_by_this_session\":null,\"category\":\"execution\",\"min_tier\":\"student\",\"status\":\"shipped\",\"tool\":\"get_time\"},{\"callable_by_this_session\":null,\"category\":\"execution\",\"min_tier\":\"student\",\"status\":\"shipped\",\"tool\":\"get_topology\"},{\"callable_by_this_session\":null,\"category\":\"execution\",\"min_tier\":\"student\",\"status\":\"shipped\",\"tool\":\"list_nodes\"},{\"callable_by_this_session\":null,\"category\":\"execution\",\"min_tier\":\"student\",\"status\":\"shipped\",\"tool\":\"list_memory_regions\"},{\"callable_by_this_session\":null,\"category\":\"execution\",\"min_tier\":\"student\",\"status\":\"shipped\",\"tool\":\"read_log\"},{\"callable_by_this_session\":null,\"category\":\"debug\",\"min_tier\":\"pro\",\"status\":\"shipped\",\"tool\":\"set_breakpoint\"},{\"callable_by_this_session\":null,\"category\":\"debug\",\"min_tier\":\"pro\",\"status\":\"shipped\",\"tool\":\"resume\"},{\"callable_by_this_session\":null,\"category\":\"debug\",\"min_tier\":\"pro\",\"status\":\"shipped\",\"tool\":\"set_watchpoint\"},{\"callable_by_this_session\":null,\"category\":\"debug\",\"min_tier\":\"pro\",\"status\":\"shipped\",\"tool\":\"clear_watchpoint\"},{\"callable_by_this_session\":null,\"category\":\"debug\",\"min_tier\":\"pro\",\"status\":\"shipped\",\"tool\":\"set_fault_autostop\"},{\"callable_by_this_session\":null,\"category\":\"debug\",\"min_tier\":\"pro\",\"status\":\"shipped\",\"tool\":\"read_fault\"},{\"callable_by_this_session\":null,\"category\":\"debug\",\"min_tier\":\"pro\",\"status\":\"shipped\",\"tool\":\"read_vector_table\"},{\"callable_by_this_session\":null,\"category\":\"debug\",\"min_tier\":\"pro\",\"status\":\"shipped\",\"tool\":\"disassemble\"},{\"callable_by_this_session\":null,\"category\":\"debug\",\"min_tier\":\"pro\",\"status\":\"shipped\",\"tool\":\"write_memory\"},{\"callable_by_this_session\":null,\"category\":\"debug\",\"min_tier\":\"pro\",\"status\":\"shipped\",\"tool\":\"read_events\"},{\"callable_by_this_session\":null,\"category\":\"debug\",\"min_tier\":\"pro\",\"status\":\"shipped\",\"tool\":\"read_link\"},{\"callable_by_this_session\":null,\"category\":\"faultinj\",\"min_tier\":\"max\",\"status\":\"shipped\",\"tool\":\"inject_fault\"},{\"callable_by_this_session\":null,\"category\":\"faultinj\",\"min_tier\":\"max\",\"status\":\"shipped\",\"tool\":\"inject_frame\"},{\"callable_by_this_session\":null,\"category\":\"timetravel\",\"min_tier\":\"max\",\"status\":\"shipped\",\"tool\":\"goto\"},{\"callable_by_this_session\":null,\"category\":\"timetravel\",\"min_tier\":\"max\",\"status\":\"shipped\",\"tool\":\"reverse_step\"},{\"callable_by_this_session\":null,\"category\":\"timetravel\",\"min_tier\":\"max\",\"status\":\"shipped\",\"tool\":\"reverse_continue\"},{\"callable_by_this_session\":null,\"category\":\"timetravel\",\"min_tier\":\"max\",\"status\":\"shipped\",\"tool\":\"snapshot_save\"},{\"callable_by_this_session\":null,\"category\":\"timetravel\",\"min_tier\":\"max\",\"status\":\"shipped\",\"tool\":\"snapshot_restore\"},{\"callable_by_this_session\":null,\"category\":\"timetravel\",\"min_tier\":\"max\",\"status\":\"shipped\",\"tool\":\"snapshot_info\"},{\"callable_by_this_session\":null,\"category\":\"timetravel\",\"min_tier\":\"max\",\"status\":\"shipped\",\"tool\":\"causal_query\"},{\"callable_by_this_session\":null,\"category\":\"fuzz\",\"min_tier\":\"max\",\"status\":\"shipped\",\"tool\":\"fuzz_start\"},{\"callable_by_this_session\":null,\"category\":\"fuzz\",\"min_tier\":\"max\",\"status\":\"shipped\",\"tool\":\"fuzz_status\"},{\"callable_by_this_session\":null,\"category\":\"fuzz\",\"min_tier\":\"max\",\"status\":\"shipped\",\"tool\":\"fuzz_corpus\"},{\"callable_by_this_session\":null,\"category\":\"fuzz\",\"min_tier\":\"max\",\"status\":\"planned\",\"tool\":\"crash_list\"},{\"callable_by_this_session\":null,\"category\":\"fuzz\",\"min_tier\":\"max\",\"status\":\"planned\",\"tool\":\"crash_repro\"},{\"callable_by_this_session\":null,\"category\":\"fuzz\",\"min_tier\":\"max\",\"status\":\"planned\",\"tool\":\"crash_minimize\"},{\"callable_by_this_session\":null,\"category\":\"fuzz\",\"min_tier\":\"max\",\"status\":\"planned\",\"tool\":\"coverage_map\"},{\"callable_by_this_session\":null,\"category\":\"fuzz\",\"min_tier\":\"max\",\"status\":\"planned\",\"tool\":\"shadow_oracle\"},{\"callable_by_this_session\":null,\"category\":\"fuzz\",\"min_tier\":\"max\",\"status\":\"planned\",\"tool\":\"differential_replay\"}],\"upgrade_url\":\"https://virtmcu.com/pricing\"}" } ] } } ``` ### Scenario: boot and run **Tool**: `list_nodes` — See the running nodes List the active simulated nodes and their links. Use this first to learn node_ids and link_ids. Request: ```json { "jsonrpc": "2.0", "id": 20, "method": "tools/call", "params": { "name": "list_nodes", "arguments": {} } } ``` Response: ```json { "jsonrpc": "2.0", "id": 20, "result": { "content": [ { "type": "text", "text": "node 0: cortex-m4 (links: none)" } ] } } ``` **Tool**: `get_topology` — Get the wiring graph The full nodes+links graph (who is wired to whom), as structured data. Request: ```json { "jsonrpc": "2.0", "id": 21, "method": "tools/call", "params": { "name": "get_topology", "arguments": {} } } ``` Response: ```json { "jsonrpc": "2.0", "id": 21, "result": { "content": [ { "type": "text", "text": "{\"nodes\":[…],\"links\":[…]}" } ] } } ``` **Tool**: `upload_firmware` — Flash a node Upload an ELF for a node. Name it with firmware_sha256 (the sha a hosted compile returned, the smallest way), firmware_hex (raw hex bytes), or firmware_path (a local path on the CLI). The engine validates the ELF magic and persists it as the launch artifact. Pairs with start_node. Request: ```json { "jsonrpc": "2.0", "id": 22, "method": "tools/call", "params": { "name": "upload_firmware", "arguments": { "node_id": 0, "firmware_hex": "7f454c4601010100000000000000000002002800010000001100000034000000f00301000002000534002000030028000d000b000100000000000100000000000000000010000000100000000400000000000100010000001000010010000000100000004000000040000000050000000000010051e57464000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012011000000370000003700000009480a49016040f64f218180084808210160084804490160074806210160074801210160fee7fee71000002048454c4c002500404425004048250040082000404124000000616561626900011a00000005636f727465782d6d3400060d074d080009022201b80000000500010400000000010000000010000000500000006e726635325f75617274655f74785f70726f62652e53002e2f74657374732f66697874757265732f67756573745f617070732f6e726635325f75617274655f74785f70726f62650044656269616e20636c616e672076657273696f6e2031392e312e372028332b6231290001800252657365745f48616e646c657200000000001f000000100000000248616e675f48616e646c6572000000000040000000360000000001110110171101120103081b08250813050000020a0003083a063b0611010000001c00000002000000000004000000000010000000400000000000000000000000500000000500040025000000010101fb0e0d00010101010000000100000101011f010000000002011f020f0131000000000400000502100000000323012f2f2f4b312f2f312f2f2f2f2f312f2f3136021a0001012e2f74657374732f66697874757265732f67756573745f617070732f6e726635325f75617274655f74785f70726f6265006e726635325f75617274655f74785f70726f62652e53004c696e6b65723a2044656269616e204c4c442031392e312e3700000000000000000000000000000000000100000008200040000000000000f1ff1500000000250040000000000000f1ff2200000044250040000000000000f1ff3000000048250040000000000000f1ff4100000008000000000000000000f1ff5000000010000020000000000000f1ff5600000006000000000000000000f1ff5e000000100000000000000000000200610000003800000000000000000002006400000011000000260000001200020072000000370000000200000012000200002e766563746f7273002e74657874002e41524d2e61747472696275746573002e64656275675f696e666f002e64656275675f616262726576002e64656275675f6172616e676573002e64656275675f6c696e65002e64656275675f6c696e655f737472002e636f6d6d656e74002e73796d746162002e7368737472746162002e737472746162000055415254455f5441534b535f535441525454580055415254455f454e41424c450055415254455f5458445f5054520055415254455f5458445f4d4158434e5400454e41424c455f454e41424c4544005458425546004d53475f4c454e0024740024640052657365745f48616e646c65720048616e675f48616e646c6572000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000100000002000000000000000000010010000000000000000000000001000000000000000a000000010000000600000010000000100001004000000000000000000000000400000000000000100000000300007000000000000000005000010025000000000000000000000001000000000000002000000001000000000000000000000075000100bc000000000000000000000001000000000000002c0000000100000000000000000000003101010021000000000000000000000001000000000000003a0000000100000000000000000000005201010020000000000000000000000001000000000000004900000001000000000000000000000072010100540000000000000000000000010000000000000055000000010000003000000000000000c60101004800000000000000000000000100000001000000650000000100000030000000000000000e0201001a000000000000000000000001000000010000006e00000002000000000000000000000028020100c00000000c0000000a000000040000001000000076000000030000000000000000000000e8020100880000000000000000000000010000000000000080000000030000000000000000000000700301007f00000000000000000000000100000000000000" } } } ``` Response: ```json { "jsonrpc": "2.0", "id": 22, "result": { "content": [ { "type": "text", "text": "uploaded firmware for node 0 (67064 bytes); call start_node to run it" } ] } } ``` **Tool**: `start_node` — Run the node Begin/resume execution (QMP cont) and release the clock-barrier hold — the unfreeze primitive for a node launched frozen. Request: ```json { "jsonrpc": "2.0", "id": 23, "method": "tools/call", "params": { "name": "start_node", "arguments": { "node_id": 0 } } } ``` Response: ```json { "jsonrpc": "2.0", "id": 23, "result": { "content": [ { "type": "text", "text": "node 0 started" } ] } } ``` **Tool**: `run_until` — Wait for a console marker Advance virtual time until a condition holds. Conditions: events_contains, vtime_at_least, console {node_id, contains}, or link {link_id, contains}. This is the deterministic 'wait for output' primitive. Request: ```json { "jsonrpc": "2.0", "id": 24, "method": "tools/call", "params": { "name": "run_until", "arguments": { "console": { "node_id": 0, "contains": "HELLO" } } } } ``` Response: ```json { "jsonrpc": "2.0", "id": 24, "result": { "content": [ { "type": "text", "text": "condition met at vtime 1200000 ns" } ] } } ``` **Tool**: `read_console` — Drain console output Read and drain a node's buffered guest->host console output since the last read. Request: ```json { "jsonrpc": "2.0", "id": 25, "method": "tools/call", "params": { "name": "read_console", "arguments": { "node_id": 0 } } } ``` Response: ```json { "jsonrpc": "2.0", "id": 25, "result": { "content": [ { "type": "text", "text": "HELLO\n" } ] } } ``` **Tool**: `get_time` — Read the simulation clock The current virtual time in nanoseconds (latest observed vtime). Virtual time is deterministic and independent of wall-clock. Request: ```json { "jsonrpc": "2.0", "id": 26, "method": "tools/call", "params": { "name": "get_time", "arguments": {} } } ``` Response: ```json { "jsonrpc": "2.0", "id": 26, "result": { "content": [ { "type": "text", "text": "vtime_ns: 1200000" } ] } } ``` ### Scenario: inspect state **Tool**: `read_registers` — Dump CPU registers Read a node's CPU registers via QMP (a deterministic snapshot at the current vtime). Request: ```json { "jsonrpc": "2.0", "id": 30, "method": "tools/call", "params": { "name": "read_registers", "arguments": { "node_id": 0 } } } ``` Response: ```json { "jsonrpc": "2.0", "id": 30, "result": { "content": [ { "type": "text", "text": "R00=00000000 R01=4006b000 … PC=00000410 …" } ] } } ``` **Tool**: `read_memory` — Inspect guest memory Read a guest physical memory range (hex address + length, capped at 1 MiB/call). Useful to read fault-status registers (CFSR @ 0xE000ED28) or an SRAM capture buffer. Request: ```json { "jsonrpc": "2.0", "id": 31, "method": "tools/call", "params": { "name": "read_memory", "arguments": { "node_id": 0, "address": "0xE000ED28", "length": 4 } } } ``` Response: ```json { "jsonrpc": "2.0", "id": 31, "result": { "content": [ { "type": "text", "text": "0xe000ed28: 00 00 00 00" } ] } } ``` **Tool**: `read_vector_table` — Decode the ARM vector table After uploading firmware, read and decode the Cortex-M vector table (stored at VTOR, the Vector Table Offset Register): returns the initial stack pointer (word[0]), reset handler address (word[1] with Thumb bit masked), and exception/IRQ vector addresses. Use to verify the firmware loaded correctly and compare against your ELF symbol table to locate exception handlers. Request: ```json { "jsonrpc": "2.0", "id": 33.5, "method": "tools/call", "params": { "name": "read_vector_table", "arguments": { "node_id": 0 } } } ``` Response: ```json { "jsonrpc": "2.0", "id": 33.5, "result": { "content": [ { "type": "text", "text": "Vector table at VTOR=0x08000000:\n Initial SP: 0x20008000\n Reset Vector: 0x08000420 (raw 0x08000421)\n Exception Vectors:\n NMI: 0x08000500 (raw 0x08000501)\n HardFault: 0x08000520 (raw 0x08000521)\n MemManage: 0x00000000 (raw 0x00000000)\n BusFault: 0x00000000 (raw 0x00000000)\n UsageFault: 0x00000000 (raw 0x00000000)\n Reserved[0]: 0x00000000 (raw 0x00000000)\n Reserved[1]: 0x00000000 (raw 0x00000000)\n Reserved[2]: 0x00000000 (raw 0x00000000)\n SVCall: 0x00000000 (raw 0x00000000)\n PendSV: 0x00000000 (raw 0x00000000)\n SysTick: 0x00000000 (raw 0x00000000)" } ] } } ``` **Tool**: `read_fault` — Decode a Cortex-M fault After a crash, decode WHY the firmware faulted (the SCB fault-status registers) AND WHERE (the faulting PC, recovered from the exception stack frame) — the agent-usable HardFault inspection (no breakpoint/gdb). Pair with a fault-handler marker + run_until, then read_fault + read_registers. Request: ```json { "jsonrpc": "2.0", "id": 32, "method": "tools/call", "params": { "name": "read_fault", "arguments": { "node_id": 0 } } } ``` Response: ```json { "jsonrpc": "2.0", "id": 32, "result": { "content": [ { "type": "text", "text": "Fault detected (CFSR=0x00000082 HFSR=0x40000000): DACCVIOL: data access violation (MPU); FORCED: escalated to HardFault (a configurable fault fired). Faulting address = 0x20004000\nFaulting PC = 0x08000420 (recovered from the MSP exception frame at SP=0x2000ffe0); stacked LR=0x08000311, xPSR=0x61000000." } ] } } ``` **Tool**: `list_memory_regions` — Enumerate the guest memory map The flattened guest-physical memory map (RAM + every peripheral MMIO window), read from the LIVE QOM memory tree — reflects reality even if a device aliases/relocates at runtime. Use to find exactly where a peripheral lives before read_memory/read_registers, or to sanity-check the world's declared layout. Request: ```json { "jsonrpc": "2.0", "id": 33, "method": "tools/call", "params": { "name": "list_memory_regions", "arguments": { "node_id": 0 } } } ``` Response: ```json { "jsonrpc": "2.0", "id": 33, "result": { "content": [ { "type": "text", "text": "Memory regions (node 0):\n- 0x08000000-0x08001000 (4096 bytes, i/o): gic_dist\n- 0x09000000-0x09001000 (4096 bytes, i/o): pl011\n- 0x40000000-0x41000000 (16777216 bytes, ram): memory@40000000\n" } ] } } ``` **Tool**: `write_memory` — Patch guest memory Write bytes into a guest physical address (hex address + hex-encoded bytes, capped at 1 MiB/call) — the write peer of read_memory. Debug-only and non-deterministic (RFC-0008): use only while the node is parked at a quantum boundary, never mid-execution. Reaches the M-profile CPU's own address-space view (NVIC/bit-band/PPB), not just the board's plain RAM/flash tree. Request: ```json { "jsonrpc": "2.0", "id": 34, "method": "tools/call", "params": { "name": "write_memory", "arguments": { "node_id": 0, "address": "0x20000000", "bytes": "deadbeef" } } } ``` Response: ```json { "jsonrpc": "2.0", "id": 34, "result": { "content": [ { "type": "text", "text": "wrote 4 bytes at 0x20000000" } ] } } ``` **Tool**: `write_register` — Write a CPU register Write one CPU register on a node (the register peer of write_memory; what a GDB user does with `set $r4 = 42`). The register name is case-insensitive (r0-r15, sp, lr, pc, msp, psp, xpsr, control, primask, basepri) and the value is a 32-bit unsigned integer; read it back with read_registers. Debug-only and non-deterministic (RFC-0008): use only while the node is parked at a quantum boundary, never mid-execution. Request: ```json { "jsonrpc": "2.0", "id": 96, "method": "tools/call", "params": { "name": "write_register", "arguments": { "node_id": 0, "register": "r4", "value": 42 } } } ``` Response: ```json { "jsonrpc": "2.0", "id": 96, "result": { "content": [ { "type": "text", "text": "wrote r4 = 0x2a" } ] } } ``` **Tool**: `disassemble` — Disassemble guest code Decode ARM/Thumb instructions at a guest physical address (hex address + instruction count, capped at 256/call; thumb:false for ARM32 A-profile code). Useful to inspect a symbol's machine code, or the instructions around a faulting PC (pair with read_fault). Request: ```json { "jsonrpc": "2.0", "id": 35, "method": "tools/call", "params": { "name": "disassemble", "arguments": { "node_id": 0, "address": "0x8", "count": 3 } } } ``` Response: ```json { "jsonrpc": "2.0", "id": 35, "result": { "content": [ { "type": "text", "text": "0x8: mov.w r0, #0x9000000\n0xc: movs r1, #0x4d\ne: str r1, [r0]\n" } ] } } ``` **Tool**: `read_log` — Tail the engine log Read a node's QEMU process log (combined stdout+stderr) — where sim_info!/sim_debug!/sim_err! telemetry lines land. No live session needed, so it stays readable after a crash/hang; pair with read_fault for a full post-mortem. Without since_line, returns the most recent lines (a tail); pass since_line to page forward through a long run. Request: ```json { "jsonrpc": "2.0", "id": 36, "method": "tools/call", "params": { "name": "read_log", "arguments": { "node_id": 0 } } } ``` Response: ```json { "jsonrpc": "2.0", "id": 36, "result": { "content": [ { "type": "text", "text": "[QEMU 0 STDERR] [VTime: 0.00 ms] [Node: 0] [INFO ] [nrf52_clock] clock: node=0 fed='sim-abc123'" } ] } } ``` **Tool**: `symbolize` — Resolve an address to function@file:line Resolve a bare guest code address to function@file:line (DWARF) or the symbol name (symtab-only), against the node's uploaded firmware ELF — the same B1 symbolizer read_fault/causal_query annotate their PCs with, standalone. Use after read_fault/causal_query/read_events name a raw PC you want a human-readable label for. Request: ```json { "jsonrpc": "2.0", "id": 91, "method": "tools/call", "params": { "name": "symbolize", "arguments": { "node_id": 0, "addr": 134218272 } } } ``` Response: ```json { "jsonrpc": "2.0", "id": 91, "result": { "content": [ { "type": "text", "text": "0x08000420 compute at sample.c:11" } ] } } ``` **Tool**: `stack_unwind` — Reconstruct the call stack at a vtime The call stack open AT virtual time vtime on a node — a Cortex-M backtrace reconstructed by replaying the call/return event trace (RFC-0019 B7) up to vtime, outermost frame first, each call target symbolized against the node's uploaded ELF. Requires trace capture active before vtime (run the sim via run_until first — same precondition as causal_query). Request: ```json { "jsonrpc": "2.0", "id": 92, "method": "tools/call", "params": { "name": "stack_unwind", "arguments": { "node_id": 0, "vtime": 1500000 } } } ``` Response: ```json { "jsonrpc": "2.0", "id": 92, "result": { "content": [ { "type": "text", "text": "Call stack at vtime 1500000 (outermost first):\n#0 main at sample.c:20\n#1 compute at sample.c:9\n" } ] } } ``` **Tool**: `read_trace` — Read a bounded write trace Every memory write to addr whose virtual time falls in [lo, hi] (inclusive both ends) — a bounded window over the RFC-0019 B6 data-write trace, each with its writer PC symbolized. Requires trace capture active before the window (run the sim via run_until first — same precondition as causal_query). Request: ```json { "jsonrpc": "2.0", "id": 93, "method": "tools/call", "params": { "name": "read_trace", "arguments": { "node_id": 0, "addr": 536932352, "lo": 0, "hi": 2000000 } } } ``` Response: ```json { "jsonrpc": "2.0", "id": 93, "result": { "content": [ { "type": "text", "text": "Writes to 0x2000f000 in vtime [0, 2000000]:\n vtime 500000 wrote 0x0 from compute at sample.c:11\n vtime 1000000 wrote 0x1 from compute at sample.c:11\n vtime 1500000 wrote 0x2 from compute at sample.c:11\n" } ] } } ``` **Tool**: `memory_diff` — Diff guest memory before/after Before/after guest-memory delta for one address: the value in effect (RFC-0019 B6 state@T) at before_vtime versus after_vtime, each annotated with its writer's symbolized PC, and whether it changed. Requires trace capture active before before_vtime (run the sim via run_until first — same precondition as causal_query). Request: ```json { "jsonrpc": "2.0", "id": 94, "method": "tools/call", "params": { "name": "memory_diff", "arguments": { "node_id": 0, "addr": 536932352, "before_vtime": 0, "after_vtime": 2000000 } } } ``` Response: ```json { "jsonrpc": "2.0", "id": 94, "result": { "content": [ { "type": "text", "text": "Memory diff for 0x2000f000: before (vtime 0) = never written; after (vtime 2000000) = 0x2 (written from compute at sample.c:11); changed = true\n" } ] } } ``` **Tool**: `get_call_trace` — Get symbolic call trace Every Call/Return event in a virtual time window for a node, with each PC resolved to a function name via the node's uploaded firmware ELF. Request: ```json { "jsonrpc": "2.0", "id": 94, "method": "tools/call", "params": { "name": "get_call_trace", "arguments": { "node_id": 0, "lo": 0, "hi": 2000000 } } } ``` Response: ```json { "jsonrpc": "2.0", "id": 94, "result": { "content": [ { "type": "text", "text": "Call/Return events for node 0 in vtime [0, 2000000]:\n vtime 500000 [Call] main -> compute\n vtime 1000000 [Return] compute\n" } ] } } ``` ### Scenario: breakpoint **Tool**: `set_breakpoint` — Arm a software breakpoint Arm a deterministic breakpoint at a PC (use the symbol's address from your ELF; addr=0 disarms). The node halts AT the next quantum boundary — virtual time stays stable and the PDES barrier never deadlocks (unlike gdb/QMP stop). Arm it before the firmware reaches the address; pair with run_until {breakpoint}, then read_fault / read_registers, then resume. Request: ```json { "jsonrpc": "2.0", "id": 51, "method": "tools/call", "params": { "name": "set_breakpoint", "arguments": { "node_id": 0, "addr": 134218272 } } } ``` Response: ```json { "jsonrpc": "2.0", "id": 51, "result": { "content": [ { "type": "text", "text": "node 0 breakpoint armed at 0x8000420" } ] } } ``` **Tool**: `run_until` — Wait for a breakpoint hit Advance virtual time until a node halts at a software breakpoint (see set_breakpoint). Optional {node_id} filter. The node pauses at the quantum boundary with vtime stable; inspect with read_registers / read_fault, then resume. Request: ```json { "jsonrpc": "2.0", "id": 52, "method": "tools/call", "params": { "name": "run_until", "arguments": { "breakpoint": { "node_id": 0 } } } } ``` Response: ```json { "jsonrpc": "2.0", "id": 52, "result": { "content": [ { "type": "text", "text": "condition met" } ] } } ``` **Tool**: `halt` — Halt the whole federation Pause the Time Authority federation-wide: every node holds at the next quantum boundary with virtual time stable. Federation-scoped, so it takes no node_id; release with resume. Request: ```json { "jsonrpc": "2.0", "id": 54, "method": "tools/call", "params": { "name": "halt", "arguments": {} } } ``` Response: ```json { "jsonrpc": "2.0", "id": 54, "result": { "content": [ { "type": "text", "text": "federation paused" } ] } } ``` **Tool**: `resume` — Resume after a breakpoint Release a breakpoint pause so the node resumes executing under virtual time — the counterpart to set_breakpoint + run_until {breakpoint}. Request: ```json { "jsonrpc": "2.0", "id": 53, "method": "tools/call", "params": { "name": "resume", "arguments": { "node_id": 0 } } } ``` Response: ```json { "jsonrpc": "2.0", "id": 53, "result": { "content": [ { "type": "text", "text": "node 0 resumed" } ] } } ``` **Tool**: `set_watchpoint` — Arm a data watchpoint Arm a deterministic break-on-access watchpoint at a guest address (the memory-access peer of set_breakpoint) — length in bytes (1..=8), kind write (the only kind implemented today). The node halts AT the next quantum boundary — virtual time stays stable and the PDES barrier never deadlocks (unlike a real hardware watchpoint trap). Arm it before the firmware performs the access; pair with run_until {breakpoint}, then read_memory / read_registers, then resume. Request: ```json { "jsonrpc": "2.0", "id": 81, "method": "tools/call", "params": { "name": "set_watchpoint", "arguments": { "node_id": 0, "address": 1073745916, "length": 4, "kind": "write" } } } ``` Response: ```json { "jsonrpc": "2.0", "id": 81, "result": { "content": [ { "type": "text", "text": "node 0 watchpoint armed at 0x4000ffbc len=4" } ] } } ``` **Tool**: `clear_watchpoint` — Disarm a data watchpoint Disarm a node's software data watchpoint without releasing an already-triggered Time Authority pause (release that separately with resume). The counterpart to set_watchpoint. Request: ```json { "jsonrpc": "2.0", "id": 82, "method": "tools/call", "params": { "name": "clear_watchpoint", "arguments": { "node_id": 0 } } } ``` Response: ```json { "jsonrpc": "2.0", "id": 82, "result": { "content": [ { "type": "text", "text": "node 0 watchpoint disarmed" } ] } } ``` **Tool**: `set_fault_autostop` — Auto-stop at the node's HardFault handler Arm a breakpoint at the node's OWN HardFault_Handler — no ELF/symbol address needed (unlike set_breakpoint): reads the node's live vector table (SCB VTOR + the HardFault vector entry) and arms it via the same determinism-safe mechanism. Arm right after upload_firmware/start_node, then wait with run_until {breakpoint} and decode with read_fault. Request: ```json { "jsonrpc": "2.0", "id": 90, "method": "tools/call", "params": { "name": "set_fault_autostop", "arguments": { "node_id": 0 } } } ``` Response: ```json { "jsonrpc": "2.0", "id": 90, "result": { "content": [ { "type": "text", "text": "node 0 fault-autostop armed at HardFault_Handler 0x0800044c (VTOR=0x08000000); wait with run_until {breakpoint}, then read_fault" } ] } } ``` ### Scenario: console io **Tool**: `write_console` — Send console input Write host->guest bytes to a node's console (the passthrough boundary; no vtime, routed immediately). Request: ```json { "jsonrpc": "2.0", "id": 40, "method": "tools/call", "params": { "name": "write_console", "arguments": { "node_id": 0, "data": "S" } } } ``` Response: ```json { "jsonrpc": "2.0", "id": 40, "result": { "content": [ { "type": "text", "text": "wrote 1 byte to node 0 console" } ] } } ``` ### Scenario: wire io **Tool**: `read_link` — Tap inter-node frames Frames seen crossing inter-node links (the wiretap tap): src node, vtime, seq, raw bytes (hex). Optional filters: link_id, since_vtime. Request: ```json { "jsonrpc": "2.0", "id": 41, "method": "tools/call", "params": { "name": "read_link", "arguments": { "link_id": 0 } } } ``` Response: ```json { "jsonrpc": "2.0", "id": 41, "result": { "content": [ { "type": "text", "text": "[{\"src_node_id\":0,\"delivery_vtime_ns\":1200000,\"sequence_number\":1,\"payload\":\"52756e6e696e67\"}]" } ] } } ``` **Tool**: `inject_frame` — Inject a frame on a link Inject a frame onto an inter-node PDES link, scheduled at a virtual time (pass vtime_ns verbatim for reproducible scenarios; omit/0 for as-soon-as-possible). A past vtime is rejected, never crashing the sim. Use write_console for console input. Request: ```json { "jsonrpc": "2.0", "id": 42, "method": "tools/call", "params": { "name": "inject_frame", "arguments": { "link_id": 1, "data": "deadbeef", "vtime_ns": 2000000 } } } ``` Response: ```json { "jsonrpc": "2.0", "id": 42, "result": { "content": [ { "type": "text", "text": "injected 4 bytes on link 1 at vtime 2000000 ns" } ] } } ``` **Tool**: `inject_fault` — Arm a deterministic link fault Arm a fault on a PDES link: the Nth REAL frame observed on link_id (1-indexed) is dropped, delayed, or has one payload byte XOR-corrupted — only genuine node-to-node traffic, never a test-injected frame. spec_id is a caller-assigned unique id (fresh per call). fire_vtime_ns gates WHEN the fault arms (0/omit = immediately). Get link_id from get_topology. Request: ```json { "jsonrpc": "2.0", "id": 43, "method": "tools/call", "params": { "name": "inject_fault", "arguments": { "link_id": 1, "spec_id": 0, "nth_frame": 1, "effect": "drop" } } } ``` Response: ```json { "jsonrpc": "2.0", "id": 43, "result": { "content": [ { "type": "text", "text": "armed spec_id 0 on link 1" } ] } } ``` **Tool**: `read_events` — Read the causal event log The global vtime-ordered event log (link routes + lifecycle). Optional filters: kind, since_vtime, node (src), link_id. Request: ```json { "jsonrpc": "2.0", "id": 43, "method": "tools/call", "params": { "name": "read_events", "arguments": { "kind": "pdes_route", "since_vtime": 0 } } } ``` Response: ```json { "jsonrpc": "2.0", "id": 43, "result": { "content": [ { "type": "text", "text": "[{\"kind\":\"pdes_route\",\"vtime_ns\":1200000,\"summary\":\"node 0 -> link 0 (7 bytes)\"}]" } ] } } ``` ### Scenario: lifecycle **Tool**: `reset_node` — Reset a node to its reset vector Relaunch a node's firmware from the reset vector (virtual time rewinds to 0); the determinism-safe restart — the node re-joins as a fresh boot, reusing the last-uploaded firmware. Request: ```json { "jsonrpc": "2.0", "id": 50, "method": "tools/call", "params": { "name": "reset_node", "arguments": { "node_id": 0 } } } ``` Response: ```json { "jsonrpc": "2.0", "id": 50, "result": { "content": [ { "type": "text", "text": "node 0 reset; rejoined at vtime 0" } ] } } ``` **Tool**: `goto` — Time-travel to an earlier virtual time Rewind (or fast-forward) the simulation to EXACTLY vtime_ns and hold there, then inspect with read_memory / read_registers. A backward goto deterministically resets the node to boot and replays to the target (RFC-0008: re-running to the same vtime reproduces the same state); a forward goto is an exact-landing advance. Single-node sessions only; exact for guests that read no clock/cycle counter (the no-clock-read class). Request: ```json { "jsonrpc": "2.0", "id": 53, "method": "tools/call", "params": { "name": "goto", "arguments": { "node_id": 0, "vtime_ns": 2000000 } } } ``` Response: ```json { "jsonrpc": "2.0", "id": 53, "result": { "content": [ { "type": "text", "text": "goto reached 2000000 ns" } ] } } ``` **Tool**: `causal_query` — Find what caused a fault, then rewind to it Time-travel debugging (RFC-0019 B8): given a suspect address and the fault's virtual time, compose the last writer of that address before the fault (with the value it wrote) and the call path open at the fault, symbolized against the node's firmware. Returns a goto target (the writer's vtime) to rewind to the cause. Run the sim via run_until first so trace capture precedes the fault. Single-node sessions. Request: ```json { "jsonrpc": "2.0", "id": 54, "method": "tools/call", "params": { "name": "causal_query", "arguments": { "node_id": 0, "addr": 536932352, "vtime": 2000000 } } } ``` Response: ```json { "jsonrpc": "2.0", "id": 54, "result": { "content": [ { "type": "text", "text": "Causal query for addr 0x2000f000 at vtime 2000000:\n last writer: vtime 1500000 wrote 0x2 from compute @ sample.c:11\n goto target: vtime 1500000\n call path at fault (outermost first):\n #0 main @ sample.c:20\n #1 compute @ sample.c:9\n" } ] } } ``` **Tool**: `reverse_step` — Step backward in time by one quantum Step the simulation BACKWARD by step_ns — a thin goto(current_vtime - step_ns) over the time-travel goto verb (reset-to-boot + deterministic replay, RFC-0008). step_ns is ε, typically one quantum (the prior quantum boundary). Inspect after with read_memory / read_registers. Single-node sessions; the no-clock-read class. Request: ```json { "jsonrpc": "2.0", "id": 55, "method": "tools/call", "params": { "name": "reverse_step", "arguments": { "node_id": 0, "step_ns": 1000000 } } } ``` Response: ```json { "jsonrpc": "2.0", "id": 55, "result": { "content": [ { "type": "text", "text": "reverse_step 1000000 ns: vtime 3000000 -> 2000000; goto reached 2000000 ns" } ] } } ``` **Tool**: `step_insn` — Step a node exactly N guest instructions Advance a simulation node by exactly count guest instructions while holding other nodes at the barrier. Returns updated PC and virtual time. Request: ```json { "jsonrpc": "2.0", "id": 56, "method": "tools/call", "params": { "name": "step_insn", "arguments": { "node_id": 0, "count": 1 } } } ``` Response: ```json { "jsonrpc": "2.0", "id": 56, "result": { "content": [ { "type": "text", "text": "{\"instructions_stepped\":1,\"node_id\":0,\"pc\":\"0x00000024\",\"vtime_ns\":8}" } ] } } ``` **Tool**: `reverse_continue` — Rewind to the last write of an address Time-travel debugging (RFC-0019 B9): rewind to the LAST write of an address before the current virtual time AND land there — a find-then-goto wrapper composing the last-writer query (like causal_query) with the backward goto verb (reset-to-boot + deterministic replay, RFC-0008). The node ends up parked at that write, ready for read_memory / read_registers. No write before now → fails loud. Run the sim via run_until first so trace capture precedes now. Single-node sessions; the no-clock-read class. Request: ```json { "jsonrpc": "2.0", "id": 56, "method": "tools/call", "params": { "name": "reverse_continue", "arguments": { "node_id": 0, "last_write_to": 536932352 } } } ``` Response: ```json { "jsonrpc": "2.0", "id": 56, "result": { "content": [ { "type": "text", "text": "no write to 0x2000f000 before vtime — nothing to reverse_continue to" } ], "isError": true } } ``` ### Scenario: feedback **Tool**: `request_mcu` — Request an MCU we don't have Agents are our customers — requesting a part is a prioritization signal. Recorded to the operator's feedback sink. Request: ```json { "jsonrpc": "2.0", "id": 60, "method": "tools/call", "params": { "name": "request_mcu", "arguments": { "vendor": "Nordic", "part": "nRF52840", "why": "BLE + Thread firmware bring-up" } } } ``` Response: ```json { "jsonrpc": "2.0", "id": 60, "result": { "content": [ { "type": "text", "text": "Recorded request_mcu — thank you; agent requests prioritize our roadmap. (…)" } ] } } ``` **Tool**: `request_link` — Request a link protocol Request an inter-node protocol you need. Request: ```json { "jsonrpc": "2.0", "id": 61, "method": "tools/call", "params": { "name": "request_link", "arguments": { "protocol": "SPI", "why": "sensor bus bring-up" } } } ``` Response: ```json { "jsonrpc": "2.0", "id": 61, "result": { "content": [ { "type": "text", "text": "Recorded request_link — thank you …" } ] } } ``` **Tool**: `request_svd` — Request a vendored SVD Request a CMSIS-SVD register map to be vendored. Request: ```json { "jsonrpc": "2.0", "id": 62, "method": "tools/call", "params": { "name": "request_svd", "arguments": { "vendor": "Nordic", "part": "nRF52840" } } } ``` Response: ```json { "jsonrpc": "2.0", "id": 62, "result": { "content": [ { "type": "text", "text": "Recorded request_svd — thank you …" } ] } } ``` **Tool**: `report_issue` — Report a fidelity gap Report a bug or fidelity gap, optionally with a deterministic repro (world + firmware + seed). Request: ```json { "jsonrpc": "2.0", "id": 63, "method": "tools/call", "params": { "name": "report_issue", "arguments": { "summary": "LPUART RDRF clears one byte early", "repro": "world=s32k144_lpuart seed=1" } } } ``` Response: ```json { "jsonrpc": "2.0", "id": 63, "result": { "content": [ { "type": "text", "text": "Recorded report_issue — thank you …" } ] } } ``` **Tool**: `suggest_feature` — Suggest a capability Suggest a capability you wish existed. Request: ```json { "jsonrpc": "2.0", "id": 64, "method": "tools/call", "params": { "name": "suggest_feature", "arguments": { "summary": "set_breakpoint(symbol) + HardFault auto-trap" } } } ``` Response: ```json { "jsonrpc": "2.0", "id": 64, "result": { "content": [ { "type": "text", "text": "Recorded suggest_feature — thank you …" } ] } } ``` **Tool**: `ask_support` — Ask an in-band support question Ask a support question; returns guidance + doc pointers (keyword-routed). Request: ```json { "jsonrpc": "2.0", "id": 65, "method": "tools/call", "params": { "name": "ask_support", "arguments": { "question": "How do I read console output from a node?" } } } ``` Response: ```json { "jsonrpc": "2.0", "id": 65, "result": { "content": [ { "type": "text", "text": "Console: use write_console to send input and read_console to drain output …" } ] } } ``` ### Scenario: observe **Tool**: `get_usage` — Check your usage budget Returns your usage so you can self-pace. `session` is THIS session vCPU-second budget toward its TTL cap (vcpu_seconds_used / session_pct_used / expires_in_s); `account` is your rolling-window account usage (window / pct_used / resets_in_s) when the control plane signed a usage grant onto session-create, else null (the engine never sees raw quota, only the %). Both null when run standalone. Call it to decide whether to keep working or wrap up. Request: ```json { "jsonrpc": "2.0", "id": 70, "method": "tools/call", "params": { "name": "get_usage", "arguments": {} } } ``` Response: ```json { "jsonrpc": "2.0", "id": 70, "result": { "content": [ { "type": "text", "text": "{\"session\":{\"vcpu_seconds_used\":42,\"session_pct_used\":4,\"expires_in_s\":858},\"account\":{\"window\":\"7d\",\"pct_used\":42.5,\"resets_in_s\":318000}}" } ] } } ``` ### Scenario: compile **Tool**: `compile` — Compile source to a firmware ELF (then upload + run) The cloud write→compile→run loop, all MCP: compile your C/asm to an ELF (no local toolchain), then upload_firmware{node_id, firmware_sha256: elf_sha256} → reset_node{node_id} → run_until/read_console. 'mcu' is the target core; 'sources' maps filename → base64 of the file bytes. Returns {elf_sha256, elf_bytes_len, warnings}: the image is named, not inlined, because a real one is hundreds of thousands of hex characters. Pass include_hex: true only if you have no broker to name it to. Hosted-session only. Request: ```json { "jsonrpc": "2.0", "id": 80, "method": "tools/call", "params": { "name": "compile", "arguments": { "mcu": "cortex_m4", "sources": { "main.c": "aW50IG1haW4odm9pZCl7cmV0dXJuIDA7fQ==" } } } } ``` Response: ```json { "jsonrpc": "2.0", "id": 80, "result": { "content": [ { "type": "text", "text": "{\"elf_sha256\":\"e3b0c442...\",\"elf_bytes_len\":67676,\"warnings\":\"\"}" } ] } } ``` ### Scenario: fuzz **Tool**: `fuzz_start` — Admit and enqueue a fuzz campaign fuzz_start admits and enqueues a campaign, returning a campaign_id IMMEDIATELY — it never blocks (a campaign runs minutes-to-hours on a separate worker, never inside this tool call). vcpu_ceiling_secs is checked up-front against your session's remaining fuzz budget; too large and the call is refused with both numbers named. global_seed/firmware_hash/world_usda_hash/engine_revision are the determinism inputs a later crash replay needs. Poll with fuzz_status{campaign_id}. Hosted-session only (MAX tier). Request: ```json { "jsonrpc": "2.0", "id": 81, "method": "tools/call", "params": { "name": "fuzz_start", "arguments": { "vcpu_ceiling_secs": 3600, "global_seed": 12345, "firmware_hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "world_usda_hash": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08", "engine_revision": "v1.0.0" } } } ``` Response: ```json { "jsonrpc": "2.0", "id": 81, "result": { "content": [ { "type": "text", "text": "{\"campaign_id\":\"01912e4a-1b2c-7def-9abc-0123456789ab\",\"state\":\"ADMITTED\"}" } ] } } ``` **Tool**: `fuzz_status` — Poll a fuzz campaign's state Poll a campaign's current state: REQUESTED → ADMITTED → RUNNING → {COMPLETED|FAILED|CANCELLED|BUDGET_EXHAUSTED}. Terminal states are reached by the worker, never by you waiting on this call. BUDGET_EXHAUSTED is a normal terminal state with its artifacts intact, not an error. Hosted-session only (MAX tier). Request: ```json { "jsonrpc": "2.0", "id": 82, "method": "tools/call", "params": { "name": "fuzz_status", "arguments": { "campaign_id": "01912e4a-1b2c-7def-9abc-0123456789ab" } } } ``` Response: ```json { "jsonrpc": "2.0", "id": 82, "result": { "content": [ { "type": "text", "text": "{\"campaign_id\":\"01912e4a-1b2c-7def-9abc-0123456789ab\",\"state\":\"ADMITTED\",\"vcpu_ceiling_secs\":3600,\"vcpu_consumption_secs\":0,\"is_terminal\":false}" } ] } } ``` **Tool**: `fuzz_corpus` — Fetch a fuzz campaign's evolving input corpus fuzz_corpus returns a campaign's evolving input corpus: the input samples (hex-encoded) that triggered new code coverage during the search — the interesting seeds the fuzzer keeps and mutates to explore further. Empty while the campaign is still ADMITTED/RUNNING or has no corpus yet; an unknown campaign_id is a loud tool error, never a fabricated corpus. Hosted-session only (MAX tier). Request: ```json { "jsonrpc": "2.0", "id": 83, "method": "tools/call", "params": { "name": "fuzz_corpus", "arguments": { "campaign_id": "01912e4a-1b2c-7def-9abc-0123456789ab" } } } ``` Response: ```json { "jsonrpc": "2.0", "id": 83, "result": { "content": [ { "type": "text", "text": "{\"campaign_id\":\"01912e4a-1b2c-7def-9abc-0123456789ab\",\"corpus\":[]}" } ] } } ``` **Tool**: `crash_list` — Fetch a fuzz campaign's REPORTABLE crashes crash_list returns a campaign's REPORTABLE crashes (x2-deterministic-replay-PROMOTED crashes only), never unreproducible crashes. Returns the crash records promoted to REPORTED status during the fuzz campaign — empty list while the campaign is still ADMITTED/RUNNING or has no reportable crashes yet; an unknown campaign_id is a loud tool error, never a fabricated list. Hosted-session only (MAX tier). Request: ```json { "jsonrpc": "2.0", "id": 84, "method": "tools/call", "params": { "name": "crash_list", "arguments": { "campaign_id": "01912e4a-1b2c-7def-9abc-0123456789ab" } } } ``` Response: ```json { "jsonrpc": "2.0", "id": 84, "result": { "content": [ { "type": "text", "text": "{\"campaign_id\":\"01912e4a-1b2c-7def-9abc-0123456789ab\",\"crashes\":[]}" } ] } } ``` **Tool**: `crash_repro` — Deterministically replay a specific promoted crash crash_repro deterministically replays a specific promoted crash artifact from a fuzz campaign and returns the replay result. The replay uses the recorded determinism inputs (global seed, firmware hash, world .usda hash, engine revision, crashing input) to reproduce the crash bit-identically on every invocation. Returns the replay result (the x2-bit-identical outcome / the reproduction evidence) — a non-deterministic result here is a product defect, not a flaky test. An unknown campaign_id or crash_id is a loud tool error, never a fabricated replay. Hosted-session only (MAX tier). Request: ```json { "jsonrpc": "2.0", "id": 85, "method": "tools/call", "params": { "name": "crash_repro", "arguments": { "campaign_id": "01912e4a-1b2c-7def-9abc-0123456789ab", "crash_id": "crash-abc-001" } } } ``` Response: ```json { "jsonrpc": "2.0", "id": 85, "result": { "content": [ { "type": "text", "text": "{\"campaign_id\":\"01912e4a-1b2c-7def-9abc-0123456789ab\",\"crash_id\":\"crash-abc-001\",\"replay_output\":\"0x6162\",\"replay_status\":\"reproduced\"}" } ] } } ``` **Tool**: `coverage_map` — Fetch a fuzz campaign's code coverage Report code coverage for a campaign (per-region breakdown). Request: ```json { "jsonrpc": "2.0", "id": 85, "method": "tools/call", "params": { "name": "coverage_map", "arguments": { "campaign_id": "01912e4a-1b2c-7def-9abc-0123456789ab" } } } ``` Response: ```json { "jsonrpc": "2.0", "id": 85, "result": { "content": [ { "type": "text", "text": "{\"campaign_id\":\"01912e4a-1b2c-7def-9abc-0123456789ab\",\"total\":{\"measured\":false},\"regions\":[]}" } ] } } ``` **Tool**: `crash_minimize` — Shrink a crashing input to minimal reproducible form crash_minimize deterministically shrinks a crashing input while preserving its crash signature, using delta-debugging (Zeller ddmin). Takes campaign_id and crash_id to identify which crash to minimize. Returns the minimized input (hex-encoded), minimized artifact address, original and minimized sizes, and the preserved signature. The minimization oracle: a candidate input preserves the crash IFF its replay produces the exact same signature (byte-identical) as the original, and the replay is x2 stable. An unknown campaign_id or crash_id is a loud tool error, never a fabricated result. Hosted-session only (MAX tier). Request: ```json { "jsonrpc": "2.0", "id": 86, "method": "tools/call", "params": { "name": "crash_minimize", "arguments": { "campaign_id": "01912e4a-1b2c-7def-9abc-0123456789ab", "crash_id": "crash-abc-001" } } } ``` Response: ```json { "jsonrpc": "2.0", "id": 86, "result": { "content": [ { "type": "text", "text": "{\"campaign_id\":\"01912e4a-1b2c-7def-9abc-0123456789ab\",\"crash_id\":\"crash-abc-001\",\"minimize_status\":\"pending\"}" } ] } } ``` ### Scenario: snapshot **Tool**: `snapshot_save` — Save a checkpoint of the current virtual time Save a named checkpoint of the CURRENT virtual time (RFC-0019) so you can later snapshot_restore back to it without tracking the vtime yourself. Returns a snapshot id. A thin id/vtime handle over the goto time-travel mechanism (re-running to the same vtime reproduces the same state, RFC-0008) — it remembers WHEN, it does not freeze/copy guest memory. Single-node sessions; the no-clock-read class (same contract as goto). Request: ```json { "jsonrpc": "2.0", "id": 90, "method": "tools/call", "params": { "name": "snapshot_save", "arguments": { "node_id": 0 } } } ``` Response: ```json { "jsonrpc": "2.0", "id": 90, "result": { "content": [ { "type": "text", "text": "snapshot snap-1 saved: node 0 @ vtime 3000000 ns" } ] } } ``` **Tool**: `snapshot_info` — List saved checkpoints List checkpoints saved this session via snapshot_save (id, node, vtime_ns), or describe one by id. Pure introspection — no guest I/O. Request: ```json { "jsonrpc": "2.0", "id": 91, "method": "tools/call", "params": { "name": "snapshot_info", "arguments": {} } } ``` Response: ```json { "jsonrpc": "2.0", "id": 91, "result": { "content": [ { "type": "text", "text": "snap-1: node 0 @ vtime 3000000 ns\n" } ] } } ``` **Tool**: `snapshot_restore` — Time-travel back to a saved checkpoint Time-travel back to a snapshot_save'd checkpoint by id — equivalent to goto(vtime_ns) at the vtime that was current when you called snapshot_save. A backward restore deterministically resets the node to boot and replays to that vtime (RFC-0008); a forward restore is an exact-landing advance. Single-node sessions only; the no-clock-read class. Fails loud on an unknown id — call snapshot_info to list saved ones. Request: ```json { "jsonrpc": "2.0", "id": 92, "method": "tools/call", "params": { "name": "snapshot_restore", "arguments": { "id": "snap-1" } } } ``` Response: ```json { "jsonrpc": "2.0", "id": 92, "result": { "content": [ { "type": "text", "text": "snapshot snap-1 restored: node 0 -> vtime 3000000 ns; goto reached 3000000 ns" } ] } } ``` ### Scenario: reverse continue ok **Tool**: `reverse_continue` — Rewind to a real write (the boot-time TX buffer store) Time-travel debugging (RFC-0019 B9), the genuinely-successful counterpart to lifecycle-reverse-continue: nrf52_uarte_tx_probe writes its "HELLO\n" TX buffer to 0x20000010 as its very first instructions (Reset_Handler, before UARTE_ENABLE), so this address has exactly one write, made near vtime 0 -- stable regardless of how far the shared session has otherwise advanced by the time this record runs. Run the sim via run_until first so trace capture precedes the query. Single-node sessions; the no-clock-read class. Request: ```json { "jsonrpc": "2.0", "id": 95, "method": "tools/call", "params": { "name": "reverse_continue", "arguments": { "node_id": 0, "last_write_to": 536870928 } } } ``` Response: ```json { "jsonrpc": "2.0", "id": 95, "result": { "content": [ { "type": "text", "text": "reverse_continue to last write to 0x20000010: vtime -> ; goto reached ns" } ] } } ``` ### Scenario: gpio **Tool**: `inject_frame` — Drive a GPIO input pin On the gpio_demo world the firmware's input port (IDR) is wired to link 1. Drive it by injecting a u32 little-endian pin word: to set IDR=0x00001234, send the 4 little-endian bytes 34120000 (NOT 00001234). The demo firmware spin-reads IDR and prints 'N0:idr=00001234' to the console once a nonzero word arrives (read it with read_console). Pass vtime_ns for a reproducible scenario; omit it (or 0) for as-soon-as-possible. Request: ```json { "jsonrpc": "2.0", "id": 51, "method": "tools/call", "params": { "name": "inject_frame", "arguments": { "link_id": 1, "data": "34120000", "vtime_ns": 5000000 } } } ``` Response: ```json { "jsonrpc": "2.0", "id": 51, "result": { "content": [ { "type": "text", "text": "injected at vtime 5000000 (link 1, seq 0, 4 bytes)" } ] } } ``` **Tool**: `read_link` — Observe a GPIO pin frame Tap link 1 with read_link to see the pin-state frames crossing the GPIO link on the gpio_demo world: the bytes you drove with inject_frame (your input edge) and the firmware's own ODR writes (its output edge) — each a u32 little-endian pin word. The observe stream buffers from the moment you first tap, so call read_link before advancing the clock to catch the firmware's boot-time ODR=0x0000ABCD edge (payload cdab0000). Request: ```json { "jsonrpc": "2.0", "id": 52, "method": "tools/call", "params": { "name": "read_link", "arguments": { "link_id": 1 } } } ``` Response: ```json { "jsonrpc": "2.0", "id": 52, "result": { "content": [ { "type": "text", "text": "[vtime 5000000 link 1 src node 4294967294 seq 0] 4 bytes: 34120000" } ] } } ``` ### Scenario: gpio h7 **Tool**: `inject_frame` — Drive a GPIO input pin on STM32H7 On the gpio_demo world the firmware's input port (IDR) is wired to link 1. Drive it by injecting a u32 little-endian pin word: to set IDR=0x00001234, send the 4 little-endian bytes 34120000 (NOT 00001234). The demo firmware spin-reads IDR and prints 'N0:idr=00001234' to the console once a nonzero word arrives (read it with read_console). Pass vtime_ns for a reproducible scenario; omit it (or 0) for as-soon-as-possible. Request: ```json { "jsonrpc": "2.0", "id": 51, "method": "tools/call", "params": { "name": "inject_frame", "arguments": { "link_id": 1, "data": "34120000", "vtime_ns": 5000000 } } } ``` Response: ```json { "jsonrpc": "2.0", "id": 51, "result": { "content": [ { "type": "text", "text": "injected at vtime 5000000 (link 1, seq 0, 4 bytes)" } ] } } ``` **Tool**: `read_link` — Observe a GPIO pin frame on STM32H7 Tap link 1 with read_link to see the pin-state frames crossing the GPIO link on the gpio_demo world: the bytes you drove with inject_frame (your input edge) and the firmware's own ODR writes (its output edge) — each a u32 little-endian pin word. The observe stream buffers from the moment you first tap, so call read_link before advancing the clock to catch the firmware's boot-time ODR=0x0000ABCD edge (payload cdab0000). Request: ```json { "jsonrpc": "2.0", "id": 52, "method": "tools/call", "params": { "name": "read_link", "arguments": { "link_id": 1 } } } ``` Response: ```json { "jsonrpc": "2.0", "id": 52, "result": { "content": [ { "type": "text", "text": "[vtime 5000000 link 1 src node 4294967294 seq 0] 4 bytes: 34120000" } ] } } ```