# Unipycation: A Language Composition Experiment

Unipycation is an experimental composition of a Python interpreter (PyPy http://pypy.org/) and a Prolog interpreter (Pyrolog by Carl Friedrich Bolz https://bitbucket.org/cfbolz/pyrolog). The languages are composed using RPython, meaning that the entire composition is meta-traced.

The goal of the project is to identify the challenges associated with composing programming languages whose paradigms differ vastly and to evaluate RPython as a language composition platform.

## Obtaining the Source from Mercurial

You need to clone this repo, then switch to the unipycation branch:

$hg clone https://bitbucket.org/softdevteam/unipycation$ cd unipycation
$hg up unipycation  ## Building You need to have installed: To build from a mercurial clone: $ python2.7 bootstrap.py all


To build from a release tarball:

$python2.7 bootstrap.py build$ python2.7 bootstrap.py configure


On a 64-bit architecture the translation process will consume about 8GiB of memory at peak. If you have PyPy installed, you can improve translation time by setting the TRANSLATE_WITH environment variable to the absolute path of your PyPy binary. If you are using PyPy to translate, you can also reduce memory consumption to about 4GiB by setting the environment variable PYPY_GC_MAX_DELTA=400MB.

If you are looking to build the other unipycation VMs too, then use the universal bootstrapper at: https://bitbucket.org/softdevteam/unipycation-shared

## Running

After building, the unipycation executable can be found and run at pypy/goal/unipycation.

## Using Unipycation

The interface is described in the paper Unipycation: A Case Study in Cross-Language Tracing which appeared in VMIL'13.

## Unit Tests

Unit tests are run as per the normal PyPy procedure. Please refer to the PyPy docs. In particular, note that the unipycation-shared and pyrolog source trees must be in PYTHONPATH.

## Authors

Unipycation is authored by Edd Barrett and Carl Friedrich Bolz.