Skip to content

Rule compiler, positive fragment: persistent rules as arrangements in the maintainer (V3) #310

Closed

Description

@jsam

Part of epic #305.

Problem. Rules are compiled per query into fresh dataflows and their results discarded (src/lib.rs:1543-1775, src/code_generator/mod.rs:378-440); the only compiled-rule type is never executed (src/derived_relations.rs:50-70).

Target. Compile the catalog's rules (select/project/join/union, arithmetic, comparisons, pure string/vector functions; no recursion/negation/aggregates yet, which are refused by the maintainer until V4/V5 and served by the recompute path meanwhile) from the canonical IR into the maintainer: scans import base/view arrangements, joins use join_core on arranged inputs, each head gets arrange_by_key (first column) and arrange_by_self. Build at registration from current arrangements; drop at removal. The query path still recomputes (V9 flips reads). Tests reuse the existing codegen closures where possible so operator semantics are shared.

Acceptance. Oracle on random histories: every maintained view equals recompute at every revision for a corpus of non-recursive rule packs (shop pack, voice pack minus recursion); an ordinary update does not rebuild the dataflow (counter); maintenance time per commit and bytes per view reported; rule_evaluations unchanged (reads still recompute).

Size L (split allowed: single rule / multi-rule stratified). Dependencies V2. Order slot 2. Supersedes #181.

Activity

  1. jsam commented on Oct 7, 2026

    @jsam
    ContributorAuthor

    Landed in https://github.com/inputlayer/inputlayer-symbolic/pull/28: positive persistent rules are compiled into maintained views behind engine.views = maintained; independently verified under concurrent writers (0 divergences against recomputation). Still open here: the measurement of the commit-path feed to the maintainer in maintained mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions