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)
NStatic is currently in pre-release. Join the waitlist to be notified when the Visual Studio extension is available.
Join the Waitlist