reasonml/ocaml syntax-aware code completion with type inference
Provides intelligent code completion for ReasonML and OCaml by leveraging the Imandra reasoning engine's type inference system. The extension parses incomplete code expressions, infers their types using the underlying formal verification engine, and suggests completions that match the inferred type signature. This integrates with VS Code's IntelliSense API to deliver context-aware suggestions based on the full type environment of the current module.
Unique: Completion engine is backed by Imandra's formal reasoning system, which performs full type inference and unification rather than pattern-matching or heuristic-based suggestions, ensuring completions are always type-correct
vs alternatives: More type-safe than generic language servers because it leverages formal verification semantics rather than syntactic heuristics, eliminating invalid suggestions that would fail type checking
hover-based type and signature inspection with formal proof context
Displays inferred types, function signatures, and proof-relevant metadata when hovering over code identifiers. The extension queries the Imandra reasoning engine to resolve the type of any expression, including polymorphic types, dependent types, and proof obligations. Hover information includes the fully-qualified type signature, module context, and links to formal specifications or proof states associated with the identifier.
Unique: Hover tooltips are powered by Imandra's formal reasoning engine, which can display not just inferred types but also proof obligations, invariants, and formal specifications tied to each identifier, bridging the gap between code and formal properties
vs alternatives: Richer than standard OCaml/ReasonML language servers because it surfaces proof-relevant metadata and formal specifications, not just syntactic type information
automated formal verification and property checking on save
Automatically invokes the Imandra reasoning engine to verify formal properties, invariants, and safety specifications whenever code is saved. The extension parses ReasonML/OCaml code, extracts formal specifications (written as comments or special annotations), and submits them to Imandra for automated reasoning. Results are displayed as inline diagnostics, highlighting code regions that violate properties or contain unproven obligations, with explanations of counterexamples or proof failures.
Unique: Integrates Imandra's automated reasoning engine directly into the VS Code save workflow, enabling real-time formal verification feedback without requiring separate tool invocations or CI/CD runs, with counterexample generation and proof state visualization
vs alternatives: More integrated and interactive than running Imandra as a separate CLI tool or in CI/CD, because it provides immediate feedback and visualization of proof failures inline in the editor as you code
interactive repl and expression evaluation with formal reasoning
Provides an interactive Read-Eval-Print Loop (REPL) panel within VS Code where developers can evaluate ReasonML/OCaml expressions in the context of the current file or project. Expressions are sent to the Imandra reasoning engine for evaluation, which computes results and can also perform formal analysis (e.g., checking if an expression satisfies a property). The REPL maintains state across multiple evaluations and integrates with the file's module context.
Unique: REPL is backed by Imandra's formal reasoning engine, enabling not just expression evaluation but also formal analysis of results (e.g., checking if an output satisfies a property), bridging interactive development with formal verification
vs alternatives: More powerful than a standard OCaml/ReasonML REPL because it can perform formal property checking on evaluated expressions, not just compute values
codebase-wide formal specification indexing and cross-reference navigation
Indexes all formal specifications, invariants, and proof obligations across the entire codebase and provides navigation features to jump between related specifications and implementations. The extension scans ReasonML/OCaml files for Imandra specification annotations, builds a searchable index, and enables 'Go to Definition' and 'Find References' operations that link code to its formal specifications. This allows developers to understand the formal contract of any function and see all code that depends on it.
Unique: Indexes formal specifications as first-class entities alongside code, enabling bidirectional navigation between implementations and their formal contracts, rather than treating specifications as comments or separate documents
vs alternatives: Deeper than standard code navigation because it understands the semantic relationship between formal specifications and implementations, enabling specification-aware refactoring and impact analysis
incremental proof state visualization and obligation tracking
Displays the current proof state and outstanding proof obligations in a sidebar panel, updated incrementally as code is edited. The extension tracks which functions have verified proofs, which have unproven obligations, and which have failed verification, with visual indicators (checkmarks, warnings, errors) in the editor gutter. Clicking on an obligation reveals details about what needs to be proven and suggestions for proof strategies or hints.
Unique: Provides real-time proof state visualization integrated into the editor UI, showing which functions are proven and which have outstanding obligations, rather than requiring separate proof status reports or log files
vs alternatives: More actionable than proof logs or separate verification reports because it embeds proof status directly in the editor workflow and provides interactive obligation exploration