PIL
Stratego -- Strategies for Program Transformation
Platform Independent Language
Intermediate languages are used in compiler construction to simplify retargeting compilers to multiple machine architectures. In the implementation of
domain-specific languages (DSLs), compilers typically generate high-level source code, rather than low-level machine instructions. DSL compilers target a software platform, i.e. a programming language with a set of libraries, deployable on one or more operating systems. DSLs enable targeting
multiple software platforms if its abstractions are platform independent. While transformations from DSL to each targeted platform are often conceptually very similar, there is little reuse between transformations due to syntactic and API differences of the target platforms, making supporting multiple platforms expensive.
We introduce
PIL, a Platform Independent Language, an intermediate language providing a layer of abstraction between DSL and target platform code, abstracting from syntactic and API differences between platforms, thereby removing the need for platform-specific transformations.
PIL is developed by
Zef Hemel and
Eelco Visser
Back-ends
PIL can translate programs written in
PIL to the following platforms:
Other back-ends are planned.
Publications/Manuals
- PilManual
- Zef Hemel, Eelco Visser. PIL: A Platform Independent Language for Retargetable DSLs. In Mark G. J. van den Brand, Jeff Gray, editors, Software Language Engineering, Second International Conference, SLE 2009, Denver, USA, October, 2009. Revised Selected Papers. Lecture Notes in Computer Science, Springer, 2009. researchr
Download
Builds are available from our buildfarm:
http://hydra.nixos.org/jobset/pil/pil-trunk . To install
PIL with
Nix, do the following:
nix-channel --add http://hydra.nixos.org/jobset/pil/pil-trunk/channel/latest
nix-channel --update
nix-env -i pil
or you can build from source from subversion. For building you need a recent version of Stratego/XT, Java-front and JDK 5+ and Apache Ant.
svn co https://svn.strategoxt.org/repos/StrategoXT/pil/trunk
./bootstrap
./configure --prefix=/usr/local
make
make install
FAQ
- Can PIL only be used in combination with Stratego/XT?
No, PIL can be used as a separate compiler too (using pilc).
For any questions or further information, please e-mail
z.hemel@tudelft.nl