aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authoreunhhu <[email protected]>2026-10-19 00:16:56 +0100
committereunhhu <[email protected]>2026-10-19 00:16:56 +0100
commit3cc6bc3d8a1d8827519decbf7e084e89110c93f9 (patch)
treeeb2aa0a0df93815a562e270696b6de3717198c0f /docs
parentd7caf4dfb1947d8f804e3d8ae7ef066c6e3b8fb7 (diff)
downloadpure-3cc6bc3d8a1d8827519decbf7e084e89110c93f9.tar.gz
pure-3cc6bc3d8a1d8827519decbf7e084e89110c93f9.zip
027's 4f-3b: no fixed count of records or of their fields in all: the header's u16s alone (16 and 128 before); a stored list's record graph (PureLayout) holds a few records itself and more on the heap, 256 at most (an image numbers them in a byte), an image or a checkpoint not written then without room for it; a record's 16 fields kept, the list engine's width (a leaf's columns, a run's columns and narrow cells, the arrays' and packs' columns), to be widened with the lists' shapes sized to their fields; unit tests: 20 records of 10 fields (200 in all), an item of the last appended; a stored list whose six records each hold a list of the next saved and read back after a restart (its graph on the heap); counts: b41 against b40 with batches BFS +0.12%, without BFS -0.09%, the rest within 0.001%; the bank's queries (s40 and s41 in turns, six each) within 0.09% (the first three's in_credit +1.16% its spread: 2.75% between runs of one build); 008 and 027
Diffstat (limited to 'docs')
-rw-r--r--docs/design/008-module-format.md6
-rw-r--r--docs/design/027-computation-core.md11
2 files changed, 15 insertions, 2 deletions
diff --git a/docs/design/008-module-format.md b/docs/design/008-module-format.md
index e940e6a..fa59692 100644
--- a/docs/design/008-module-format.md
+++ b/docs/design/008-module-format.md
@@ -190,8 +190,10 @@ bool은 실행 중에 수의 칸에 든 0이나 1이고, i64는 같은 8바이�
## 로드할 때 검증하는 것
- 머리말, 예약 바이트, 명령 패딩이 0인지. 한도(명령 65,535, text 상수 4,096개·1 MiB, 이름 문자열 32 KiB)와 정확한 파일 크기.
- 상태, 입력, 보기(지은 열까지 u16), 핸들러, 메시지 필드의 수는 머리말의 u16이 정할 뿐이다(027의 4f-2, 4f-3a). 메시지 하나의
- 필드는 64까지다(SEND가 모두 스택에 올린다). 출력은 255까지다(저장소가 링크와 보낼 것의 이미지에 그 수를 바이트로 적는다). 명령과 상수, 그리고 상태·입력·보기·레코드 따위의 표는 모듈 크기에 맞춘 블록에 담긴다(4f-1). 앱이 상태마다
+ 상태, 입력, 보기(지은 열까지 u16), 핸들러, 메시지 필드, 레코드, 레코드 필드의 수는 머리말의 u16이 정할 뿐이다(027의 4f-2, 4f-3a,
+ 4f-3b). 메시지 하나의 필드는 64까지다(SEND가 모두 스택에 올린다). 출력은 255까지다(저장소가 링크와 보낼 것의 이미지에 그 수를
+ 바이트로 적는다). 레코드 하나의 필드는 16까지다(리스트의 잎이 열 16을 가진다, module-list.c). 저장 리스트의 레코드 그래프는 256
+ 레코드까지다(이미지가 그 번호를 바이트로 적는다). 명령과 상수, 그리고 상태·입력·보기·레코드 따위의 표는 모듈 크기에 맞춘 블록에 담긴다(4f-1). 앱이 상태마다
가지는 배열도 모듈의 상태 수에 맞춘다. JIT은 상태가 32개까지인 모듈만 컴파일한다(그 집합이 한 단어의 비트다). 넘는 모듈은
실행기가 모두 돈다. 걷기와 집계의 인자는 리스트를 8비트에 적으므로(아래 표) 그것이 도는 리스트는 상태 번호 256 아래다.
호스트는 모듈 파일을 크기대로 읽는다(`pure_module_read`).
diff --git a/docs/design/027-computation-core.md b/docs/design/027-computation-core.md
index d555204..06bfe02 100644
--- a/docs/design/027-computation-core.md
+++ b/docs/design/027-computation-core.md
@@ -468,6 +468,17 @@
- 시험: 단위 시험이 입력 40개와 보기 70개를 가진 모듈을 로드하고 마지막 입력과 마지막 보기를 쓴다.
- 명령 수(b40 대 b39b): 묶음과 함께, 실행기만 모두 ±0.01% 안이다(실행기만의 BFS +0.09%). 은행 질의(s39b와 s40을 한 번에 번갈아
세 번)는 in_credit −0.64%, per_branch −0.37%, field +0.34%, found +0.22%, ranks −0.22%, large +0.13%, none −0.01%다.
+ - **4f-3b 만듦(2026-10-19).** 레코드와 레코드 필드의 수는 머리말의 u16이 정할 뿐이다(전에는 16과 128).
+ - 저장 리스트의 레코드 그래프(`PureLayout`)는 몇(4) 레코드를 제 안에, 넘으면 힙에 두고, 256 레코드까지다(이미지의 머리가 그래프의
+ 레코드 번호를 바이트로 적는다). 그것을 짓지 못하면 이미지와 체크포인트가 그때 쓰이지 않는다.
+ - 레코드 하나의 필드 16은 남겼다. 리스트 엔진의 너비다: 잎의 열(`Layout`의 열 16), 런(`PureRun`의 열과 좁은 칸 [16][32]), 배열 꼴과
+ 팩(`columns[16]`)이 그것으로 짜여 있다. 넓히면 리스트마다(레코드 안의 리스트 하나하나도) 그 표가 커지고 런이 스택에서 네 배가
+ 되므로, 리스트의 꼴을 필드 수에 맞추는 일과 함께 따로 한다(남은 것).
+ - 시험: 단위 시험이 레코드 20개(필드 200개)의 모듈에서 마지막 레코드의 리스트에 덧붙이고, 레코드 여섯이 차례로 다음의 리스트인
+ 저장 리스트를 저장하고 다시 시작해 읽는다(그래프가 힙에 간다).
+ - 명령 수(b41 대 b40): 묶음과 함께 BFS +0.12%, 실행기만 BFS −0.09%, 나머지 ±0.001% 안이다. 은행 질의(s40과 s41을 한 번에 번갈아
+ 여섯 번)는 in_credit +0.09%, per_branch +0.05%, ranks +0.03%, 나머지 ±0.01% 안이다. 처음 세 번의 in_credit +1.16%는 그 질의의
+ 흔들림이었다(같은 빌드의 여섯 번 사이 2.75%).
- **차례의 까닭.**
- 4a는 작고, 3단계의 끝을 맺는다.
- 4b는 가장 많이 지운다. 키 있는 메시지와 기준 리비전이 사라지면 4d가 단순해진다.