short introduction

1. Interpreter
2. Introduction
3. Error messages
4. Example programs

Short introduction to the Janus interpreter

This is not a description of the semantics of Janus (see [1]) or a manual to Janus (see [2]), but a introduction to this implementation of Janus, which is based on [1]. Compared to the semantics from [1] three keywords have been added error, write and read, which ease the program development. error id, this statement raises an error with a string argument. write var, this statement outputs the variable which is given as argument. read var, this statement has no effect at the moment. Numbers in the interval [231, 232-1] represent negative numbers in the interval [-231-1, -1]. Thus the biggest positive number plus one becomes the smallest negative number. If you write a number which is bigger than 232 it will be converted by modulo 232. The interpreter starts by executing the procedure called main. If this procedure does not exist the last procedure in the program will be executed.

References

[1] Yokoyama, T. and Glück, R. 2007. A reversible programming language and its invertible self-interpreter. In Proceedings of the 2007 ACM SIGPLAN Symposium on Partial Evaluation and Semantics-Based Program Manipulation (Nice, France, January 15 - 16, 2007). PEPM '07. ACM Press, New York, NY, 144-153. DOI= http://doi.acm.org/10.1145/1244381.1244404 [2] C. Lutz. Janus: a time-reversible language. A letter to Landauer. http://www.cise.ufl.edu/~mpf/rc/janus.html, 1986.