Friday, October 28, 2005

C? on Wikipedia.
Another C? page at MS research.

An Overview of C?

Integrating XML into Popular Programming Languages

Dare Obasanjo
Microsoft Corporation

January 13, 2005

Summary: Dare Obasanjo covers the C? programming language created by Microsoft Research by augmenting C# with constructs to make it better at processing information, such as XML and relational data. (18 printed pages)

Design by Contract Framework for .NET

This class library provides a Design by Contract framework for use in .NET projects. A Visual Basic .NET version is also included in the download but the following discussion is in C#. In both cases the library can be used by a .NET client written in any .NET language. (Though if the VB.NET version is used IntelliSense code comments will not be visible in the client application.)

"Design by Contract" is a method made famous by Bertrand Meyer in the Eiffel programming language where support is built right into the language constructs.

See Chapter 11 of Object-Oriented Software Construction - 2nd Edition (Prentice Hall, 1997) by Bertrand Meyer and Building Bug-free O-O Software: An Introduction to Design by Contract.

From Lambda the Ultimate:

An Overview of the Singularity Project

Singularity is a research project in Microsoft Research that started with the question: what would a software platform look like if it was designed from scratch with the primary goal of dependability? Singularity is working to answer this question by building on advances in programming languages and tools to develop a new system architecture and operating system (named Singularity), with the aim of producing a more robust and dependable software platform. Singularity demonstrates the practicality of new technologies and architectural decisions, which should lead to the construction of more robust and dependable systems...
Singularity... starts from a premise of language safety and builds a system architecture that supports and enhances the language guarantees.

An interesting overview of what sounds like an intersting project.

The choice of implementation language is also interesting:

Singularity is written in Sing#, which is an extension to the Spec# language developed in Microsoft Research. Spec# itself is an extension to Microsoft’s C# language that provides constructs (pre- and post-conditions and object invariants) for specifying program behavior. Specifications can be statically verified by the Boogie verifier or checked by compiler-inserted run-time tests. Sing# extends this language with support for channels and low-level constructs necessary for system code....integrating a feature into a language allows more aspects of a program to be verified. Singularity’s constructs allow communication to be statically verified.

An interesting aspect is the support for meta-programming, which is implemented in an unusal manner:

Compile-time reflection (CTR) is a partial substitute for the CLR’s full reflection capability. CTR is similar to techniques such as macros, binary code rewriting, aspects, meta-programming, and multi-stage languages. The basic idea is that programs may contain place-holder elements (classes, methods, fields, etc.) that are subsequently expanded by a generator.

Many other intersting design decisions are discussed in the paper (e.g., various DbC facilities), so do check it out.