Automating creativity
Analysis Capabilities
Six categories of bugs that escape every other .NET static analyzer — found symbolically, not by pattern matching.
Category 01
NStatic tracks exceptions as first-class values in its symbolic model. An expression that might throw becomes If(condition, result, Exception(…)) — allowing the analyzer to determine whether any execution path can reach a thrown exception uncaught.
NullReferenceException,IndexOutOfRangeException, DivideByZeroException,OverflowException, StackOverflowExceptionString.ToCharArray, List<T>.Add, and hundreds of other methods can throwDebug.Assert conditions verified; failures surfaced as findingsWhen an uncaught exception is found, NStatic shows the full interprocedural call stack and the symbolic condition under which it occurs.


Category 02
Code that can never execute isn't just untested — it's a maintenance hazard that confuses future readers and bloats the binary. NStatic identifies unreachable code through symbolic path analysis rather than simple control-flow heuristics.
if or switch that the symbolic model proves unreachable
Category 03
Redundant code compiles and runs — it just doesn't do anything useful. These findings point to logic errors, copy-paste mistakes, or stale code that should have been removed.
if, while, and ternary expressions
Category 04
Null references are .NET's most common runtime crash. NStatic tracks nullability through the symbolic model — no [NotNull] or [CanBeNull] attributes needed. The analysis infers nullability from code, assignments, conditional branches, and method return types.
nullif (x == null) wherex cannot be null
Category 05
Array index out of bounds is a direct cause of IndexOutOfRangeException. NStatic models array lengths and index values symbolically, including loops that iterate over collections — which it solves to closed form rather than unrolling.

Category 06
When two expressions in your code always produce the same value, NStatic can identify the opportunity for simplification. This category surfaces refactoring hints and occasionally reveals deeper logic errors where two different-looking computations were expected to diverge but don't.
if that produce identical results (the branch is redundant)
Feature preview
NStatic is designed to surface the symbolic facts behind a warning: which call path reached it, which assumptions mattered, and what values were known at the point of failure.
Infer conditions that guarantee or permit exceptions, including framework parameter validation and custom exception messages when available.

Follow warnings through method calls and present a call stack that makes cross-method reasoning understandable.

Inspect locals and object state in terms of original inputs, conditionals, method summaries, and simplified expressions.

Represent loop updates as symbolic functions or recurrences where possible, instead of only unrolling a fixed number of times.

NStatic's planned specification syntax uses analysis comments so teams can add assertions, assumptions, old-value references, and breakpoints while preserving normal C# source compatibility.

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