NStatic Walkthrough

2/25/2006 5:28:12 PM

NStatic Walkthrough

This is the current user interface of NStatic. By the time, the user interface will undergo additional changes before I release it.

Nstatic

The tool is capable of analyzing code in isolation and handling ambiguities due to incomplete information (such as whether a symbol is a type or a variable). In this example, there are two files being analyzed: Sample.cs and Sample2.cs. 

Codeex

The snapshot for Sample.cs is shown above and Sample2.cs is available as a File Attachment. Together, these two files produce the 10 errors and 1 warning in the Error List pane shown here. 

ErrorList

In this window, the error produced from the code displayed earlier is currently selected. The error messages are meant to be identical to the ones that would ordinarily occur at runtime, but, in some cases, for the standard exceptions automatically generated by the runtime, I have added additional explanatory text (such as whether an out-of-bounds index was negative or too high). For custom exceptions, NStatic will dynamically evaluate and construct the exception and then extract the message contained inside.

Besides the Error List pane, there are three additional panes: the Call Stack Pane, the Locals Pane, and the Assumptions Pane.

Locals

The Call Stack Pane reveals the call stack at the time the error occurred. The Locals Pane above contains a hierarchical tree grid that reveals the values of each of the locals (and instance members) at the time the error occurred, expressed symbolically in terms of the original function parameters (include the this parameter). These expressions may contain constant values (including user-defined object instances) and function bindings. The value p’ reflects the original value of parameter p, since the variable p may change at any time.

Assumptions

The Assumptions Pane reveals the working assumptions the compiler relied on upon reaching the error. In this case, there is only one set of assumptions.

 

Comments

 

Navigation

Categories

About

Net Undocumented is a blog about the internals of .NET including Xamarin implementations. Other topics include managed and web languages (C#, C++, Javascript), computer science theory, software engineering and software entrepreneurship.

Social Media