## Project Roadmap This document tracks the current state and next steps for the repository. > [!IMPORTANT] > The project is still early-stage. Treat this roadmap as directional rather > than fixed, and do not read unchecked items as implied existing behavior. ### Current Foundation - [x] Rust crate and binary named `query_engine` / `query-engine` - [x] Core term representation (`Constant`, `Null`, `Variable`) - [x] Atom structure (predicate with terms) - [x] Fact storage via `Instance` - [x] Tuple-generating dependencies (TGDs) - [x] Equality-generating dependencies (EGDs) - [x] Rule and EGD builders - [x] Variable substitutions and atom unification - [x] Restricted chase implementation - [x] Standard chase implementation - [x] Existential variable support (labeled null generation) - [x] Multi-atom rule bodies and heads - [x] Equality merging with union-find support - [x] REPL, script runner, and local web UI - [x] Provenance-oriented explanation support ### Near-Term Cleanup - [ ] Keep all public docs aligned with actual implemented behavior - [ ] Remove remaining stale terminology in comments and help text - [ ] Expand examples for the current rule-engine workflow - [ ] Add rustdoc coverage for the main public types ### Query-Engine Structure - [ ] Introduce a dedicated logical representation module - [ ] Define clear front-end, planning, and execution boundaries - [ ] Add engine-level abstractions that are not chase-specific - [ ] Establish common schema and typed-value representations - [ ] Design a source boundary for future scans and pushdown ### Front End and Planning - [ ] Add a parser-oriented module beyond the current rule REPL language - [ ] Add AST types for a structured query front end - [ ] Add logical plan node types - [ ] Add name resolution and schema validation hooks - [ ] Add expression typing and nullability tracking ### Execution and Optimization - [ ] Introduce physical operator abstractions - [ ] Add a planning step from logical operators to executable operators - [ ] Add basic rule-based logical rewrites - [ ] Add statistics and cost-model scaffolding - [ ] Add indexing and access-path abstractions ### Rule-Engine Evolution - [x] Restricted chase - [x] Standard chase - [ ] Oblivious chase - [ ] Skolem chase - [ ] Core chase - [ ] Negative constraints - [ ] Stratified negation in rule bodies - [ ] Disjunctive heads - [ ] Aggregation support in rule evaluation - [ ] Semi-naive evaluation - [ ] Termination analysis helpers ### Data and Interoperability - [ ] Fact import/export - [ ] File-backed data source experiments - [ ] Table-like row or batch abstractions - [ ] Stable script/query file format - [ ] Integration with external storage or file formats ### Performance and Reliability - [ ] Predicate indexing for fact lookup - [ ] Incremental evaluation - [ ] Benchmarks - [ ] Fuzzing - [ ] Profiling-guided optimization passes ### Testing and Tooling - [x] Unit tests - [x] Integration tests - [x] Property-based tests - [x] Regression tests - [ ] Benchmark coverage - [ ] Snapshot-style frontend tests - [ ] More planner/executor tests as those layers are added