Unfinished Business

CCI Metadata

This page contains suggestions for future work.

Testing
Samples and tutorials
Documentation
Models for XML Document Files
Alternative Metadata Serializations
CILDB Files
Improve the PE Reader and PE Writer
Update Static Methods in the Metadata Helper Library

Testing

The automated regression tests need to be beefed up considerably, and the existing regression tests need some cleanup and reorganization.

The CCI Metadata libraries are based largely on code that was harvested from other projects. Most were for short-term research prototypes that were built for specific purposes and weren’t assigned staffing or resources for systematic testing.

The libraries usually work well for common cases, but there will be a long period of discovering bugs related to corner cases. This situation presents a problem but also an opportunity. For anyone with a bug finding tool or a test generation framework, there are some juicy bugs waiting to be discovered.

Test cases should be in one of two categories:

Samples and tutorials

Right now, more is better. One type of sample that would be particularly useful is a rewriting application.

Add basic samples to the CCI Metadata source tree, under the Samples folder. Add more substantial samples to the CCI Sample Applications project.

Documentation

The library source contains numerous documentation comments, which are incorporated into the API reference CHM by SandCastle. However, the API is far from completely documented, and additional comments are welcome.

Models for XML Document Files

CCI Metadata currently supports object models for .NET PE files (assemblies, modules, DLLs, EXEs) and PDB files. CCI Metadata does not support an object model for the XML document files that the C# and VB.NET compilers produce from documentation comments embedded in the source files. It would be useful to provide CCI Metadata to support for XML document files that is:
  • Lighter weight than the XML DOM, and thus suitable for use by an IDE.
  • Easy to construct programmatically.
  • Aware of the CCI Metadata object model. This allows applications to query the XML model by using metadata objects, rather than the strings used by XML serialization.

Alternative Metadata Serializations

It would be useful to have alternative serializations for metadata. PE files are arcane and not particularly well suited to compression. An XML serializer is an obvious possibility. However, there might be other formats that are easier and more efficient to write, and would make it possible to implement a smaller, simpler metadata reader.

CILDB Files

It would be useful to be able to write the source model out as a CILDB (debug interchange format) file, and read it back in. A converter to and from PDB files would be nice sample and a useful tool. To download the related specification, go to Standard ECMA-335 Common Language Infrastructure (CLI).

Improve the PE Reader and PE Writer

The PE reader is essentially a parser and must handle and recover from input errors. Currently, the PE reader usually recovers from errors by silently ignoring them. It would be useful to have it report any errors that it encounters.

The PE writer is reasonably tolerant of bad input, but only when it is not too inconvenient. Debugging can be awkward if the writer throws an exception or silently ignores bad input. It would be useful to have a component that takes an arbitrary metadata model, carefully validates it, and provides useful error messages when warranted.

Update Static Methods in the Metadata Helper Library

It would be useful to change the static methods in the metadata helper library to extension methods. This requires upgrading the projects to require .NET 3.5 as the target platform, which may need to be discussed first.

Last edited Dec 15, 2009 at 5:14 PM by Guy_Smith, version 18

Comments

No comments yet.