The Relational Abstract Machine (RAM) is the main computation engine for the Relational Computing project, and provides a new foundation for declarative programming based on rewriting and interpretation of Relation Expressions. The relation expressions are variable-free terms in a relation algebra with a fixed point operator.
It is used here as an intermediate compilation language for Horn Clause logic programming with Constrains and other extensions.
The two first items form the RAM software, which can be obtained below.
RAM is at alpha stage of development, but we have some basic features implemented:
Emilio Jesús Gallego Arias is currently working in new features, directed by James Lipton.
Version 1.0 is currently in development.
We use trac for our bug system and roadmap tracking. See it here.
Some old TODO notes can be viewed at this TODO file.
At the moment the machine is not usable as is. We are working hard on that and we will publish a stable release soon.
Previous versions:
This version is still extremely alpha software, but it should run Ok most Prolog programs.
This is the first release. Only the compiler works. The engine is broken and only works for very limited queries.
If you want the most recent implementation, go to the RAM subversion repository. Be warned that RAM is alpha software and subversion trunk is likely to be severely broken.
RAM trunk has the following build requisites:
We test RAM in Debian Lenny.
Once compiled, type ./ramc -h to see a list of available options:
[Ram version 0.3] Relational Abstract Machine Prolog Compiler (c) Emilio Jesús Gallego Arias 2008: Usage: ramc [OPTIONS] file -i --interactive interactive shell -h --help show help -r --ralog output ralog code -o FILE --output=FILE output filename, default r.out -v --verbose verbose level
We have a developer mailing list, you're welcome to post.
An example of a simple RAM execution is below:
egallego@exodo5:~/babel/ram/trunk/src$ ./ramc -i samples/append.pl [Ram version: 0.3] Relational Abstract Machine Prolog Compiler Copyright (C) 2004-2008 Emilio Jes�s Gallego Arias This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. :- append2([1,2], X, [1,2,3]). Query : [I1 . [K(_x1, [1|[2|[]]], [1|[2|[3|[]]]]) /\ [W . append2/3 . cnv(W)]] . I1] Result: K([3|[]], [1|[2|[]]], [1|[2|[3|[]]]]) Meaning: X = [3] Final expression. Rewrite more? (y/n)? y Result: 0 Meaning: No solution :-