This repository contains an implementation of the RISE language and its Shine compiler (https://rise-lang.org/).
The source code for the compiler is organised into sub-packages of the shine package.
-
DPIAcontains the implementation of Data Parallel Idealised Algol. TheCompilationsub-package contains the implementation to rewrite a high-level functional program into an imperative representation. Backend specific code generators for C, OpenMP and OpenCL are in their own packages. A paper describing DPIA is available at (https://arxiv.org/abs/1710.08332). -
Ccontains the C backend printing an imperative DPIA representation into C code. -
OpenMPcontains the OpenMP backend printing an imperative DPIA representation into OpenMP code. The C backend is used to print most code. This package also defines extensions in form of additional patterns added to the RISE language andDPIA. -
OpenCLcontains the OpenCL backend printing an imperative DPIA representation into OpenCL code. This package also defines extensions in form of additional patterns added to the RISE language andDPIA.
Prerequisits: Java 8+ SDK, git
- Clone the
shinerepository to a directory of your choice that we call$SHINE_ROOT. - In
$SHINE_ROOT, runsetup.shto download all required submodules. - Then run
sbt compile(even if you want to use IDEA IntelliJ, because IntelliJ does not execute subproject dependencies correctly and the Executor needs to be built once in the beginning).
- Download IDEA IntelliJ (http://www.jetbrains.com/idea/) and choose to install the Scala Plugin during setup.
- Launch IntelliJ. From the menu choose
File->Open.... Then, select$SHINE_ROOTand pressOK. - From the menu bar choose
Run->Edit Configurations.... UnderTemplateschooseScalaTestand add the following line toVM parameters:-Djava.library.path=lib/executor/lib/Executor/build -Xss26m(this will tell IntelliJ where to find the Executor library and use 26MB of thread stack size which is needed for arithmetic simplifactions sometimes).