myxce/src
Rongsong Shen b38babb7d6 feat: implement Phase 4d const-fold transform for select AST
Adds sel_const_fold_pass() — a single-pass bottom-up const-fold that
runs after the Phase 4c flatten loop in parse_select():

  4d-1  EQ/NE with either operand SEL_ANY → SEL_TRUE / SEL_FALSE
        (checks both child slots — commutativity sort makes SEL_ANY
        position non-deterministic after makeSelectNode interning)
  4d-2  Identity laws: TRUE&&X→X, X&&TRUE→X, FALSE||X→X, X||FALSE→X
  4d-3  Annihilation laws: FALSE&&X→FALSE, TRUE||X→TRUE (symmetric)
  4d-4  Complement laws: !TRUE→FALSE, !FALSE→TRUE

Memory semantics:
  level==0 (API server): frees orphaned nodes via free_select_node /
    sel_free_tree; OOM from makeSelectNode returns original node safely
  level>0  (CSE/scheduler): never manually frees; annihilation folds
    return the already-interned left/right singleton directly (no
    redundant makeSelectNode call); OOM guard unconditional so CSE
    mode also degrades gracefully instead of returning NULL

9 new TDD tests added to test_select.c (RED→GREEN verified).
All 166 tests pass (157 prior + 9 Phase 4d).
2026-04-29 08:24:04 +00:00
..
autoscaler support shared libxce(for api server) 2026-01-19 11:02:49 +08:00
controller feat: P0-2a C-side plumbing for host control 2026-04-17 07:46:41 +00:00
docs feat: implement Phase 4d const-fold transform for select AST 2026-04-29 08:24:04 +00:00
frontend test(apiserver): add integration tests for P0+P1 backend features 2026-04-18 11:56:31 +00:00
include feat: implement Phase 4d const-fold transform for select AST 2026-04-29 08:24:04 +00:00
lib feat: implement Phase 4d const-fold transform for select AST 2026-04-29 08:24:04 +00:00
nixSupport Merge Go frontend (apiserver + xcecli) into meson build 2026-04-14 11:23:18 +08:00
scheduler minor improve 2026-04-14 12:52:40 +08:00
schema feat: P0-2a C-side plumbing for host control 2026-04-17 07:46:41 +00:00
tools save works 2026-03-04 18:18:53 +08:00
worker Merge Go frontend (apiserver + xcecli) into meson build 2026-04-14 11:23:18 +08:00
flake.lock save works 2026-03-04 18:18:53 +08:00
flake.nix save works 2026-03-04 18:18:53 +08:00
meson.build Merge Go frontend (apiserver + xcecli) into meson build 2026-04-14 11:23:18 +08:00
meson.options Merge Go frontend (apiserver + xcecli) into meson build 2026-04-14 11:23:18 +08:00