TorchLean API

NN.Verification.CLI

CLI #

Unified verification CLI registry.

The repository exposes several verification entry points: LiRPA-style bound checks, PINN certificate recomputation, α,β-CROWN leaf artifact checks, robustness margin certificates, ODE enclosure checks, and model-to-IR bound propagation workflows.

This file defines a single dispatcher so users can run everything from: lake exe verify -- <tool> [args...]

References (background on the verifier families exposed here):

Tool registry #

We represent each runnable verifier or checker as a Tool record, then expose a simple dispatcher over a list of tools.

A single entry in the unified verification CLI.

Each Tool corresponds to one command name (e.g. torchlean-ibp) and a handler run : List StringIO Unit.

Design notes:

  • Tools with includeInAll = false are interactive or long-running workflows and are excluded from the all command.
  • Tools may declare a default path argument for convenience.
  • name : String

    Command-line name (first positional arg) used to select this tool.

  • description : String

    Short help text shown in list output.

  • defaultArg : Option String

    Default file/path argument, if the tool expects a path.

  • includeInAll : Bool

    Whether lake exe verify -- all should run this tool.

  • run : List StringIO Unit

    Implementation: run the tool with the remaining CLI args.

Instances For

    One-line usage string for a single tool in the unified verification CLI.

    Instances For

      Usage string for the unified verification CLI dispatcher.

      Instances For

        Extract a path argument if present; otherwise fall back to a default path.

        Instances For

          Tool group: LiRPA-style bound propagation and certificate checking.

          Instances For

            Tool group: other verification-related utilities.

            Instances For

              The full list of registered verification tools (LiRPA plus other workflows/checkers).

              Instances For

                Look up a tool by its command-line name.

                Instances For

                  Dispatch a unified verification command.

                  Supported invocations:

                  • list: show usage and tool list
                  • all: run all non-interactive tools (ignores extra args)
                  • <tool> [args...]: run a named tool
                  Instances For

                    lake exe verify executes the unqualified main.

                    We keep the implementation namespaced and provide a thin root-level wrapper so the Lake executable entrypoint remains stable.

                    def main (args : List String) :

                    lake exe verify entry point.

                    This is a thin wrapper around the unified dispatcher NN.Verification.CLI.dispatch.

                    Instances For