soft person

Automating creativity

NStatic

Preannouncement for a revived code analyzer

NStatic finds bugs by reasoning about what your C# code means.

Not another style checker. NStatic is a symbolic analyzer for .NET code that models state, calls, paths, assertions, and exceptions so warnings can explain how a problem is reached. Bugs caught before you run anything. NStatic reads your C# code the way a mathematician reads an equation — tracing every execution path symbolically, solving loops to closed form, and surfacing real bugs without false positives.

See the featuresSee how it works
NStatic source highlighting with arrows showing execution flow

Friendlier

A debugger-like experience for static analysis: error list, symbolic locals, assumptions, call stack, and visual execution paths.

Smarter

Deep semantic analysis built on symbolic expressions, method summaries, constraints, and algebraic simplification.

Faster

A deterministic expression engine that caches, simplifies, and summarizes rather than blindly exploring every path forever.

Why NStatic

Most analyzers stop at "this line might fail." NStatic was designed to answer the more useful question: under what symbolic conditions does this line fail, and what did the program know at that point?

Show the route to the warning.

Execution paths are represented internally and rendered back onto source so ignored, active, and assumed branches can be distinguished.

Explain values symbolically.

Locals and fields can be shown in terms of parameters, pre-state, conditionals, and function summaries.

Use facts across calls.

Interprocedural analysis lets errors flow through methods, properties, constructors, framework calls, and user-defined abstractions.

What NStatic finds

Six categories of real bugs. Every finding is backed by a proof. If NStatic flags something, it can show you exactly why — the assumptions it made, the path it traced, the contradiction it found.

Exceptions

Unhandled NullReferenceException, IndexOutOfRangeException, DivideByZeroException — including those thrown deep inside .NET Framework library calls.

Learn more →

Dead Code

Branches, statements, and catch blocks that can never execute — detected through symbolic path analysis, not heuristics.

Learn more →

Redundancy

Always-true conditions, no-op assignments, constant calls, parameters that never affect results, and infinite loops.

Learn more →

Null Analysis

Tracks nullability through assignments, method calls, and branching. No attribute tagging needed — inferred from code.

Learn more →

Bounds Violations

Array and collection accesses verified against inferred index ranges. Loop bounds solved symbolically to catch off-by-one errors.

Learn more →

Equivalences

Two expressions that always produce the same result can often be simplified. NStatic surfaces these as refactoring opportunities.

Learn more →

Execution Path Visualization

See every path your code can take

NStatic superimposes colored arrows directly on your source code showing the possible execution flows. Branches, loops, exceptions, and early returns are all visible at a glance — without leaving the editor.

Click any path to see the symbolic state at that point: what values variables can hold, what assumptions have been made, what exceptions could be thrown.

View examples
Execution path visualization showing if-branch paths
Execution path visualization showing loop paths

Loop Analysis

Loops solved, not simulated

Most analyzers give up on loops or unroll a fixed number of iterations. NStatic solves them to closed form.

A Fibonacci loop becomes a formula involving the golden ratio. An array-filling loop becomes a range assertion. Idempotent and involutive loops are recognized as patterns and eliminated entirely.

This means NStatic can reason about what a loop produces — not just whether it terminates.

How loop solving works →
NStatic solving Fibonacci loop to closed form
Loop variable values shown symbolically

Interprocedural Analysis

Follows bugs across method calls

NStatic analyzes call chains up to 11 frames deep — including calls into .NET Framework library code, which it interprets directly from the IL (intermediate language) without needing source.

The call stack panel shows exactly which methods contributed to a finding, with symbolic values at each frame. No more guessing which caller passed the null.

NStatic call stack showing 11 frames of interprocedural analysis

How NStatic compares

Traditional static analyzers pattern-match against known bug signatures. NStatic reasons about your program mathematically — the difference shows up in what it can find.

CapabilityNStaticFxCop / RoslynResharperSpec# / Code Contracts
No annotations required✓✓✓✗ (requires specs)
Interprocedural reasoning✓ (11 frames)LimitedLimited✓
Loop analysis✓ Closed-form✗✗Requires invariant
.NET Framework IL interpretation✓✗✗✗
Execution path visualization✓ In-editor overlay✗✗✗
Symbolic assumption tracking✓✗Partial✓
Works on existing code✓✓✓✗
Assumptions panel showing tracked conditions
Assumptions panel showing additional conditions

Transparent Reasoning

Show your work

Every finding comes with a full audit trail. The Assumptions panel shows every condition NStatic has recorded as it traversed your code — what it knows about each variable at each point.

When a bug is flagged, you can trace back through the assumption chain to see exactly which inputs or conditions lead to the problem. The analysis is never a black box.

Core approach

NStatic lowers C# into a symbolic representation where values, branches, state changes, lambdas, assertions, and calls can be evaluated together.

01

Parse C#

Read source and recover declarations, expressions, statements, scopes, and type information.

02

Build semantics

Translate methods into symbolic state, result, and type summaries.

03

Simplify

Normalize arithmetic, conditionals, lambdas, state reads, and method facts.

04

Check assertions

Find possible exceptions, failed asserts, redundant branches, and unreachable paths.

05

Explain

Report the call stack, path assumptions, symbolic locals, and the source route to the issue.

Product preview

The original UI explored a simple idea: when analysis finds a problem, let the developer inspect the symbolic runtime that led to it.

Symbolic call stacks

Inspect how a warning crosses method boundaries without forcing every caller to be annotated manually.

NStatic call stack window showing interprocedural analysis
Specification comments

Add analysis-only assertions, assumptions, and breakpoints while keeping ordinary C# compilation intact.

NStatic specification syntax highlighted inside C# comments

Intrigued?

Join the waitlist and be first to try NStatic when it ships for Visual Studio.

Join the Waitlist