Commit c7770a6
committed
Add Datalog evaluator and type resolution packages
Introduce two new self-contained packages:
- internal/datalog: A purpose-built Datalog evaluator implementing
semi-naïve bottom-up evaluation with stratified negation. Supports
symbol interning, rule building, nested-loop joins, and fixpoint
computation (~720 lines).
- internal/datalog/typeres: SQL type resolution expressed as Datalog
rules over relations (base_type, implicit_cast, operator, function_sig,
expr_type, etc.). Derives resolved_type, castable, and common_type.
Includes LoadPostgreSQLTypes() with ~25 common PG types and their
cast paths (~680 lines).
https://claude.ai/code/session_01Tp4qzqnkRGVxJnJa9ARtDi1 parent 4bf2159 commit c7770a6
4 files changed
Lines changed: 1841 additions & 0 deletions
0 commit comments