## 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 - [x] Relational schema, value, row, and result-set scaffolding - [x] Predicate-backed catalog inference - [x] Minimal SQL AST and parser - [x] Logical plan scaffolding - [x] Logical-plan execution for the first SQL slice - [x] Single-table `SELECT-FROM-WHERE` support with positional columns (`c0`, `c1`, ...) ### 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 - [ ] Document the current SQL subset and its limits ### Query-Engine Structure - [x] Introduce a dedicated logical representation module - [x] Define clear front-end, planning, and execution boundaries - [ ] Add engine-level abstractions that are not chase-specific - [x] Establish common schema and typed-value representations - [ ] Design a source boundary for future scans and pushdown ### Front End and Planning - [x] Add a parser-oriented module beyond the current rule REPL language - [x] Add AST types for a structured query front end - [x] Add logical plan node types - [x] Add name resolution and schema validation hooks - [x] Add expression typing and nullability tracking - [ ] Add aliases and richer projection expressions - [ ] Add joins across multiple predicate-backed tables - [ ] Add a catalog path for stable column naming beyond `c0`, `c1`, ... ### Execution and Optimization - [ ] Introduce physical operator abstractions - [x] 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 - [x] 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 - [x] Initial SQL pipeline tests - [ ] Benchmark coverage - [ ] Snapshot-style frontend tests - [ ] More planner/executor tests as those layers are added