ParaSail (programming language)

Parallel Specification and Implementation Language (ParaSail) is an object-oriented parallel programming language. Its design and ongoing implementation is described in a blog and on its official website.

ParaSail uses a pointer-free programming model, where objects can grow and shrink, and value semantics are used for assignment. It has no global garbage collected heap. Instead, region-based memory management is used throughout. Types can be recursive, so long as the recursive components are declared optional. There are no global variables, no parameter aliasing, and all subexpressions of an expression can be evaluated in parallel. Assertions, preconditions, postconditions, class invariants, etc., are part of the standard syntax, using a Hoare-like notation. Any possible race conditions are detected at compile time. Initial design of ParaSail began in September 2009, by S. Tucker Taft.

Both an interpreter using the ParaSail virtual machine, and an LLVM-based ParaSail compiler are available. Work stealing is used for scheduling ParaSail's light-weight threads. The latest version can be downloaded from the ParaSail website.

Description
The syntax of ParaSail is similar to Modula, but with a class-and-interface-based object-oriented programming model more similar to Java or C#.

More recently, the parallel constructs of ParaSail have been adapted to other syntaxes, to produce Java-like, Python-like, and Ada-like parallel languages, dubbed, respectively, Javallel, Parython, and Sparkel (named after the Ada subset SPARK on which it is based). Compilers and interpreters for these languages are included with the ParaSail implementation.

Examples
The following is a Hello world program in ParaSail:

The following is an interface to a basic map module:

Here is a possible implementation of this map module, using a binary tree:

Here is a simple test program for the BMap module: