.NET assemblies are superior to previous component technologies because they
seamlessly provide multilingual support; introduce an excellent synergy
between code and metadata; and inspire confidence through a strong type
system and the .NET security policy. Nevertheless, .NET lacks a formal
mechanism for specifying the semantics of the types offered by an assembly.
This article shows how, using .NET attributes, it is feasible to introduce
Boolean assertion clauses in .NET assemblies. Using reflection, these
assertion attributes can be extracted, checked, and monitored at runtime. We
offer an assertion browser tool that extracts the assertion attributes from
the assemblies for documentation purposes and generates a "trusted" proxy
assembly to monitor these assertions at runtime.
Introduction
Bertrand Meyer included the assertion formalism in Eiffel under his Design by ... (more)