Crate asdi
Another Simplistic Datalog Implementation (in Rust).
This package provides a data model to represent Datalog programs in memory, a parser for the textual representation, and some evaluation implementations.
The text representation parser is a separate feature, so if you only need to construct and evaluate programs using the API you may opt out of the Pest parser and support.
Status
- Library API mostly stable, but minimal, will try and make the construction API more ergonomic.
- Library Documentation good top-level documentation but very little else right now.
- Library validation checking basic checking, but some is done in the parser and needs to be in the library.
- Parser full support for the core language as well as most pragmas (see next), require more unit tests.
- I/O nothing implemented, need to build out the input for extensional and output for intensional relations.
- Evaluation current evaluator is basically top-down brute force and does not support any additional language features.
Example
parent(xerces, brooke).
parent(brooke, damocles).
ancestor(X, Y) ⟵ parent(X, Y).
ancestor(X, Y) ⟵ parent(X, Z) ⋀ parent(Z, Y).
?- ancestor(xerces, X).
use ;
use ;
use Program;
use FromStr;
Changes
Version 0.2.0
- New internal structures and library layout.
- Less cloning, but still too much.
- Finished top-level documentation, more to come.
Version 0.1.0
- Not published, used for own verification only.
Version 0.1.0-dev
- Initial release, mostly to verify CI infrastructure through to crates.io