跳转到内容
查看源码

设计决策

docs/DECISIONS.md 回答**“Entelechy 为什么是这样而不是别的样子”**——代码中看不出来的原因。每一条都是在架构文档边界内做出的裁决,在被按名字替换之前一直有效:选择、原因、以及代码在哪里保证它(Where)。

下表是全部 32 条的索引(中文为本文档的意译,以英文原文为准)。

# 决策 原文
1 图计算结构,从不计算值 The Graph computes structure, never values
2 Host 约束工作量与内存 The Host bounds work and memory
3 运行时计数的循环整体运行;预算约束它 A loop counted at run time runs whole; the budget bounds it
4 函数永远不会到达自己;它在文档中的位置是自由的 A function never reaches itself; its place in the document is free
5 一个表达式在每个后端上只有一个答案 One expression has one answer on every backend
6 group 的各 lane 在 exchange 处相遇 A group’s lanes meet at exchanges
7 一帧只运行有人读取的部分;check 说明运行会做什么 A frame runs what something reads; a check says what running would
8 节点可以按某一行的值休眠 A node may sleep by what a row says
9 语言只因所有者的决定而增长 The language grows only by the owner’s word
10 遍历输入的 Kernel 要说出它的名字 A Kernel that walks an input names it
11 公共契约只增长;只随版本破坏 A public contract grows; it breaks only with its version
12 来源归加载器;名字归语言 Sources are the loader’s; names are the language’s
13 Entelechy 用它所执行的表描述自己 Entelechy describes itself, from the tables it enforces
14 有两个所有者的规则收归一个 A rule that had two owners is held to one
15 Kernel 的效果是 Host 在提交后执行的数据 A Kernel’s effects are data the Host carries out after a commit
16 世界可以编写自己的定律 A world may write its own laws
17 served 场景能接触到的,就是运行它的人给出的 What a served scene reaches is what the person running it gave
18 场景从 Host 世界读取的,是输入或节点 What a scene reads of the Host’s world is an input or a node
19 现实原子地改变;历史记录原因 Reality changes atomically; history records why
20 运行中的世界通过三扇门改变,各有各的粒度 A live world is changed through three doors, each at its own grain
21 “播放一个场景”的含义只决定一次 What playing a scene means is decided once
22 场景说出输出或输入对接的 Host 设备 The scene names the Host device an output or input meets
23 指针由 Kernel 绘制、由系统显示 The pointer is drawn by a Kernel and shown by the system
24 回放就是测试;框架测试自己 A replay is a test; the framework tests itself
25 平台是 Host 的世界;场景计算什么与平台无关 A platform is the Host’s world; what a scene computes is not
26 光栅化器是一个包;原生光栅化器是它的快速路径 The rasterizer is a package; the native one is its fast path
27 运行去哪里由后端决定;它计算什么不由后端决定 Where a run goes is the backend’s; what it computes is not
28 修改在帧之外准备;无效的东西从不发布 A change prepares off the frames; nothing invalid publishes
29 只在答案相同处节省工作 Work is spared only where the answer is the same
30 包用函数、Kernel、图预设和数据说话 A package speaks in functions, Kernels, graph presets and data
31 一个词因探针写不出而进入 A word enters by what a probe could not write
32 表格中的文本是该行中的码点数组 A table’s text is an array of codes in its row

手册中引用了其中多条:图与状态(1、8)、后端(5、27)、能力与安全(17)、热替换(19、20、28)、回放测试(24)、包(30、31)。