This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Interpreter for the Rule Specification Language (RSL)

Project Description

pyrsl is an interpreter for a language called RSL (Rule Specification Language). RSL is commonly used as a template language to express transformations from a BridgePoint model into a textual representation, e.g. when writing model compilers or when generating html documentation from a model.


POSIX users with python available on thier system may grab gen_erate.pyz from a release. The .pyz file contain pyrsl and all of its dependencises, and may be executed directly without installing anything:

$ chmod +x gen_erate.pyz
$ ./gen_erate.pyz -h

Optionally, the .pyz file may be added to your PYTHONPATH:

$ export PYTHONPATH=some/path/gen_erate.pyz
$ python -m rsl.gen_erate -h

pyrsl is also available from pypi:

$ python -m pip install pyrsl
$ python -m rsl.gen_erate -h


Generally, Windows users don’t have python installed. However, pyrsl releases include gen_erate.exe that contain pyrsl and all of its dependencies, including python.

Command Line Options

To remain backwards compatable with the original RSL interpreter, some command line options are a bit confusing. Also, some of the options are not used by pyrsl.

pyrsl also contain a few additional command line options not available in the original RSL interpreter:

-include Add a path to list of dirs to search for include files.
-diff Save a diff of all emits to a filename.
-emit Chose when to emit, i.e. never, on change, or always.
-force Make read-only emit files writable.
-integrity check the model for integrity violations upon program exit

For more information, see the help text by appending -h to the command line when executing gen_erate.

Developer Notes

pyrsl depend on pyxtuml, see its github page for install instructions.

Test suites

pyrsl contain a set of unit tests that may be executed:

$ git clone
$ cd pyrsl
$ python test

Bundling gen_erate

pyrsl may be bundled into a self contained file with a limited amount of external dependencies. gen_erate.exe may be produced by issuing the following command on a windows machine where python, ply and pyrsl are installed:

$ python py2exe -O2 -c -b1 -p xtuml,rsl

Note that binaries produced by py2exe depend on MSVCR90.dll which is distributed with the Microsoft Visual C++ 2008 Redistributable Package

To produce gen_erate.pyz, a python zip app that is executable and easy to distribute to POSIX compatable operating systems where python is allready available, use the bundle command.

$ python bundle

Customizing gen_erate

pyrsl may be extended to include additional builtin functions, i.e. bridges, and additional string formatters. The extensions may be added to your own pyz file when invoking the bundle command:

$ python bundle -o gen_erate.pyz -m examples/
$ ./gen_erate.pyz -nopersist -arch examples/customization_test.arc
Running my custom version of gen_erate
customization_test.arc: 4:  INFO:  the md5 of 'hello world' is 619d201e5209d3d52342cc5b6616b0cf
customization_test.arc: 11:  INFO:  the md5 of hello world is 5eb63bbbe01eeed093cb22bb8f5acdc3

See and customization_test.arc for more information.

Reporting bugs

If you encounter problems with pyrsl, please file a github issue. If you plan on sending pull request which affect more than a few lines of code, please file an issue before you start to work on you changes. This will allow us to discuss the solution properly before you commit time and effort.


pyrsl is licensed under the GPLv3, see LICENSE for more information.

Release History

Release History

This version
History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
pyrsl-0.6.0.tar.gz (33.7 kB) Copy SHA256 Checksum SHA256 Source Sep 3, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting