From 4c2d3d4808827d12415e629bff27833c80de72d7 Mon Sep 17 00:00:00 2001 From: eunhhu Date: Mon, 28 Sep 2026 05:22:14 +0100 Subject: Slice a keyed list: fold and walk over a range of keys A fold whose kind has PURE_FOLD_SLICED (128), and a walk whose argument has PURE_EACH_SLICED (bit 0), first take two numbers, a low and a high key, and run for the items of their list (keyed by a number) whose keys are from low up to before high, found by key: the range is the program's meaning, not an optimization, so their blocks may fault (items out of the slice never run). A fold a leaf at a time now leaves out the lanes of a leaf outside the items it runs for, and a leaf that would fault runs item by item over those items alone. Slices are neither shaped nor given automatic ranges. ranges now checks a count over a slice whose test divides (a division by zero failing it only when inside the slice) against a model, the same on the item-by-item path, and a walk over a slice. --- docs/design/008-module-format.md | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'docs/design') diff --git a/docs/design/008-module-format.md b/docs/design/008-module-format.md index dbac460..36423b2 100644 --- a/docs/design/008-module-format.md +++ b/docs/design/008-module-format.md @@ -191,6 +191,11 @@ text, 끝이 맞지 않는 바이트는 메시지를 `limit`으로 실패시킨 건너뛴 항목이 돌렸을 일이 없어야 하기 때문이다. 걷기의 경계는 블록이 쓰는 상태·지역 칸·리스트를 읽지 않을 때만 쓴다(경계는 걷기 전에 한 번 계산하고, where는 항목마다 다시 읽는다). 경계가 결함을 내면 범위 없이 쓰인 대로 돈다. +**조각.** 종류에 128(PURE_FOLD_SLICED)을 더한 집계와 인자의 비트 0(PURE_EACH_SLICED)을 켠 걷기는 먼저 수 두 개(낮은 키, 높은 +키)를 꺼내, 수로 키를 둔 리스트에서 키가 낮은 키부터 높은 키 앞까지인 항목만 돈다(키로 찾은 두 위치 사이). 범위를 뜻으로 적은 +것이라 블록이 결함을 낼 수 있어도 되고(조각 밖의 항목은 돌지 않는다), 잎 단위 실행은 조각 밖의 레인을 빼며, 결함이 날 잎은 조각 +안의 항목만 하나씩 돈다. + **지역 칸.** 이벤트는 수나 인덱스를 담는 칸 64개를 0으로 시작해 핸들러들과 그 안의 걷기·집계가 함께 쓴다(LOCAL_LOAD·LOCAL_STORE). 상태가 아니라 저장되지 않고, 이름공간을 쓰지 않으며, 보기에는 없다. 한 칸은 한 핸들러에서 한 가지로 쓰여 검증된 타입을 지킨다. 잎 단위 실행에서는 모두에 같은 값이고, 한 번의 통과로 답하는 집계에서는 키 쪽에만 온다. -- cgit v1.2.3