Parsing and Printing of and with Triples: Amperspiegel source code

This page corresponds to the RAMICS'17 paper, containing the source-code corresponding to the paper.

Paper abstract. We introduce the tool Amperspiegel, which uses triple graphs for parsing, printing and manipulating data. The tool was originally developed to aid in the development of Ampersand. We show how to conveniently encode parsers, graph manipulation-rules, and printers using several relations. Accordingly, parsers, rules and printers are all encoded as graphs themselves. This allows us to parse, manipulate and print these parsers, rules and printers within the system. A parser for a context free grammar is graph-encoded with only four relations. The graph manipulation-rules turn out to be especially helpful when parsing. The printers strongly correspond to the parsers, being described using only five relations. The combination of parsers, rules and printers allows us to extract Ampersand source code from Archimate XML documents.

Source files

Download the sources of the necessary parts of Amperspiegel, together with the files necessary to parse Archimate documents. The current license is a highly restrictive review-only license. Should the paper be accepted, a (less restrictive) research-only license will be offered. The purpose of these licenses is to prevent distribution of the sources. Another (arguably better!) version of Amperspiegel is offered as open-source (GLP3) on github/sjcjoosten/amperspiegel, which is intended for distribution. If you intend to use this software for any purposes other than reviewing (or research), then that is probably the version you want to use.

Installation

The software is tested with GHC-8.0.1. Newer versions are likely to work too. Installation works via haskellstack. If you are working on Unix, you can install it via curl -sSL https://get.haskellstack.org/ | sh.

To install amperspiegel, simply type (from the unpacked sources directory):

stack install

Check the output of the command: it will warn you if the installation directory is not in your path (if so, put it there). You should be able to use: amperspiegel -h

Reproducing claims in the paper

We distinguish claims made in relation to amperspiegel from those made in relation to the application. For the claims in relation to amperspiegel, go to the directory Base to reproduce these claims:

For the claims in the application section of the paper, go to the directory Archimate to reproduce these claims:


This page was made by Sebastiaan J. C. Joosten