Skip to content

v1.3.1: Initial support for ViperServer, LSP and MCP servers (#307)

Latest

Choose a tag to compare

@marcoeilers marcoeilers released this 06 Jul 23:08
· 15 commits to master since this release
c2fd68f

v1.3.1 (July 2026)

New features

  • MCP and LSP servers: Nagini now ships a Model Context Protocol (MCP) server and a Language Server Protocol (LSP) server. The MCP server exposes verification to AI agents and MCP-capable editors (e.g. Claude Code, Claude Desktop, Cursor) over stdio, allowing whole files, individual methods, or inline snippets to be verified with structured diagnostics. The LSP server provides editor integration with live diagnostics and per-method verification. Install with pip install "nagini[mcp]" / pip install "nagini[lsp]".
  • ViperServer backend: Verification can now run through an in-process ViperServer instance instead of invoking Silicon/Carbon directly. This enables result caching across requests, precise cancellation of running verifications, and concurrent verification of independent requests.
  • Improved --server mode: The verification server now accepts and can reconfigure command-line options between requests, prints a startup message once it is ready, and the client (nagini_client) accepts a --select argument to verify only specific methods or classes on a per-request basis.
  • Correctly formatted translation errors in --ide-mode: Translation errors (invalid program, unsupported feature, and type errors) are now emitted in the same file:line:col:end_line:end_col: error: message format as verification errors, so IDE/LSP frontends can parse them uniformly. Type errors now carry a real source range (start and end) rather than only a line. (#308)
  • Chained comparisons: Comparison chains such as a < b < c are now supported.
  • enumerate() with a start argument: enumerate(xs, start) is now supported.
  • range() with a step argument: range(start, stop, step) is now supported.
  • Set and dict comprehensions: Set comprehensions ({x for x in xs}) and dict comprehensions ({k: v for ... in ...}) are now supported, including comprehensions with filters and multiple generators. (#305)

Infrastructure and dependencies

  • Single bundled Viper backend: The separate silicon.jar and carbon.jar backends have been replaced by a single bundled viperserver.jar, which contains Silicon, Carbon, and Silver and serves both the direct and ViperServer-based backends. Extraneous backend log output (e.g. logback traces) is now suppressed so it cannot interfere with the CLI output, the test framework, or the LSP/MCP JSON-RPC stream.
  • Added optional dependency extras server, lsp, and mcp for the respective server modes.
  • Added CI test workflows for the LSP/MCP servers and a test suite that runs verification through ViperServer.

v1.3.0 (June 2026)

New features

  • Python 3.12–3.14 support: Nagini now targets Python 3.12 and newer (3.13 and 3.14 are also supported). Python versions older than 3.12 are no longer supported. (#300)
  • match statement support: match/case statements are now supported in both impure and pure functions. Most pattern types (value, OR, sequence, mapping, class, wildcard, capture) are handled, with class patterns with keyword arguments currently unsupported. (#301, #302)
  • Branch condition reporting: When using the Silicon backend, error messages now include the branch conditions that led to the error — the set of conditions along the execution path that the verifier was exploring when it found the failure. (#298)
  • Bytearray and PByteSeq: Added support for bytearray and a corresponding pure ghost type PByteSeq. (#299)
  • IntEnum support: Classes subclassing IntEnum are now supported. (#299)
  • Bit shift operators: Left (<<) and right (>>) shift operators are now supported for integers. (#299)
  • int.bit_length(): Added support for the int.bit_length() method. (#299)
  • String format expressions: Basic support for string format operations. (#299)
  • Relative imports: from .module import X style relative imports are now supported. (#280)
  • Constructor calls with type arguments: Calls like ParseResult[bool](True) (generic constructor with explicit type argument) are now supported. (#264)
  • Subclassing int: Soundly supports subclasses of int. Subclassing other builtin types remains unsupported. (#262)
  • Better quantifier triggers for collections: Improved trigger selection for Forall quantifiers over lists, sequences, and similar collection types, reducing incompleteness issues. (#289)

Fixes

  • Fixed imprecise ADT type information in certain cases. (#288)
  • Fixed several crashes and translation errors. (#265, #267, #268, #272, #274, #277, #279, #283, #291)
  • Fixed Reveal() annotations being incorrectly attached to type conversion wrappers rather than the actual function call. (#303)

Infrastructure and dependencies

  • Migrated packaging from setup.py to pyproject.toml. (#300)
  • Updated jpype1 from 1.5.0 to 1.7.0. (#300)
  • Updated mypy from 0.900 to 1.5.0. (#300)
  • Updated toposort from 1.5 to 1.10. (#300)
  • Updated z3-solver to 4.16.0.0 on ARM. (#300)
  • Updated pytest from 7.0.0 to 9.0.3. (#300)
  • Removed astunparse and typed-ast dependencies. (#300)