Parallel Language Research Project

Contacts: info@parallelcsharp.com

Parallel C# is a new parallel programming language, a "smooth" extension of C# language.
We acknowledge the influence of several languages, such as T++, Polyphonic C#, ML and others.


In addition to the base C# language syntax the following constructs were added:
1) Asynchronous methods
2) Movable methods
3) Join patterns
4) High-order functions
In Parallel C# objects can have synchronous, asynchronous and movable methods.
Values are passed by ordinary method calls:
  • If the method is synchronous, the caller blocks until the method returns some result (as usual).
  • If the method is async or movable, the call completes at once and returns void.
    The differences between synchronous, asynchronous and movable methods can be demonstrated by the following sequence diagram:


  • A class defines a collection of synchronization patterns (chords or joins), which define what happens once a particular set of methods have been invoked on an object:
  • When pending method calls match a pattern, its body runs.
  • If there is no match, the invocations are queued up.
  • If there are several matches, an unspecified pattern is selected.
  • If a pattern containing only async methods fires, the body runs in a new thread.

    Join patterns (joins) initially appeared in Polyphonic C# language, and after that migrated with slight modifications to Parallel C# language.
    The essence of joins can be demonstrated by the following animated picture:

  • All functions in Parallel C# are high-order functions, that means that one can pass them as parameters to other functions, assign them to variables and so on. When you pass function to other methods Runtime System automatically creates proxy object for this function. Proxy-methods in action are demonstrated in the following sequence diagram:



    Status of the implementation & Downloads

  • Currently you can download the following packages (the first prototypes of the language, v.0.0.5.7):
    1) Parallel C# Many Core Edition (for Windows machines) - this version was made specially for the convenience of developers, so they could debug their programs locally prior to the application deployment to clusters.
    2) Parallel C# Cluster Edition (for Linux clusters) - this is what you should use on real HPC Linux clusters, after you finish debugging your Parallel C# applications locally...

  • As a proof of the concept we've used new managed tools for generating compilers - GPLEX, GPPG and Managed Babel System. I.e. as a side-effect of this research project programming community can get sources for a really advanced compiler (I hope so ;)), written completely in managed languages (C#) and see how to integrate it with Visual Studio IDE. You can download current version of the solution archive file here (which contains the sources of compiler and Runtime System for Windows). The source code of Distributed Runtime System for the Linux is available here.

  • You can find several examples written in Parallel C# language here.

    Also, you can read paper about Parallel C# here [printable version], which was published in the Proceedings of the PDPTA'08 - The 2008 International Conference on Parallel and Distributed Processing Techniques and Applications (Las Vegas, Nevada, USA, July 14-17, 2008).


    Stay tuned... ;)