Verification Oracles

analyze_rules

POST /v1/analyze/rules. MCP: analyze_rules. Ordered first-match rules over bool, bounded int and finite enum inputs. No API key or account required. Zero-logging execution.

Input

variables: 1..64 unique names matching ^[a-zA-Z_][a-zA-Z0-9_]{0,47}$. bool: {name,type}. int: {name,type,min,max}, -1000000000 <= min <= max <= 1000000000. enum: {name,type,values}, 1..64 unique safe identifiers.

rules: 1..128 {id,when,action} records, unique IDs per version. IDs and actions: strings of 1..64 characters. First matching rule wins. Omitted default_action means an unmatched input has null output and counts as an uncovered gap. A default suppresses gaps. Explicit null on any optional field (default_action, compare_rules, compare_default_action, max_witnesses, timeout_ms) means omitted.

compare_rules: optional second ordered rule list using the same variables; compare_default_action defaults to no output. compare_default_action requires compare_rules. Semantic equality compares effective actions, including null for uncovered inputs; changing only rule IDs is equivalent. Diff witnesses include the exact selected rule IDs (null for default or uncovered).

Expressions

RuleExpr: {op:"true"}, {op:"false"}, {op:"and",args:[...]}, {op:"or",args:[...]}, {op:"not",arg:...}, {op:"eq"|"ne",var,value}, {op:"lt"|"le"|"gt"|"ge",var,value}, {op:"in",var,values:[...]}. Boolean arrays and membership lists are non-empty. Ordering requires int; membership requires int or enum. Constants must match the declared type and domain; bool is distinct from int. A comparison value may be {var:"other"} to compare two variables of the same type: ordering needs two ints; enums compare by value name, so enums with different value lists are equal only on shared names.

Each rule expression: depth <=16 (root depth 1), <=256 AST nodes. Boolean arrays <=255 children; membership <=256 values. Unknown variables, fields and operators, duplicate declarations and out-of-domain constants fail with INVALID_INPUT and structural paths. Input values never appear in errors.

Analysis

unreachable_rules: unsatisfiable guards or satisfiable guards shadowed by earlier rules. shadowed_by lists earlier intersecting rule IDs; their union covers the guard, and the list need not be minimal. overlaps: satisfiable guard pairs in source order, including shadowed rules; conflict is true exactly when actions differ. uncovered_gap: whether some input has no rule and no default, with a concrete witness.

diff: null without compare_rules; otherwise equivalent plus distinct diverging witnesses. max_witnesses: 1..20, default 10, separately caps overlap pairs and diff inputs. Lists are capped samples; complete means every required solver check finished within these caps, not that all witnesses or overlap pairs were enumerated.

Verification and limits

Every returned witness is independently evaluated against the original JSON AST in pure code: exact variable domains, both overlap guards and conflict flag, uncovered gap, and first-match actions and rule IDs for diffs. verified=true requires verdict=complete and all witness checks passing. Unreachability, absence of gaps, and equivalence remain solver-reported proofs; witness replay does not independently prove negative claims. Any witness mismatch aborts with INTERNAL_ERROR.

verdict: complete, timeout or unknown. Timeout and unknown return verified=false and no findings or witnesses. One timeout_ms budget covers encoding, all queries and verification: 100..5000, default 3000. The supervisor kills and reaps the process group at timeout_ms + 500 ms. Request <=65536 bytes; response <=262144 bytes; compute slots 3. Execution uses the isolated no-egress worker. No input retention.

Schemas

analyze_rules request

{
  "$defs": {
    "Int": {
      "maximum": 1000000000,
      "minimum": -1000000000,
      "type": "integer"
    },
    "Label": {
      "maxLength": 64,
      "minLength": 1,
      "type": "string"
    },
    "Name": {
      "maxLength": 48,
      "minLength": 1,
      "pattern": "^[a-zA-Z_][a-zA-Z0-9_]{0,47}$",
      "type": "string"
    },
    "Rule": {
      "additionalProperties": false,
      "properties": {
        "action": {
          "$ref": "#/$defs/Label"
        },
        "id": {
          "$ref": "#/$defs/Label"
        },
        "when": {
          "$ref": "#/$defs/RuleExpr"
        }
      },
      "required": [
        "id",
        "when",
        "action"
      ],
      "type": "object"
    },
    "RuleBoolVariable": {
      "additionalProperties": false,
      "properties": {
        "name": {
          "$ref": "#/$defs/Name"
        },
        "type": {
          "const": "bool",
          "type": "string"
        }
      },
      "required": [
        "name",
        "type"
      ],
      "type": "object"
    },
    "RuleBoolean": {
      "additionalProperties": false,
      "properties": {
        "args": {
          "items": {
            "$ref": "#/$defs/RuleExpr"
          },
          "maxItems": 255,
          "minItems": 1,
          "type": "array"
        },
        "op": {
          "enum": [
            "and",
            "or"
          ],
          "type": "string"
        }
      },
      "required": [
        "op",
        "args"
      ],
      "type": "object"
    },
    "RuleComparison": {
      "additionalProperties": false,
      "properties": {
        "op": {
          "enum": [
            "eq",
            "ne",
            "lt",
            "le",
            "gt",
            "ge"
          ],
          "type": "string"
        },
        "value": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "$ref": "#/$defs/Int"
            },
            {
              "$ref": "#/$defs/Name"
            },
            {
              "$ref": "#/$defs/VarRef"
            }
          ]
        },
        "var": {
          "$ref": "#/$defs/Name"
        }
      },
      "required": [
        "op",
        "var",
        "value"
      ],
      "type": "object"
    },
    "RuleConstant": {
      "additionalProperties": false,
      "properties": {
        "op": {
          "enum": [
            "true",
            "false"
          ],
          "type": "string"
        }
      },
      "required": [
        "op"
      ],
      "type": "object"
    },
    "RuleEnumVariable": {
      "additionalProperties": false,
      "properties": {
        "name": {
          "$ref": "#/$defs/Name"
        },
        "type": {
          "const": "enum",
          "type": "string"
        },
        "values": {
          "items": {
            "$ref": "#/$defs/Name"
          },
          "maxItems": 64,
          "minItems": 1,
          "type": "array"
        }
      },
      "required": [
        "name",
        "type",
        "values"
      ],
      "type": "object"
    },
    "RuleExpr": {
      "oneOf": [
        {
          "$ref": "#/$defs/RuleConstant"
        },
        {
          "$ref": "#/$defs/RuleBoolean"
        },
        {
          "$ref": "#/$defs/RuleNot"
        },
        {
          "$ref": "#/$defs/RuleComparison"
        },
        {
          "$ref": "#/$defs/RuleMembership"
        }
      ]
    },
    "RuleIntVariable": {
      "additionalProperties": false,
      "properties": {
        "max": {
          "$ref": "#/$defs/Int"
        },
        "min": {
          "$ref": "#/$defs/Int"
        },
        "name": {
          "$ref": "#/$defs/Name"
        },
        "type": {
          "const": "int",
          "type": "string"
        }
      },
      "required": [
        "name",
        "type",
        "min",
        "max"
      ],
      "type": "object"
    },
    "RuleMembership": {
      "additionalProperties": false,
      "properties": {
        "op": {
          "const": "in",
          "type": "string"
        },
        "values": {
          "items": {
            "anyOf": [
              {
                "$ref": "#/$defs/Int"
              },
              {
                "$ref": "#/$defs/Name"
              }
            ]
          },
          "maxItems": 256,
          "minItems": 1,
          "type": "array"
        },
        "var": {
          "$ref": "#/$defs/Name"
        }
      },
      "required": [
        "op",
        "var",
        "values"
      ],
      "type": "object"
    },
    "RuleNot": {
      "additionalProperties": false,
      "properties": {
        "arg": {
          "$ref": "#/$defs/RuleExpr"
        },
        "op": {
          "const": "not",
          "type": "string"
        }
      },
      "required": [
        "op",
        "arg"
      ],
      "type": "object"
    },
    "VarRef": {
      "additionalProperties": false,
      "properties": {
        "var": {
          "$ref": "#/$defs/Name"
        }
      },
      "required": [
        "var"
      ],
      "type": "object"
    }
  },
  "additionalProperties": false,
  "properties": {
    "compare_default_action": {
      "anyOf": [
        {
          "$ref": "#/$defs/Label"
        },
        {
          "type": "null"
        }
      ]
    },
    "compare_rules": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/Rule"
          },
          "maxItems": 128,
          "minItems": 1,
          "type": "array"
        },
        {
          "type": "null"
        }
      ]
    },
    "default_action": {
      "anyOf": [
        {
          "$ref": "#/$defs/Label"
        },
        {
          "type": "null"
        }
      ]
    },
    "max_witnesses": {
      "anyOf": [
        {
          "maximum": 20,
          "minimum": 1,
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": 10
    },
    "rules": {
      "items": {
        "$ref": "#/$defs/Rule"
      },
      "maxItems": 128,
      "minItems": 1,
      "type": "array"
    },
    "timeout_ms": {
      "anyOf": [
        {
          "maximum": 5000,
          "minimum": 100,
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": 3000
    },
    "variables": {
      "items": {
        "oneOf": [
          {
            "$ref": "#/$defs/RuleBoolVariable"
          },
          {
            "$ref": "#/$defs/RuleIntVariable"
          },
          {
            "$ref": "#/$defs/RuleEnumVariable"
          }
        ]
      },
      "maxItems": 64,
      "minItems": 1,
      "type": "array"
    }
  },
  "required": [
    "variables",
    "rules"
  ],
  "type": "object"
}

analyze_rules response

{
  "$defs": {
    "Label": {
      "maxLength": 64,
      "minLength": 1,
      "type": "string"
    },
    "RuleDiff": {
      "additionalProperties": false,
      "properties": {
        "equivalent": {
          "type": "boolean"
        },
        "witnesses": {
          "items": {
            "$ref": "#/$defs/RuleDiffWitness"
          },
          "maxItems": 20,
          "type": "array"
        }
      },
      "required": [
        "equivalent",
        "witnesses"
      ],
      "type": "object"
    },
    "RuleDiffWitness": {
      "additionalProperties": false,
      "properties": {
        "input": {
          "$ref": "#/$defs/Witness"
        },
        "v1_action": {
          "anyOf": [
            {
              "$ref": "#/$defs/Label"
            },
            {
              "type": "null"
            }
          ]
        },
        "v1_rule": {
          "anyOf": [
            {
              "$ref": "#/$defs/Label"
            },
            {
              "type": "null"
            }
          ]
        },
        "v2_action": {
          "anyOf": [
            {
              "$ref": "#/$defs/Label"
            },
            {
              "type": "null"
            }
          ]
        },
        "v2_rule": {
          "anyOf": [
            {
              "$ref": "#/$defs/Label"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "input",
        "v1_action",
        "v2_action",
        "v1_rule",
        "v2_rule"
      ],
      "type": "object"
    },
    "RuleGap": {
      "additionalProperties": false,
      "properties": {
        "has_gap": {
          "type": "boolean"
        },
        "witness": {
          "anyOf": [
            {
              "$ref": "#/$defs/Witness"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "has_gap"
      ],
      "type": "object"
    },
    "RuleOverlap": {
      "additionalProperties": false,
      "properties": {
        "conflict": {
          "type": "boolean"
        },
        "rule_a": {
          "$ref": "#/$defs/Label"
        },
        "rule_b": {
          "$ref": "#/$defs/Label"
        },
        "witness": {
          "$ref": "#/$defs/Witness"
        }
      },
      "required": [
        "rule_a",
        "rule_b",
        "conflict",
        "witness"
      ],
      "type": "object"
    },
    "Stats": {
      "additionalProperties": false,
      "properties": {
        "elapsed_ms": {
          "minimum": 0,
          "type": "integer"
        },
        "timed_out": {
          "type": "boolean"
        }
      },
      "required": [
        "elapsed_ms",
        "timed_out"
      ],
      "type": "object"
    },
    "UnreachableRule": {
      "additionalProperties": false,
      "properties": {
        "id": {
          "$ref": "#/$defs/Label"
        },
        "reason": {
          "enum": [
            "unsatisfiable",
            "shadowed"
          ],
          "type": "string"
        },
        "shadowed_by": {
          "items": {
            "$ref": "#/$defs/Label"
          },
          "type": "array"
        }
      },
      "required": [
        "id",
        "reason"
      ],
      "type": "object"
    },
    "Witness": {
      "additionalProperties": {
        "anyOf": [
          {
            "type": "boolean"
          },
          {
            "type": "integer"
          },
          {
            "type": "string"
          }
        ]
      },
      "type": "object"
    }
  },
  "additionalProperties": false,
  "properties": {
    "diff": {
      "anyOf": [
        {
          "$ref": "#/$defs/RuleDiff"
        },
        {
          "type": "null"
        }
      ]
    },
    "overlaps": {
      "items": {
        "$ref": "#/$defs/RuleOverlap"
      },
      "maxItems": 20,
      "type": "array"
    },
    "stats": {
      "$ref": "#/$defs/Stats"
    },
    "uncovered_gap": {
      "anyOf": [
        {
          "$ref": "#/$defs/RuleGap"
        },
        {
          "type": "null"
        }
      ]
    },
    "unreachable_rules": {
      "items": {
        "$ref": "#/$defs/UnreachableRule"
      },
      "maxItems": 128,
      "type": "array"
    },
    "verdict": {
      "enum": [
        "complete",
        "timeout",
        "unknown"
      ],
      "type": "string"
    },
    "verified": {
      "type": "boolean"
    }
  },
  "required": [
    "verdict",
    "verified",
    "stats"
  ],
  "type": "object"
}

Errors

INVALID_INPUT: HTTP 422. INTERNAL_ERROR: HTTP 500 with no unverified witness. Other shared limits and errors are listed in the constraint reference.

{
  "error": {
    "code": "INVALID_INPUT",
    "docs_resource": "oracle://docs/verification-oracles",
    "docs_url": "https://oracles.burgeonads.com/docs/verification-oracles.md",
    "example_resource": "oracle://examples/rules-rbac-gap-overlap",
    "example_url": "https://oracles.burgeonads.com/examples/rules-rbac-gap-overlap.json",
    "message": "Schema validation failed."
  }
}

MCP Resources

oracle://docs/schema-compat, oracle://docs/overview, oracle://docs/constraint-oracle, oracle://docs/verification-oracles, oracle://docs/full, oracle://examples, oracle://examples/{slug}. Read-only; no compute slot.

MCP Prompts

check_schema_compat(), diff_regex(), check_state_machine(), verify_rules(), model_schedule(engine), debug_unsat(tool), optimize_linear(), optimize_allocation(pattern, sense). All arguments optional.

Solver tool annotations: readOnlyHint=true, destructiveHint=false, idempotentHint=true, openWorldHint=false. submit_feedback: readOnlyHint=false, destructiveHint=false, idempotentHint=false, openWorldHint=false. outputSchema: verified result or error envelope.

verify_state_machine

POST /v1/verify/state-machine. MCP: verify_state_machine. Deterministic bounded BFS over finite state variables. Declared initial-state and transition order breaks shortest-trace ties.

State variables and expressions

variables: 1..16 unique safe names. bool: {name,type}. int: {name,type,min,max}, -1000000 <= min <= max <= 1000000, max-min <=1000. enum: {name,type,values}, 1..32 unique safe identifiers. Names and enum values match ^[a-zA-Z_][a-zA-Z0-9_]{0,47}$. Exactly one of initial or initial_states (1..16 complete states). Values must match types and domains; bool is distinct from int. Explicit null on any optional field means omitted, so the unused initial form may be null.

transitions: 1..64 {name,guard,updates}, unique names. StateExpr extends RuleExpr: comparison value can be {var:"other"}, with matching types. Ordering requires int; membership requires int or enum. Guard constants must be in domain. UpdateExpr: {op:"const",value}, {op:"var",var}, {op:"add"|"sub",left,right}, {op:"clamp",arg,min,max}. Constants and clamp bounds are -1000000..1000000; arithmetic operands must be int. Every update reads the old state simultaneously; omitted variables retain their value. Any out-of-domain result is a domain_violation, never silently clamped.

Each guard, update, invariant, terminal condition or goal AST has depth <=16 and <=256 nodes. Boolean arrays have 1..255 children. Membership has 1..256 values. invariants: 0..32 {name,expr}; reachability: 0..16 {name,expr}; unique names in each list. Unknown fields, operators, variables and mistyped expressions return non-reflecting INVALID_INPUT errors.

Exploration and replay

check_deadlocks defaults true. A deadlock has no enabled transitions and does not satisfy optional terminal_condition. Terminal states still obey invariants and may have outgoing transitions. BFS stops at the first shortest invariant, domain or deadlock counterexample; multiple failed invariants at that state share its trace. Domain traces include the invalid final state and name the first violated variable in declaration order.

Traces: [{step:0,transition:null,state:{...}}, ...]. Independent pure replay checks initial membership, step numbers, every guard, simultaneous updates, exact values and types, domains and the claimed final condition. Every returned goal witness is replayed too. verified_safe additionally requires an independent complete traversal proving finite closure, all invariants, deadlock freedom and negative reachability claims. Any mismatch returns INTERNAL_ERROR.

status: verified_safe requires exhaustive=true; counterexample_found carries verified=true only after replay. state_limit_reached and timeout have verified=false and exhaustive=false. state_limit_reached includes depth truncation. No unseen successor beyond a cap can produce a safety claim. Exact-cap closure and cycles may still be exhaustive.

Livelocks

check_livelocks defaults false. When true, a livelock is a reachable cycle whose states, and the path to it, never satisfy terminal_condition: an infinite execution that never terminates. Without terminal_condition every reachable cycle is a livelock, including a self-loop transition that leaves the state unchanged. Cycles reachable only through a terminal state are not livelocks. No fairness is assumed: one enabled loop is enough.

livelock: {found, loop_start, trace}. trace is a lasso: steps 0..loop_start reach the loop, and the final state repeats trace[loop_start].state, so the loop repeats forever. The loop is a shortest cycle through the shallowest state of a cyclic component; the lasso is short, not necessarily globally shortest, and its transitions never exceed max_depth. Search runs after BFS on every explored edge, so a partial exploration may still return a verified livelock. Safety counterexamples found during BFS are returned first.

Replay checks the lasso like every trace, plus the repeated state and that no step satisfies terminal_condition. verified_safe with check_livelocks also requires an independent traversal and cycle elimination by in-degree proving that no reachable non-terminal cycle exists. With check_deadlocks too, verified_safe proves every execution eventually reaches terminal_condition. A livelock whose lasso exceeds max_depth gives state_limit_reached.

reachability records have goal, reachable and trace. reachable=true has a shortest witness; false means exhaustive unreachability; null means no witness was found before stopping. unreachable_transitions is populated only after exhaustive exploration. states_explored counts valid dequeued states; transitions_fired counts enabled updates evaluated, including repeats and depth-frontier checks. Incomplete exploration does not claim unreachable goals or transitions.

Limits

max_states 1..20000, default 5000; max_depth 1..200, default 50, initial depth 0. timeout_ms 100..5000, default 3000, covers exploration and independent verification. Timeout discards partial findings. The supervisor kills and reaps the process group at timeout_ms +500 ms. Request <=65536 bytes; response <=262144 bytes, including MCP wrapping; oversized traces return RESOURCE_LIMIT_EXCEEDED. Same isolated worker, three compute slots, payment hook and aggregate-only telemetry as other tools.

verify_state_machine schemas

verify_state_machine request

{
  "$defs": {
    "FsmEnumVariable": {
      "additionalProperties": false,
      "properties": {
        "name": {
          "$ref": "#/$defs/Name"
        },
        "type": {
          "const": "enum",
          "type": "string"
        },
        "values": {
          "items": {
            "$ref": "#/$defs/Name"
          },
          "maxItems": 32,
          "minItems": 1,
          "type": "array"
        }
      },
      "required": [
        "name",
        "type",
        "values"
      ],
      "type": "object"
    },
    "FsmIntVariable": {
      "additionalProperties": false,
      "properties": {
        "max": {
          "$ref": "#/$defs/StateInt"
        },
        "min": {
          "$ref": "#/$defs/StateInt"
        },
        "name": {
          "$ref": "#/$defs/Name"
        },
        "type": {
          "const": "int",
          "type": "string"
        }
      },
      "required": [
        "name",
        "type",
        "min",
        "max"
      ],
      "type": "object"
    },
    "FsmPredicate": {
      "additionalProperties": false,
      "properties": {
        "expr": {
          "$ref": "#/$defs/StateExpr"
        },
        "name": {
          "$ref": "#/$defs/Name"
        }
      },
      "required": [
        "name",
        "expr"
      ],
      "type": "object"
    },
    "FsmState": {
      "maxProperties": 16,
      "patternProperties": {
        "^[a-zA-Z_][a-zA-Z0-9_]{0,47}$": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "integer"
            },
            {
              "$ref": "#/$defs/Name"
            }
          ]
        }
      },
      "propertyNames": {
        "maxLength": 48,
        "minLength": 1
      },
      "type": "object"
    },
    "FsmTransition": {
      "additionalProperties": false,
      "properties": {
        "guard": {
          "$ref": "#/$defs/StateExpr"
        },
        "name": {
          "$ref": "#/$defs/Name"
        },
        "updates": {
          "maxProperties": 16,
          "patternProperties": {
            "^[a-zA-Z_][a-zA-Z0-9_]{0,47}$": {
              "$ref": "#/$defs/UpdateExpr"
            }
          },
          "propertyNames": {
            "maxLength": 48,
            "minLength": 1
          },
          "type": "object"
        }
      },
      "required": [
        "name",
        "guard",
        "updates"
      ],
      "type": "object"
    },
    "Int": {
      "maximum": 1000000000,
      "minimum": -1000000000,
      "type": "integer"
    },
    "Name": {
      "maxLength": 48,
      "minLength": 1,
      "pattern": "^[a-zA-Z_][a-zA-Z0-9_]{0,47}$",
      "type": "string"
    },
    "RuleBoolVariable": {
      "additionalProperties": false,
      "properties": {
        "name": {
          "$ref": "#/$defs/Name"
        },
        "type": {
          "const": "bool",
          "type": "string"
        }
      },
      "required": [
        "name",
        "type"
      ],
      "type": "object"
    },
    "RuleConstant": {
      "additionalProperties": false,
      "properties": {
        "op": {
          "enum": [
            "true",
            "false"
          ],
          "type": "string"
        }
      },
      "required": [
        "op"
      ],
      "type": "object"
    },
    "RuleMembership": {
      "additionalProperties": false,
      "properties": {
        "op": {
          "const": "in",
          "type": "string"
        },
        "values": {
          "items": {
            "anyOf": [
              {
                "$ref": "#/$defs/Int"
              },
              {
                "$ref": "#/$defs/Name"
              }
            ]
          },
          "maxItems": 256,
          "minItems": 1,
          "type": "array"
        },
        "var": {
          "$ref": "#/$defs/Name"
        }
      },
      "required": [
        "op",
        "var",
        "values"
      ],
      "type": "object"
    },
    "StateBoolean": {
      "additionalProperties": false,
      "properties": {
        "args": {
          "items": {
            "$ref": "#/$defs/StateExpr"
          },
          "maxItems": 255,
          "minItems": 1,
          "type": "array"
        },
        "op": {
          "enum": [
            "and",
            "or"
          ],
          "type": "string"
        }
      },
      "required": [
        "op",
        "args"
      ],
      "type": "object"
    },
    "StateComparison": {
      "additionalProperties": false,
      "properties": {
        "op": {
          "enum": [
            "eq",
            "ne",
            "lt",
            "le",
            "gt",
            "ge"
          ],
          "type": "string"
        },
        "value": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "$ref": "#/$defs/StateInt"
            },
            {
              "$ref": "#/$defs/Name"
            },
            {
              "$ref": "#/$defs/VarRef"
            }
          ]
        },
        "var": {
          "$ref": "#/$defs/Name"
        }
      },
      "required": [
        "op",
        "var",
        "value"
      ],
      "type": "object"
    },
    "StateExpr": {
      "oneOf": [
        {
          "$ref": "#/$defs/RuleConstant"
        },
        {
          "$ref": "#/$defs/StateBoolean"
        },
        {
          "$ref": "#/$defs/StateNot"
        },
        {
          "$ref": "#/$defs/StateComparison"
        },
        {
          "$ref": "#/$defs/RuleMembership"
        }
      ]
    },
    "StateInt": {
      "maximum": 1000000,
      "minimum": -1000000,
      "type": "integer"
    },
    "StateNot": {
      "additionalProperties": false,
      "properties": {
        "arg": {
          "$ref": "#/$defs/StateExpr"
        },
        "op": {
          "const": "not",
          "type": "string"
        }
      },
      "required": [
        "op",
        "arg"
      ],
      "type": "object"
    },
    "UpdateArithmetic": {
      "additionalProperties": false,
      "properties": {
        "left": {
          "$ref": "#/$defs/UpdateExpr"
        },
        "op": {
          "enum": [
            "add",
            "sub"
          ],
          "type": "string"
        },
        "right": {
          "$ref": "#/$defs/UpdateExpr"
        }
      },
      "required": [
        "op",
        "left",
        "right"
      ],
      "type": "object"
    },
    "UpdateClamp": {
      "additionalProperties": false,
      "properties": {
        "arg": {
          "$ref": "#/$defs/UpdateExpr"
        },
        "max": {
          "$ref": "#/$defs/StateInt"
        },
        "min": {
          "$ref": "#/$defs/StateInt"
        },
        "op": {
          "const": "clamp",
          "type": "string"
        }
      },
      "required": [
        "op",
        "arg",
        "min",
        "max"
      ],
      "type": "object"
    },
    "UpdateConstant": {
      "additionalProperties": false,
      "properties": {
        "op": {
          "const": "const",
          "type": "string"
        },
        "value": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "$ref": "#/$defs/StateInt"
            },
            {
              "$ref": "#/$defs/Name"
            }
          ]
        }
      },
      "required": [
        "op",
        "value"
      ],
      "type": "object"
    },
    "UpdateExpr": {
      "oneOf": [
        {
          "$ref": "#/$defs/UpdateConstant"
        },
        {
          "$ref": "#/$defs/UpdateReference"
        },
        {
          "$ref": "#/$defs/UpdateArithmetic"
        },
        {
          "$ref": "#/$defs/UpdateClamp"
        }
      ]
    },
    "UpdateReference": {
      "additionalProperties": false,
      "properties": {
        "op": {
          "const": "var",
          "type": "string"
        },
        "var": {
          "$ref": "#/$defs/Name"
        }
      },
      "required": [
        "op",
        "var"
      ],
      "type": "object"
    },
    "VarRef": {
      "additionalProperties": false,
      "properties": {
        "var": {
          "$ref": "#/$defs/Name"
        }
      },
      "required": [
        "var"
      ],
      "type": "object"
    }
  },
  "additionalProperties": false,
  "anyOf": [
    {
      "required": [
        "initial"
      ]
    },
    {
      "required": [
        "initial_states"
      ]
    }
  ],
  "properties": {
    "check_deadlocks": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": true
    },
    "check_livelocks": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "default": false
    },
    "initial": {
      "anyOf": [
        {
          "$ref": "#/$defs/FsmState"
        },
        {
          "type": "null"
        }
      ]
    },
    "initial_states": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/FsmState"
          },
          "maxItems": 16,
          "minItems": 1,
          "type": "array"
        },
        {
          "type": "null"
        }
      ]
    },
    "invariants": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/FsmPredicate"
          },
          "maxItems": 32,
          "type": "array"
        },
        {
          "type": "null"
        }
      ]
    },
    "max_depth": {
      "anyOf": [
        {
          "maximum": 200,
          "minimum": 1,
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": 50
    },
    "max_states": {
      "anyOf": [
        {
          "maximum": 20000,
          "minimum": 1,
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": 5000
    },
    "reachability": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/FsmPredicate"
          },
          "maxItems": 16,
          "type": "array"
        },
        {
          "type": "null"
        }
      ]
    },
    "terminal_condition": {
      "anyOf": [
        {
          "$ref": "#/$defs/StateExpr"
        },
        {
          "type": "null"
        }
      ]
    },
    "timeout_ms": {
      "anyOf": [
        {
          "maximum": 5000,
          "minimum": 100,
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "default": 3000
    },
    "transitions": {
      "items": {
        "$ref": "#/$defs/FsmTransition"
      },
      "maxItems": 64,
      "minItems": 1,
      "type": "array"
    },
    "variables": {
      "items": {
        "oneOf": [
          {
            "$ref": "#/$defs/RuleBoolVariable"
          },
          {
            "$ref": "#/$defs/FsmIntVariable"
          },
          {
            "$ref": "#/$defs/FsmEnumVariable"
          }
        ]
      },
      "maxItems": 16,
      "minItems": 1,
      "type": "array"
    }
  },
  "required": [
    "variables",
    "transitions"
  ],
  "type": "object"
}

verify_state_machine response

{
  "$defs": {
    "FsmDeadlock": {
      "additionalProperties": false,
      "properties": {
        "found": {
          "default": false,
          "type": "boolean"
        },
        "trace": {
          "anyOf": [
            {
              "$ref": "#/$defs/Trace"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "type": "object"
    },
    "FsmDomainViolation": {
      "additionalProperties": false,
      "properties": {
        "trace": {
          "$ref": "#/$defs/Trace"
        },
        "variable": {
          "$ref": "#/$defs/Name"
        }
      },
      "required": [
        "variable",
        "trace"
      ],
      "type": "object"
    },
    "FsmInvariantViolation": {
      "additionalProperties": false,
      "properties": {
        "invariant": {
          "$ref": "#/$defs/Name"
        },
        "trace": {
          "$ref": "#/$defs/Trace"
        }
      },
      "required": [
        "invariant",
        "trace"
      ],
      "type": "object"
    },
    "FsmLivelock": {
      "additionalProperties": false,
      "properties": {
        "found": {
          "default": false,
          "type": "boolean"
        },
        "loop_start": {
          "anyOf": [
            {
              "maximum": 199,
              "minimum": 0,
              "type": "integer"
            },
            {
              "type": "null"
            }
          ]
        },
        "trace": {
          "anyOf": [
            {
              "$ref": "#/$defs/Trace"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "type": "object"
    },
    "FsmReachability": {
      "additionalProperties": false,
      "properties": {
        "goal": {
          "$ref": "#/$defs/Name"
        },
        "reachable": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ]
        },
        "trace": {
          "anyOf": [
            {
              "$ref": "#/$defs/Trace"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "goal",
        "reachable"
      ],
      "type": "object"
    },
    "FsmState": {
      "maxProperties": 16,
      "patternProperties": {
        "^[a-zA-Z_][a-zA-Z0-9_]{0,47}$": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "integer"
            },
            {
              "$ref": "#/$defs/Name"
            }
          ]
        }
      },
      "propertyNames": {
        "maxLength": 48,
        "minLength": 1
      },
      "type": "object"
    },
    "FsmStep": {
      "additionalProperties": false,
      "properties": {
        "state": {
          "$ref": "#/$defs/FsmState"
        },
        "step": {
          "maximum": 200,
          "minimum": 0,
          "type": "integer"
        },
        "transition": {
          "anyOf": [
            {
              "$ref": "#/$defs/Name"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "step",
        "transition",
        "state"
      ],
      "type": "object"
    },
    "Name": {
      "maxLength": 48,
      "minLength": 1,
      "pattern": "^[a-zA-Z_][a-zA-Z0-9_]{0,47}$",
      "type": "string"
    },
    "Stats": {
      "additionalProperties": false,
      "properties": {
        "elapsed_ms": {
          "minimum": 0,
          "type": "integer"
        },
        "timed_out": {
          "type": "boolean"
        }
      },
      "required": [
        "elapsed_ms",
        "timed_out"
      ],
      "type": "object"
    },
    "Trace": {
      "items": {
        "$ref": "#/$defs/FsmStep"
      },
      "maxItems": 201,
      "minItems": 1,
      "type": "array"
    }
  },
  "additionalProperties": false,
  "properties": {
    "deadlock": {
      "$ref": "#/$defs/FsmDeadlock"
    },
    "domain_violations": {
      "items": {
        "$ref": "#/$defs/FsmDomainViolation"
      },
      "maxItems": 1,
      "type": "array"
    },
    "exhaustive": {
      "default": false,
      "type": "boolean"
    },
    "invariant_violations": {
      "items": {
        "$ref": "#/$defs/FsmInvariantViolation"
      },
      "maxItems": 32,
      "type": "array"
    },
    "livelock": {
      "$ref": "#/$defs/FsmLivelock"
    },
    "reachability": {
      "items": {
        "$ref": "#/$defs/FsmReachability"
      },
      "maxItems": 16,
      "type": "array"
    },
    "states_explored": {
      "default": 0,
      "maximum": 20000,
      "minimum": 0,
      "type": "integer"
    },
    "stats": {
      "$ref": "#/$defs/Stats"
    },
    "status": {
      "enum": [
        "verified_safe",
        "counterexample_found",
        "state_limit_reached",
        "timeout"
      ],
      "type": "string"
    },
    "transitions_fired": {
      "default": 0,
      "maximum": 1280000,
      "minimum": 0,
      "type": "integer"
    },
    "unreachable_transitions": {
      "items": {
        "$ref": "#/$defs/Name"
      },
      "maxItems": 64,
      "type": "array"
    },
    "verified": {
      "type": "boolean"
    }
  },
  "required": [
    "status",
    "verified",
    "stats"
  ],
  "type": "object"
}

analyze_regex

POST /v1/analyze/regex. MCP: analyze_regex. Exact full-string regular-language analysis over printable ASCII plus tab, newline and carriage return (98 characters). No backtracking matching is used.

Regular subset

Literals, escaped literals, \d \w \s and their uppercase negations, \t \n \r, \xHH, dot (excludes newline), character classes with ranges and negation, groups, non-capturing groups, alternation, *, +, ?, {m}, {m,}, {m,n}. Boundary ^ and $ are redundant full-string anchors; internal anchors are rejected. Character classes and negations are relative to the character domain; \w is ASCII letters, digits and underscore. Lazy quantifiers preserve the same path set.

Backreferences, lookarounds, atomic groups, possessive quantifiers, inline flags, word boundaries, recursion and class set operations return HTTP 400 UNSUPPORTED_FEATURE naming only a static construct class. Malformed syntax returns HTTP 422 INVALID_INPUT with structural field and column. No raw pattern text appears in errors.

Language and difference

empty and universal describe the complete language over the character domain. max_samples 0..20, default 5, separately caps distinct matching_samples and non_matching_samples. Samples are shortest-first; deterministic ties use lowercase, digits, uppercase, punctuation, space, tab, newline, carriage return. Fewer samples mean that language side is exhausted.

compare_pattern is optional and must be omitted rather than null. equivalence is null without it; otherwise exact product exploration returns equivalent and the shortest only_in_pattern and only_in_compare witnesses. A null witness means that side of the symmetric difference is empty. The empty string is a valid witness.

Ambiguity certificates

check_ambiguity defaults true; false returns ambiguity=null. risk_class: none, finite, polynomial or exponential. A weighted position NFA self-product detects two distinct accepting paths. Two distinct same-word cycles at one live state prove exponential ambiguity; synchronized paths p->p, p->q and q->q, p!=q, prove polynomial ambiguity after exponential ambiguity is excluded. Finite ambiguity has a concrete dual-path string and no pump.

Optional loop iterations must consume input; required iterations may be empty. This progress guard prevents empty iterations alone creating infinite path counts. Counts describe syntactic NFA paths, independent of greedy or lazy order. Ambiguity describes path growth, not measured runtime or a claim about a particular matching engine.

A pumped witness accepts prefix + pump^k + suffix for all k>=1; example_string uses k=2. accepting_paths lists exact saturated counts for k=1,2,3,4 (finite: one count), capped at 1000000000000000. The cycle certificate proves growth for every k. attack_suffix is a separate rejection suffix: prefix + pump^k + attack_suffix is rejected for every k>=1. It may be empty, or null when no common rejection suffix exists, including universal languages. suffix is the accepting continuation.

paths contains two distinct compact accepting NFA paths for example_string; pump_paths contains two exponential cycle paths or the three polynomial paths. states: 0 is entry, 1..N are consuming positions in AST expansion order, -1 is accepting exit. choices selects a zero-based epsilon-route ordinal for each edge. Multiplicity is established by independent lockstep count propagation, without enumerating paths.

Verification and bounds

An independent epsilon-NFA compiler checks membership in linear time per string, every diff side, shortest witness lengths, emptiness, universality and exact equivalence by separate state-set exploration. It independently eliminates epsilon routes to replay every compact path and pump structure, recounts paths, proves negative ambiguity claims by a self-product, independently excludes higher growth classes with synchronized-product SCC and triple-path checks, and checks the entire periodic pump-state orbit for an attack suffix. A mismatch returns INTERNAL_ERROR with no findings.

Patterns: 1..1024 ASCII bytes, <=512 syntax nodes, group depth <=32, repeat bounds 0..64, <=2048 expanded character positions and <=8192 expanded syntax nodes. DFA <=4096 states each; product <=65536 states; weighted edges <=262144; analysis work <=2000000 steps; each returned string <=16384 characters. Verification has its own bounded exploration. Exceeding a cap returns HTTP 422 RESOURCE_LIMIT_EXCEEDED with no partial findings.

timeout_ms 100..5000, default 3000, covers construction and independent verification. Timeout returns verdict=timeout, verified=false and no findings; complete results require verified=true. The supervisor kills and reaps the process group at timeout_ms +500 ms. Same isolated worker, 65536-byte request, 262144-byte response including MCP wrapping, three compute slots and aggregate-only telemetry.

analyze_regex schemas

analyze_regex request

{
  "additionalProperties": false,
  "properties": {
    "check_ambiguity": {
      "default": true,
      "type": "boolean"
    },
    "compare_pattern": {
      "maxLength": 1024,
      "minLength": 1,
      "type": "string"
    },
    "max_samples": {
      "default": 5,
      "maximum": 20,
      "minimum": 0,
      "type": "integer"
    },
    "pattern": {
      "maxLength": 1024,
      "minLength": 1,
      "type": "string"
    },
    "timeout_ms": {
      "default": 3000,
      "maximum": 5000,
      "minimum": 100,
      "type": "integer"
    }
  },
  "required": [
    "pattern"
  ],
  "type": "object"
}

analyze_regex response

{
  "$defs": {
    "RegexAmbiguity": {
      "additionalProperties": false,
      "properties": {
        "ambiguous": {
          "type": "boolean"
        },
        "risk_class": {
          "enum": [
            "none",
            "finite",
            "polynomial",
            "exponential"
          ],
          "type": "string"
        },
        "witness": {
          "anyOf": [
            {
              "$ref": "#/$defs/RegexWitness"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "ambiguous",
        "risk_class"
      ],
      "type": "object"
    },
    "RegexEquivalence": {
      "additionalProperties": false,
      "properties": {
        "equivalent": {
          "type": "boolean"
        },
        "only_in_compare": {
          "anyOf": [
            {
              "$ref": "#/$defs/Text"
            },
            {
              "type": "null"
            }
          ]
        },
        "only_in_pattern": {
          "anyOf": [
            {
              "$ref": "#/$defs/Text"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "equivalent"
      ],
      "type": "object"
    },
    "RegexPath": {
      "additionalProperties": false,
      "properties": {
        "choices": {
          "items": {
            "maximum": 1000000000000000,
            "minimum": 0,
            "type": "integer"
          },
          "maxItems": 16385,
          "type": "array"
        },
        "states": {
          "items": {
            "maximum": 2048,
            "minimum": -1,
            "type": "integer"
          },
          "maxItems": 16386,
          "minItems": 1,
          "type": "array"
        }
      },
      "required": [
        "states",
        "choices"
      ],
      "type": "object"
    },
    "RegexWitness": {
      "additionalProperties": false,
      "properties": {
        "accepting_paths": {
          "items": {
            "maximum": 1000000000000000,
            "minimum": 1,
            "type": "integer"
          },
          "maxItems": 4,
          "minItems": 1,
          "type": "array"
        },
        "attack_suffix": {
          "anyOf": [
            {
              "$ref": "#/$defs/Text"
            },
            {
              "type": "null"
            }
          ]
        },
        "example_string": {
          "$ref": "#/$defs/Text"
        },
        "paths": {
          "items": {
            "$ref": "#/$defs/RegexPath"
          },
          "maxItems": 2,
          "minItems": 2,
          "type": "array"
        },
        "prefix": {
          "anyOf": [
            {
              "$ref": "#/$defs/Text"
            },
            {
              "type": "null"
            }
          ]
        },
        "pump": {
          "anyOf": [
            {
              "$ref": "#/$defs/Text"
            },
            {
              "type": "null"
            }
          ]
        },
        "pump_paths": {
          "items": {
            "$ref": "#/$defs/RegexPath"
          },
          "maxItems": 3,
          "type": "array"
        },
        "suffix": {
          "anyOf": [
            {
              "$ref": "#/$defs/Text"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "example_string",
        "accepting_paths",
        "paths"
      ],
      "type": "object"
    },
    "Stats": {
      "additionalProperties": false,
      "properties": {
        "elapsed_ms": {
          "minimum": 0,
          "type": "integer"
        },
        "timed_out": {
          "type": "boolean"
        }
      },
      "required": [
        "elapsed_ms",
        "timed_out"
      ],
      "type": "object"
    },
    "Text": {
      "maxLength": 16384,
      "type": "string"
    }
  },
  "additionalProperties": false,
  "properties": {
    "ambiguity": {
      "anyOf": [
        {
          "$ref": "#/$defs/RegexAmbiguity"
        },
        {
          "type": "null"
        }
      ]
    },
    "empty": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ]
    },
    "equivalence": {
      "anyOf": [
        {
          "$ref": "#/$defs/RegexEquivalence"
        },
        {
          "type": "null"
        }
      ]
    },
    "matching_samples": {
      "items": {
        "$ref": "#/$defs/Text"
      },
      "maxItems": 20,
      "type": "array"
    },
    "non_matching_samples": {
      "items": {
        "$ref": "#/$defs/Text"
      },
      "maxItems": 20,
      "type": "array"
    },
    "stats": {
      "$ref": "#/$defs/Stats"
    },
    "universal": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ]
    },
    "verdict": {
      "enum": [
        "complete",
        "timeout"
      ],
      "type": "string"
    },
    "verified": {
      "type": "boolean"
    }
  },
  "required": [
    "verdict",
    "verified",
    "stats"
  ],
  "type": "object"
}

check_schema_compat

POST /v1/check/schema-compat. MCP: check_schema_compat. Send old_schema, new_schema and optional timeout_ms (100..5000, default 3000). No API key or account required. Zero-logging execution.

Directions and results

Backward: every payload accepted by old_schema is accepted by new_schema. Forward: every payload accepted by new_schema is accepted by old_schema. These definitions describe accepted data languages; choose the direction for your producer or consumer role.

verdict=complete and verified=true returns backward_compatible and forward_compatible. Each false flag has a corresponding backward_counterexample or forward_counterexample wrapper: {payload: <JSON value>}. A null payload is a concrete example. A null wrapper means no counterexample. Both true means equivalent, including two empty languages.

Supported schemas

Draft 2020-12 validation semantics for boolean schemas and these keywords only: type, enum, minimum, maximum, exclusiveMinimum, exclusiveMaximum, pattern, properties, required, additionalProperties, anyOf, oneOf. type is a supported name or unique nonempty list: null, boolean, integer, number, string, object. Integer-valued numbers satisfy integer; booleans are distinct from numbers. enum has 1..64 unique primitive values; numeric 1 and 1.0 are equal.

Objects support nested schemas, optional or required properties, required names without property declarations, and boolean or schema-valued additionalProperties (default true). Keywords constrain only their applicable types; properties without type does not require an object. anyOf accepts at least one branch; oneOf accepts exactly one, including overlaps. Sibling keywords are conjunctive.

All unknown keywords are rejected with UNSUPPORTED_FEATURE, including annotations, $schema, $ref, allOf, not, const, array constraints, formats and unevaluatedProperties. No network references are resolved. Unconstrained schemas can still accept all JSON values, including arrays, which this subset cannot inspect.

String patterns

Patterns use search semantics over full Unicode payload strings, with ASCII pattern syntax: literals, escaped punctuation, explicit character ranges/classes and their negations, dot (except newline), groups, non-capturing groups, alternation and regular quantifiers *, +, ?, {m}, {m,}, {m,n}; lazy suffixes preserve the language. Boundary ^ and $ are allowed; $ also matches before a final newline. Use ^(?:a|b)$ for anchored alternation.

Unsupported: character class escapes such as backslash-d, backslash-w and backslash-s or their uppercase complements (use explicit ranges), internal anchors, anchored top-level alternation, backreferences, lookarounds, inline flags, atomic groups and possessive quantifiers. Empty pattern accepts every string. This intentionally narrow regex dialect is separate from analyze_regex's full-string ASCII domain.

Schema verification and limits

Exact bottom-up semantic partitions cover every type and object shape. The existing symbolic solver exhausts numeric and object membership vectors; the existing position automaton exhausts string-language products. Unnamed properties are partitioned by value membership; several extra properties may be necessary to falsify different union branches. These are exhaustive abstractions, not bounded payload samples.

Every returned concrete payload is serialized and independently validated against both original schemas by a Draft 2020-12 validator. Its pattern keyword uses the separate Thompson automaton compiler and lockstep membership; no backtracking engine is invoked. Any mismatch returns INTERNAL_ERROR without findings. Compatibility proofs rely on partition construction and solver exhaustion; witness validation does not independently prove negative claims.

Combined schemas: <=128 nodes, depth <=12; <=64 properties and required names per node (names <=128 characters), <=64 distinct names per object level; anyOf/oneOf 1..16 branches. Names and enum strings must contain Unicode scalar values. Primitive numeric constants are finite within -1000000000..1000000000; enum strings <=256 characters. Numeric solving is exact rational arithmetic; a witness that cannot be represented safely as a finite JSON number produces unknown.

Patterns <=1024 characters, <=512 syntax nodes, depth <=32, repeat bounds <=64, <=2048 expanded positions and <=8192 expanded nodes. String product <=16384 states, Unicode enum character set <=128 representatives including one other character; semantic partitions <=1024 classes, total work <=200000 steps; returned strings <=16384 characters. Exceeding a cap returns RESOURCE_LIMIT_EXCEEDED without partial findings.

One timeout_ms budget covers analysis and independent validation. timeout or unknown has verified=false, null compatibility flags and no counterexamples. The supervisor kills and reaps at timeout_ms +500 ms. Same isolated no-egress worker, three compute slots, payment gate, 65536-byte request and 262144-byte response caps, including MCP wrapping. Aggregate telemetry contains only bounded labels; no schemas, property names or payloads are retained. Errors contain only static reasons and index paths.

MCP reference: oracle://docs/schema-compat. Prompt: check_schema_compat(). Verified examples: oracle://examples.

check_schema_compat request

{
  "additionalProperties": false,
  "properties": {
    "new_schema": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "additionalProperties": true,
          "type": "object"
        }
      ]
    },
    "old_schema": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "additionalProperties": true,
          "type": "object"
        }
      ]
    },
    "timeout_ms": {
      "default": 3000,
      "maximum": 5000,
      "minimum": 100,
      "type": "integer"
    }
  },
  "required": [
    "old_schema",
    "new_schema"
  ],
  "type": "object"
}

check_schema_compat response

{
  "$defs": {
    "JsonValue": {},
    "SchemaCounterexample": {
      "additionalProperties": false,
      "properties": {
        "payload": {
          "$ref": "#/$defs/JsonValue"
        }
      },
      "required": [
        "payload"
      ],
      "type": "object"
    },
    "Stats": {
      "additionalProperties": false,
      "properties": {
        "elapsed_ms": {
          "minimum": 0,
          "type": "integer"
        },
        "timed_out": {
          "type": "boolean"
        }
      },
      "required": [
        "elapsed_ms",
        "timed_out"
      ],
      "type": "object"
    }
  },
  "additionalProperties": false,
  "properties": {
    "backward_compatible": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ]
    },
    "backward_counterexample": {
      "anyOf": [
        {
          "$ref": "#/$defs/SchemaCounterexample"
        },
        {
          "type": "null"
        }
      ]
    },
    "forward_compatible": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ]
    },
    "forward_counterexample": {
      "anyOf": [
        {
          "$ref": "#/$defs/SchemaCounterexample"
        },
        {
          "type": "null"
        }
      ]
    },
    "stats": {
      "$ref": "#/$defs/Stats"
    },
    "verdict": {
      "enum": [
        "complete",
        "timeout",
        "unknown"
      ],
      "type": "string"
    },
    "verified": {
      "type": "boolean"
    }
  },
  "required": [
    "verdict",
    "verified",
    "stats"
  ],
  "type": "object"
}

rules-rbac-gap-overlap

curl --fail-with-body --silent --show-error https://oracles.burgeonads.com/v1/analyze/rules -H 'Content-Type: application/json' --data-raw '{"variables":[{"name":"role","type":"enum","values":["guest","editor","auditor"]},{"name":"active","type":"bool"}],"rules":[{"id":"active_editor","when":{"op":"and","args":[{"op":"eq","var":"role","value":"editor"},{"op":"eq","var":"active","value":true}]},"action":"allow"},{"id":"editor","when":{"op":"eq","var":"role","value":"editor"},"action":"deny"},{"id":"guest","when":{"op":"eq","var":"role","value":"guest"},"action":"deny"}]}'

rules-semantic-diff

curl --fail-with-body --silent --show-error https://oracles.burgeonads.com/v1/analyze/rules -H 'Content-Type: application/json' --data-raw '{"variables":[{"name":"amount","type":"int","min":0,"max":2}],"rules":[{"id":"small","when":{"op":"le","var":"amount","value":1},"action":"allow"}],"default_action":"deny","compare_rules":[{"id":"small_v2","when":{"op":"lt","var":"amount","value":1},"action":"allow"}],"compare_default_action":"deny"}'

fsm-lock-deadlock

curl --fail-with-body --silent --show-error https://oracles.burgeonads.com/v1/verify/state-machine -H 'Content-Type: application/json' --data-raw '{"variables":[{"name":"lock_a","type":"enum","values":["free","p","q"]},{"name":"lock_b","type":"enum","values":["free","p","q"]},{"name":"p","type":"enum","values":["start","holding","done"]},{"name":"q","type":"enum","values":["start","holding","done"]}],"initial":{"lock_a":"free","lock_b":"free","p":"start","q":"start"},"transitions":[{"name":"p_take_a","guard":{"op":"and","args":[{"op":"eq","var":"p","value":"start"},{"op":"eq","var":"lock_a","value":"free"}]},"updates":{"p":{"op":"const","value":"holding"},"lock_a":{"op":"const","value":"p"}}},{"name":"q_take_b","guard":{"op":"and","args":[{"op":"eq","var":"q","value":"start"},{"op":"eq","var":"lock_b","value":"free"}]},"updates":{"q":{"op":"const","value":"holding"},"lock_b":{"op":"const","value":"q"}}},{"name":"p_take_b","guard":{"op":"and","args":[{"op":"eq","var":"p","value":"holding"},{"op":"eq","var":"lock_b","value":"free"}]},"updates":{"p":{"op":"const","value":"done"},"lock_a":{"op":"const","value":"free"}}},{"name":"q_take_a","guard":{"op":"and","args":[{"op":"eq","var":"q","value":"holding"},{"op":"eq","var":"lock_a","value":"free"}]},"updates":{"q":{"op":"const","value":"done"},"lock_b":{"op":"const","value":"free"}}}],"terminal_condition":{"op":"and","args":[{"op":"eq","var":"p","value":"done"},{"op":"eq","var":"q","value":"done"}]},"reachability":[{"name":"completed","expr":{"op":"and","args":[{"op":"eq","var":"p","value":"done"},{"op":"eq","var":"q","value":"done"}]}}]}'

fsm-order-lifecycle-safe

curl --fail-with-body --silent --show-error https://oracles.burgeonads.com/v1/verify/state-machine -H 'Content-Type: application/json' --data-raw '{"variables":[{"name":"phase","type":"enum","values":["new","paid","shipped","cancelled"]}],"initial":{"phase":"new"},"transitions":[{"name":"pay","guard":{"op":"eq","var":"phase","value":"new"},"updates":{"phase":{"op":"const","value":"paid"}}},{"name":"cancel","guard":{"op":"eq","var":"phase","value":"new"},"updates":{"phase":{"op":"const","value":"cancelled"}}},{"name":"ship","guard":{"op":"eq","var":"phase","value":"paid"},"updates":{"phase":{"op":"const","value":"shipped"}}},{"name":"retry_payment","guard":{"op":"eq","var":"phase","value":"paid"},"updates":{"phase":{"op":"const","value":"paid"}}},{"name":"cancel_after_ship","guard":{"op":"and","args":[{"op":"eq","var":"phase","value":"new"},{"op":"eq","var":"phase","value":"shipped"}]},"updates":{}}],"invariants":[{"name":"valid_phase","expr":{"op":"in","var":"phase","values":["new","paid","shipped","cancelled"]}}],"terminal_condition":{"op":"in","var":"phase","values":["shipped","cancelled"]},"reachability":[{"name":"settled","expr":{"op":"eq","var":"phase","value":"shipped"}}]}'

rules-variable-comparison

curl --fail-with-body --silent --show-error https://oracles.burgeonads.com/v1/analyze/rules -H 'Content-Type: application/json' --data-raw '{"variables":[{"name":"requested","type":"int","min":0,"max":5},{"name":"limit","type":"int","min":0,"max":5},{"name":"owner","type":"enum","values":["ana","bo","cy"]},{"name":"caller","type":"enum","values":["ana","bo","cy"]}],"rules":[{"id":"own_within_limit","action":"allow","when":{"op":"and","args":[{"op":"eq","var":"caller","value":{"var":"owner"}},{"op":"le","var":"requested","value":{"var":"limit"}}]}},{"id":"over_limit","action":"deny","when":{"op":"gt","var":"requested","value":{"var":"limit"}}}],"default_action":null,"compare_rules":null,"max_witnesses":null,"timeout_ms":null}'

fsm-retry-livelock

curl --fail-with-body --silent --show-error https://oracles.burgeonads.com/v1/verify/state-machine -H 'Content-Type: application/json' --data-raw '{"variables":[{"name":"phase","type":"enum","values":["idle","sending","acked","failed"]},{"name":"tries","type":"int","min":0,"max":2}],"initial":{"phase":"idle","tries":0},"initial_states":null,"transitions":[{"name":"send","guard":{"op":"eq","var":"phase","value":"idle"},"updates":{"phase":{"op":"const","value":"sending"}}},{"name":"retry","guard":{"op":"eq","var":"phase","value":"sending"},"updates":{"tries":{"op":"clamp","arg":{"op":"add","left":{"op":"var","var":"tries"},"right":{"op":"const","value":1}},"min":0,"max":2}}},{"name":"ack","guard":{"op":"eq","var":"phase","value":"sending"},"updates":{"phase":{"op":"const","value":"acked"}}},{"name":"give_up","guard":{"op":"and","args":[{"op":"eq","var":"phase","value":"sending"},{"op":"eq","var":"tries","value":2}]},"updates":{"phase":{"op":"const","value":"failed"}}}],"terminal_condition":{"op":"in","var":"phase","values":["acked","failed"]},"check_livelocks":true,"reachability":null}'

fsm-bounded-retry-progress

curl --fail-with-body --silent --show-error https://oracles.burgeonads.com/v1/verify/state-machine -H 'Content-Type: application/json' --data-raw '{"variables":[{"name":"phase","type":"enum","values":["idle","sending","acked","failed"]},{"name":"tries","type":"int","min":0,"max":2}],"initial":{"phase":"idle","tries":0},"initial_states":null,"transitions":[{"name":"send","guard":{"op":"eq","var":"phase","value":"idle"},"updates":{"phase":{"op":"const","value":"sending"}}},{"name":"retry","guard":{"op":"and","args":[{"op":"eq","var":"phase","value":"sending"},{"op":"lt","var":"tries","value":2}]},"updates":{"tries":{"op":"add","left":{"op":"var","var":"tries"},"right":{"op":"const","value":1}}}},{"name":"ack","guard":{"op":"eq","var":"phase","value":"sending"},"updates":{"phase":{"op":"const","value":"acked"}}},{"name":"give_up","guard":{"op":"and","args":[{"op":"eq","var":"phase","value":"sending"},{"op":"eq","var":"tries","value":2}]},"updates":{"phase":{"op":"const","value":"failed"}}}],"terminal_condition":{"op":"in","var":"phase","values":["acked","failed"]},"check_livelocks":true,"reachability":null}'

regex-diff-witness

curl --fail-with-body --silent --show-error https://oracles.burgeonads.com/v1/analyze/regex -H 'Content-Type: application/json' --data-raw '{"pattern":"a(b|c)","compare_pattern":"(ab|b)"}'

regex-redos-ambiguity

curl --fail-with-body --silent --show-error https://oracles.burgeonads.com/v1/analyze/regex -H 'Content-Type: application/json' --data-raw '{"pattern":"(a+)+"}'

schema-required-property

curl --fail-with-body --silent --show-error https://oracles.burgeonads.com/v1/check/schema-compat -H 'Content-Type: application/json' --data-raw '{"old_schema":{"type":"object","properties":{"id":{"type":"integer"}}},"new_schema":{"type":"object","properties":{"id":{"type":"integer"}},"required":["id"]}}'

schema-regex-widening

curl --fail-with-body --silent --show-error https://oracles.burgeonads.com/v1/check/schema-compat -H 'Content-Type: application/json' --data-raw '{"old_schema":{"type":"string","pattern":"^[a-z]+$"},"new_schema":{"type":"string","pattern":"^[a-z0-9]+$"}}'

schema-exclusive-union

curl --fail-with-body --silent --show-error https://oracles.burgeonads.com/v1/check/schema-compat -H 'Content-Type: application/json' --data-raw '{"old_schema":{"anyOf":[{"type":"integer"},{"type":"number","minimum":0}]},"new_schema":{"oneOf":[{"type":"integer"},{"type":"number","minimum":0}]}}'