Skip to content
Compiling Scala to Something special
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
ast/src/main/scala/scalan core module don't depend on scala-compiler Jun 2, 2019
common/src fix MemoizedFunc.scala Jun 4, 2019
core/src more accurate Thunk schedule Jun 22, 2019
docs dsl.md updated Feb 20, 2019
kotlin-backend/src core module don't depend on scala-compiler Jun 2, 2019
library-api/src make CollBuilder.replicate specialized on T Jun 19, 2019
library-conf/src/main/scala/special/library/config moved Size API and implementation in separate files Mar 6, 2019
library-impl/src fix multiplyExact (use overload from Java 1.8) Jun 28, 2019
library/src Prepare a fix Jun 25, 2019
macros/src/main/scala/scalan/macros better parsing of annotations Mar 26, 2018
meta/src core module don't depend on scala-compiler Jun 2, 2019
plugin/src/main/scala/scalan/plugin more accurate generation of imports Jan 7, 2019
project Support compiling and running with Jdk9 and above (#24) May 12, 2019
scalanizer making cross library dependencies between Special modules work Mar 25, 2018
toolkit/src core module don't depend on scala-compiler Jun 2, 2019
.gitignore making cross library dependencies between Special modules work Mar 25, 2018
.travis.jvmopts infrastructure for Liftable constants Sep 4, 2018
.travis.yml Support compiling and running with Jdk9 and above (#24) May 12, 2019
DEVELOPMENT.md description of Special Library architecture Jan 11, 2019
LICENSE.txt Initial public version of Scalan-meta Aug 29, 2014
README.md README.md thanks YourKit Oct 5, 2018
TODO.md making cross library dependencies between Special modules work Mar 25, 2018
build.sbt core module don't depend on scala-compiler Jun 2, 2019
debugsbt.sh better CostedOption (similar to CostedCol) Jan 13, 2019
masterplan.md [optimize] optimize.md added Oct 12, 2018
measure build graph.md optimization of Library instantiation time (part 2) Dec 17, 2018
new-feature-branch.sh Improved push-github script Dec 3, 2014
optimize.md
profile-sbt.sh resetContext method added Nov 17, 2018
version.sbt add secured env vars; Nov 13, 2018

README.md

Special: Compiling Scala to Something special

Join the chat at https://gitter.im/scalan/scalan Build Status

Intro

DISCLAIMER: This is very experimental! Use it at your own risk.

Special is a framework for compiling Scala to something special. It allows you to write Scala code and compile it into some domain specific execution engine by configuring your specific compilation pipeline.

Special subsumes Scalanizer and includes it as submodule.

Special can be used to develop domain-specific compilers for hot-spot optimization in Scala. (The basic idea is explained in this Scala Days video. The corresponding demonstration project is here)

Special is the only framework (to our best knowledge) which uses Isomorphic Specialization: a new specialization algorithm and technique which allows to perform cross-domain translations of programs. It enables construction of compilation pipelines with gradual lowering of domain-specific abstractions. Other approaches exist though :-)

Please visit Scalan Google Group for Special discussions. See also Contributions below and get involved.

Building the project and running tests

SBT is required to build Special. See SBT documentation for installation and usage instructions.

If you want to create your own project depending on Special, you should use publishLocal SBT command to publish Special artifacts to your local Ivy repository and add dependencies as usual.

Stability

Currently this is experimental research playground and quite far from stable release. If you are interested to try it out for you special case, please get in touch.

If you are familiar with Scalan and/or LMS

With the introduction of Scalanizer, the role of scalan-core is shifted one level down in the middle part of the compilation pipeline to perform main transformations of Scalan IR at compile time. Even though Special still can be used for development of new EDSLs without Scalanizer using old Scalan way, this is NOT its main use case.

With Special if you write a program which is legal Scala, but not legal in your special domain, there should be error messages or warnings at compile time issued by Scalanizer plugin. This is one of the reasons and rationale for creating Special as a new frontend for Scalan pipeline, in this way errors can easily be handled at compile time.

Contributions

Minor pull requests (typos, bug fixes and so on) are gladly accepted; for anything larger please raise an issue first.

Issues with the low-hanging fruit label should be easy to fix if you want something to get started with.

If you want to start working on an issue (existing or one you just raised), please label it in progress.

Acknowledgments

We thank JetBrains for supporting Scalan project since 2016 by providing All Products Pack subscription.

We thank YourKit for support of open source projects with its full-featured Java Profiler. YourKit, LLC is the creator of YourKit Java Profiler and YourKit .NET Profiler, innovative and intelligent tools for profiling Java and .NET applications.

See also

Scalan - the original framework for domain-specific compilation. Currently frozen and most usefull ideas are being reincarnated in Special.

Scalanizer - a first version of experimental Scala plugin which allows to capture Scala ASTs and translate it into Scalan IR. (subsumed by this submodule.)

Scalanizer Demo - a simple project that demonstrates how to use Scalanizer, declare hot-spot regions and generate efficient kernels for JVM and native execution. (this corresponds to Scala Days 2015 demonstration)

You can’t perform that action at this time.