query-engine/ROADMAP.md
2026-04-09 11:37:46 +02:00

3.1 KiB

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

  • Rust crate and binary named query_engine / query-engine
  • Core term representation (Constant, Null, Variable)
  • Atom structure (predicate with terms)
  • Fact storage via Instance
  • Tuple-generating dependencies (TGDs)
  • Equality-generating dependencies (EGDs)
  • Rule and EGD builders
  • Variable substitutions and atom unification
  • Restricted chase implementation
  • Standard chase implementation
  • Existential variable support (labeled null generation)
  • Multi-atom rule bodies and heads
  • Equality merging with union-find support
  • REPL, script runner, and local web UI
  • 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

  • Restricted chase
  • 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

  • Unit tests
  • Integration tests
  • Property-based tests
  • Regression tests
  • Benchmark coverage
  • Snapshot-style frontend tests
  • More planner/executor tests as those layers are added