WIP
This commit is contained in:
parent
e12d2d811c
commit
aac85af9a1
48
README.md
48
README.md
@ -1,27 +1,27 @@
|
||||
# chase-rs
|
||||
## Chase-rs
|
||||
|
||||
An efficient implementation of the chase algorithm in Rust for advanced reasoning engines.
|
||||
An implementation of the chase algorithm in Rust for advanced reasoning engines.
|
||||
|
||||
## Overview
|
||||
### Overview
|
||||
|
||||
The chase algorithm is a fundamental technique in database theory and knowledge representation used for:
|
||||
The chase algorithm is a fundamental technique in context of database theory and knowledge representation used for:
|
||||
|
||||
- Query answering under tuple-generating dependencies (TGDs)
|
||||
- Computing universal models
|
||||
- Ontology-based data access (OBDA)
|
||||
- Datalog with existential rules
|
||||
|
||||
This implementation provides a **restricted chase** that ensures termination even with existential rules by tracking applied triggers.
|
||||
This implementation provides a **restricted chase** that guarantees termination even with existential rules by tracking applied triggers.
|
||||
|
||||
## Features
|
||||
### Features
|
||||
|
||||
- **Core Data Types**: Terms, Atoms, Rules, Instances
|
||||
- **Core Data Types**: Terms, Atoms, Rules, and Instances
|
||||
- **Existential Quantification**: Automatic generation of labeled nulls
|
||||
- **Restricted Chase**: Termination guarantees via trigger tracking
|
||||
- **Fluent API**: `RuleBuilder` for readable rule construction
|
||||
- **Zero Dependencies**: Pure Rust with no external runtime dependencies
|
||||
|
||||
## Quick Start
|
||||
### Quick Start
|
||||
|
||||
```rust
|
||||
use chase_rs::{chase, Atom, Instance, Term};
|
||||
@ -54,7 +54,7 @@ assert!(result.terminated);
|
||||
println!("Derived {} facts", result.instance.len());
|
||||
```
|
||||
|
||||
## Existential Rules
|
||||
### Existential Rules
|
||||
|
||||
Rules with head-only variables (existential quantification) automatically generate fresh labeled nulls:
|
||||
|
||||
@ -66,39 +66,19 @@ let rule = RuleBuilder::new()
|
||||
.build();
|
||||
```
|
||||
|
||||
## Project Structure
|
||||
|
||||
```
|
||||
src/
|
||||
├── lib.rs # Library root and re-exports
|
||||
├── main.rs # Binary entry point
|
||||
└── chase/
|
||||
├── mod.rs # Module exports
|
||||
├── term.rs # Terms: Constants, Nulls, Variables
|
||||
├── atom.rs # Atoms: Predicate(term1, term2, ...)
|
||||
├── instance.rs # Database instance (set of facts)
|
||||
├── rule.rs # TGDs with RuleBuilder
|
||||
├── substitution.rs # Variable bindings and unification
|
||||
└── engine.rs # Core chase algorithm
|
||||
tests/
|
||||
├── integration_tests.rs
|
||||
├── regression_tests.rs
|
||||
└── property_tests.rs
|
||||
```
|
||||
|
||||
## Building and Testing
|
||||
### Building and Testing
|
||||
|
||||
```bash
|
||||
# Run all tests
|
||||
## Run all tests
|
||||
cargo test
|
||||
|
||||
# Run with optimizations
|
||||
## Run with optimizations
|
||||
cargo build --release
|
||||
|
||||
# Check for lint warnings
|
||||
## Check for lint warnings
|
||||
cargo clippy
|
||||
```
|
||||
|
||||
## License
|
||||
### License
|
||||
|
||||
This project is licensed under [BSD-3](LICENSE).
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user