Sparkel Programming Language
Sparkel is a new parallel programming language inspired by the SPARK subset of Ada, and designed to support the development of inherently safe and secure, highly parallel applications that can be mapped to multicore, manycore, heterogeneous, or distributed architectures.
Sparkel is intended to be a lean, elegant, parallel language inspired by the SPARK subset of Ada. Sparkel is for both specifying and implementing parallel applications. As such, it includes high-level specification features, including parameterized types with full separation of interface from implementation, pre- and postconditions for individual operations of a type, invariants that apply across all operations of a type, and constraints that apply to individual subtypes.
Sparkel provides support for both implicit and explicit parallelism. Every Sparkel expression is defined to have parallel evaluation semantics. That is, given a Sparkel expression like F(X) + G(Y), the language rules ensure that it is safe to evaluate F(X) and G(Y) in parallel. The compiler makes the decision based on complexity or other criteria whether a given computation should be created as a potentially parallel activity. An underlying scheduler then maps these potentially parallel activities to particular processing resources, by default using a work-stealing approach, which provides load balancing across processors while also providing good locality of reference and minimal cache contention.
The primary approach to ensuring the safe parallelism is by simplification of the language, with the elimination of features that interfere with safe parallelization. In particular, Sparkel:
eliminates global variables -- operations may only access variables passed as parameters;
eliminates parameter aliasing -- two parameters passed to the same operation must not refer to the same object if either parameter is updateable within the operation;
eliminates pointers -- optional and expandable objects and generalized indexing provides an approach that allows safe parallelization;
eliminates run-time exception handling -- strong compile-time checking of preconditions and support for parallel event-handling provides a safer alternative;
eliminates a global garbage-collected heap -- automatic storage management is provided using region-based storage management which provides immediate, automatic reclamation of storage with none of the global contention and disruption associated with a global garbage-collected heap;
eliminates explicit threads, lock/unlock, or signal/wait -- parallel activities are identified automatically by the compiler, and language rules prevent data races between readers and writers of the same object, while explicitly protected objects can be used for safe synchronization when concurrent access from multiple readers and writers is required, without any need for explicit lock/unlock or signal/wait.
Writings on Sparkel and ParaSail
Below are listed some introductory articles and other documentation, mostly on the ParaSail language, where many of the ideas of Sparkel originated. Soon we hope to have more articles and presentations that are specific to Sparkel. See the section on Sparkel Documentation and Download for the Sparkel reference manual, and the prototype implementation.
Sparkel Documentation and Download
Here is the latest download and reference manual:
Sources for ParaSail/Sparkel Prototype Compiler and Virtual Machine, alpha release, revision 5.2 (now includes Javallel and Parython compilers as well): parasail_sources_5_2.zip
Binaries for ParaSail/Sparkel Prototype Compiler and Virtual Machine, alpha release, revision 5.2 (now includes Javallel and Parython compilers as well): parasail_binaries_5_2.zip
Sparkel Reference manual: sparkel_ref_manual.pdf
Sparkel release notes: sparkel_release_notes_alpha_0.5.txt
Here are some examples of Sparkel code:
Comments or Questions
Please direct your comments or questions to the Sparkel open-discussion forum:
Open-DO Sparkel Home Page
Sparkel now has its own Open-DO project: