Alzint — An interpreter for AL(ℤ) programs
Source code: alzint.pl
You need Scryer Prolog to run
AL(ℤ) stands for Assignment Language over Integers. It is a
complete programming language supporting variable
assignments, loops and conditions.
Alzint is an interpreter for AL(ℤ) programs, written in
Prolog. Alzint lets you run AL(ℤ) programs. It also supports
single-stepping and reverse execution of AL(ℤ) programs.
This means that previous steps of the execution can
be undone and later repeated.
To run an AL(ℤ) program with Alzint, use run(+File):
For single-stepping, use step(+File):
When single-stepping through an AL(ℤ) program, you press:
- c to continue with the next statement
- r to run the program without further interruption
- u to undo the preceding step (reverse execution)
- q to quit
are ex1.txt, ex2.txt and
A transcript of running ex3.txt: ex3.log
If you are interested in more interpreters and compilers in
Prolog, also check out Thinking in
States and Lisprolog.
Acknowledgments: Many thanks
Fermüller for spawning my interest in AL(ℤ) and countless
other topics in theoretical computer science.