Skip to content

Add Datalog evaluator and type resolution packages#4360

Open
kyleconroy wants to merge 1 commit intomainfrom
claude/datalog-evaluator-go-18ji4
Open

Add Datalog evaluator and type resolution packages#4360
kyleconroy wants to merge 1 commit intomainfrom
claude/datalog-evaluator-go-18ji4

Conversation

@kyleconroy
Copy link
Copy Markdown
Collaborator

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_01Tp4qzqnkRGVxJnJa9ARtDi

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_01Tp4qzqnkRGVxJnJa9ARtDi
@dosubot dosubot bot added the size:XXL This PR changes 1000+ lines, ignoring generated files. label Mar 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants