diff --git a/.github/workflows/deploy-pages.yml b/.github/workflows/deploy-pages.yml index 595bf9166..634860626 100644 --- a/.github/workflows/deploy-pages.yml +++ b/.github/workflows/deploy-pages.yml @@ -30,6 +30,11 @@ jobs: sudo apt-get install -y texlive texlive-fonts-extra latexmk - name: Fetch Yarn dependencies run: yarn install + - name: Clone translated_xmls + run: | + git clone -b translated_xmls https://github.com/source-academy/sicp.git translated_xmls + mv translated_xmls/* xml/ + rm -r translated_xmls - name: Build run: | set -euxo pipefail diff --git a/.github/workflows/translate-changed.yml b/.github/workflows/translate-changed.yml new file mode 100644 index 000000000..70fd3e044 --- /dev/null +++ b/.github/workflows/translate-changed.yml @@ -0,0 +1,55 @@ +on: + workflow_dispatch: + workflow_call: + +concurrency: + group: translate-changed + cancel-in-progress: true + +jobs: + translate-changed: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v4 + - name: cd + run: | + cd i18n + - name: Use Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: yarn + - name: Fetch Yarn Dependencies + run: | + yarn install + - name: Clone translated_xmls + run: | + git clone -b translated_xmls https://github.com/source-academy/sicp.git translation_output + - name: Get Changed Files + id: changed-files + uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46 + with: + files: | + xml/**.xml + - name: Create .env + run: | + touch .env + echo API_MODEL=gpt-4.1-nano >> .env + echo API_KEY=${{ secrets.OPENAI_KEY }} >> .env + # echo API_KEY=${{ secrets.OPENAI_KEY2 }} >> .env + echo MAX_LEN=5000 >> .env + echo MAX_TRANSLATION_NO=10 >> .env + echo CONTEXT=3 >> .env + echo TOKEN_WARNING=7000 >> .env + - name: Translate Changed Files + if: steps.changed-files.outputs.anychanged == 'true' + env: + CHANGED_FILES: ${{ steps.changed_files.outputs.all_changed_files }} + run: | + npx tsx index.ts "${CHANGED_FILES[@]}" + - name: Deploy + uses: peaceiris/actions-gh-pages@v4 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./translation_output + force_orphan: false # leave the possibility for direct modification on translated xmls diff --git a/.github/workflows/translate-everything.yml b/.github/workflows/translate-everything.yml new file mode 100644 index 000000000..b522c1f39 --- /dev/null +++ b/.github/workflows/translate-everything.yml @@ -0,0 +1,43 @@ +on: + workflow_dispatch: + workflow_call: + +concurrency: + group: translate-everything + cancel-in-progress: true + +jobs: + translate-everything: + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v4 + - name: cd + run: | + cd i18n + - name: Use Node.js + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: yarn + - name: Fetch Yarn Dependencies + run: | + yarn install + - name: Create .env + run: | + touch .env + echo API_MODEL=gpt-4.1-nano >> .env + echo API_KEY=${{ secrets.OPENAI_KEY }} >> .env + # echo API_KEY=${{ secrets.OPENAI_KEY2 }} >> .env + echo MAX_LEN=5000 >> .env + echo MAX_TRANSLATION_NO=10 >> .env + echo CONTEXT=3 >> .env + echo TOKEN_WARNING=7000 >> .env + - name: Run Translation + run: | + npx tsx index.ts + - name: Deploy + uses: peaceiris/actions-gh-pages@v4 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./translation_output + force_orphan: false # leave the possiblity for direct modification on translated xmls diff --git a/.gitignore b/.gitignore index 9f1f7b4f9..bfb978f53 100644 --- a/.gitignore +++ b/.gitignore @@ -10,4 +10,8 @@ test_node_env/expect.txt test_node_env/result.txt test_node_env/node_modules .DS_Store +.env *.icloud + +/xml_* +/logs diff --git a/i18n/.env.example b/i18n/.env.example new file mode 100644 index 000000000..33e15b3cd --- /dev/null +++ b/i18n/.env.example @@ -0,0 +1,28 @@ +API_KEY= + +# Model to be used for translation +# ensure that selected assistant supports file search API +# models that are tried and shown to work includes: o3-mini, 4o and 4o mini +AI_MODEL=gpt-4.1-nano + +# maximum number of characters to be sent for translation per batch, default: 3000 +# smaller number of characters could lead to greater translation quality +# but worse continuity +MAX_LEN=5000 + +#Optional, only specify if calling alternative LLM provider +# Note: We require the Assistant API which only OpenAI provides as of 13 April 2025 +AI_BASEURL= + +# maximum number of concurent translations that are allowed +# if unspecified default to 5 +MAX_TRANSLATION_NO=10 + +# Number of previous messages to be referred to in a thread for LLM Translation, if unspecified, default to 3 +# Higher context size might lead to greater continuity in translation but higher cost and lower speed. +CONTEXT=3 + +# Number of token per query which when exceeded will log an error +# Formula to derive an adequate value: MAX_LEN * CONTEXT * k, where k is a constant +# Recommended k = 1.5 +TOKEN_WARNING=7000 \ No newline at end of file diff --git a/i18n/.gitignore b/i18n/.gitignore new file mode 100644 index 000000000..697837f55 --- /dev/null +++ b/i18n/.gitignore @@ -0,0 +1,3 @@ +/node_modules +/translation_output +/logs diff --git a/i18n/ai_files/zh_CN/dictionary.txt b/i18n/ai_files/zh_CN/dictionary.txt new file mode 100644 index 000000000..58598167b --- /dev/null +++ b/i18n/ai_files/zh_CN/dictionary.txt @@ -0,0 +1 @@ +function: 函数 diff --git a/i18n/ai_files/zh_CN/dictionary_.txt b/i18n/ai_files/zh_CN/dictionary_.txt new file mode 100644 index 000000000..da5cf49bd --- /dev/null +++ b/i18n/ai_files/zh_CN/dictionary_.txt @@ -0,0 +1,3214 @@ +" (double quote): 双引号 +' (single quote): 单引号 +` (back quote): 反引号 ++: 加号 ++ (as numeric addition operator): + (作为数值加法运算符) ++ (as string concatenation operator): + (作为字符串连接运算符) +-: 减号 +- (as numeric negation operator): - (作为数值取反运算符) +- (as numeric subtraction operator): - (作为数值减法运算符) +* (multiplication operator): * (乘法运算符) +/ (division operator): / (除法运算符) +% (remainder operator): % (求余运算符) +&& (logical conjunction): && (逻辑与) +&& (as derived component): && (作为派生组件) +&& (evaluation of): && (求值) +&& (implementing in metacircular evaluator): && (在元循环求值器中实现) +&& (parsing of): && (解析) +&& (why a syntactic form): && (为何是语法形式) +|| (logical disjunction): || (逻辑或) +|| (as derived component): || (作为派生组件) +|| (evaluation of): || (求值) +|| (implementing in metacircular evaluator): || (在元循环求值器中实现) +|| (parsing of): || (解析) +|| (why a syntactic form): || (为何是语法形式) +? :: 条件运算符 (三元运算符) +! (logical negation operator): ! (逻辑非运算符) +!==: 不全等运算符 +!== (as numeric comparison operator): !== (作为数值比较运算符) +!== (as string comparison operator): !== (作为字符串比较运算符) +=: 赋值运算符 +===: 全等运算符 +=== (as equality of pointers): === (作为指针相等性判断) +=== (as general comparison operator): === (作为通用比较运算符) +=== (as numeric equality operator): === (作为数值相等性运算符) +=== (as string comparison operator): === (作为字符串比较运算符) +> (numeric comparison operator): > (数值比较运算符) +>= (numeric comparison operator): >= (数值比较运算符) +< (numeric comparison operator): < (数值比较运算符) +<= (numeric comparison operator): <= (数值比较运算符) +=>: 箭头函数定义符 +-> notation for mathematical function: -> (数学函数表示法) +[ , ] (box notation for pairs): [ , ] (序对的方框表示法) +;: 分号 +... (rest parameter and spread syntax): ... (剩余参数与展开语法) +$$ (pattern variables starting with): $$ (以此开头的模式变量) +// (for comments in programs): // (用于程序注释) +theta(f(n)) (theta of f(n)): theta(f(n)) (Theta 记号) +lambda calculus (lambda calculus): lambda 演算 +pi: 圆周率 (pi) +Sigma (sigma) notation: Sigma (求和) 记号 + +A + +abs: abs (绝对值函数) +absolute value: 绝对值 +abstract data: 抽象数据 +abstraction: 抽象 +abstraction (common pattern and): 抽象 (与共同模式) +abstraction (functional): 抽象 (函数式) +abstraction (metalinguistic): 抽象 (元语言) +abstraction (in register-machine design): 抽象 (在寄存器机设计中) +abstraction (of search in nondeterministic programming): 抽象 (非确定性编程中搜索的抽象) +abstraction barriers: 抽象屏障 +abstraction barriers (in complex-number system): 抽象屏障 (在复数系统中) +abstraction barriers (in generic arithmetic system): 抽象屏障 (在通用算术系统中) +abstraction barriers (in query language): 抽象屏障 (在查询语言中) +abstraction barriers (in representing JavaScript syntax): 抽象屏障 (在表示 JavaScript 语法中) +abstract models for data: 数据的抽象模型 +abstract syntax: 抽象语法 +abstract syntax (in metacircular evaluator): 抽象语法 (在元循环求值器中) +abstract syntax (in query interpreter): 抽象语法 (在查询解释器中) +accelerated_sequence: accelerated_sequence (加速序列函数) +accumulate: accumulate (累积函数) +accumulate (same as fold_right): accumulate (与 fold_right 相同) +accumulate_n: accumulate_n (多元累积函数) +accumulator: 累加器 +Ackermann's function: 阿克曼函数 +acquire a mutex: 获取互斥锁 +actions, in register machine: 动作 (在寄存器机中) +actual_value: actual_value (实际值函数) +Ada: Ada (编程语言名) +Adams, Norman I., IV: Adams, Norman I., IV (人名) +add (generic): add (通用加法) +add (generic, used for polynomial coefficients): add (通用加法, 用于多项式系数) +add_action: add_action (添加动作函数) +add_complex: add_complex (复数加法函数) +add_complex_to_javascript_num: add_complex_to_javascript_num (复数与JS数字相加函数) +addend: addend (加数选择器) +adder (primitive constraint): adder (加法器原语约束) +adder: 加法器 +adder (full): 加法器 (全加器) +adder (half): 加法器 (半加器) +adder (ripple-carry): 加法器 (行波进位) +add_interval: add_interval (区间加法函数) +additivity: 可加性 +add_lists: add_lists (列表相加函数) +add_poly: add_poly (多项式加法函数) +add_rat: add_rat (有理数加法函数) +address: 地址 +address arithmetic: 地址算术 +add_rule_or_assertion: add_rule_or_assertion (添加规则或断言函数) +add_streams: add_streams (流加法函数) +add_terms: add_terms (项加法函数) +add_to_agenda: add_to_agenda (添加到议程函数) +add_vect: add_vect (向量加法函数) +adjoin_arg: adjoin_arg (添加参数函数) +adjoining to a list with pair: 使用 pair 添加到列表 +adjoin_set: adjoin_set (添加到集合函数) +adjoin_set (binary-tree representation): adjoin_set (二叉树表示) +adjoin_set (ordered-list representation): adjoin_set (有序列表表示) +adjoin_set (unordered-list representation): adjoin_set (无序列表表示) +adjoin_set (for weighted sets): adjoin_set (用于加权集合) +adjoin_term: adjoin_term (添加项函数) +Adleman, Leonard: Adleman, Leonard (人名) +administrative assistant, importance of: 行政助理的重要性 +advance_pc: advance_pc (推进程序计数器函数) +after_delay: after_delay (延迟后执行函数) +agenda: 议程 (模拟) +A'h-mose: A'h-mose (人名) +algebra, symbolic: 符号代数 +algebraic expression: 代数表达式 +algebraic expression (differentiating): 代数表达式 (求导) +algebraic expression (representing): 代数表达式 (表示) +algebraic expression (simplifying): 代数表达式 (化简) +algebraic specification for data: 数据的代数规约 +Algol: Algol (编程语言名) +Algol (block structure): Algol (块结构) +Algol (call-by-name argument passing): Algol (传名调用参数传递) +Algol (thunks): Algol (thunk) +algorithm: 算法 +algorithm (optimal): 算法 (最优) +algorithm (probabilistic): 算法 (概率性) +aliasing: 别名 / 混淆 +Al-Karaji: Al-Karaji (人名) +Allen, John: Allen, John (人名) +all_regs (compiler): all_regs (编译器使用的寄存器列表) +alternative: 替换部分 / 备选项 +alternative (of conditional expression): 替换部分 (条件表达式的) +alternative (of conditional statement): 替换部分 (条件语句的) +always_true: always_true (总是为真函数) +amb: amb (歧义选择运算符) +amb evaluator: amb 求值器 +ambeval: ambeval (amb 求值器主函数) +analog computer: 模拟计算机 +analyze: analyze (分析函数) +analyze (metacircular): analyze (元循环求值器版本) +analyze (nondeterministic): analyze (非确定性版本) +analyze_...: analyze_... (系列分析函数) +analyze_... (metacircular): analyze_... (元循环求值器版本) +analyze_... (nondeterministic): analyze_... (非确定性版本) +analyze_amb: analyze_amb (分析 amb 表达式函数) +analyzing evaluator: 分析求值器 +analyzing evaluator (as basis for nondeterministic evaluator): 分析求值器 (作为非确定性求值器的基础) +and (query language): and (查询语言中的与) +and (query language, evaluation of): and (查询语言中与的求值) +and-gate: 与门 +and_gate: and_gate (与门函数) +an_element_of: an_element_of (集合元素选择函数) +angle: angle (角度函数/选择器) +angle (data-directed): angle (数据导向版本) +angle (polar representation): angle (极坐标表示) +angle (rectangular representation): angle (直角坐标表示) +angle (with tagged data): angle (带标签数据版本) +angle_polar: angle_polar (极坐标角度函数) +angle_rectangular: angle_rectangular (直角坐标角度函数) +an_integer_starting_from: an_integer_starting_from (从...开始的整数函数) +Appel, Andrew W.: Appel, Andrew W. (人名) +append: append (列表连接函数) +append (as accumulation): append (作为累积) +append (append_mutator vs.): append (与 append_mutator 的比较) +append (as register machine): append (作为寄存器机) +append ("what is" (rules) vs. "how to" (function)): append ("是什么"(规则) vs. "如何做"(函数)) +append_instruction_sequences: append_instruction_sequences (连接指令序列函数) +append_mutator: append_mutator (列表原地连接函数) +append_mutator (as register machine): append_mutator (作为寄存器机) +append_to_form (rules): append_to_form (规则系统中的连接形式函数) +applicative-order evaluation: 应用序求值 +applicative-order evaluation (in JavaScript): 应用序求值 (在 JavaScript 中) +applicative-order evaluation (normal order vs.): 应用序求值 (与正则序的比较) +apply (lazy): apply (惰性求值版本) +apply (metacircular): apply (元循环求值器版本) +apply (metacircular, tail recursion and): apply (元循环求值器版本, 与尾递归) +apply (primitive method): apply (JavaScript 内建方法) +apply_a_rule: apply_a_rule (应用规则函数) +apply_dispatch: apply_dispatch (应用分派函数) +apply_dispatch (modified for compiled code): apply_dispatch (为编译代码修改的版本) +apply_generic: apply_generic (应用通用操作函数) +apply_generic (with coercion): apply_generic (带强制转换) +apply_generic (with coercion by raising): apply_generic (通过提升进行强制转换) +apply_generic (with coercion of multiple arguments): apply_generic (多参数强制转换) +apply_generic (with coercion to simplify): apply_generic (通过强制转换简化) +apply_generic (with message passing): apply_generic (带消息传递) +apply_generic (with tower of types): apply_generic (带类型塔) +apply_in_underlying_javascript: apply_in_underlying_javascript (在底层 JavaScript 中应用函数) +apply_primitive_function: apply_primitive_function (应用原语函数) +apply_rules: apply_rules (应用规则函数) +arbiter: 仲裁器 +arctangent: 反正切 +arg_expressions: arg_expressions (参数表达式选择器) +argl register: argl 寄存器 (参数列表寄存器) +argument(s): 参数 +argument(s) (arbitrary number of): 参数 (任意数量) +argument(s) (delayed): 参数 (延迟求值) +argument passing: 参数传递 +Aristotle's De caelo (Buridan's commentary on): 亚里士多德的《论天》(布里丹的评注) +arithmetic: 算术 +arithmetic (address arithmetic): 算术 (地址算术) +arithmetic (generic): 算术 (通用) +arithmetic (on complex numbers): 算术 (复数) +arithmetic (on intervals): 算术 (区间) +arithmetic (on polynomials): 算术 (多项式) +arithmetic (on power series): 算术 (幂级数) +arithmetic (on rational numbers): 算术 (有理数) +arithmetic (operators for): 算术 (运算符) +array: 数组 +arrow function: 箭头函数 +articles: articles (冠词列表) +ASCII code: ASCII 码 +assemble: assemble (汇编函数) +assembler: 汇编器 +assert (query interpreter): assert (查询解释器中的断言命令) +assertion: 断言 +assertion (implicit): 断言 (隐式) +assertion_body: assertion_body (断言体选择器) +assign (in register machine): assign (寄存器机中的赋值指令) +assign (in register machine, instruction constructor): assign (赋值指令构造器) +assign (in register machine, simulating): assign (模拟赋值指令) +assign (in register machine, storing label in register): assign (将标号存入寄存器) +assignment: 赋值 +assignment (assignment expression): 赋值 (赋值表达式) +assignment (assignment operation): 赋值 (赋值操作) +assignment (benefits of): 赋值 (优点) +assignment (bugs associated with): 赋值 (相关的错误) +assignment (constant/variable declaration vs.): 赋值 (与常量/变量声明的比较) +assignment (costs of): 赋值 (代价) +assignment (equality test vs.): 赋值 (与相等性测试的比较) +assignment (evaluation of): 赋值 (求值) +assignment (parsing of): 赋值 (解析) +assignment (value of): 赋值 (值) +assignment_symbol: assignment_symbol (赋值符号选择器) +assignment_value_expression: assignment_value_expression (赋值的值表达式选择器) +assign_reg_name: assign_reg_name (赋值指令的寄存器名选择器) +assign_symbol_value: assign_symbol_value (设置符号值函数) +assign_value_exp: assign_value_exp (赋值指令的值表达式选择器) +assoc: assoc (关联列表查找函数) +associativity: 结合律 / 结合性 +associativity (of conditional expression): 结合性 (条件表达式的) +associativity (of operators): 结合性 (运算符的) +atomic operations supported in hardware: 硬件支持的原子操作 +atomic requirement for test_and_set: test_and_set 的原子性要求 +attach_tag: attach_tag (附加标签函数) +attach_tag (using JavaScript data types): attach_tag (使用 JavaScript 数据类型) +augend: augend (被加数选择器) +automagically: 自动魔法般地 +automatic search: 自动搜索 +automatic search (history of): 自动搜索 (历史) +automatic storage allocation: 自动存储分配 +average: average (平均值函数) +average_damp: average_damp (平均阻尼函数) +average damping: 平均阻尼 +averager (constraint): averager (平均值约束) + +B + +back quotes: 反引号 +backtracking: 回溯 +Backus, John: Backus, John (人名) +Baker, Henry G., Jr.: Baker, Henry G., Jr. (人名) +balanced binary tree: 平衡二叉树 +balanced mobile: 平衡的悬挂物 +bank account: 银行账户 +bank account (exchanging balances): 银行账户 (交换余额) +bank account (joint): 银行账户 (联名) +bank account (joint, modeled with streams): 银行账户 (联名, 用流建模) +bank account (joint, with concurrent access): 银行账户 (联名, 带并发访问) +bank account (password-protected): 银行账户 (密码保护) +bank account (serialized): 银行账户 (序列化) +bank account (stream model): 银行账户 (流模型) +bank account (transferring money): 银行账户 (转账) +barrier synchronization: 屏障同步 +Barth, John: Barth, John (人名) +Batali, John Dean: Batali, John Dean (人名) +below: below (下方组合函数 - 图片语言) +Bertrand's Hypothesis: 伯特兰假设 +beside: beside (旁边组合函数 - 图片语言) +Bhaskara: Bhaskara (人名) +bignum: 大数 (任意精度整数) +binary numbers, addition of: 二进制数加法 +binary operator: 二元运算符 +binary search: 二分搜索 +binary tree: 二叉树 +binary tree (balanced): 二叉树 (平衡) +binary tree (converting a list to a): 二叉树 (将列表转换为) +binary tree (converting to a list): 二叉树 (转换为列表) +binary tree (for Huffman encoding): 二叉树 (用于霍夫曼编码) +binary tree (represented with lists): 二叉树 (用列表表示) +binary tree (set represented as): 二叉树 (集合表示为) +binary tree (table structured as): 二叉树 (表结构为) +bind: 约束 / 绑定 +binding: 绑定 +binding (deep): 绑定 (深绑定) +binding_in_frame: binding_in_frame (帧内绑定查找函数) +binding_value: binding_value (绑定值选择器) +binding_variable: binding_variable (绑定变量选择器) +binomial coefficients: 二项式系数 +black box: 黑箱 +block: 块 / 代码块 +block (empty): 块 (空) +block (parsing of): 块 (解析) +block_body: block_body (块体选择器) +blocked process: 阻塞进程 +block structure: 块结构 +block structure (in environment model): 块结构 (在环境模型中) +block structure (in query language): 块结构 (在查询语言中) +body of a function: 函数体 +boolean values (true, false): 布尔值 (true, false) +Borning, Alan: Borning, Alan (人名) +Borodin, Alan: Borodin, Alan (人名) +bound name: 约束变量 / 绑定名 +box-and-pointer notation: 方框与指针表示法 +box-and-pointer notation (end-of-list marker): 方框与指针表示法 (列表结束标记) +box notation for pairs: 序对的方框表示法 +branch (in register machine): branch (寄存器机中的分支指令) +branch (in register machine, instruction constructor): branch (分支指令构造器) +branch (in register machine, simulating): branch (模拟分支指令) +branch_dest: branch_dest (分支目标选择器) +branch of a tree: 树的分支 +break (keyword): break (关键字) +breakpoint: 断点 +broken heart: 破碎的心 (垃圾回收相关) +B-tree: B 树 +bug: 错误 / Bug +bug (capturing a free name): 错误 (捕获自由变量) +bug (order of assignments): 错误 (赋值顺序) +bug (side effect with aliasing): 错误 (别名引起的副作用) +bureaucracy: 官僚机构 / 繁琐手续 +Buridan, Jean: Buridan, Jean (人名) +busy-waiting: 忙等待 + +C + +C: C 语言 +C (compiling JavaScript into): C (将 JavaScript 编译到) +C (error handling): C (错误处理) +C (JavaScript interpreter written in): C (用 C 编写的 JavaScript 解释器) +C (recursive functions in): C (递归函数) +cache-coherence protocols: 缓存一致性协议 +calculator, fixed points with: 计算器 (用计算器求不动点) +call-by-name argument passing: 传名调用参数传递 +call-by-need argument passing: 传需求调用参数传递 +call-by-need argument passing (memoization and): 传需求调用参数传递 (与记忆化) +call_each: call_each (调用每个函数) +camel case: 驼峰命名法 +canonical form, for polynomials: 规范形式 (多项式的) +capturing a free name: 捕获自由变量 +Carmichael numbers: 卡迈克尔数 +case analysis: 情况分析 +case analysis (data-directed programming vs.): 情况分析 (与数据导向编程的比较) +case analysis (general): 情况分析 (通用) +case analysis (as sequence of clauses): 情况分析 (作为子句序列) +cell, in serializer implementation: 单元 (序列化器实现中) +celsius_fahrenheit_converter: celsius_fahrenheit_converter (摄氏华氏转换器) +celsius_fahrenheit_converter (expression-oriented): celsius_fahrenheit_converter (面向表达式版本) +center: center (中心选择器 - 区间算术) +Chaitin, Gregory: Chaitin, Gregory (人名) +Chandah-sutra: Chandah-sutra (文献名) +change and sameness: 变化与同一性 +change and sameness (meaning of): 变化与同一性 (含义) +change and sameness (shared data and): 变化与同一性 (与共享数据) +changing money: 换零钱 +Chapman, David: Chapman, David (人名) +character, ASCII encoding: 字符, ASCII 编码 +Charniak, Eugene: Charniak, Eugene (人名) +Chebyshev, Pafnutii L'vovich: Chebyshev, Pafnutii L'vovich (人名) +check_an_assertion: check_an_assertion (检查断言函数) +chess, eight-queens puzzle: 国际象棋, 八皇后问题 +chip implementation of Scheme: Scheme 的芯片实现 +chronological backtracking: 时序回溯 +Church, Alonzo: Church, Alonzo (人名) +Church numerals: 丘奇数 +Church–Turing thesis: 丘奇-图灵论题 +circuit: 电路 +circuit (digital): 电路 (数字) +circuit (modeled with streams): 电路 (用流建模) +Clark, Keith L.: Clark, Keith L. (人名) +clause of a case analysis: 子句 (情况分析的) +Clinger, William: Clinger, William (人名) +closed world assumption: 封闭世界假设 +closure: 闭包 / 闭合性 +closure (in abstract algebra): 闭合性 (在抽象代数中) +closure (closure property of picture-language operations): 闭合性 (图片语言操作的闭合性质) +closure (closure property of pair): 闭合性 (pair 的闭合性质) +coal, bituminous: 烟煤 +code: 编码 / 代码 +code (ASCII): 编码 (ASCII) +code (fixed-length): 编码 (定长) +code (Huffman): 编码 (霍夫曼) +code (Morse): 编码 (摩尔斯) +code (prefix): 编码 (前缀) +code (variable-length): 编码 (变长) +code generator: 代码生成器 +code generator (arguments of): 代码生成器 (参数) +code generator (value of): 代码生成器 (值) +coeff: coeff (系数选择器) +coercion: 强制类型转换 +coercion (function): 强制类型转换 (函数) +coercion (in algebraic manipulation): 强制类型转换 (在代数操作中) +coercion (in polynomial arithmetic): 强制类型转换 (在多项式算术中) +coercion (table): 强制类型转换 (表) +Colmerauer, Alain: Colmerauer, Alain (人名) +combination: 组合式 +combination, means of: 组合的方法 +comments in programs: 程序注释 +comp register: comp 寄存器 (编译后代码寄存器) +compacting garbage collector: 紧凑式垃圾回收器 +compilation: 编译 +compile: compile (编译函数) +compile_and_go: compile_and_go (编译并执行函数) +compile_and_run: compile_and_run (编译并运行函数) +compile_application: compile_application (编译应用式函数) +compile_assignment: compile_assignment (编译赋值函数) +compile_block: compile_block (编译块函数) +compile_conditional: compile_conditional (编译条件式函数) +compiled_apply: compiled_apply (编译后的 apply 函数) +compile_declaration: compile_declaration (编译声明函数) +compiled_function_entry: compiled_function_entry (编译后函数的入口点) +compiled_function_env: compiled_function_env (编译后函数的环境) +compile_fun_appl: compile_fun_appl (编译函数应用辅助函数) +compile_function_call: compile_function_call (编译函数调用函数) +compile_lambda_body: compile_lambda_body (编译 lambda 体函数) +compile_lambda_expression: compile_lambda_expression (编译 lambda 表达式函数) +compile_linkage: compile_linkage (编译链接描述函数) +compile_literal: compile_literal (编译字面量函数) +compile_name: compile_name (编译名称函数) +compiler: 编译器 +compiler (interpreter vs.): 编译器 (与解释器的比较) +compiler (tail recursion, stack allocation, and garbage-collection): 编译器 (尾递归, 栈分配和垃圾回收) +compile_return_statement: compile_return_statement (编译返回语句函数) +compiler for JavaScript: JavaScript 编译器 +compiler for JavaScript (analyzing evaluator vs.): JavaScript 编译器 (与分析求值器的比较) +compiler for JavaScript (assignments): JavaScript 编译器 (赋值) +compiler for JavaScript (blocks): JavaScript 编译器 (块) +compiler for JavaScript (code generators): JavaScript 编译器 (代码生成器) +compiler for JavaScript (combinations): JavaScript 编译器 (组合式) +compiler for JavaScript (conditionals): JavaScript 编译器 (条件式) +compiler for JavaScript (dead code analysis): JavaScript 编译器 (死代码分析) +compiler for JavaScript (declarations): JavaScript 编译器 (声明) +compiler for JavaScript (efficiency): JavaScript 编译器 (效率) +compiler for JavaScript (example compilation): JavaScript 编译器 (编译示例) +compiler for JavaScript (explicit-control evaluator vs.): JavaScript 编译器 (与显式控制求值器的比较) +compiler for JavaScript (expression-syntax functions): JavaScript 编译器 (表达式语法函数) +compiler for JavaScript (function applications): JavaScript 编译器 (函数应用) +compiler for JavaScript (interfacing to evaluator): JavaScript 编译器 (与求值器接口) +compiler for JavaScript (label generation): JavaScript 编译器 (标号生成) +compiler for JavaScript (lambda expressions): JavaScript 编译器 (lambda 表达式) +compiler for JavaScript (lexical addressing): JavaScript 编译器 (词法寻址) +compiler for JavaScript (linkage code): JavaScript 编译器 (链接代码) +compiler for JavaScript (literals): JavaScript 编译器 (字面量) +compiler for JavaScript (machine-operation use): JavaScript 编译器 (机器操作使用) +compiler for JavaScript (monitoring performance (stack use) of compiled code): JavaScript 编译器 (监控编译代码性能(栈使用)) +compiler for JavaScript (names): JavaScript 编译器 (名称) +compiler for JavaScript (open coding of primitives): JavaScript 编译器 (原语的开放编码) +compiler for JavaScript (order of argument evaluation): JavaScript 编译器 (参数求值顺序) +compiler for JavaScript (register use): JavaScript 编译器 (寄存器使用) +compiler for JavaScript (return statements): JavaScript 编译器 (返回语句) +compiler for JavaScript (running compiled code): JavaScript 编译器 (运行编译代码) +compiler for JavaScript (scanning out internal declarations): JavaScript 编译器 (扫描出内部声明) +compiler for JavaScript (sequences of statements): JavaScript 编译器 (语句序列) +compiler for JavaScript (stack usage): JavaScript 编译器 (栈使用) +compiler for JavaScript (structure of): JavaScript 编译器 (结构) +compiler for JavaScript (tail-recursive code generated by): JavaScript 编译器 (生成的尾递归代码) +compile_sequence: compile_sequence (编译序列函数) +compile-time environment: 编译时环境 +complex package: complex 包 (复数包) +complex-number arithmetic: 复数算术 +complex-number arithmetic (interfaced to generic arithmetic system): 复数算术 (与通用算术系统接口) +complex-number arithmetic (structure of system): 复数算术 (系统结构) +complex numbers: 复数 +complex numbers (polar representation): 复数 (极坐标表示) +complex numbers (rectangular representation): 复数 (直角坐标表示) +complex numbers (rectangular vs. polar form): 复数 (直角坐标 vs. 极坐标形式) +complex numbers (represented as tagged data): 复数 (表示为带标签数据) +complex_to_complex: complex_to_complex (复数到复数转换函数) +composition of functions: 函数复合 +compound_apply: compound_apply (复合函数应用函数) +compound data, need for: 复合数据, 需求 +compound expression: 复合表达式 +compound expression (as function expression of application): 复合表达式 (作为应用的函数表达式) +compound function: 复合函数 +compound function (used like primitive function): 复合函数 (像原语函数一样使用) +compound query: 复合查询 +compound query (processing): 复合查询 (处理) +computability: 可计算性 +computational process: 计算过程 +computer science: 计算机科学 +computer science (mathematics vs.): 计算机科学 (与数学的比较) +concatenating strings: 连接字符串 +conclusion: conclusion (结论选择器 - 规则) +concrete data representation: 具体数据表示 +concurrency: 并发 +concurrency (correctness of concurrent programs): 并发 (并发程序的正确性) +concurrency (deadlock): 并发 (死锁) +concurrency (functional programming and): 并发 (与函数式编程) +concurrency (mechanisms for controlling): 并发 (控制机制) +concurrent_execute: concurrent_execute (并发执行函数) +conditional_alternative: conditional_alternative (条件替换部分选择器) +conditional_consequent: conditional_consequent (条件后续部分选择器) +conditional expression: 条件表达式 +conditional expression (as alternative of conditional expression): 条件表达式 (作为条件表达式的替换部分) +conditional expression (evaluation of): 条件表达式 (求值) +conditional expression (non-boolean value as predicate): 条件表达式 (非布尔值作为谓词) +conditional expression (normal-order evaluation of): 条件表达式 (正则序求值) +conditional expression (as operand of operator combination): 条件表达式 (作为组合式的操作数) +conditional expression (parsing of): 条件表达式 (解析) +conditional expression (precedence of): 条件表达式 (优先级) +conditional expression (right-associativity of): 条件表达式 (右结合性) +conditional expression (why a syntactic form): 条件表达式 (为何是语法形式) +conditional_predicate: conditional_predicate (条件谓词选择器) +conditional statement: 条件语句 +conditional statement (alternative statements of): 条件语句 (替换语句部分) +conditional statement (conditional instead of alternative block): 条件语句 (条件式代替替换块) +conditional statement (consequent statements of): 条件语句 (后续语句部分) +conditional statement (need for): 条件语句 (必要性) +conditional statement (one-armed (without alternative)): 条件语句 (单臂 (无替换部分)) +conditional statement (parsing of): 条件语句 (解析) +conditional statement (predicate, consequent, and alternative of): 条件语句 (谓词, 后续部分和替换部分) +congruent modulo n: 模 n 同余 +conjoin: conjoin (合取函数) +conjunction: 合取 / 逻辑与 +connect: connect (连接函数 - 约束系统) +connector(s), in constraint system: 连接器 (在约束系统中) +connector(s), in constraint system (operations on): 连接器 (操作) +connector(s), in constraint system (representing): 连接器 (表示) +Conniver: Conniver (编程语言名) +consciousness, expansion of: 意识的扩展 +consequent: 后续部分 +consequent (of clause): 后续部分 (子句的) +consequent (of conditional expression): 后续部分 (条件表达式的) +consequent (of conditional statement): 后续部分 (条件语句的) +const (keyword): const (关键字) +constant (in register machine): constant (寄存器机中的常量操作数) +constant (in register machine, simulating): constant (模拟常量操作数) +constant (in register machine, syntax of): constant (常量操作数语法) +constant (primitive constraint): constant (常量约束) +constant (in JavaScript): 常量 (在 JavaScript 中) +constant (in JavaScript, detecting assignment to): 常量 (检测对其赋值) +constant (in JavaScript, value of): 常量 (值) +constant declaration: 常量声明 +constant declaration (parsing of): 常量声明 (解析) +constant declaration (why a syntactic form): 常量声明 (为何是语法形式) +constant_exp_value: constant_exp_value (常量表达式值选择器) +constraint(s): 约束 +constraint(s) (primitive): 约束 (原语) +constraint(s) (propagation of): 约束 (传播) +constraint network: 约束网络 +construct_arglist: construct_arglist (构造参数列表函数) +constructing a list with pair: 使用 pair 构造列表 +constructor: 构造函数 / 构造器 +constructor (as abstraction barrier): 构造函数 (作为抽象屏障) +contents: contents (内容选择器) +contents (using JavaScript data types): contents (使用 JavaScript 数据类型) +continuation: 续延 / 后续 +continuation (in nondeterministic evaluator): 续延 (在非确定性求值器中) +continuation (in register-machine simulator): 续延 (在寄存器机模拟器中) +continue (keyword): continue (关键字) +continue register: continue 寄存器 (用于保存返回地址) +continue register (in explicit-control evaluator): continue 寄存器 (在显式控制求值器中) +continue register (recursion and): continue 寄存器 (与递归) +continued fraction: 连分数 +continued fraction (e as): 连分数 (e 表示为) +continued fraction (golden ratio as): 连分数 (黄金分割比表示为) +continued fraction (tangent as): 连分数 (正切表示为) +controller for register machine: 控制器 (寄存器机的) +controller for register machine (controller diagram): 控制器 (控制器图) +control structure: 控制结构 +conventional interface: 约定接口 +conventional interface (sequence as): 约定接口 (序列作为) +convert: convert (转换函数) +convert_to_query_syntax: convert_to_query_syntax (转换为查询语法函数) +Cormen, Thomas H.: Cormen, Thomas H. (人名) +corner_split: corner_split (角分裂函数 - 图片语言) +correctness of a program: 程序正确性 +cosine: 余弦 +cosine (fixed point of): 余弦 (不动点) +cosine (power series for): 余弦 (幂级数) +cosmic radiation: 宇宙辐射 +count_change: count_change (换零钱方式计数函数) +counting change: 换零钱方式计数 +count_leaves: count_leaves (计算叶节点数函数) +count_leaves (as accumulation): count_leaves (作为累积) +count_leaves (as register machine): count_leaves (作为寄存器机) +count_pairs: count_pairs (计算序对数函数) +credit-card accounts, international: 国际信用卡账户 +Cressey, David: Cressey, David (人名) +Crockford, Douglas: Crockford, Douglas (人名) +cross-type operations: 跨类型操作 +cryptography: 密码学 +cube: cube (立方函数) +cube_root: cube_root (立方根函数) +cube root: 立方根 +cube root (as fixed point): 立方根 (作为不动点) +cube root (by Newton's method): 立方根 (通过牛顿法) +current_time: current_time (当前时间函数 - 模拟) +current time, for simulation agenda: 当前时间 (用于模拟议程) +Curry, Haskell Brooks: Curry, Haskell Brooks (人名) +currying: 柯里化 +cycle in list: 列表中的环 +cycle in list (detecting): 列表中的环 (检测) + +D + +Darlington, John: Darlington, John (人名) +data: 数据 +data (abstract): 数据 (抽象) +data (abstract models for): 数据 (抽象模型) +data (algebraic specification for): 数据 (代数规约) +data (compound): 数据 (复合) +data (concrete representation of): 数据 (具体表示) +data (functional representation of): 数据 (函数表示) +data (hierarchical): 数据 (层次) +data (list-structured): 数据 (列表结构) +data (meaning of): 数据 (含义) +data (mutable): 数据 (可变) +data (numerical): 数据 (数值) +data (as program): 数据 (作为程序) +data (shared): 数据 (共享) +data (symbolic): 数据 (符号) +data (tagged): 数据 (带标签) +data abstraction: 数据抽象 +data abstraction (for queue): 数据抽象 (用于队列) +data base: 数据库 +data base (data-directed programming and): 数据库 (与数据导向编程) +data base (Gargle personnel): 数据库 (Gargle 公司人事) +data base (indexing): 数据库 (索引) +data base (Insatiable Enterprises personnel): 数据库 (Insatiable Enterprises 公司人事) +data base (logic programming and): 数据库 (与逻辑编程) +data base (as set of records): 数据库 (作为记录集合) +data-directed programming: 数据导向编程 +data-directed programming (case analysis vs.): 数据导向编程 (与情况分析比较) +data-directed programming (in metacircular evaluator): 数据导向编程 (在元循环求值器中) +data-directed programming (in query interpreter): 数据导向编程 (在查询解释器中) +data-directed recursion: 数据导向递归 +data paths for register machine: 数据通路 (寄存器机的) +data paths for register machine (data-path diagram): 数据通路 (数据通路图) +data types: 数据类型 +data types (in JavaScript): 数据类型 (在 JavaScript 中) +data types (in statically typed languages): 数据类型 (在静态类型语言中) +deadlock: 死锁 +deadlock (avoidance): 死锁 (避免) +deadlock (recovery): 死锁 (恢复) +debug: 调试 / Debug +declaration: 声明 +declaration (of constant (`const`)): 声明 (常量 `const`) +declaration (environment model of): 声明 (环境模型) +declaration (of function (`function`)): 声明 (函数 `function`) +declaration (use of name before): 声明 (在声明前使用名称) +declaration (of variable (`let`)): 声明 (变量 `let`) +declaration_symbol: declaration_symbol (声明符号选择器) +declaration_value_expression: declaration_value_expression (声明的值表达式选择器) +declarative vs. imperative knowledge: 说明性知识 vs. 命令性知识 +declarative vs. imperative knowledge (logic programming and): 说明性知识 vs. 命令性知识 (与逻辑编程) +declarative vs. imperative knowledge (nondeterministic computing and): 说明性知识 vs. 命令性知识 (与非确定性计算) +decode: decode (解码函数) +decomposition of program into parts: 程序分解为部分 +deep binding: 深绑定 +deep_reverse: deep_reverse (深层反转列表函数) +deferred operations: 推迟的操作 +definite integral: 定积分 +definite integral (estimated with Monte Carlo simulation): 定积分 (用蒙特卡洛模拟估计) +de Kleer, Johan: de Kleer, Johan (人名) +delay, in digital circuit: 延迟 (在数字电路中) +delayed argument: 延迟参数 +delayed evaluation: 延迟求值 +delayed evaluation (assignment and): 延迟求值 (与赋值) +delayed evaluation (explicit vs. automatic): 延迟求值 (显式 vs. 自动) +delayed evaluation (in lazy evaluator): 延迟求值 (在惰性求值器中) +delayed evaluation (normal-order evaluation and): 延迟求值 (与正则序求值) +delayed evaluation (printing and): 延迟求值 (与打印) +delayed evaluation (streams and): 延迟求值 (与流) +delayed expression: 延迟表达式 +delayed expression (explicit): 延迟表达式 (显式) +delayed expression (explicit vs. automatic): 延迟表达式 (显式 vs. 自动) +delayed expression (lazy evaluation and): 延迟表达式 (与惰性求值) +delayed expression (memoized): 延迟表达式 (记忆化) +delay_it: delay_it (延迟执行函数) +delete_queue: delete_queue (从队列删除函数) +denom: denom (分母选择器) +denom (axiom for): denom (公理) +denom (reducing to lowest terms): denom (化简到最简形式) +dense polynomial: 稠密多项式 +dependency-directed backtracking: 依赖导向回溯 +depends_on: depends_on (依赖关系检查函数) +deposit message for bank account: deposit (存款消息 - 银行账户) +deposit, with external serializer: deposit (带外部序列化器的存款) +depth-first search: 深度优先搜索 +deque: 双端队列 +deriv (numerical): deriv (数值微分函数) +deriv (symbolic): deriv (符号微分函数) +deriv (symbolic, data-directed): deriv (符号微分, 数据导向版本) +derivative of a function: 函数的导数 +derived component: 派生组件 +derived component (adding to explicit-control evaluator): 派生组件 (添加到显式控制求值器) +derived components in evaluator: 求值器中的派生组件 +derived components in evaluator (function declaration): 求值器中的派生组件 (函数声明) +derived components in evaluator (operator combination): 求值器中的派生组件 (运算符组合) +design, stratified: 分层设计 +differential equation: 微分方程 +differential equation (second-order): 微分方程 (二阶) +differentiation: 微分 / 求导 +differentiation (numerical): 微分 (数值) +differentiation (rules for): 微分 (规则) +differentiation (symbolic): 微分 (符号) +diffusion, simulation of: 扩散模拟 +digital-circuit simulation: 数字电路模拟 +digital-circuit simulation (agenda): 数字电路模拟 (议程) +digital-circuit simulation (agenda implementation): 数字电路模拟 (议程实现) +digital-circuit simulation (primitive function boxes): 数字电路模拟 (原语函数盒) +digital-circuit simulation (representing wires): 数字电路模拟 (表示导线) +digital-circuit simulation (sample simulation): 数字电路模拟 (模拟示例) +digital signal: 数字信号 +Dijkstra, Edsger Wybe: Dijkstra, Edsger Wybe (人名) +Dinesman, Howard P.: Dinesman, Howard P. (人名) +Diophantus's Arithmetic, Fermat's copy of: 丢番图的《算术》, 费马的版本 +Dirichlet, Peter Gustav Lejeune: Dirichlet, Peter Gustav Lejeune (人名) +dirichlet_stream: dirichlet_stream (狄利克雷流) +dirichlet_test: dirichlet_test (狄利克雷测试函数) +disjoin: disjoin (析取函数) +disjoin (without delayed expression): disjoin (无延迟表达式版本) +disjunction: 析取 / 逻辑或 +dispatching: 分派 +dispatching (comparing different styles): 分派 (比较不同风格) +dispatching (on type): 分派 (基于类型) +display (primitive function): display (显示原语函数) +display operation in register machine: display 操作 (寄存器机中) +display_stream: display_stream (显示流函数) +distinct: distinct (不同检查函数) +div (generic): div (通用除法) +div_complex: div_complex (复数除法函数) +divides: divides (整除检查函数) +div_interval: div_interval (区间除法函数) +div_interval (division by zero): div_interval (除以零) +div_poly: div_poly (多项式除法) +div_rat: div_rat (有理数除法函数) +div_series: div_series (幂级数除法) +div_terms: div_terms (项除法函数) +dog, perfectly rational behavior of: 狗的完全理性行为 +dot_product: dot_product (点积函数) +Doyle, Jon: Doyle, Jon (人名) +draw_line: draw_line (画线函数) +driver_loop: driver_loop (驱动循环) +driver_loop (for lazy evaluator): driver_loop (惰性求值器) +driver_loop (for metacircular evaluator): driver_loop (元循环求值器) +driver_loop (for nondeterministic evaluator): driver_loop (非确定性求值器) +driver loop: 驱动循环 +driver loop (in explicit-control evaluator): 驱动循环 (在显式控制求值器中) +driver loop (in lazy evaluator): 驱动循环 (在惰性求值器中) +driver loop (in metacircular evaluator): 驱动循环 (在元循环求值器中) +driver loop (in nondeterministic evaluator): 驱动循环 (在非确定性求值器中) +driver loop (in query interpreter): 驱动循环 (在查询解释器中) +duplicate parameters: 重复参数 + +E + +e: 自然常数 e +e (as continued fraction): e (表示为连分数) +e (as solution to differential equation): e (作为微分方程的解) +e^x, power series for: e^x (幂级数) +Earth, measuring circumference of: 地球周长测量 +eceval: eceval (显式控制求值器主函数) +ECMAScript: ECMAScript (标准) +ECMAScript (Math object): ECMAScript (Math 对象) +edge1_frame: edge1_frame (边1框架选择器) +edge2_frame: edge2_frame (边2框架选择器) +Edwards, Anthony William Fairbank: Edwards, Anthony William Fairbank (人名) +efficiency: 效率 +efficiency (of compilation): 效率 (编译的) +efficiency (of data-base access): 效率 (数据库访问的) +efficiency (of evaluation): 效率 (求值的) +efficiency (of query processing): 效率 (查询处理的) +efficiency (of tree-recursive process): 效率 (树形递归过程的) +Eich, Brendan: Eich, Brendan (人名) +EIEIO: EIEIO (Old MacDonald Had a Farm 歌词) +eight-queens puzzle: 八皇后问题 +electrical circuits, modeled with streams: 电路 (用流建模) +element_expressions: element_expressions (元素表达式选择器) +else (keyword): else (关键字) +embedded language, language design using: 嵌入式语言 (使用嵌入式语言设计语言) +empty_arglist: empty_arglist (空参数列表) +empty list: 空列表 +empty stream: 空流 +encapsulated name: 封装名称 +enclosing_environment: enclosing_environment (外层环境选择器) +enclosing environment: 外层环境 +encode: encode (编码函数) +end-of-list marker: 列表结束标记 +end_segment: end_segment (线段终点选择器) +end_with_linkage: end_with_linkage (结束并带链接描述符函数) +engineering vs. mathematics: 工程学 vs. 数学 +entry: entry (入口/条目 - 树节点) +enumerate_interval: enumerate_interval (枚举区间函数) +enumerate_tree: enumerate_tree (枚举树函数) +enumerator: 枚举器 +env register: env 寄存器 (环境寄存器) +environment: 环境 +environment (compile-time): 环境 (编译时) +environment (as context for evaluation): 环境 (作为求值上下文) +environment (enclosing): 环境 (外层) +environment (global): 环境 (全局) +environment (lexical scoping and): 环境 (与词法作用域) +environment (program): 环境 (程序) +environment (in query interpreter): 环境 (在查询解释器中) +environment (renaming vs.): 环境 (与重命名比较) +environment model of evaluation: 求值的环境模型 +environment model of evaluation (environment structure): 求值的环境模型 (环境结构) +environment model of evaluation (function application): 求值的环境模型 (函数应用) +environment model of evaluation (function-application example): 求值的环境模型 (函数应用示例) +environment model of evaluation (internal declarations): 求值的环境模型 (内部声明) +environment model of evaluation (local state): 求值的环境模型 (局部状态) +environment model of evaluation (message passing): 求值的环境模型 (消息传递) +environment model of evaluation (metacircular evaluator and): 求值的环境模型 (与元循环求值器) +environment model of evaluation (rules for evaluation): 求值的环境模型 (求值规则) +environment model of evaluation (tail recursion and): 求值的环境模型 (与尾递归) +equal: equal (相等性检查函数 - 列表) +equality: 相等性 +equality (in generic arithmetic system): 相等性 (在通用算术系统中) +equality (of lists): 相等性 (列表的) +equality (of numbers): 相等性 (数值的) +equality (referential transparency and): 相等性 (与引用透明性) +equality (of strings): 相等性 (字符串的) +equal_rat: equal_rat (有理数相等性检查函数) +equation, solving: 方程求解 +Eratosthenes: Eratosthenes (人名) +error (primitive function): error (错误原语函数) +error handling: 错误处理 +error handling (in compiled code): 错误处理 (在编译代码中) +error handling (in explicit-control evaluator): 错误处理 (在显式控制求值器中) +Escher, Maurits Cornelis: Escher, Maurits Cornelis (人名) +estimate_integral: estimate_integral (估算积分函数) +estimate_pi: estimate_pi (估算 pi 函数) +Euclid's Algorithm: 欧几里得算法 (辗转相除法) +Euclid's Algorithm (order of growth): 欧几里得算法 (增长阶) +Euclid's Algorithm (for polynomials): 欧几里得算法 (用于多项式) +Euclid's Elements: 欧几里得《几何原本》 +Euclid's proof of infinite number of primes: 欧几里得证明素数无限 +Euclidean ring: 欧几里得环 +Euler, Leonhard: Euler, Leonhard (人名) +Euler, Leonhard (proof of Fermat's Little Theorem): Euler, Leonhard (费马小定理证明) +Euler, Leonhard (series accelerator): Euler, Leonhard (级数加速器) +euler_transform: euler_transform (欧拉变换函数) +eval (primitive function in JavaScript): eval (JavaScript 内建求值函数) +eval_assignment: eval_assignment (求值赋值函数) +eval_block: eval_block (求值块函数) +eval_conditional (lazy): eval_conditional (惰性求值版本) +eval_conditional (metacircular): eval_conditional (元循环求值器版本) +eval_declaration: eval_declaration (求值声明函数) +eval_dispatch: eval_dispatch (求值分派函数) +eval_return_statement: eval_return_statement (求值返回语句函数) +eval_sequence: eval_sequence (求值序列函数) +evaluate (lazy): evaluate (惰性求值版本) +evaluate (metacircular): evaluate (元循环求值器版本) +evaluate (metacircular, analyzing version): evaluate (元循环分析版本) +evaluate (metacircular, data-directed): evaluate (元循环数据导向版本) +evaluate_query: evaluate_query (求值查询函数) +evaluation: 求值 +evaluation (applicative-order): 求值 (应用序) +evaluation (delayed): 求值 (延迟) +evaluation (environment model of): 求值 (环境模型) +evaluation (models of): 求值 (模型) +evaluation (normal-order): 求值 (正则序) +evaluation (of &&): 求值 (&& 的) +evaluation (of ||): 求值 (|| 的) +evaluation (of conditional expression): 求值 (条件表达式的) +evaluation (of function application): 求值 (函数应用的) +evaluation (of operator combination): 求值 (运算符组合的) +evaluation (of primitive expression): 求值 (原语表达式的) +evaluation (order of subexpression evaluation): 求值 (子表达式求值顺序) +evaluation (substitution model of): 求值 (代换模型) +evaluator: 求值器 +evaluator (as abstract machine): 求值器 (作为抽象机) +evaluator (metacircular): 求值器 (元循环) +evaluator (as universal machine): 求值器 (作为通用机) +evaluators: 求值器 (各种类型) +ev_application: ev_application (求值应用式 - 显式控制) +ev_assignment: ev_assignment (求值赋值 - 显式控制) +ev_block: ev_block (求值块 - 显式控制) +ev_conditional: ev_conditional (求值条件式 - 显式控制) +ev_declaration: ev_declaration (求值声明 - 显式控制) +even_fibs: even_fibs (偶数斐波那契数函数/序列) +event-driven simulation: 事件驱动模拟 +ev_function_declaration: ev_function_declaration (求值函数声明 - 显式控制) +ev_lambda: ev_lambda (求值 lambda 表达式 - 显式控制) +evlis tail recursion: evlis 尾递归 (求值参数列表的尾递归) +ev_literal: ev_literal (求值字面量 - 显式控制) +ev_name: ev_name (求值名称 - 显式控制) +ev_operator_combination: ev_operator_combination (求值运算符组合 - 显式控制) +ev_return: ev_return (求值返回 - 显式控制) +ev_sequence: ev_sequence (求值序列 - 显式控制) +exchange: exchange (交换函数) +execute: execute (执行函数) +execute_application: execute_application (执行应用函数) +execute_application (metacircular): execute_application (元循环版本) +execute_application (nondeterministic): execute_application (非确定性版本) +execution function: 执行函数 +execution function (in analyzing evaluator): 执行函数 (在分析求值器中) +execution function (in nondeterministic evaluator): 执行函数 (在非确定性求值器中) +execution function (in register-machine simulator): 执行函数 (在寄存器机模拟器中) +explicit-control evaluator for JavaScript: JavaScript 的显式控制求值器 +explicit-control evaluator for JavaScript (argument evaluation): 显式控制求值器 (参数求值) +explicit-control evaluator for JavaScript (assignments): 显式控制求值器 (赋值) +explicit-control evaluator for JavaScript (blocks): 显式控制求值器 (块) +explicit-control evaluator for JavaScript (combinations): 显式控制求值器 (组合式) +explicit-control evaluator for JavaScript (compound functions): 显式控制求值器 (复合函数) +explicit-control evaluator for JavaScript (conditionals): 显式控制求值器 (条件式) +explicit-control evaluator for JavaScript (controller): 显式控制求值器 (控制器) +explicit-control evaluator for JavaScript (data paths): 显式控制求值器 (数据通路) +explicit-control evaluator for JavaScript (declarations): 显式控制求值器 (声明) +explicit-control evaluator for JavaScript (derived components): 显式控制求值器 (派生组件) +explicit-control evaluator for JavaScript (driver loop): 显式控制求值器 (驱动循环) +explicit-control evaluator for JavaScript (error handling): 显式控制求值器 (错误处理) +explicit-control evaluator for JavaScript (expressions with no subexpressions to evaluate): 显式控制求值器 (无子表达式求值的表达式) +explicit-control evaluator for JavaScript (function application): 显式控制求值器 (函数应用) +explicit-control evaluator for JavaScript (as machine-language program): 显式控制求值器 (作为机器语言程序) +explicit-control evaluator for JavaScript (machine model): 显式控制求值器 (机器模型) +explicit-control evaluator for JavaScript (modified for compiled code): 显式控制求值器 (为编译代码修改) +explicit-control evaluator for JavaScript (monitoring performance (stack use)): 显式控制求值器 (监控性能(栈使用)) +explicit-control evaluator for JavaScript (normal-order evaluation): 显式控制求值器 (正则序求值) +explicit-control evaluator for JavaScript (operations): 显式控制求值器 (操作) +explicit-control evaluator for JavaScript (optimizations (additional)): 显式控制求值器 (额外优化) +explicit-control evaluator for JavaScript (primitive functions): 显式控制求值器 (原语函数) +explicit-control evaluator for JavaScript (registers): 显式控制求值器 (寄存器) +explicit-control evaluator for JavaScript (return statements): 显式控制求值器 (返回语句) +explicit-control evaluator for JavaScript (running): 显式控制求值器 (运行) +explicit-control evaluator for JavaScript (sequences of statements): 显式控制求值器 (语句序列) +explicit-control evaluator for JavaScript (stack usage): 显式控制求值器 (栈使用) +explicit-control evaluator for JavaScript (syntactic forms (additional)): 显式控制求值器 (额外语法形式) +explicit-control evaluator for JavaScript (tail recursion): 显式控制求值器 (尾递归) +explicit-control evaluator for JavaScript (as universal machine): 显式控制求值器 (作为通用机) +expmod: expmod (模幂函数) +exponential growth: 指数增长 +exponential growth (of tree-recursive Fibonacci-number computation): 指数增长 (树形递归斐波那契数计算) +exponentiation: 幂运算 / 求幂 +exponentiation (modulo n): 幂运算 (模 n) +expression: 表达式 +expression (algebraic): 表达式 (代数) +expression (literal): 表达式 (字面量) +expression (primitive boolean): 表达式 (原语布尔) +expression (symbolic): 表达式 (符号) +expression-oriented vs. imperative programming style: 面向表达式 vs. 命令式编程风格 +expression statement: 表达式语句 +expression statement (parsing of): 表达式语句 (解析) +expt: expt (幂运算函数) +expt (linear iterative version): expt (线性迭代版本) +expt (linear recursive version): expt (线性递归版本) +expt (register machine for): expt (寄存器机) +extend: extend (扩展函数 - 模式匹配) +extend_environment: extend_environment (扩展环境函数) +extend_if_consistent: extend_if_consistent (如果一致则扩展函数) +extend_if_possible: extend_if_possible (如果可能则扩展函数) +external_entry: external_entry (外部入口点) +extract_labels: extract_labels (提取标号函数) + +F + +factorial: factorial (阶乘函数) +factorial (as an abstract machine): factorial (作为抽象机) +factorial (compilation of): factorial (编译) +factorial (environment structure in evaluating): factorial (求值时的环境结构) +factorial (linear iterative version): factorial (线性迭代版本) +factorial (linear recursive version): factorial (线性递归版本) +factorial (register machine for (iterative)): factorial (寄存器机 (迭代)) +factorial (register machine for (recursive)): factorial (寄存器机 (递归)) +factorial (stack usage, compiled): factorial (栈使用, 编译后) +factorial (stack usage, interpreted): factorial (栈使用, 解释执行) +factorial (stack usage, register machine): factorial (栈使用, 寄存器机) +factorial (with assignment): factorial (带赋值版本) +factorial (with higher-order functions): factorial (带高阶函数版本) +factorial (with while loop): factorial (带 while 循环版本) +factorial: 阶乘 +factorial (without declaration or assignment): 阶乘 (无声明或赋值) +factorial (infinite stream): 阶乘 (无限流) +failure, in nondeterministic computation: 失败 (在非确定性计算中) +failure, in nondeterministic computation (bug vs.): 失败 (与 Bug 比较) +failure, in nondeterministic computation (searching and): 失败 (与搜索) +failure continuation (nondeterministic evaluator): 失败续延 (非确定性求值器) +failure continuation (nondeterministic evaluator, constructed by amb): 失败续延 (由 amb 构造) +failure continuation (nondeterministic evaluator, constructed by assignment): 失败续延 (由赋值构造) +failure continuation (nondeterministic evaluator, constructed by driver loop): 失败续延 (由驱动循环构造) +false (keyword): false (关键字) +falsiness: 假值性 (JavaScript 中的假值概念) +fast_expt: fast_expt (快速幂函数) +fast_is_prime: fast_is_prime (快速素性测试函数) +feedback loop, modeled with streams: 反馈回路 (用流建模) +Feeley, Marc: Feeley, Marc (人名) +Feigenbaum, Edward: Feigenbaum, Edward (人名) +Fenichel, Robert: Fenichel, Robert (人名) +Fermat, Pierre de: Fermat, Pierre de (人名) +Fermat's Little Theorem: 费马小定理 +Fermat's Little Theorem (alternate form): 费马小定理 (替代形式) +Fermat's Little Theorem (proof): 费马小定理 (证明) +fermat_test: fermat_test (费马测试函数) +Fermat test for primality: 费马素性测试 +Fermat test for primality (variant of): 费马素性测试 (变体) +fetch_assertions: fetch_assertions (获取断言函数) +fetch_rules: fetch_rules (获取规则函数) +fib: fib (斐波那契数函数) +fib (linear iterative version): fib (线性迭代版本) +fib (logarithmic version): fib (对数版本) +fib (register machine for (tree-recursive)): fib (寄存器机 (树形递归)) +fib (stack usage, compiled): fib (栈使用, 编译后) +fib (stack usage, interpreted): fib (栈使用, 解释执行) +fib (tree-recursive version): fib (树形递归版本) +fib (with memoization): fib (带记忆化版本) +Fibonacci numbers: 斐波那契数 +Fibonacci numbers (Euclid's GCD algorithm and): 斐波那契数 (与欧几里得 GCD 算法) +Fibonacci numbers (infinite stream of): 斐波那契数 (无限流) +fibs (infinite stream): fibs (斐波那契无限流) +fibs (infinite stream, implicit definition): fibs (斐波那契无限流, 隐式定义) +FIFO buffer: 先入先出缓冲器 (队列) +filter: filter (过滤函数) +filter: 过滤器 +filtered_accumulate: filtered_accumulate (带过滤的累积函数) +find_assertions: find_assertions (查找断言函数) +find_divisor: find_divisor (查找因子函数) +first_agenda_item: first_agenda_item (首个议程项选择器) +first-class elements in language: 语言中的一等公民 +first_conjunct: first_conjunct (首个合取项选择器) +first_disjunct: first_disjunct (首个析取项选择器) +first_frame: first_frame (首个帧选择器) +first_segment: first_segment (首个段选择器) +first_statement: first_statement (首条语句选择器) +first_term: first_term (首项选择器) +fixed-length code: 定长编码 +fixed_point: fixed_point (不动点函数) +fixed_point (as iterative improvement): fixed_point (作为迭代改进) +fixed point: 不动点 +fixed point (computing with calculator): 不动点 (用计算器计算) +fixed point (of cosine): 不动点 (余弦的) +fixed point (cube root as): 不动点 (立方根作为) +fixed point (fourth root as): 不动点 (四次方根作为) +fixed point (golden ratio as): 不动点 (黄金分割比作为) +fixed point (as iterative improvement): 不动点 (作为迭代改进) +fixed point (in Newton's method): 不动点 (在牛顿法中) +fixed point (nth root as): 不动点 (n 次方根作为) +fixed point (square root as): 不动点 (平方根作为) +fixed point (of transformed function): 不动点 (变换后函数) +fixed point (unification and): 不动点 (与合一) +fixed_point_of_transform: fixed_point_of_transform (变换后函数的不动点函数) +flag register: 标志寄存器 +flatmap: flatmap (扁平映射函数) +flatten_stream: flatten_stream (扁平化流函数) +flip_horiz: flip_horiz (水平翻转函数 - 图片语言) +flipped_pairs: flipped_pairs (翻转序对函数 - 图片语言) +flip_vert: flip_vert (垂直翻转函数 - 图片语言) +Floyd, Robert: Floyd, Robert (人名) +fold_left: fold_left (左折叠函数) +fold_right: fold_right (右折叠函数) +Forbus, Kenneth D.: Forbus, Kenneth D. (人名) +force_it: force_it (强制求值函数) +force_it (memoized version): force_it (记忆化版本) +forcing: 强制求值 +forcing (tail of stream): 强制求值 (流的尾部) +forcing (of thunk): 强制求值 (thunk 的) +for_each: for_each (遍历执行函数) +for_each_except: for_each_except (除...之外遍历执行函数) +forget_value: forget_value (忘记值函数 - 约束系统) +formal parameters: 形式参数 +Fortran: Fortran (编程语言名) +Fortran (inventor of): Fortran (发明者) +forwarding address: 转发地址 (垃圾回收) +fourth root, as fixed point: 四次方根 (作为不动点) +fraction: 分数 +frame (environment model): 帧 (环境模型) +frame (environment model, as repository of local state): 帧 (作为局部状态的存储库) +frame (environment model, global): 帧 (全局) +frame (picture language): 框架 (图片语言) +frame (picture language, coordinate map): 框架 (坐标映射) +frame (query interpreter): 帧 (查询解释器) +frame (query interpreter, representation): 帧 (表示) +frame_coord_map: frame_coord_map (框架坐标映射选择器) +framed-stack discipline: 帧栈规则 +frame_symbols: frame_symbols (帧符号选择器) +frame_values: frame_values (帧值选择器) +free register: free 寄存器 (空闲内存指针) +free list: 空闲列表 (内存管理) +free name: 自由变量 / 自由名 +free name (capturing): 自由变量 (捕获) +free name (in internal declaration): 自由变量 (在内部声明中) +Friedman, Daniel P.: Friedman, Daniel P. (人名) +fringe: fringe (树叶列表函数) +fringe (as a tree enumeration): fringe (作为树的枚举) +front_ptr: front_ptr (队头指针) +front_queue: front_queue (队头元素函数) +full-adder: 全加器 +full_adder: full_adder (全加器函数) +fun register: fun 寄存器 (函数寄存器) +function (keyword): function (关键字) +function (JavaScript): 函数 (JavaScript) +function (JavaScript, anonymous): 函数 (匿名) +function (JavaScript, as argument): 函数 (作为参数) +function (JavaScript, as black box): 函数 (作为黑箱) +function (JavaScript, body of): 函数 (体) +function (JavaScript, compound): 函数 (复合) +function (JavaScript, creating with function declaration): 函数 (用函数声明创建) +function (JavaScript, creating with lambda expression): 函数 (用 lambda 表达式创建) +function (JavaScript, declaration of): 函数 (声明) +function (JavaScript, first-class): 函数 (一等公民) +function (JavaScript, as general method): 函数 (作为通用方法) +function (JavaScript, generic): 函数 (通用) +function (JavaScript, higher-order): 函数 (高阶) +function (JavaScript, mathematical function vs.): 函数 (与数学函数的比较) +function (JavaScript, memoized): 函数 (记忆化) +function (JavaScript, monitored): 函数 (被监控) +function (JavaScript, name of): 函数 (名称) +function (JavaScript, naming (with function declaration)): 函数 (命名 (用函数声明)) +function (JavaScript, parameters of): 函数 (参数) +function (JavaScript, as pattern for local evolution of a process): 函数 (作为过程局部演化的模式) +function (JavaScript, primitive): 函数 (原语) +function (JavaScript, as returned value): 函数 (作为返回值) +function (JavaScript, returning multiple values): 函数 (返回多个值) +function (JavaScript, scope of parameters): 函数 (参数作用域) +function (JavaScript, syntactic form vs.): 函数 (与语法形式比较) +function (JavaScript, with any number of arguments): 函数 (带任意数量参数) +function (mathematical): 函数 (数学) +function (mathematical, -> notation for): 函数 (数学, -> 表示法) +function (mathematical, Ackermann's): 函数 (数学, 阿克曼) +function (mathematical, composition of): 函数 (数学, 复合) +function (mathematical, derivative of): 函数 (数学, 导数) +function (mathematical, fixed point of): 函数 (数学, 不动点) +function (mathematical, JavaScript function vs.): 函数 (数学, 与 JavaScript 函数比较) +function (mathematical, rational): 函数 (数学, 有理) +function (mathematical, repeated application of): 函数 (数学, 重复应用) +function (mathematical, smoothing of): 函数 (数学, 平滑) +functional abstraction: 函数抽象 +functional programming: 函数式编程 +functional programming (concurrency and): 函数式编程 (与并发) +functional programming (functional programming languages): 函数式编程 (函数式编程语言) +functional programming (time and): 函数式编程 (与时间) +functional representation of data: 数据的函数表示 +functional representation of data (mutable data): 数据的函数表示 (可变数据) +function application: 函数应用 +function application (compound expression as function expression of): 函数应用 (复合表达式作为其函数表达式) +function application (environment model of): 函数应用 (环境模型) +function application (evaluation of): 函数应用 (求值) +function application (as function expression of application): 函数应用 (作为应用的函数表达式) +function application (parsing of): 函数应用 (解析) +function application (substitution model of): 函数应用 (代换模型) +function_body: function_body (函数体选择器) +function box, in digital circuit: 函数盒 (在数字电路中) +function declaration: 函数声明 +function declaration (as derived component): 函数声明 (作为派生组件) +function declaration (hoisting of): 函数声明 (提升) +function declaration (lambda expression vs.): 函数声明 (与 lambda 表达式比较) +function declaration (parsing of): 函数声明 (解析) +function_declaration_body: function_declaration_body (函数声明体选择器) +function_declaration_name: function_declaration_name (函数声明名称选择器) +function_declaration_parameters: function_declaration_parameters (函数声明参数选择器) +function_decl_to_constant_decl: function_decl_to_constant_decl (函数声明转常量声明函数) +function_environment: function_environment (函数环境选择器) +function_expression: function_expression (函数表达式选择器) +function expression: 函数表达式 +function expression (application as): 函数表达式 (应用作为) +function expression (compound expression as): 函数表达式 (复合表达式作为) +function expression (lambda expression as): 函数表达式 (lambda 表达式作为) +function_parameters: function_parameters (函数参数选择器) + +G + +Gabriel, Richard P.: Gabriel, Richard P. (人名) +garbage collection: 垃圾回收 +garbage collection (memoization and): 垃圾回收 (与记忆化) +garbage collection (mutation and): 垃圾回收 (与修改) +garbage collection (tail recursion and): 垃圾回收 (与尾递归) +garbage collector: 垃圾回收器 +garbage collector (compacting): 垃圾回收器 (紧凑式) +garbage collector (mark-sweep): 垃圾回收器 (标记-清除) +garbage collector (stop-and-copy): 垃圾回收器 (停止-复制) +Gargle: Gargle (虚构公司名) +GCD: 最大公约数 (GCD) +gcd: gcd (最大公约数函数) +gcd (register machine for): gcd (寄存器机) +gcd_machine: gcd_machine (GCD 寄存器机定义) +gcd_terms: gcd_terms (项的最大公约数函数) +general-purpose computer, as universal machine: 通用计算机 (作为通用机) +generate_huffman_tree: generate_huffman_tree (生成霍夫曼树函数) +generating sentences: 生成句子 +generic arithmetic operations: 通用算术操作 +generic arithmetic operations (structure of system): 通用算术操作 (系统结构) +generic function: 通用函数 +generic function (generic selector): 通用函数 (通用选择器) +generic operation: 通用操作 +generic types: 泛型类型 +Genesis: 《创世纪》 +get: get (获取函数 - 表操作) +get_contents: get_contents (获取内容函数 - 寄存器/内存) +get_current_environment: get_current_environment (获取当前环境函数) +get_register: get_register (获取寄存器对象函数) +get_register_contents: get_register_contents (获取寄存器内容函数) +get_signal: get_signal (获取信号值函数) +get_time (primitive function): get_time (获取时间原语函数) +get_value: get_value (获取值函数 - 约束系统) +global environment: 全局环境 +global environment (in metacircular evaluator): 全局环境 (在元循环求值器中) +global frame: 全局帧 +Goguen, Joseph: Goguen, Joseph (人名) +golden ratio: 黄金分割比 +golden ratio (as continued fraction): 黄金分割比 (表示为连分数) +golden ratio (as fixed point): 黄金分割比 (作为不动点) +good parts of JavaScript: JavaScript 的精华部分 +Gordon, Michael: Gordon, Michael (人名) +go_to (in register machine): go_to (寄存器机中的跳转指令) +go_to (in register machine, destination in register): go_to (目标在寄存器中) +go_to (in register machine, instruction constructor): go_to (跳转指令构造器) +go_to (in register machine, simulating): go_to (模拟跳转指令) +go_to_dest: go_to_dest (跳转目标选择器) +grammar: 语法 / 文法 +graphics: 图形学 +Gray, Jim: Gray, Jim (人名) +greatest common divisor: 最大公约数 +greatest common divisor (generic): 最大公约数 (通用) +greatest common divisor (of polynomials): 最大公约数 (多项式的) +greatest common divisor (used to estimate pi): 最大公约数 (用于估算 pi) +greatest common divisor (used in rational-number arithmetic): 最大公约数 (用于有理数算术) +Green, Cordell: Green, Cordell (人名) +Guttag, John Vogel: Guttag, John Vogel (人名) + +H + +half-adder: 半加器 +half_adder: half_adder (半加器函数) +half_adder (simulation of): half_adder (模拟) +half-interval method: 半区间法 +half_interval_method: half_interval_method (半区间法函数) +half-interval method (Newton's method vs.): 半区间法 (与牛顿法比较) +halting problem: 停机问题 +Halting Theorem: 停机定理 +Hamming, Richard Wesley: Hamming, Richard Wesley (人名) +Hanson, Christopher P.: Hanson, Christopher P. (人名) +Hardy, Godfrey Harold: Hardy, Godfrey Harold (人名) +Haskell: Haskell (编程语言名) +Hassle: Hassle (编程语言名) +has_value: has_value (是否有值检查函数 - 约束系统) +Havender, J.: Havender, J. (人名) +Haynes, Christopher T.: Haynes, Christopher T. (人名) +head (primitive function): head (列表头元素原语函数) +head (primitive function, axiom for): head (公理) +head (primitive function, functional implementation of): head (函数式实现) +head (primitive function, implemented with vectors): head (用向量实现) +head (primitive function, as list operation): head (作为列表操作) +headed list: 带头结点的列表 +Henderson, Peter: Henderson, Peter (人名) +Henderson, Peter (Henderson diagram): Henderson, Peter (Henderson 图) +Henz, Martin, children of: Henz, Martin 的孩子们 +Heraclitus: Heraclitus (人名) +Heron of Alexandria: Heron of Alexandria (人名) +Hewitt, Carl Eddie: Hewitt, Carl Eddie (人名) +hiding principle: 隐藏原则 +hierarchical data structures: 层次数据结构 +hierarchy of types: 类型层次结构 +hierarchy of types (inadequacy of): 类型层次结构 (不足之处) +hierarchy of types (in symbolic algebra): 类型层次结构 (在符号代数中) +higher-order functions: 高阶函数 +higher-order functions (function as argument): 高阶函数 (函数作为参数) +higher-order functions (function as general method): 高阶函数 (函数作为通用方法) +higher-order functions (function as returned value): 高阶函数 (函数作为返回值) +higher-order functions (in metacircular evaluator): 高阶函数 (在元循环求值器中) +higher-order functions (static typing and): 高阶函数 (与静态类型) +high-level language, machine language vs.: 高级语言 vs. 机器语言 +Hilfinger, Paul: Hilfinger, Paul (人名) +Hoare, Charles Antony Richard: Hoare, Charles Antony Richard (人名) +Hodges, Andrew: Hodges, Andrew (人名) +Hofstadter, Douglas R.: Hofstadter, Douglas R. (人名) +hoisting of function declarations: 函数声明提升 +Horner, W. G.: Horner, W. G. (人名) +Horner's rule: 霍纳规则 (秦九韶算法) +"how to" vs. "what is" description: "如何做" vs. "是什么" 的描述 +Huffman, David: Huffman, David (人名) +Huffman code: 霍夫曼编码 +Huffman code (optimality of): 霍夫曼编码 (最优性) +Huffman code (order of growth of encoding): 霍夫曼编码 (编码的增长阶) +Hughes, R. J. M.: Hughes, R. J. M. (人名) + +I + +identity: identity (恒等函数) +if (keyword): if (关键字) +imag_part: imag_part (虚部选择器) +imag_part (data-directed): imag_part (数据导向版本) +imag_part (polar representation): imag_part (极坐标表示) +imag_part (rectangular representation): imag_part (直角坐标表示) +imag_part (with tagged data): imag_part (带标签数据版本) +imag_part_polar: imag_part_polar (极坐标虚部函数) +imag_part_rectangular: imag_part_rectangular (直角坐标虚部函数) +immediately invoked lambda expression: 立即调用 lambda 表达式 (IILE) +imperative programming: 命令式编程 +imperative vs. declarative knowledge: 命令性知识 vs. 说明性知识 +imperative vs. declarative knowledge (logic programming and): 命令性知识 vs. 说明性知识 (与逻辑编程) +imperative vs. declarative knowledge (nondeterministic computing and): 命令性知识 vs. 说明性知识 (与非确定性计算) +imperative vs. expression-oriented programming style: 命令式 vs. 面向表达式编程风格 +inc: inc (加一函数) +incremental development of programs: 程序的增量开发 +indentation: 缩进 +indeterminate of a polynomial: 不定元 (多项式的) +indexing a data base: 数据库索引 +inference, method of: 推理方法 +infinite series: 无穷级数 +infinite stream(s): 无限流 +infinite stream(s) (merging): 无限流 (合并) +infinite stream(s) (merging as a relation): 无限流 (合并作为关系) +infinite stream(s) (of factorials): 无限流 (阶乘) +infinite stream(s) (of Fibonacci numbers): 无限流 (斐波那契数) +infinite stream(s) (of integers): 无限流 (整数) +infinite stream(s) (of pairs): 无限流 (序对) +infinite stream(s) (of prime numbers): 无限流 (素数) +infinite stream(s) (of random numbers): 无限流 (随机数) +infinite stream(s) (representing power series): 无限流 (表示幂级数) +infinite stream(s) (to model signals): 无限流 (用于模拟信号) +infinite stream(s) (to sum a series): 无限流 (用于级数求和) +infix notation: 中缀表示法 +infix notation (prefix notation vs.): 中缀表示法 (与前缀表示法比较) +infix operator: 中缀运算符 +inform_about_no_value: inform_about_no_value (通知无值函数) +inform_about_value: inform_about_value (通知有值函数) +information retrieval: 信息检索 +Ingerman, Peter: Ingerman, Peter (人名) +initialize_stack operation in register machine: initialize_stack 操作 (寄存器机中) +insert: insert (插入函数 - 表操作) +insert (in one-dimensional table): insert (在一维表中) +insert (in two-dimensional table): insert (在二维表中) +insert_queue: insert_queue (插入队列函数) +install_complex_package: install_complex_package (安装复数包函数) +install_javascript_number_package: install_javascript_number_package (安装 JS 数字包函数) +install_polar_package: install_polar_package (安装极坐标包函数) +install_polynomial_package: install_polynomial_package (安装多项式包函数) +install_rational_package: install_rational_package (安装有理数包函数) +install_rectangular_package: install_rectangular_package (安装直角坐标包函数) +instantiate a pattern: 实例化模式 +instantiate_expression: instantiate_expression (实例化表达式函数) +instantiate_term: instantiate_term (实例化项函数) +inst_controller_instruction: inst_controller_instruction (指令的控制器指令部分) +inst_execution_fun: inst_execution_fun (指令的执行函数) +instruction counting: 指令计数 +instruction execution function: 指令执行函数 +instructions: instructions (指令列表选择器) +instruction sequence: 指令序列 +instruction tracing: 指令跟踪 +integer(s): 整数 +integerizing factor: 整数化因子 (多项式 GCD) +integers (infinite stream): integers (整数无限流) +integers (infinite stream, implicit definition): integers (整数无限流, 隐式定义) +integers (infinite stream, lazy-list version): integers (整数无限流, 惰性列表版本) +integers_starting_from: integers_starting_from (从...开始的整数流函数) +integral: integral (积分函数/过程) +integral (with delayed argument): integral (带延迟参数) +integral (with lambda expression): integral (带 lambda 表达式) +integral (lazy-list version): integral (惰性列表版本) +integral (need for delayed evaluation): integral (延迟求值需求) +integral: 积分 +integral (of a power series): 积分 (幂级数的) +integrated-circuit implementation of Scheme: Scheme 的集成电路实现 +integrate_series: integrate_series (幂级数积分函数) +integrator, for signals: 积分器 (用于信号) +interleave: interleave (交错合并流函数) +interleave_delayed: interleave_delayed (延迟交错合并流函数) +internal declaration: 内部声明 +internal declaration (in environment model): 内部声明 (在环境模型中) +internal declaration (free name in): 内部声明 (其中的自由变量) +internal declaration (names distinct from parameters): 内部声明 (名称与参数不同) +internal declaration (in nondeterministic evaluator): 内部声明 (在非确定性求值器中) +internal declaration (position of): 内部声明 (位置) +internal declaration (restrictions on): 内部声明 (限制) +internal declaration (scanning out): 内部声明 (扫描出) +internal declaration (scope of name): 内部声明 (名称作用域) +Internet "Worm": 互联网“蠕虫” +interning strings: 字符串驻留 +interpreter: 解释器 +interpreter (compiler vs.): 解释器 (与编译器比较) +interpreter (read-evaluate-print loop): 解释器 (读取-求值-打印循环) +intersection_set: intersection_set (集合交集函数) +intersection_set (binary-tree representation): intersection_set (二叉树表示) +intersection_set (ordered-list representation): intersection_set (有序列表表示) +intersection_set (unordered-list representation): intersection_set (无序列表表示) +interval arithmetic: 区间算术 +invariant quantity of an iterative process: 迭代过程的不变量 +inverter: 反相器 / 非门 +inverter: inverter (反相器函数) +is_, in predicate names: is_ (谓词命名约定) +is_amb: is_amb (检查是否为 amb 表达式) +is_application: is_application (检查是否为应用式) +is_assertion: is_assertion (检查是否为断言) +is_assignment: is_assignment (检查是否为赋值) +is_block: is_block (检查是否为块) +is_boolean: is_boolean (检查是否为布尔值) +is_compiled_function: is_compiled_function (检查是否为编译后函数) +is_compound_function: is_compound_function (检查是否为复合函数) +is_conditional: is_conditional (检查是否为条件式) +is_constant_exp: is_constant_exp (检查是否为常量表达式) +is_declaration: is_declaration (检查是否为声明) +is_divisible: is_divisible (检查是否可整除) +is_element_of_set: is_element_of_set (检查是否为集合元素) +is_element_of_set (binary-tree representation): is_element_of_set (二叉树表示) +is_element_of_set (ordered-list representation): is_element_of_set (有序列表表示) +is_element_of_set (unordered-list representation): is_element_of_set (无序列表表示) +is_empty_agenda: is_empty_agenda (检查议程是否为空) +is_empty_conjunction: is_empty_conjunction (检查合取是否为空) +is_empty_disjunction: is_empty_disjunction (检查析取是否为空) +is_empty_queue: is_empty_queue (检查队列是否为空) +is_empty_sequence: is_empty_sequence (检查序列是否为空) +is_empty_termlist: is_empty_termlist (检查项列表是否为空) +is_equal (generic predicate): is_equal (通用相等性谓词) +is_equal_to_zero (generic): is_equal_to_zero (通用零值检查) +is_equal_to_zero (generic, for polynomials): is_equal_to_zero (通用零值检查, 用于多项式) +is_even: is_even (检查是否为偶数) +is_falsy: is_falsy (检查是否为假值 - JavaScript) +is_falsy (full JavaScript version): is_falsy (完整 JavaScript 版本) +is_falsy (why used in explicit-control evaluator): is_falsy (为何在显式控制求值器中使用) +is_function_declaration: is_function_declaration (检查是否为函数声明) +is_label_exp: is_label_exp (检查是否为标号表达式) +is_lambda_expression: is_lambda_expression (检查是否为 lambda 表达式) +is_last_argument_expression: is_last_argument_expression (检查是否为最后一个参数表达式) +is_last_statement: is_last_statement (检查是否为最后一条语句) +is_leaf: is_leaf (检查是否为叶节点) +is_list_construction: is_list_construction (检查是否为列表构造) +is_literal: is_literal (检查是否为字面量) +is_name: is_name (检查是否为名称) +is_null (primitive function): is_null (检查是否为空列表原语函数) +is_null (primitive function, implemented with typed pointers): is_null (用类型指针实现) +is_number (primitive function): is_number (检查是否为数值原语函数) +is_number (primitive function, data types and): is_number (与数据类型) +is_number (primitive function, implemented with typed pointers): is_number (用类型指针实现) +is_operation_exp: is_operation_exp (检查是否为操作表达式) +is_pair (primitive function): is_pair (检查是否为序对原语函数) +is_pair (primitive function, implemented with typed pointers): is_pair (用类型指针实现) +is_polar: is_polar (检查是否为极坐标表示) +is_prime: is_prime (检查是否为素数) +is_primitive_function: is_primitive_function (检查是否为原语函数) +is_product: is_product (检查是否为乘积) +is_rectangular: is_rectangular (检查是否为直角坐标表示) +is_register_exp: is_register_exp (检查是否为寄存器表达式) +is_return_statement: is_return_statement (检查是否为返回语句) +is_return_value: is_return_value (检查是否为返回值) +is_rule: is_rule (检查是否为规则) +is_same_variable: is_same_variable (检查是否为相同变量) +is_sequence: is_sequence (检查是否为序列) +is_string (primitive function): is_string (检查是否为字符串原语函数) +is_string (primitive function, data types and): is_string (与数据类型) +is_string (primitive function, implemented with typed pointers): is_string (用类型指针实现) +is_sum: is_sum (检查是否为和) +is_tagged_list: is_tagged_list (检查是否为带标签列表) +is_truthy: is_truthy (检查是否为真值 - JavaScript) +is_truthy (full JavaScript version): is_truthy (完整 JavaScript 版本) +is_undefined (primitive function): is_undefined (检查是否未定义原语函数) +is_variable: is_variable (检查是否为变量) +is_variable (for algebraic expressions): is_variable (用于代数表达式) +is_variable (in query system): is_variable (在查询系统中) +iteration contructs: 迭代结构 +iterative improvement: 迭代改进 +iterative process: 迭代过程 +iterative process (as a stream process): 迭代过程 (作为流过程) +iterative process (design of algorithm): 迭代过程 (算法设计) +iterative process (implemented by function call): 迭代过程 (通过函数调用实现) +iterative process (linear): 迭代过程 (线性) +iterative process (recursive process vs.): 迭代过程 (与递归过程比较) +iterative process (register machine for): 迭代过程 (寄存器机) + +J + +Jaffar, Joxan: Jaffar, Joxan (人名) +Java: Java (编程语言名) +Java (recursive functions in): Java (递归函数) +JavaScript: JavaScript (编程语言) +JavaScript (applicative-order evaluation in): JavaScript (应用序求值) +JavaScript (eval in): JavaScript (eval 函数) +JavaScript (first-class functions in): JavaScript (一等公民函数) +JavaScript (good parts): JavaScript (精华部分) +JavaScript (history of): JavaScript (历史) +JavaScript (internal type system): JavaScript (内部类型系统) +JavaScript (tail recursion in): JavaScript (尾递归) +JavaScript environment used in this book: 本书中使用的 JavaScript 环境 +javascript_number package: javascript_number 包 (JS 数字包) +javascript_number_to_complex: javascript_number_to_complex (JS 数字转复数函数) +javascript_number_to_javascript_number: javascript_number_to_javascript_number (JS 数字转 JS 数字函数) +JavaScript package sicp: JavaScript sicp 包 +javascript_predicate (query interpreter): javascript_predicate (查询解释器中的 JS 谓词) +javascript_predicate (query language): javascript_predicate (查询语言中的 JS 谓词) +javascript_predicate (query language, evaluation of): javascript_predicate (查询语言中 JS 谓词的求值) +javascript_predicate_expression: javascript_predicate_expression (JS 谓词表达式选择器) +Jayaraman, Sundaresan: Jayaraman, Sundaresan (人名) + +K + +Kaldewaij, Anne: Kaldewaij, Anne (人名) +Karr, Alphonse: Karr, Alphonse (人名) +Kepler, Johannes: Kepler, Johannes (人名) +key: 键 / 关键字 +key of a record: 记录的键 +key of a record (in a data base): 记录的键 (在数据库中) +key of a record (in a table): 记录的键 (在表中) +key of a record (testing equality of): 记录的键 (测试相等性) +keyword: 关键字 +keywords: 关键字 (列表) +keywords (break): 关键字 (break) +keywords (const): 关键字 (const) +keywords (continue): 关键字 (continue) +keywords (else): 关键字 (else) +keywords (false): 关键字 (false) +keywords (function): 关键字 (function) +keywords (if): 关键字 (if) +keywords (let): 关键字 (let) +keywords (null): 关键字 (null) +keywords (return): 关键字 (return) +keywords (true): 关键字 (true) +keywords (while): 关键字 (while) +Knuth, Donald E.: Knuth, Donald E. (人名) +Kolmogorov, A. N.: Kolmogorov, A. N. (人名) +Konopasek, Milos: Konopasek, Milos (人名) +Kowalski, Robert: Kowalski, Robert (人名) +KRC: KRC (编程语言名) + +L + +label (in register machine): label (寄存器机中的标号) +label (in register machine, simulating): label (模拟标号) +label_exp_label: label_exp_label (标号表达式的标号选择器) +Lagrange interpolation formula: 拉格朗日插值公式 +lambda calculus (lambda calculus): lambda 演算 +lambda_body: lambda_body (lambda 体选择器) +lambda expression: lambda 表达式 +lambda expression (block as body of): lambda 表达式 (块作为体) +lambda expression (as function expression of application): lambda 表达式 (作为应用的函数表达式) +lambda expression (function declaration vs.): lambda 表达式 (与函数声明比较) +lambda expression (immediately invoked): lambda 表达式 (立即调用) +lambda expression (lazy evaluation and): lambda 表达式 (与惰性求值) +lambda expression (parsing of): lambda 表达式 (解析) +lambda expression (precedence of): lambda 表达式 (优先级) +lambda expression (value of): lambda 表达式 (值) +lambda_parameter_symbols: lambda_parameter_symbols (lambda 参数符号选择器) +Lambert, J.H.: Lambert, J.H. (人名) +Lamé, Gabriel: Lamé, Gabriel (人名) +Lamé's Theorem: 拉梅定理 +Lamport, Leslie: Lamport, Leslie (人名) +Lampson, Butler: Lampson, Butler (人名) +Landin, Peter: Landin, Peter (人名) +language: 语言 +Lapalme, Guy: Lapalme, Guy (人名) +last_pair: last_pair (列表最后一个序对函数) +last_pair (rules): last_pair (规则版本) +lazy evaluation: 惰性求值 / 延迟求值 +lazy evaluator: 惰性求值器 +lazy list: 惰性列表 +lazy pair: 惰性序对 +lazy tree: 惰性树 +least commitment, principle of: 最少承诺原则 +left-associative: 左结合 +left_branch: left_branch (左分支选择器) +Leibniz, Baron Gottfried Wilhelm von: Leibniz, Baron Gottfried Wilhelm von (人名) +Leibniz, Baron Gottfried Wilhelm von (proof of Fermat's Little Theorem): Leibniz (费马小定理证明) +Leibniz, Baron Gottfried Wilhelm von (series for pi): Leibniz (pi 级数) +Leiserson, Charles E.: Leiserson, Charles E. (人名) +length: length (列表长度函数) +length (as accumulation): length (作为累积) +length (iterative version): length (迭代版本) +length (recursive version): length (递归版本) +let (keyword): let (关键字) +let* (Scheme variant of let): let* (Scheme 中 let 的变体) +lexical_address_assign: lexical_address_assign (词法地址赋值函数) +lexical addressing: 词法寻址 +lexical_address_lookup: lexical_address_lookup (词法地址查找函数) +lexical scoping: 词法作用域 +lexical scoping (environment structure and): 词法作用域 (与环境结构) +Lieberman, Henry: Lieberman, Henry (人名) +LIFO buffer: 后入先出缓冲器 (栈) +linear growth: 线性增长 +linear iterative process: 线性迭代过程 +linear iterative process (order of growth): 线性迭代过程 (增长阶) +linear recursive process: 线性递归过程 +linear recursive process (order of growth): 线性递归过程 (增长阶) +line segment: 线段 +line segment (represented as pair of points): 线段 (表示为点对) +line segment (represented as pair of vectors): 线段 (表示为向量对) +linkage descriptor: 链接描述符 +Liskov, Barbara Huberman: Liskov, Barbara Huberman (人名) +Lisp: Lisp (编程语言名) +Lisp (as ancestor of JavaScript): Lisp (作为 JavaScript 的祖先) +Lisp (on DEC PDP-1): Lisp (在 DEC PDP-1 上) +Lisp (efficiency of): Lisp (效率) +Lisp (MDL dialect of): Lisp (MDL 方言) +list (primitive function): list (列表构造原语函数) +list(s): 列表 +list(s) (adjoining to with pair): 列表 (用 pair 添加) +list(s) (combining with append): 列表 (用 append 连接) +list(s) (constructing with pair): 列表 (用 pair 构造) +list(s) (converting a binary tree to a): 列表 (从二叉树转换) +list(s) (converting to a binary tree): 列表 (转换为二叉树) +list(s) (empty): 列表 (空) +list(s) (equality of): 列表 (相等性) +list(s) (headed): 列表 (带头结点) +list(s) (last pair of): 列表 (最后一个序对) +list(s) (lazy): 列表 (惰性) +list(s) (length of): 列表 (长度) +list(s) (list structure vs.): 列表 (与列表结构比较) +list(s) (manipulation with head, tail, and pair): 列表 (用 head, tail, pair 操作) +list(s) (mapping over): 列表 (映射) +list(s) (nth element of): 列表 (第 n 个元素) +list(s) (operations on): 列表 (操作) +list(s) (printed representation of): 列表 (打印表示) +list(s) (reversing): 列表 (反转) +list(s) (techniques for manipulating): 列表 (操作技巧) +list(s) (walking down with tail): 列表 (用 tail 遍历) +list_difference: list_difference (列表差集函数) +list notation for data: 数据的列表表示法 +list_of_arg_values: list_of_arg_values (参数值列表函数) +list_of_delayed_args: list_of_delayed_args (延迟参数列表函数) +list_of_values: list_of_values (值列表函数) +list_of_values (without higher-order functions): list_of_values (无高阶函数版本) +list_ref: list_ref (列表引用函数) +list structure: 列表结构 +list structure (list vs.): 列表结构 (与列表比较) +list structure (mutable): 列表结构 (可变) +list structure (represented using vectors): 列表结构 (用向量表示) +list-structured memory: 列表结构内存 +list_to_tree: list_to_tree (列表转树函数) +list_union: list_union (列表并集函数) +literal expression: 字面量表达式 +literal expression (parsing of): 字面量表达式 (解析) +literal_value: literal_value (字面量值选择器) +lives_near (rule): lives_near (规则: 住在附近) +local evolution of a process: 过程的局部演化 +local name: 局部名称 / 局部变量 +local state: 局部状态 +local state (maintained in frames): 局部状态 (在帧中维护) +local state variable: 局部状态变量 +location: 位置 (内存) +Locke, John: Locke, John (人名) +logarithm, approximating ln 2: 对数 (近似 ln 2) +logarithmic growth: 对数增长 +logical and (digital logic): 逻辑与 (数字逻辑) +logical conjunction: 逻辑与 +logical disjunction: 逻辑或 +logical_not: logical_not (逻辑非函数) +logical or (digital logic): 逻辑或 (数字逻辑) +logic programming: 逻辑编程 +logic programming (computers for): 逻辑编程 (计算机) +logic programming (history of): 逻辑编程 (历史) +logic programming (in Japan): 逻辑编程 (在日本) +logic programming (logic programming languages): 逻辑编程 (逻辑编程语言) +logic programming (mathematical logic vs.): 逻辑编程 (与数理逻辑比较) +logic puzzles: 逻辑谜题 +lookup: lookup (查找函数 - 表) +lookup (in one-dimensional table): lookup (在一维表中) +lookup (in set of records): lookup (在记录集合中) +lookup (in two-dimensional table): lookup (在二维表中) +lookup_label: lookup_label (查找标号函数) +lookup_prim: lookup_prim (查找原语操作函数) +lookup_symbol_value: lookup_symbol_value (查找符号值函数) +lookup_symbol_value (for scanned-out declarations): lookup_symbol_value (用于扫描出的声明) +looping constructs: 循环结构 +lower_bound: lower_bound (下界选择器 - 区间) + +M + +machine language: 机器语言 +machine language (high-level language vs.): 机器语言 (与高级语言比较) +magician: 魔术师 +magnitude: magnitude (幅度/模长选择器) +magnitude (data-directed): magnitude (数据导向版本) +magnitude (polar representation): magnitude (极坐标表示) +magnitude (rectangular representation): magnitude (直角坐标表示) +magnitude (with tagged data): magnitude (带标签数据版本) +magnitude_polar: magnitude_polar (极坐标幅度函数) +magnitude_rectangular: magnitude_rectangular (直角坐标幅度函数) +make_account: make_account (创建账户函数) +make_account (in environment model): make_account (在环境模型中) +make_account (with serialization): make_account (带序列化版本) +make_account_and_serializer: make_account_and_serializer (创建账户和序列化器函数) +make_accumulator: make_accumulator (创建累加器函数) +make_agenda: make_agenda (创建议程函数) +make_application: make_application (创建应用式函数) +make_assign_ef: make_assign_ef (创建赋值执行函数) +make_binding: make_binding (创建绑定函数) +make_branch_ef: make_branch_ef (创建分支执行函数) +make_center_percent: make_center_percent (根据中心和百分比创建区间) +make_center_width: make_center_width (根据中心和宽度创建区间) +make_code_tree: make_code_tree (创建编码树函数) +make_compiled_function: make_compiled_function (创建编译后函数对象) +make_complex_from_mag_ang: make_complex_from_mag_ang (根据模长和角度创建复数) +make_complex_from_real_imag: make_complex_from_real_imag (根据实部和虚部创建复数) +make_connector: make_connector (创建连接器函数) +make_constant_declaration: make_constant_declaration (创建常量声明函数) +make_cycle: make_cycle (创建循环列表函数) +make_decrementer: make_decrementer (创建递减器函数) +make_execution_function: make_execution_function (创建执行函数) +make_frame: make_frame (创建框架函数 - 图片/环境) +make_from_mag_ang: make_from_mag_ang (根据模长和角度创建对象 - 通用) +make_from_mag_ang (message-passing): make_from_mag_ang (消息传递版本) +make_from_mag_ang (polar representation): make_from_mag_ang (极坐标表示) +make_from_mag_ang (rectangular representation): make_from_mag_ang (直角坐标表示) +make_from_mag_ang_polar: make_from_mag_ang_polar (极坐标版本) +make_from_mag_ang_rectangular: make_from_mag_ang_rectangular (直角坐标版本) +make_from_real_imag: make_from_real_imag (根据实部和虚部创建对象 - 通用) +make_from_real_imag (message-passing): make_from_real_imag (消息传递版本) +make_from_real_imag (polar representation): make_from_real_imag (极坐标表示) +make_from_real_imag (rectangular representation): make_from_real_imag (直角坐标表示) +make_from_real_imag_polar: make_from_real_imag_polar (极坐标版本) +make_from_real_imag_rectangular: make_from_real_imag_rectangular (直角坐标版本) +make_function: make_function (创建函数对象函数) +make_go_to_ef: make_go_to_ef (创建跳转执行函数) +make_inst: make_inst (创建指令对象函数) +make_instruction_sequence: make_instruction_sequence (创建指令序列函数) +make_interval: make_interval (创建区间函数) +make_javascript_number: make_javascript_number (创建 JS 数字对象函数) +make_joint: make_joint (创建联名账户函数) +make_label: make_label (创建标号函数) +make_label_entry: make_label_entry (创建标号条目函数) +make_lambda_expression: make_lambda_expression (创建 lambda 表达式函数) +make_leaf: make_leaf (创建叶节点函数) +make_leaf_set: make_leaf_set (创建叶节点集合函数) +make_literal: make_literal (创建字面量函数) +make_machine: make_machine (创建寄存器机函数) +make_monitored: make_monitored (创建被监控函数) +make_mutex: make_mutex (创建互斥锁函数) +make_name: make_name (创建名称/标识符函数) +make_new_machine: make_new_machine (创建新机器函数) +make_new_variable: make_new_variable (创建新变量函数 - 查询系统) +make_operation_exp_ef: make_operation_exp_ef (创建操作表达式执行函数) +make_perform_ef: make_perform_ef (创建 perform 执行函数) +make_point: make_point (创建点函数) +make_poly: make_poly (创建多项式函数) +make_polynomial: make_polynomial (创建多项式对象函数) +make_primitive_exp_ef: make_primitive_exp_ef (创建原语表达式执行函数) +make_product: make_product (创建乘积函数/节点) +make_queue: make_queue (创建队列函数) +make_rat: make_rat (创建有理数函数) +make_rat (axiom for): make_rat (公理) +make_rat (reducing to lowest terms): make_rat (化简到最简形式) +make_rational: make_rational (创建有理数对象函数 - 通用算术) +make_register: make_register (创建寄存器函数) +make_restore_ef: make_restore_ef (创建 restore 执行函数) +make_return_value: make_return_value (创建返回值对象函数) +make_save_ef: make_save_ef (创建 save 执行函数) +make_segment: make_segment (创建线段函数) +make_serializer: make_serializer (创建序列化器函数) +make_simplified_withdraw: make_simplified_withdraw (创建简化取款函数) +make_stack: make_stack (创建栈函数) +make_stack (with monitored stack): make_stack (带监控栈) +make_sum: make_sum (创建和函数/节点) +make_table: make_table (创建表函数) +make_table (message-passing implementation): make_table (消息传递实现) +make_table (one-dimensional table): make_table (一维表) +make_tableau: make_tableau (创建 tableau 函数 - 级数加速) +make_term: make_term (创建项函数) +make_test_ef: make_test_ef (创建 test 执行函数) +make_time_segment: make_time_segment (创建时间段函数) +make_tree: make_tree (创建树函数) +make_vect: make_vect (创建向量函数) +make_wire: make_wire (创建导线函数) +make_withdraw: make_withdraw (创建取款函数) +make_withdraw (in environment model): make_withdraw (在环境模型中) +make_withdraw (using immediately invoked lambda expression): make_withdraw (使用立即调用 lambda 表达式) +making change: 换零钱 +map: map (映射函数) +map (as accumulation): map (作为累积) +mapping: 映射 +mapping (over lists): 映射 (列表上) +mapping (nested): 映射 (嵌套) +mapping (as a transducer): 映射 (作为转换器) +mapping (over trees): 映射 (树上) +map_successive_pairs: map_successive_pairs (映射连续对函数) +mark-sweep garbage collector: 标记-清除垃圾回收器 +math_atan2 (primitive function): math_atan2 (atan2 原语函数) +math_cos (primitive function): math_cos (cos 原语函数) +mathematical function: 数学函数 +mathematics: 数学 +mathematics (computer science vs.): 数学 (与计算机科学比较) +mathematics (engineering vs.): 数学 (与工程学比较) +math_floor (primitive function): math_floor (floor 原语函数) +math_log (primitive function): math_log (log 原语函数) +math_max (primitive function): math_max (max 原语函数) +math_min (primitive function): math_min (min 原语函数) +math_random (primitive function): math_random (random 原语函数) +math_random (primitive function, assignment needed for): math_random (需要赋值) +math_round (primitive function): math_round (round 原语函数) +math_sin (primitive function): math_sin (sin 原语函数) +math_trunc (primitive function): math_trunc (trunc 原语函数) +matrix, represented as sequence: 矩阵 (表示为序列) +matrix_times_matrix: matrix_times_matrix (矩阵乘矩阵函数) +matrix_times_vector: matrix_times_vector (矩阵乘向量函数) +McAllester, David Allen: McAllester, David Allen (人名) +McCarthy, John: McCarthy, John (人名) +McDermott, Drew: McDermott, Drew (人名) +MDL: MDL (编程语言名) +means of abstraction: 抽象的方法 +means of abstraction (constant declaration as): 抽象的方法 (常量声明作为) +means of combination: 组合的方法 +measure in a Euclidean ring: 欧几里得环中的度量 +member: member (列表成员检查函数) +member (extended to use pointer equality): member (扩展为使用指针相等性) +memo: memo (记忆化辅助函数) +memo_fib: memo_fib (记忆化斐波那契函数) +memoization: 记忆化 / 缓存 +memoization (call-by-need and): 记忆化 (与传需求调用) +memoization (garbage collection and): 记忆化 (与垃圾回收) +memoization (in stream tail): 记忆化 (在流尾部) +memoization (of thunks): 记忆化 (thunk 的) +memoize: memoize (记忆化高阶函数) +memory: 内存 / 存储器 +memory (in 1965): 内存 (1965年) +memory (list-structured): 内存 (列表结构) +merge: merge (合并流函数) +merge_weighted: merge_weighted (加权合并流函数) +merging infinite streams: 合并无限流 +message passing: 消息传递 +message passing (environment model and): 消息传递 (与环境模型) +message passing (in bank account): 消息传递 (在银行账户中) +message passing (in digital-circuit simulation): 消息传递 (在数字电路模拟中) +message passing (tail recursion and): 消息传递 (与尾递归) +metacircular evaluator: 元循环求值器 +metacircular evaluator for JavaScript: JavaScript 的元循环求值器 +metacircular evaluator for JavaScript (&& (logical conjunction)): 元循环求值器 (&& 逻辑与) +metacircular evaluator for JavaScript (|| (logical disjunction)): 元循环求值器 (|| 逻辑或) +metacircular evaluator for JavaScript (analyzing version): 元循环求值器 (分析版本) +metacircular evaluator for JavaScript (compilation of): 元循环求值器 (编译) +metacircular evaluator for JavaScript (component representation): 元循环求值器 (组件表示) +metacircular evaluator for JavaScript (data abstraction in): 元循环求值器 (数据抽象) +metacircular evaluator for JavaScript (data-directed evaluate): 元循环求值器 (数据导向 evaluate) +metacircular evaluator for JavaScript (derived components): 元循环求值器 (派生组件) +metacircular evaluator for JavaScript (driver loop): 元循环求值器 (驱动循环) +metacircular evaluator for JavaScript (efficiency of): 元循环求值器 (效率) +metacircular evaluator for JavaScript (environment model of evaluation in): 元循环求值器 (求值环境模型) +metacircular evaluator for JavaScript (environment operations): 元循环求值器 (环境操作) +metacircular evaluator for JavaScript (evaluate and apply): 元循环求值器 (evaluate 和 apply) +metacircular evaluator for JavaScript (evaluate–apply cycle): 元循环求值器 (evaluate-apply 循环) +metacircular evaluator for JavaScript (global environment): 元循环求值器 (全局环境) +metacircular evaluator for JavaScript (higher-order functions in): 元循环求值器 (高阶函数) +metacircular evaluator for JavaScript (implemented language vs. implementation language): 元循环求值器 (被实现语言 vs. 实现语言) +metacircular evaluator for JavaScript (job of): 元循环求值器 (工作) +metacircular evaluator for JavaScript (let* (Scheme variant of let)): 元循环求值器 (let*) +metacircular evaluator for JavaScript (order of argument evaluation): 元循环求值器 (参数求值顺序) +metacircular evaluator for JavaScript (parameters distinct from local names): 元循环求值器 (参数与局部名称区分) +metacircular evaluator for JavaScript (preventing duplicate parameters): 元循环求值器 (防止重复参数) +metacircular evaluator for JavaScript (primitive functions): 元循环求值器 (原语函数) +metacircular evaluator for JavaScript (representation of environments): 元循环求值器 (环境表示) +metacircular evaluator for JavaScript (representation of functions): 元循环求值器 (函数表示) +metacircular evaluator for JavaScript (representation of true and false): 元循环求值器 (true 和 false 表示) +metacircular evaluator for JavaScript (return value): 元循环求值器 (返回值) +metacircular evaluator for JavaScript (running): 元循环求值器 (运行) +metacircular evaluator for JavaScript (symbolic differentiation and): 元循环求值器 (与符号微分) +metacircular evaluator for JavaScript (syntactic forms (additional)): 元循环求值器 (额外语法形式) +metacircular evaluator for JavaScript (syntactic forms as derived components): 元循环求值器 (语法形式作为派生组件) +metacircular evaluator for JavaScript (syntax of evaluated language): 元循环求值器 (被求值语言的语法) +metacircular evaluator for JavaScript (tail recursion and): 元循环求值器 (与尾递归) +metacircular evaluator for JavaScript (undefined): 元循环求值器 (undefined) +metacircular evaluator for JavaScript (value of program at top level): 元循环求值器 (顶层程序值) +metacircular evaluator for JavaScript (while loop): 元循环求值器 (while 循环) +metalinguistic abstraction: 元语言抽象 +MicroPlanner: MicroPlanner (编程语言名) +midpoint_segment: midpoint_segment (线段中点函数) +Miller, Gary L.: Miller, Gary L. (人名) +Miller, James S.: Miller, James S. (人名) +Miller–Rabin test for primality: Miller-Rabin 素性测试 +Milner, Robin: Milner, Robin (人名) +Minsky, Marvin Lee: Minsky, Marvin Lee (人名) +Miranda: Miranda (编程语言名) +MIT: MIT (麻省理工学院) +MIT (early history of): MIT (早期历史) +MIT (Research Laboratory of Electronics): MIT (电子学研究实验室) +ML: ML (编程语言名) +mobile: 悬挂物 (玩具) +Mocha: Mocha (JavaScript 早期名称) +modeling: 建模 +modeling (as a design strategy): 建模 (作为设计策略) +modeling (in science and engineering): 建模 (在科学与工程中) +models of evaluation: 求值模型 +modified registers: 被修改的寄存器 +modifies_register: modifies_register (检查寄存器是否被修改) +modularity: 模块性 +modularity (along object boundaries): 模块性 (沿对象边界) +modularity (functional programs vs. objects): 模块性 (函数式程序 vs. 对象) +modularity (hiding principle): 模块性 (隐藏原则) +modularity (streams and): 模块性 (与流) +modularity (through dispatching on type): 模块性 (通过类型分派) +modularity (through infinite streams): 模块性 (通过无限流) +modularity (through modeling with objects): 模块性 (通过对象建模) +modulo n: 模 n +modus ponens: 肯定前件 (推理规则) +money, changing: 换零钱 +monitored function: 被监控的函数 +monte_carlo: monte_carlo (蒙特卡洛模拟函数) +monte_carlo (infinite stream): monte_carlo (无限流版本) +Monte Carlo integration: 蒙特卡洛积分 +Monte Carlo simulation: 蒙特卡洛模拟 +Monte Carlo simulation (stream formulation): 蒙特卡洛模拟 (流形式) +Moon, David A.: Moon, David A. (人名) +Morris, J. H.: Morris, J. H. (人名) +Morse code: 摩尔斯电码 +Mouse, Minnie and Mickey: 米妮和米奇老鼠 +mul (generic): mul (通用乘法) +mul (generic, used for polynomial coefficients): mul (通用乘法, 用于多项式系数) +mul_complex: mul_complex (复数乘法函数) +mul_interval: mul_interval (区间乘法函数) +mul_interval (more efficient version): mul_interval (更高效版本) +mul_poly: mul_poly (多项式乘法函数) +mul_rat: mul_rat (有理数乘法函数) +mul_series: mul_series (幂级数乘法) +mul_streams: mul_streams (流乘法函数) +mul_terms: mul_terms (项乘法函数) +Multics time-sharing system: Multics 分时系统 +multiplicand: multiplicand (被乘数选择器) +multiplication by Russian peasant method: 俄罗斯农民乘法 +multiplier: multiplier (乘数选择器 / 乘法器约束) +multiplier (primitive constraint): multiplier (乘法器原语约束) +multiplier (selector): multiplier (乘数选择器) +Munro, Ian: Munro, Ian (人名) +mutable data objects: 可变数据对象 +mutable data objects (functional representation of): 可变数据对象 (函数表示) +mutable data objects (implemented with assignment): 可变数据对象 (用赋值实现) +mutable data objects (list structure): 可变数据对象 (列表结构) +mutable data objects (pairs): 可变数据对象 (序对) +mutable data objects (shared data): 可变数据对象 (共享数据) +mutator: 修改器 / 突变器 +mutex: 互斥锁 / 互斥量 +mutual exclusion: 互斥 +mutual recursion: 相互递归 +mystery: mystery (神秘函数 - 列表操作) + +N + +name: 名称 / 名字 / 标识符 +name (bound): 名称 (绑定) +name (encapsulated): 名称 (封装) +name (free): 名称 (自由) +name (of a function): 名称 (函数的) +name (of a parameter): 名称 (参数的) +name (parsing of): 名称 (解析) +name (scope of): 名称 (作用域) +name (unbound): 名称 (未绑定) +name (value of): 名称 (值) +naming: 命名 +naming (of computational objects): 命名 (计算对象) +naming (of functions): 命名 (函数) +naming conventions: 命名约定 +naming conventions ($ for pattern variables): 命名约定 ($ 用于模式变量) +naming conventions (is_ for predicates): 命名约定 (is_ 用于谓词) +naming conventions (snake case): 命名约定 (蛇形命名法) +NaN: NaN (非数值) +native language of machine: 机器的本地语言 +natural language parsing: 自然语言解析 +needed registers: 需要的寄存器 +needs_register: needs_register (检查是否需要寄存器) +negate: negate (否定函数 - 查询) +negated_query: negated_query (否定查询选择器) +negation: 否定 / 取反 +negation (logical (!)): 否定 (逻辑 !) +negation (numeric (-)): 否定 (数值 -) +negation as failure: 失败即否定 (逻辑编程) +nested declaration(s): 嵌套声明 +nested mapping(s): 嵌套映射 +nested operator combinations: 嵌套运算符组合 +Netscape Communications Corporation: Netscape 通信公司 +Netscape Navigator: Netscape Navigator (浏览器) +new register: new 寄存器 (垃圾回收) +new_heads register: new_heads 寄存器 (垃圾回收) +new_tails register: new_tails 寄存器 (垃圾回收) +Newton's method: 牛顿法 +Newton's method (for cube roots): 牛顿法 (用于立方根) +Newton's method (for differentiable functions): 牛顿法 (用于可微函数) +Newton's method (half-interval method vs.): 牛顿法 (与半区间法比较) +Newton's method (for square roots): 牛顿法 (用于平方根) +newtons_method: newtons_method (牛顿法函数) +newton_transform: newton_transform (牛顿变换函数) +new_withdraw: new_withdraw (新取款函数) +next (linkage descriptor): next (链接描述符) +next_to_in (rules): next_to_in (规则: 相邻) +node of a tree: 树的节点 +noncomputable: 不可计算的 +nondeterminism, in behavior of concurrent programs: 非确定性 (并发程序行为) +nondeterministic choice point: 非确定性选择点 +nondeterministic computing: 非确定性计算 +nondeterministic evaluator: 非确定性求值器 +nondeterministic evaluator (order of argument evaluation): 非确定性求值器 (参数求值顺序) +nondeterministic programming vs. JavaScript programming: 非确定性编程 vs. JavaScript 编程 +nondeterministic programs: 非确定性程序 +nondeterministic programs (logic puzzles): 非确定性程序 (逻辑谜题) +nondeterministic programs (pairs with prime sums): 非确定性程序 (素数和配对) +nondeterministic programs (parsing natural language): 非确定性程序 (解析自然语言) +nondeterministic programs (Pythagorean triples): 非确定性程序 (勾股数) +non-strict: 非严格求值 +normal-order evaluation: 正则序求值 +normal-order evaluation (applicative order vs.): 正则序求值 (与应用序比较) +normal-order evaluation (of conditional expressions): 正则序求值 (条件表达式) +normal-order evaluation (delayed evaluation and): 正则序求值 (与延迟求值) +normal-order evaluation (in explicit-control evaluator): 正则序求值 (在显式控制求值器中) +normal-order evaluator: 正则序求值器 +not (query language): not (查询语言中的非) +not (query language, evaluation of): not (查询语言中非的求值) +notation in this book: 本书中的表示法 +notation in this book (box notation for data): 本书中的表示法 (数据的方框表示) +notation in this book (italic symbols in expression syntax): 本书中的表示法 (表达式语法中的斜体符号) +notation in this book (list notation for data): 本书中的表示法 (数据的列表表示) +notation in this book (slanted characters for interpreter response): 本书中的表示法 (解释器响应的斜体字符) +nouns: nouns (名词列表) +nth root, as fixed point: n 次方根 (作为不动点) +null (keyword): null (关键字/值) +null (keyword, as empty list): null (作为空列表) +null (keyword, as end-of-list marker): null (作为列表结束标记) +null (keyword, recognizing with is_null): null (用 is_null 识别) +number(s): 数 / 数字 / 数值 +number(s) (bignum): 数 (大数) +number(s) (comparison of): 数 (比较) +number(s) (equality of): 数 (相等性) +number(s) (in generic arithmetic system): 数 (在通用算术系统中) +number(s) (integer vs. real number): 数 (整数 vs. 实数) +number(s) (in JavaScript): 数 (在 JavaScript 中) +number_equal: number_equal (数值相等性检查函数) +number theory: 数论 +numer: numer (分子选择器) +numer (axiom for): numer (公理) +numer (reducing to lowest terms): numer (化简到最简形式) +numerical analysis: 数值分析 +numerical analyst: 数值分析家 +numerical data: 数值数据 + +O + +object(s): 对象 +object(s) (benefits of modeling with): 对象 (用对象建模的好处) +object(s) (with time-varying state): 对象 (带时变状态) +object-oriented programming languages: 面向对象编程语言 +object program: 目标程序 +Ocaml: Ocaml (编程语言名) +office_move: office_move (办公室搬迁谜题函数) +old register: old 寄存器 (垃圾回收) +oldht register: oldht 寄存器 (垃圾回收) +ones (infinite stream): ones (全 1 无限流) +ones (infinite stream, lazy-list version): ones (全 1 无限流, 惰性列表版本) +op (in register machine): op (寄存器机中的操作符) +op (in register machine, simulating): op (模拟操作符) +open coding of primitives: 原语的开放编码 +operands of a combination: 组合式的操作数 +operation: 操作 / 运算 +operation (cross-type): 操作 (跨类型) +operation (generic): 操作 (通用) +operation (in register machine): 操作 (在寄存器机中) +operation-and-type table: 操作与类型表 +operation-and-type table (assignment needed for): 操作与类型表 (需要赋值) +operation-and-type table (implementing): 操作与类型表 (实现) +operation_exp_op: operation_exp_op (操作表达式的操作符选择器) +operation_exp_operands: operation_exp_operands (操作表达式的操作数选择器) +operator combination: 运算符组合 / 组合式 +operator combination (as function application): 运算符组合 (作为函数应用) +operator combination (as derived component): 运算符组合 (作为派生组件) +operator combination (evaluation of): 运算符组合 (求值) +operator combination (parsing of): 运算符组合 (解析) +operator combination (as a tree): 运算符组合 (作为树) +operator_combination_to_application: operator_combination_to_application (运算符组合转应用函数) +operator of a combination: 组合式的运算符 +operator precedence: 运算符优先级 +operators: 运算符 +operators (+ (for numeric addition)): 运算符 (+ 数值加法) +operators (+ (for string concatenation)): 运算符 (+ 字符串连接) +operators (- (numeric negation operator)): 运算符 (- 数值取反) +operators (- (numeric subtraction operator)): 运算符 (- 数值减法) +operators (* (multiplication)): 运算符 (* 乘法) +operators (/ (division)): 运算符 (/ 除法) +operators (% (remainder)): 运算符 (% 求余) +operators (! (logical negation)): 运算符 (! 逻辑非) +operators (!== (for numeric comparison)): 运算符 (!== 数值比较) +operators (!== (for string comparison)): 运算符 (!== 字符串比较) +operators (=== (for nonprimitive values)): 运算符 (=== 非原语值) +operators (=== (for numeric comparison)): 运算符 (=== 数值比较) +operators (=== (for string comparison)): 运算符 (=== 字符串比较) +operators (< (numeric comparison)): 运算符 (< 数值比较) +operators (<= (numeric comparison)): 运算符 (<= 数值比较) +operators (> (numeric comparison)): 运算符 (> 数值比较) +operators (>= (numeric comparison)): 运算符 (>= 数值比较) +optimality: 最优性 +optimality (of Horner's rule): 最优性 (霍纳规则) +optimality (of Huffman code): 最优性 (霍夫曼编码) +or (query language): or (查询语言中的或) +or (query language, evaluation of): or (查询语言中或的求值) +Oracle Corporation: 甲骨文公司 +order: order (阶选择器 - 多项式) +ordered-list representation of sets: 集合的有序列表表示 +order notation: 阶记号 (大 O, Theta 等) +order of evaluation: 求值顺序 +order of evaluation (assignment and): 求值顺序 (与赋值) +order of evaluation (in compiler): 求值顺序 (在编译器中) +order of evaluation (in explicit-control evaluator): 求值顺序 (在显式控制求值器中) +order of evaluation (in metacircular evaluator): 求值顺序 (在元循环求值器中) +order of evaluation (in JavaScript): 求值顺序 (在 JavaScript 中) +order of evaluation (in metacircular evaluator, other ref): 求值顺序 (在元循环求值器中, 另一处) +order of events: 事件顺序 +order of events (decoupling apparent from actual): 事件顺序 (解耦表观与实际) +order of events (indeterminacy in concurrent systems): 事件顺序 (并发系统中的不确定性) +order of growth: 增长阶 +order of growth (linear iterative process): 增长阶 (线性迭代过程) +order of growth (linear recursive process): 增长阶 (线性递归过程) +order of growth (logarithmic): 增长阶 (对数) +order of growth (tree-recursive process): 增长阶 (树形递归过程) +order of subexpression evaluation: 子表达式求值顺序 +ordinary numbers (in generic arithmetic system): 普通数 (在通用算术系统中) +or-gate: 或门 +or_gate: or_gate (或门函数) +origin_frame: origin_frame (原点框架) +Ostrowski, A. M.: Ostrowski, A. M. (人名) +outranked_by (rule): outranked_by (规则: 级别低于) +overloaded operator +: 重载运算符 + + +P + +P operation on semaphore: P 操作 (信号量) +package: 包 / 软件包 +package (complex-number): 包 (复数) +package (JavaScript-number): 包 (JavaScript 数字) +package (polar representation): 包 (极坐标表示) +package (polynomial): 包 (多项式) +package (rational-number): 包 (有理数) +package (rectangular representation): 包 (直角坐标表示) +painter(s): 画家 (图片语言) +painter(s) (higher-order operations): 画家 (高阶操作) +painter(s) (operations): 画家 (操作) +painter(s) (represented as functions): 画家 (表示为函数) +painter(s) (transforming and combining): 画家 (变换与组合) +pair (primitive function): pair (序对构造原语函数) +pair (primitive function, axiom for): pair (公理) +pair (primitive function, closure property of): pair (闭合性质) +pair (primitive function, functional implementation of): pair (函数式实现) +pair (primitive function, implemented with mutators): pair (用修改器实现) +pair (primitive function, implemented with vectors): pair (用向量实现) +pair (primitive function, as list operation): pair (作为列表操作) +pair(s): 序对 +pair(s) (axiomatic definition of): 序对 (公理化定义) +pair(s) (box-and-pointer notation for): 序对 (方框与指针表示法) +pair(s) (box notation for): 序对 (方框表示法) +pair(s) (functional representation of): 序对 (函数表示) +pair(s) (infinite stream of): 序对 (无限流) +pair(s) (lazy): 序对 (惰性) +pair(s) (mutable): 序对 (可变) +pair(s) (represented using vectors): 序对 (用向量表示) +pair(s) (used to represent sequence): 序对 (用于表示序列) +pair(s) (used to represent tree): 序对 (用于表示树) +pairs: pairs (序对流生成函数) +Pan, V. Y.: Pan, V. Y. (人名) +parallel_instruction_sequences: parallel_instruction_sequences (并行指令序列组合函数) +parameter passing: 参数传递 +parameters: 参数 +parameters (distinct from local names): 参数 (与局部名称区分) +parameters (duplicate): 参数 (重复) +parameters (names of): 参数 (名称) +parameters (scope of): 参数 (作用域) +parameters (as variables): 参数 (作为变量) +parentheses: 圆括号 / 括号 +parentheses (in function declaration): 圆括号 (在函数声明中) +parentheses (to group operator combinations): 圆括号 (用于组合运算符) +parentheses (around lambda expression): 圆括号 (包围 lambda 表达式) +parentheses (around parameters of lambda expression): 圆括号 (包围 lambda 参数) +parentheses (around predicate of conditional statement): 圆括号 (包围条件语句谓词) +parse: parse (解析函数) +parse (in query interpreter): parse (在查询解释器中) +parse_...: parse_... (系列解析函数 - 自然语言) +parsing JavaScript: 解析 JavaScript +parsing JavaScript (&& (logical conjunction)): 解析 JavaScript (&& 逻辑与) +parsing JavaScript (|| (logical disjunction)): 解析 JavaScript (|| 逻辑或) +parsing JavaScript (assignment): 解析 JavaScript (赋值) +parsing JavaScript (block): 解析 JavaScript (块) +parsing JavaScript (conditional expression): 解析 JavaScript (条件表达式) +parsing JavaScript (conditional statement): 解析 JavaScript (条件语句) +parsing JavaScript (constant declaration): 解析 JavaScript (常量声明) +parsing JavaScript (expression statement): 解析 JavaScript (表达式语句) +parsing JavaScript (function application): 解析 JavaScript (函数应用) +parsing JavaScript (function declaration): 解析 JavaScript (函数声明) +parsing JavaScript (lambda expression): 解析 JavaScript (lambda 表达式) +parsing JavaScript (literal expression): 解析 JavaScript (字面量表达式) +parsing JavaScript (name): 解析 JavaScript (名称) +parsing JavaScript (operator combination): 解析 JavaScript (运算符组合) +parsing JavaScript (return statement): 解析 JavaScript (返回语句) +parsing JavaScript (sequence of statements): 解析 JavaScript (语句序列) +parsing JavaScript (variable declaration): 解析 JavaScript (变量声明) +parsing natural language: 解析自然语言 +parsing natural language (real language understanding vs. toy parser): 解析自然语言 (真实语言理解 vs. 玩具解析器) +partial_sums: partial_sums (部分和流函数) +Pascal, Blaise: Pascal, Blaise (人名) +Pascal's triangle: 帕斯卡三角形 (杨辉三角) +Pascal: Pascal (编程语言名) +Pascal (lack of higher-order functions in): Pascal (缺少高阶函数) +password-protected bank account: 密码保护的银行账户 +pattern: 模式 +pattern_match: pattern_match (模式匹配函数) +pattern matching: 模式匹配 +pattern matching (implementation): 模式匹配 (实现) +pattern matching (unification vs.): 模式匹配 (与合一比较) +pattern variable: 模式变量 +pattern variable (representation of): 模式变量 (表示) +pc register: pc 寄存器 (程序计数器) +perform (in register machine): perform (寄存器机中的 perform 指令) +perform (in register machine, instruction constructor): perform (perform 指令构造器) +perform (in register machine, simulating): perform (模拟 perform 指令) +perform_action: perform_action (执行动作选择器) +Perlis, Alan J.: Perlis, Alan J. (人名) +Perlis, Alan J. (quips by): Perlis, Alan J. (引言) +permutations of a set: 集合的排列 +permutations: permutations (排列函数) +Peter, Paul and Mary: Peter, Paul and Mary (歌曲组合名) +Phillips, Hubert: Phillips, Hubert (人名) +pi (pi): 圆周率 pi +pi (pi, approximation with half-interval method): pi (用半区间法近似) +pi (pi, approximation with Monte Carlo integration): pi (用蒙特卡洛积分近似) +pi (pi, Dirichlet estimate for): pi (狄利克雷估计) +pi (pi, Leibniz's series for): pi (莱布尼茨级数) +pi (pi, stream of approximations): pi (近似值流) +pi (pi, Wallis's formula for): pi (沃利斯公式) +picture language: 图片语言 +Pingala, Áchárya: Pingala, Áchárya (人名) +pipelining: 流水线 +pi_stream: pi_stream (pi 近似值流) +pi_sum: pi_sum (pi 级数求和函数) +pi_sum (with higher-order functions): pi_sum (带高阶函数版本) +pi_sum (with lambda expression): pi_sum (带 lambda 表达式版本) +Planner: Planner (编程语言名) +point, represented as a pair: 点 (表示为序对) +pointer: 指针 +pointer (in box-and-pointer notation): 指针 (在方框与指针表示法中) +pointer (typed): 指针 (带类型) +polar package: polar 包 (极坐标包) +poly: 多项式 (缩写/类型) +polymorphic types: 多态类型 +polynomial package: polynomial 包 (多项式包) +polynomial(s): 多项式 +polynomial(s) (canonical form): 多项式 (规范形式) +polynomial(s) (dense): 多项式 (稠密) +polynomial(s) (evaluating with Horner's rule): 多项式 (用霍纳规则求值) +polynomial(s) (hierarchy of types): 多项式 (类型层次) +polynomial(s) (indeterminate of): 多项式 (不定元) +polynomial(s) (sparse): 多项式 (稀疏) +polynomial(s) (univariate): 多项式 (单变量) +polynomial arithmetic: 多项式算术 +polynomial arithmetic (addition): 多项式算术 (加法) +polynomial arithmetic (division): 多项式算术 (除法) +polynomial arithmetic (Euclid's Algorithm): 多项式算术 (欧几里得算法) +polynomial arithmetic (greatest common divisor): 多项式算术 (最大公约数) +polynomial arithmetic (interfaced to generic arithmetic system): 多项式算术 (与通用算术系统接口) +polynomial arithmetic (multiplication): 多项式算术 (乘法) +polynomial arithmetic (probabilistic algorithm for GCD): 多项式算术 (GCD 的概率算法) +polynomial arithmetic (rational functions): 多项式算术 (有理函数) +polynomial arithmetic (subtraction): 多项式算术 (减法) +pop: pop (出栈操作) +porting a language: 移植语言 +PowerPC: PowerPC (处理器架构) +power series, as stream: 幂级数 (作为流) +power series, as stream (adding): 幂级数 (加法) +power series, as stream (dividing): 幂级数 (除法) +power series, as stream (integrating): 幂级数 (积分) +power series, as stream (multiplying): 幂级数 (乘法) +precedence: 优先级 +precedence (of conditional expression): 优先级 (条件表达式的) +precedence (of lambda expression): 优先级 (lambda 表达式的) +precedence (of operators): 优先级 (运算符的) +precedence (of unary operators): 优先级 (一元运算符的) +predicate: 谓词 +predicate (of clause): 谓词 (子句的) +predicate (of conditional expression): 谓词 (条件表达式的) +predicate (of conditional statement): 谓词 (条件语句的) +predicate (naming convention for): 谓词 (命名约定) +prefix code: 前缀码 +prefix notation: 前缀表示法 +prefix notation (infix notation vs.): 前缀表示法 (与中缀表示法比较) +prefix operator: 前缀运算符 +prepositions: prepositions (介词列表) +preserving: preserving (保护寄存器的高阶函数) +pretty-printing: 漂亮打印 / 格式化输出 +prime number(s): 素数 / 质数 +prime number(s) (cryptography and): 素数 (与密码学) +prime number(s) (Eratosthenes's sieve for): 素数 (埃拉托斯特尼筛法) +prime number(s) (Fermat test for): 素数 (费马测试) +prime number(s) (infinite stream of): 素数 (无限流) +prime number(s) (Miller–Rabin test for): 素数 (Miller-Rabin 测试) +prime number(s) (testing for): 素数 (测试) +primes (infinite stream): primes (素数无限流) +primes (infinite stream, implicit definition): primes (素数无限流, 隐式定义) +prime_sum_pair: prime_sum_pair (素数和配对检查函数) +prime_sum_pairs: prime_sum_pairs (素数和配对列表函数) +prime_sum_pairs (infinite stream): prime_sum_pairs (无限流版本) +primitive_apply: primitive_apply (应用原语函数 - 显式控制) +primitive constraints: 原语约束 +primitive expression: 原语表达式 +primitive expression (evaluation of): 原语表达式 (求值) +primitive expression (name of constant): 原语表达式 (常量名称) +primitive expression (number): 原语表达式 (数字) +primitive function: 原语函数 +primitive_function_objects: primitive_function_objects (原语函数对象列表) +primitive functions: 原语函数 (列表) +primitive functions (apply): 原语函数 (apply) +primitive functions (display): 原语函数 (display) +primitive functions (error): 原语函数 (error) +primitive functions (eval): 原语函数 (eval) +primitive functions (get_time): 原语函数 (get_time) +primitive functions (head): 原语函数 (head) +primitive functions (is_null): 原语函数 (is_null) +primitive functions (is_number): 原语函数 (is_number) +primitive functions (is_pair): 原语函数 (is_pair) +primitive functions (is_string): 原语函数 (is_string) +primitive functions (is_undefined): 原语函数 (is_undefined) +primitive functions (list): 原语函数 (list) +primitive functions (math_atan2): 原语函数 (math_atan2) +primitive functions (math_cos): 原语函数 (math_cos) +primitive functions (math_floor): 原语函数 (math_floor) +primitive functions (math_log): 原语函数 (math_log) +primitive functions (math_max): 原语函数 (math_max) +primitive functions (math_min): 原语函数 (math_min) +primitive functions (math_random): 原语函数 (math_random) +primitive functions (math_round): 原语函数 (math_round) +primitive functions (math_sin): 原语函数 (math_sin) +primitive functions (math_trunc): 原语函数 (math_trunc) +primitive functions (pair): 原语函数 (pair) +primitive functions (prompt): 原语函数 (prompt) +primitive functions (set_head): 原语函数 (set_head) +primitive functions (set_tail): 原语函数 (set_tail) +primitive functions (stringify): 原语函数 (stringify) +primitive functions (tail): 原语函数 (tail) +primitive functions (vector_ref): 原语函数 (vector_ref) +primitive functions (vector_set): 原语函数 (vector_set) +primitive_function_symbols: primitive_function_symbols (原语函数符号列表) +primitive_implementation: primitive_implementation (原语实现选择器) +primitive query: 原语查询 / 简单查询 +principle of least commitment: 最少承诺原则 +print_point: print_point (打印点函数) +print_queue: print_queue (打印队列函数) +print_rat: print_rat (打印有理数函数) +print_result: print_result (打印结果函数) +print_result (monitored-stack version): print_result (带监控栈版本) +print_stack_statistics operation in register machine: print_stack_statistics 操作 (寄存器机中) +probabilistic algorithm: 概率算法 +probe: probe (探针函数 - 约束/电路) +probe (in constraint system): probe (在约束系统中) +probe (in digital-circuit simulator): probe (在数字电路模拟器中) +process: 过程 +process (iterative): 过程 (迭代) +process (linear iterative): 过程 (线性迭代) +process (linear recursive): 过程 (线性递归) +process (local evolution of): 过程 (局部演化) +process (order of growth of): 过程 (增长阶) +process (recursive): 过程 (递归) +process (resources required by): 过程 (所需资源) +process (shape of): 过程 (形态) +process (tree-recursive): 过程 (树形递归) +product: product (乘积函数) +product (as accumulation): product (作为累积) +program: 程序 +program (as abstract machine): 程序 (作为抽象机) +program (comments in): 程序 (注释) +program (as data): 程序 (作为数据) +program (incremental development of): 程序 (增量开发) +program (structured with subroutines): 程序 (用子例程构建) +program (structure of): 程序 (结构) +program (value of): 程序 (值) +program counter: 程序计数器 +program environment: 程序环境 +programming: 编程 +programming (data-directed): 编程 (数据导向) +programming (demand-driven): 编程 (需求驱动) +programming (elements of): 编程 (要素) +programming (functional): 编程 (函数式) +programming (imperative): 编程 (命令式) +programming (odious style): 编程 (糟糕风格) +programming language: 编程语言 +programming language (design of): 编程语言 (设计) +programming language (functional): 编程语言 (函数式) +programming language (logic): 编程语言 (逻辑) +programming language (object-oriented): 编程语言 (面向对象) +programming language (statically typed): 编程语言 (静态类型) +programming language (very high-level): 编程语言 (超高级) +Prolog: Prolog (编程语言名) +promise to evaluate: 求值承诺 (延迟求值) +prompt (primitive function): prompt (提示原语函数) +prompt operation in register machine: prompt 操作 (寄存器机中) +prompts: 提示符 +prompts (explicit-control evaluator): 提示符 (显式控制求值器) +prompts (lazy evaluator): 提示符 (惰性求值器) +prompts (metacircular evaluator): 提示符 (元循环求值器) +prompts (nondeterministic evaluator): 提示符 (非确定性求值器) +prompts (query interpreter): 提示符 (查询解释器) +propagate: propagate (传播函数 - 模拟) +propagation of constraints: 约束传播 +proving programs correct: 程序正确性证明 +pseudodivision of polynomials: 多项式伪除法 +pseudo-random sequence: 伪随机序列 +pseudoremainder of polynomials: 多项式伪余数 +push: push (入栈操作) +push_marker_to_stack (in register machine): push_marker_to_stack (标记入栈 - 寄存器机) +put: put (存放函数 - 表操作) +puzzles: 谜题 +puzzles (eight-queens puzzle): 谜题 (八皇后) +puzzles (logic puzzles): 谜题 (逻辑) +Pythagorean triples: 勾股数 / 毕达哥拉斯三元组 +Pythagorean triples (with nondeterministic programs): 勾股数 (用非确定性程序) +Pythagorean triples (with streams): 勾股数 (用流) +Python: Python (编程语言名) +Python (recursive functions in): Python (递归函数) + +Q + +quantum mechanics: 量子力学 +queens: queens (八皇后问题求解函数) +query: 查询 +query (compound): 查询 (复合) +query (simple): 查询 (简单) +query_driver_loop: query_driver_loop (查询驱动循环) +query interpreter: 查询解释器 +query interpreter (adding rule or assertion): 查询解释器 (添加规则或断言) +query interpreter (compound query): 查询解释器 (复合查询) +query interpreter (data base): 查询解释器 (数据库) +query interpreter (driver loop): 查询解释器 (驱动循环) +query interpreter (environment structure in): 查询解释器 (环境结构) +query interpreter (frame): 查询解释器 (帧) +query interpreter (improvements to): 查询解释器 (改进) +query interpreter (infinite loops): 查询解释器 (无限循环) +query interpreter (instantiation): 查询解释器 (实例化) +query interpreter (JavaScript interpreter vs.): 查询解释器 (与 JavaScript 解释器比较) +query interpreter (as nondeterministic program): 查询解释器 (作为非确定性程序) +query interpreter (overview): 查询解释器 (概述) +query interpreter (pattern matching): 查询解释器 (模式匹配) +query interpreter (pattern-variable representation): 查询解释器 (模式变量表示) +query interpreter (problems with not and javascript_predicate): 查询解释器 (not 和 javascript_predicate 的问题) +query interpreter (query evaluator): 查询解释器 (查询求值器) +query interpreter (rule): 查询解释器 (规则) +query interpreter (simple query): 查询解释器 (简单查询) +query interpreter (stream operations): 查询解释器 (流操作) +query interpreter (streams of frames): 查询解释器 (帧流) +query interpreter (syntax of query language): 查询解释器 (查询语言语法) +query interpreter (unification): 查询解释器 (合一) +query language: 查询语言 +query language (abstraction in): 查询语言 (抽象) +query language (compound query): 查询语言 (复合查询) +query language (data base): 查询语言 (数据库) +query language (equality testing in): 查询语言 (相等性测试) +query language (extensions to): 查询语言 (扩展) +query language (logical deductions): 查询语言 (逻辑推导) +query language (mathematical logic vs.): 查询语言 (与数理逻辑比较) +query language (rule): 查询语言 (规则) +query language (simple query): 查询语言 (简单查询) +query-language-specific representation: 查询语言特定表示 +query-language-specific representation (transforming JavaScript syntax into): 查询语言特定表示 (转换 JavaScript 语法到) +queue: 队列 +queue (double-ended): 队列 (双端) +queue (front of): 队列 (队头) +queue (functional implementation of): 队列 (函数式实现) +queue (operations on): 队列 (操作) +queue (rear of): 队列 (队尾) +queue (in simulation agenda): 队列 (在模拟议程中) +quotation marks: 引号 +quotation marks (back quotes): 引号 (反引号) +quotation marks (double): 引号 (双引号) +quotation marks (single): 引号 (单引号) + +R + +Rabin, Michael O.: Rabin, Michael O. (人名) +radicand: 被开方数 +Ramanujan, Srinivasa: Ramanujan, Srinivasa (人名) +Ramanujan numbers: 拉马努金数 (出租车数) +rand: rand (随机数生成器) +rand (with reset): rand (带重置) +random_in_range: random_in_range (范围内随机数函数) +random-number generator: 随机数生成器 +random-number generator (in Monte Carlo simulation): 随机数生成器 (在蒙特卡洛模拟中) +random-number generator (in primality testing): 随机数生成器 (在素性测试中) +random-number generator (with reset): 随机数生成器 (带重置) +random-number generator (with reset, stream version): 随机数生成器 (带重置, 流版本) +random_numbers (infinite stream): random_numbers (随机数无限流) +Raphael, Bertram: Raphael, Bertram (人名) +rational package: rational 包 (有理数包) +rational function: 有理函数 +rational function (reducing to lowest terms): 有理函数 (化简到最简形式) +rational number(s): 有理数 +rational number(s) (arithmetic operations on): 有理数 (算术操作) +rational number(s) (printing): 有理数 (打印) +rational number(s) (reducing to lowest terms): 有理数 (化简到最简形式) +rational number(s) (represented as pairs): 有理数 (表示为序对) +rational-number arithmetic: 有理数算术 +rational-number arithmetic (interfaced to generic arithmetic system): 有理数算术 (与通用算术系统接口) +rational-number arithmetic (need for compound data): 有理数算术 (复合数据需求) +rational tree: 有理树 (无限树) +Raymond, Eric: Raymond, Eric (人名) +RC circuit: RC 电路 +read_evaluate_print_loop: read_evaluate_print_loop (读取-求值-打印循环函数) +read-evaluate-print loop: 读取-求值-打印循环 (REPL) +real number: 实数 +real_part: real_part (实部选择器) +real_part (data-directed): real_part (数据导向版本) +real_part (polar representation): real_part (极坐标表示) +real_part (rectangular representation): real_part (直角坐标表示) +real_part (with tagged data): real_part (带标签数据版本) +real_part_polar: real_part_polar (极坐标实部函数) +real_part_rectangular: real_part_rectangular (直角坐标实部函数) +rear_ptr: rear_ptr (队尾指针) +receive function: receive 函数 (多值返回) +record, in a data base: 记录 (在数据库中) +rectangle, representing: 矩形 (表示) +rectangular package: rectangular 包 (直角坐标包) +recursion: 递归 +recursion (data-directed): 递归 (数据导向) +recursion (expressing complicated process): 递归 (表达复杂过程) +recursion (mutual): 递归 (相互) +recursion (in rules): 递归 (在规则中) +recursion (in working with trees): 递归 (在处理树时) +recursion theory: 递归论 +recursive function: 递归函数 +recursive function (recursive function declaration): 递归函数 (递归函数声明) +recursive function (recursive process vs.): 递归函数 (与递归过程比较) +recursive function (specifying without declaration): 递归函数 (无声明指定) +recursive process: 递归过程 +recursive process (iterative process vs.): 递归过程 (与迭代过程比较) +recursive process (linear): 递归过程 (线性) +recursive process (recursive function vs.): 递归过程 (与递归函数比较) +recursive process (register machine for): 递归过程 (寄存器机) +recursive process (tree): 递归过程 (树形) +red-black tree: 红黑树 +reducing to lowest terms: 化简到最简形式 +Rees, Jonathan A.: Rees, Jonathan A. (人名) +referential transparency: 引用透明性 +reg (in register machine): reg (寄存器机中的寄存器操作数) +reg (in register machine, simulating): reg (模拟寄存器操作数) +register(s): 寄存器 +register(s) (representing): 寄存器 (表示) +register(s) (tracing): 寄存器 (跟踪) +register_exp_reg: register_exp_reg (寄存器表达式的寄存器选择器) +register machine: 寄存器机 +register machine (actions): 寄存器机 (动作) +register machine (controller): 寄存器机 (控制器) +register machine (controller diagram): 寄存器机 (控制器图) +register machine (data-path diagram): 寄存器机 (数据通路图) +register machine (data paths): 寄存器机 (数据通路) +register machine (design of): 寄存器机 (设计) +register machine (language for describing): 寄存器机 (描述语言) +register machine (monitoring performance): 寄存器机 (监控性能) +register machine (simulator): 寄存器机 (模拟器) +register machine (stack): 寄存器机 (栈) +register machine (subroutine): 寄存器机 (子例程) +register machine (test operation): 寄存器机 (测试操作) +register-machine language: 寄存器机语言 +register-machine language (assign): 寄存器机语言 (assign) +register-machine language (branch): 寄存器机语言 (branch) +register-machine language (constant): 寄存器机语言 (constant) +register-machine language (entry point): 寄存器机语言 (入口点) +register-machine language (go_to): 寄存器机语言 (go_to) +register-machine language (instructions): 寄存器机语言 (指令) +register-machine language (label): 寄存器机语言 (label) +register-machine language (label, name): 寄存器机语言 (标号名称) +register-machine language (op): 寄存器机语言 (op) +register-machine language (perform): 寄存器机语言 (perform) +register-machine language (push_marker_to_stack): 寄存器机语言 (push_marker_to_stack) +register-machine language (reg): 寄存器机语言 (reg) +register-machine language (restore): 寄存器机语言 (restore) +register-machine language (revert_stack_to_marker): 寄存器机语言 (revert_stack_to_marker) +register-machine language (save): 寄存器机语言 (save) +register-machine language (test): 寄存器机语言 (test) +register-machine simulator: 寄存器机模拟器 +registers_modified: registers_modified (被修改寄存器列表选择器) +registers_needed: registers_needed (所需寄存器列表选择器) +register table, in simulator: 寄存器表 (在模拟器中) +relations, computing in terms of: 关系 (基于关系计算) +relatively prime: 互质 / 互素 +relativity, theory of: 相对论 +release a mutex: 释放互斥锁 +remainder: 余数 / 余项 +remainder (after integer division): 余数 (整数除法后) +remainder (modulo n): 余数 (模 n) +remainder_terms: remainder_terms (多项式除法的余项) +remove: remove (移除函数) +remove_first_agenda_item: remove_first_agenda_item (移除首个议程项函数) +rename_variables_in: rename_variables_in (重命名变量函数) +require: require (要求函数 - 非确定性) +require (as a syntactic form): require (作为语法形式) +resistance: 电阻 +resistance (formula for parallel resistors): 电阻 (并联电阻公式) +resistance (tolerance of resistors): 电阻 (电阻容差) +resolution, Horn-clause: 归结 (霍恩子句) +resolution principle: 归结原理 +restore (in register machine): restore (寄存器机中的 restore 指令) +restore (in register machine, implementing): restore (实现) +restore (in register machine, instruction constructor): restore (restore 指令构造器) +restore (in register machine, simulating): restore (模拟 restore 指令) +rest parameter and spread syntax: 剩余参数与展开语法 +rest_segments: rest_segments (剩余段选择器) +rest_statements: rest_statements (剩余语句选择器) +rest_terms: rest_terms (剩余项选择器) +retry: retry (重试函数 - 非确定性) +return (linkage descriptor): return (链接描述符) +return (keyword): return (关键字) +return_expression: return_expression (返回表达式选择器) +returning multiple values: 返回多个值 +return statement: 返回语句 +return statement (handling in compiler): 返回语句 (在编译器中处理) +return statement (handling in explicit-control evaluator): 返回语句 (在显式控制求值器中处理) +return statement (handling in metacircular evaluator): 返回语句 (在元循环求值器中处理) +return statement (parsing of): 返回语句 (解析) +return statement (tail recursion and): 返回语句 (与尾递归) +return_undefined: return_undefined (返回 undefined 函数) +return value: 返回值 +return value (representation in metacircular evaluator): 返回值 (在元循环求值器中表示) +return value (undefined as): 返回值 (undefined 作为) +return_value_content: return_value_content (返回值内容选择器) +Reuter, Andreas: Reuter, Andreas (人名) +reverse: reverse (反转列表函数) +reverse (as folding): reverse (作为折叠) +reverse (rules): reverse (规则版本) +revert_stack_to_marker (in register machine): revert_stack_to_marker (栈恢复到标记 - 寄存器机) +Rhind Papyrus: 莱茵德纸草书 +right-associative: 右结合 +right_branch: right_branch (右分支选择器) +right_split: right_split (右分裂函数 - 图片语言) +ripple-carry adder: 行波进位加法器 +Rivest, Ronald L.: Rivest, Ronald L. (人名) +RLC circuit: RLC 电路 +Robinson, J. A.: Robinson, J. A. (人名) +robustness: 鲁棒性 / 健壮性 +rock songs, 1950s: 摇滚歌曲 (1950年代) +Rogers, William Barton: Rogers, William Barton (人名) +root register: root 寄存器 (垃圾回收) +roots of equation: 方程根 +rotate90: rotate90 (旋转90度函数 - 图片语言) +roundoff error: 舍入误差 +Rozas, Guillermo Juan: Rozas, Guillermo Juan (人名) +RSA algorithm: RSA 算法 +rule (query language): 规则 (查询语言) +rule (query language, applying): 规则 (应用) +rule (query language, without body): 规则 (无体) +rule_body: rule_body (规则体选择器) +Runkle, John Daniel: Runkle, John Daniel (人名) +Russian peasant method of multiplication: 俄罗斯农民乘法 + +S + +same (rule): same (规则: 相同) +sameness and change: 同一性与变化 +sameness and change (meaning of): 同一性与变化 (含义) +sameness and change (shared data and): 同一性与变化 (与共享数据) +satisfy a compound query: 满足复合查询 +satisfy a pattern (simple query): 满足模式 (简单查询) +save (in register machine): save (寄存器机中的 save 指令) +save (in register machine, implementing): save (实现) +save (in register machine, instruction constructor): save (save 指令构造器) +save (in register machine, simulating): save (模拟 save 指令) +scale_list: scale_list (列表缩放函数) +scale_stream: scale_stream (流缩放函数) +scale_tree: scale_tree (树缩放函数) +scale_vect: scale_vect (向量缩放函数) +scan register: scan 寄存器 (垃圾回收) +scanning out declarations: 扫描出声明 +scanning out declarations (in compiler): 扫描出声明 (在编译器中) +scanning out declarations (in explicit-control evaluator): 扫描出声明 (在显式控制求值器中) +scanning out declarations (in metacircular evaluator): 扫描出声明 (在元循环求值器中) +scanning out declarations (sequential declaration processing vs.): 扫描出声明 (与顺序声明处理比较) +scan_out_declarations: scan_out_declarations (扫描出声明函数) +Scheme: Scheme (编程语言名) +Scheme (evaluators written in): Scheme (用 Scheme 编写的求值器) +Scheme (integrated-circuit implementation of): Scheme (集成电路实现) +Scheme (as JavaScript precursor): Scheme (作为 JavaScript 前身) +Scheme (let* in): Scheme (let*) +Scheme (nondeterministic extension of): Scheme (非确定性扩展) +Scheme (tail recursion in): Scheme (尾递归) +Scheme (use of "lambda" in): Scheme ("lambda" 的使用) +Scheme (Y operator written in): Scheme (用 Scheme 写的 Y 算子) +Scheme chip: Scheme 芯片 +Schmidt, Eric: Schmidt, Eric (人名) +scope of a name: 名称的作用域 +scope of a name (function's parameters): 名称的作用域 (函数参数) +scope of a name (internal declaration): 名称的作用域 (内部声明) +search: 搜索 +search (of binary tree): 搜索 (二叉树) +search (depth-first): 搜索 (深度优先) +search (systematic): 搜索 (系统性) +search: search (搜索函数 - 半区间法) +segment_queue: segment_queue (段队列选择器) +segments: segments (段列表选择器) +segments_to_painter: segments_to_painter (线段转画家函数) +segment_time: segment_time (段时间选择器) +selector: 选择器 / 选择函数 +selector (as abstraction barrier): 选择器 (作为抽象屏障) +selector (generic): 选择器 (通用) +Self: Self (编程语言名) +semaphore: 信号量 +semaphore (of size n): 信号量 (大小为 n) +semicolon (;): 分号 +semicolon (; cancer of): 分号 (分号癌) +semicolon (; ending statement): 分号 (结束语句) +separator code: 分隔符编码 +sequence(s): 序列 +sequence(s) (as conventional interface): 序列 (作为约定接口) +sequence(s) (as source of modularity): 序列 (作为模块性来源) +sequence(s) (operations on): 序列 (操作) +sequence(s) (represented by pairs): 序列 (用序对表示) +sequence accelerator: 序列加速器 +sequence of statements: 语句序列 +sequence of statements (in block): 语句序列 (在块中) +sequence of statements (in conditional statement): 语句序列 (在条件语句中) +sequence of statements (in function body): 语句序列 (在函数体中) +sequence of statements (as body of lambda expression): 语句序列 (作为 lambda 表达式体) +sequence of statements (parsing of): 语句序列 (解析) +sequential declaration processing vs. scanning out: 顺序声明处理 vs. 扫描出 +serialized_exchange: serialized_exchange (序列化交换函数) +serialized_exchange (with deadlock avoidance): serialized_exchange (带死锁避免) +serializer: 序列化器 +serializer (implementing): 序列化器 (实现) +serializer (with multiple shared resources): 序列化器 (带多个共享资源) +series, summation of: 级数求和 +series, summation of (accelerating sequence of approximations): 级数求和 (加速近似序列) +series, summation of (with streams): 级数求和 (用流) +set: 集合 +set (data base as): 集合 (数据库作为) +set (operations on): 集合 (操作) +set (permutations of): 集合 (排列) +set (represented as binary tree): 集合 (表示为二叉树) +set (represented as ordered list): 集合 (表示为有序列表) +set (represented as unordered list): 集合 (表示为无序列表) +set (subsets of): 集合 (子集) +set_contents: set_contents (设置内容函数 - 寄存器/内存) +set_current_environment: set_current_environment (设置当前环境函数) +set_current_time: set_current_time (设置当前时间函数) +set_front_ptr: set_front_ptr (设置队头指针函数) +set_head (primitive function): set_head (设置列表头元素原语函数) +set_head (primitive function, functional implementation of): set_head (函数式实现) +set_head (primitive function, implemented with vectors): set_head (用向量实现) +set_head (primitive function, value of): set_head (值) +set_inst_execution_fun: set_inst_execution_fun (设置指令执行函数) +set_rear_ptr: set_rear_ptr (设置队尾指针函数) +set_register_contents: set_register_contents (设置寄存器内容函数) +set_segments: set_segments (设置段列表函数) +set_signal: set_signal (设置信号值函数) +set_tail (primitive function): set_tail (设置列表尾元素原语函数) +set_tail (primitive function, functional implementation of): set_tail (函数式实现) +set_tail (primitive function, implemented with vectors): set_tail (用向量实现) +set_tail (primitive function, value of): set_tail (值) +setup_environment: setup_environment (设置环境函数) +set_value: set_value (设置值函数 - 约束系统) +shadow a binding: 遮蔽绑定 +Shamir, Adi: Shamir, Adi (人名) +shape of a process: 过程形态 +shared data: 共享数据 +shared resources: 共享资源 +shared state: 共享状态 +shrink_to_upper_right: shrink_to_upper_right (缩向右上角函数 - 图片语言) +Shrobe, Howard E.: Shrobe, Howard E. (人名) +SICP: SICP (书名缩写:《计算机程序的构造和解释》) +sicp JavaScript package: sicp JavaScript 包 +SICP JS: SICP JS (本书版本名称) +side-effect bug: 副作用错误 +sieve of Eratosthenes: 埃拉托斯特尼筛法 +sieve: sieve (筛法函数) +Sigma (sigma) notation: Sigma (求和) 记号 +signal, digital: 信号 (数字) +signal_error: signal_error (发信号错误函数) +signal-flow diagram: 信号流图 +signal processing: 信号处理 +signal processing (smoothing a function): 信号处理 (平滑函数) +signal processing (smoothing a signal): 信号处理 (平滑信号) +signal processing (stream model of): 信号处理 (流模型) +signal processing (zero crossings of a signal): 信号处理 (信号过零点) +signal-processing view of computation: 计算的信号处理观点 +simple_query: simple_query (简单查询处理函数) +simple_query (without delayed expression): simple_query (无延迟表达式版本) +simple query: 简单查询 +simple query (processing): 简单查询 (处理) +simplification of algebraic expressions: 代数表达式化简 +Simpson's Rule for numerical integration: 辛普森积分法则 +simulation: 模拟 +simulation (of digital circuit): 模拟 (数字电路) +simulation (event-driven): 模拟 (事件驱动) +simulation (as machine-design tool): 模拟 (作为机器设计工具) +simulation (for monitoring performance of register machine): 模拟 (用于监控寄存器机性能) +simulation (Monte Carlo): 模拟 (蒙特卡洛) +simulation (of register machine): 模拟 (寄存器机) +sine: 正弦 +sine (approximation for small angle): 正弦 (小角度近似) +sine (power series for): 正弦 (幂级数) +singleton_stream: singleton_stream (单元素流函数) +SKETCHPAD: SKETCHPAD (早期图形系统) +slash (double slash // for comments in programs): 斜杠 (双斜杠 // 用于程序注释) +smallest_divisor: smallest_divisor (最小因子函数) +smallest_divisor (more efficient version): smallest_divisor (更高效版本) +Smalltalk: Smalltalk (编程语言名) +smoothing a function: 平滑函数 +smoothing a signal: 平滑信号 +snake case: 蛇形命名法 +snarf: snarf (俚语: 快速获取/复制) +Solomonoff, Ray: Solomonoff, Ray (人名) +solve differential equation: solve (解微分方程函数) +solve differential equation (lazy-list version): solve (惰性列表版本) +solving equation: 方程求解 +source language: 源语言 +source program: 源程序 +Spafford, Eugene H.: Spafford, Eugene H. (人名) +sparse polynomial: 稀疏多项式 +split: split (分裂函数 - 图片语言) +spread and rest parameter syntax: 展开与剩余参数语法 +sqrt: sqrt (平方根函数) +sqrt (block structured): sqrt (块结构版本) +sqrt (in environment model): sqrt (在环境模型中) +sqrt (as fixed point): sqrt (作为不动点) +sqrt (as iterative improvement): sqrt (作为迭代改进) +sqrt (with Newton's method): sqrt (用牛顿法) +sqrt (register machine for): sqrt (寄存器机) +sqrt (as stream limit): sqrt (作为流极限) +sqrt_stream: sqrt_stream (平方根近似值流) +square: square (平方函数) +square (in environment model): square (在环境模型中) +square_limit: square_limit (方块极限函数 - 图片语言) +square_of_four: square_of_four (四方块函数 - 图片语言) +squarer (constraint): squarer (平方器约束) +square root: 平方根 +square root (stream of approximations): 平方根 (近似值流) +squash_inwards: squash_inwards (向内挤压函数 - 图片语言) +stack: 栈 +stack (framed): 栈 (带帧) +stack (for recursion in register machine): 栈 (用于寄存器机递归) +stack (representing): 栈 (表示) +stack allocation and tail recursion: 栈分配与尾递归 +stack_inst_reg_name: stack_inst_reg_name (栈指令寄存器名选择器) +Stallman, Richard M.: Stallman, Richard M. (人名) +start register machine: start (启动寄存器机函数) +start_eceval: start_eceval (启动显式控制求值器函数) +start_segment: start_segment (线段起点选择器) +state: 状态 +state (local): 状态 (局部) +state (shared): 状态 (共享) +state (vanishes in stream formulation): 状态 (在流形式中消失) +statement: 语句 +statement (value-producing and non-value-producing): 语句 (产生值和不产生值) +statement sequence: 语句序列 +state variable: 状态变量 +state variable (local): 状态变量 (局部) +statically typed language: 静态类型语言 +Steele, Guy Lewis Jr.: Steele, Guy Lewis Jr. (人名) +Stein, Clifford: Stein, Clifford (人名) +stop-and-copy garbage collector: 停止-复制垃圾回收器 +Stoy, Joseph E.: Stoy, Joseph E. (人名) +Strachey, Christopher: Strachey, Christopher (人名) +stratified design: 分层设计 +stream(s): 流 +stream(s) (delayed evaluation and): 流 (与延迟求值) +stream(s) (empty): 流 (空) +stream(s) (implemented as delayed lists): 流 (实现为延迟列表) +stream(s) (implemented as lazy lists): 流 (实现为惰性列表) +stream(s) (implicit definition): 流 (隐式定义) +stream(s) (infinite): 流 (无限) +stream(s) (used in query interpreter): 流 (在查询解释器中使用) +stream_append: stream_append (连接流函数) +stream_append_delayed: stream_append_delayed (延迟连接流函数) +stream_enumerate_interval: stream_enumerate_interval (枚举区间流函数) +stream_filter: stream_filter (过滤流函数) +stream_flatmap: stream_flatmap (扁平映射流函数) +stream_for_each: stream_for_each (遍历流执行函数) +stream_limit: stream_limit (流极限函数) +stream_map: stream_map (映射流函数) +stream_map_2: stream_map_2 (二元映射流函数) +stream_map_optimized: stream_map_optimized (优化映射流函数) +stream_ref: stream_ref (引用流元素函数) +stream_tail: stream_tail (流尾部函数) +stream_withdraw: stream_withdraw (流式取款函数) +strict: 严格求值 +string(s): 字符串 +string(s) (concatenation): 字符串 (连接) +string(s) (equality of): 字符串 (相等性) +string(s) (interning): 字符串 (驻留) +string(s) (quotation marks for): 字符串 (引号) +string(s) (representation of): 字符串 (表示) +string(s) (typed over multiple lines): 字符串 (跨多行输入) +string(s) (uniqueness of): 字符串 (唯一性) +stringify (primitive function): stringify (字符串化原语函数) +string pool: 字符串池 +Stuckey, Peter J.: Stuckey, Peter J. (人名) +sub (generic): sub (通用减法) +sub_complex: sub_complex (复数减法函数) +sub_interval: sub_interval (区间减法函数) +sub_rat: sub_rat (有理数减法函数) +subroutine in register machine: 子例程 (在寄存器机中) +subsets of a set: 集合的子集 +substitution model of function application: 函数应用的代换模型 +substitution model of function application (inadequacy of): 函数应用的代换模型 (不足之处) +substitution model of function application (shape of process): 函数应用的代换模型 (过程形态) +subtype: 子类型 +subtype (multiple): 子类型 (多个) +sub_vect: sub_vect (向量减法函数) +success continuation (nondeterministic evaluator): 成功续延 (非确定性求值器) +successive squaring: 逐次平方法 (快速幂) +sum: sum (求和函数) +sum (as accumulation): sum (作为累积) +sum (iterative version): sum (迭代版本) +sum_cubes: sum_cubes (立方和函数) +sum_cubes (with higher-order functions): sum_cubes (带高阶函数版本) +sum_integers: sum_integers (整数和函数) +sum_integers (with higher-order functions): sum_integers (带高阶函数版本) +summation of a series: 级数求和 +summation of a series (with streams): 级数求和 (用流) +sum_odd_squares: sum_odd_squares (奇数平方和函数) +sum_of_squares: sum_of_squares (平方和函数) +sum_of_squares (in environment model): sum_of_squares (在环境模型中) +sum_primes: sum_primes (素数和函数) +supertype: 超类型 +supertype (multiple): 超类型 (多个) +Sussman, Gerald Jay: Sussman, Gerald Jay (人名) +Sutherland, Ivan: Sutherland, Ivan (人名) +symbol(s): 符号 +symbol(s) (in environment operations): 符号 (在环境操作中) +symbol(s) (in global environment): 符号 (在全局环境中) +symbol(s) (in parsing of names): 符号 (在名称解析中) +symbol(s) (representing names in metacircular evaluator): 符号 (在元循环求值器中表示名称) +symbol(s) (in unparse): 符号 (在 unparse 中) +symbolic algebra: 符号代数 +symbolic differentiation: 符号微分 +symbolic expression: 符号表达式 +symbol_leaf: symbol_leaf (符号叶节点选择器) +symbol_of_name: symbol_of_name (名称的符号选择器) +symbols: symbols (符号列表选择器) +SYNC: SYNC (同步原语) +synchronization: 同步 +syntactic analysis, separated from execution: 语法分析 (与执行分离) +syntactic analysis, separated from execution (in metacircular evaluator): 语法分析 (在元循环求值器中) +syntactic analysis, separated from execution (in register-machine simulator): 语法分析 (在寄存器机模拟器中) +syntactic form: 语法形式 +syntactic form (as derived component): 语法形式 (作为派生组件) +syntactic form (function vs.): 语法形式 (与函数比较) +syntactic form (need for): 语法形式 (必要性) +syntactic forms: 语法形式 (列表) +syntactic forms (assignment): 语法形式 (赋值) +syntactic forms (block): 语法形式 (块) +syntactic forms (break statement): 语法形式 (break 语句) +syntactic forms (conditional expression): 语法形式 (条件表达式) +syntactic forms (conditional statement): 语法形式 (条件语句) +syntactic forms (constant declaration): 语法形式 (常量声明) +syntactic forms (continue statement): 语法形式 (continue 语句) +syntactic forms (function declaration): 语法形式 (函数声明) +syntactic forms (lambda expression): 语法形式 (lambda 表达式) +syntactic forms (logical conjunction (&&)): 语法形式 (逻辑与 &&) +syntactic forms (logical disjunction (||)): 语法形式 (逻辑或 ||) +syntactic forms (return statement): 语法形式 (返回语句) +syntactic forms (variable declaration): 语法形式 (变量声明) +syntactic forms (while loop): 语法形式 (while 循环) +syntactic sugar: 语法糖 +syntactic sugar (&& and || as): 语法糖 (&& 和 || 作为) +syntactic sugar (function vs. data as): 语法糖 (函数 vs. 数据作为) +syntactic sugar (looping constructs as): 语法糖 (循环结构作为) +syntax: 语法 +syntax (abstract): 语法 (抽象) +syntax (of expressions, describing): 语法 (表达式描述) +syntax (of a programming language): 语法 (编程语言的) +syntax interface: 语法接口 +systematic search: 系统搜索 + +T + +table: 表 / 表格 +table (backbone of): 表 (骨干) +table (for coercion): 表 (用于强制转换) +table (for data-directed programming): 表 (用于数据导向编程) +table (local): 表 (局部) +table (n-dimensional): 表 (n 维) +table (one-dimensional): 表 (一维) +table (operation-and-type): 表 (操作与类型) +table (represented as binary tree vs. unordered list): 表 (表示为二叉树 vs. 无序列表) +table (testing equality of keys): 表 (测试键相等性) +table (two-dimensional): 表 (二维) +table (used in simulation agenda): 表 (用于模拟议程) +table (used to store computed values): 表 (用于存储计算值) +tableau: 表格 (级数加速) +tabulation: 制表 / 列表 (记忆化) +tack_on_instruction_sequence: tack_on_instruction_sequence (附加指令序列函数) +tagged architecture: 带标签架构 +tagged data: 带标签数据 +tail (primitive function): tail (列表尾部原语函数) +tail (primitive function, axiom for): tail (公理) +tail (primitive function, functional implementation of): tail (函数式实现) +tail (primitive function, implemented with vectors): tail (用向量实现) +tail (primitive function, as list operation): tail (作为列表操作) +tail recursion: 尾递归 +tail recursion (compiler and): 尾递归 (与编译器) +tail recursion (environment model of evaluation and): 尾递归 (与求值环境模型) +tail recursion (explicit-control evaluator and): 尾递归 (与显式控制求值器) +tail recursion (garbage collection and): 尾递归 (与垃圾回收) +tail recursion (in JavaScript): 尾递归 (在 JavaScript 中) +tail recursion (metacircular evaluator and): 尾递归 (与元循环求值器) +tail recursion (return statement necessary for): 尾递归 (需要返回语句) +tail recursion (in Scheme): 尾递归 (在 Scheme 中) +tail-recursive evaluator: 尾递归求值器 +tangent: 正切 +tangent (as continued fraction): 正切 (表示为连分数) +tangent (power series for): 正切 (幂级数) +target register: 目标寄存器 +TDZ (temporal dead zone): TDZ (暂时性死区) +Technological University of Eindhoven: 埃因霍温理工大学 +temporal dead zone (TDZ): 暂时性死区 (TDZ) +terminal node of a tree: 树的终端节点 / 叶节点 +term_list: term_list (项列表选择器/构造器) +term list of polynomial: 多项式的项列表 +term list of polynomial (representing): 多项式的项列表 (表示) +ternary operator: 三元运算符 +test (in register machine): test (寄存器机中的 test 指令) +test (in register machine, instruction constructor): test (test 指令构造器) +test (in register machine, simulating): test (模拟 test 指令) +test_and_set: test_and_set (测试并设置原子操作) +test_condition: test_condition (测试条件选择器) +test operation in register machine: 测试操作 (寄存器机中) +Thatcher, James W.: Thatcher, James W. (人名) +the_empty_environment: the_empty_environment (空环境) +the_empty_termlist: the_empty_termlist (空项列表) +the_global_environment: the_global_environment (全局环境) +the_heads: the_heads (头指针向量/寄存器) +the_heads (register): the_heads (寄存器) +the_heads (vector): the_heads (向量) +THE Multiprogramming System: THE 多道程序系统 +theorem proving (automatic): 定理证明 (自动) +theta(f(n)) (theta of f(n)): theta(f(n)) (Theta 记号) +the_tails: the_tails (尾指针向量/寄存器) +the_tails (register): the_tails (寄存器) +the_tails (vector): the_tails (向量) +thread: 线程 +thunk: thunk (延迟计算对象) +thunk (call-by-name): thunk (传名调用) +thunk (call-by-need): thunk (传需求调用) +thunk (forcing): thunk (强制求值) +thunk (implementation of): thunk (实现) +thunk (origin of name): thunk (名称来源) +time: 时间 +time (assignment and): 时间 (与赋值) +time (communication and): 时间 (与通信) +time (in concurrent systems): 时间 (在并发系统中) +time (functional programming and): 时间 (与函数式编程) +time (in nondeterministic computing): 时间 (在非确定性计算中) +time (purpose of): 时间 (目的) +timed_prime_test: timed_prime_test (计时素性测试函数) +time segment, in agenda: 时间段 (在议程中) +time slicing: 时间分片 +timing diagram: 时序图 +TK!Solver: TK!Solver (软件名) +tower of types: 类型塔 +tracing: 跟踪 +tracing (instruction execution): 跟踪 (指令执行) +tracing (register assignment): 跟踪 (寄存器赋值) +transform_painter: transform_painter (变换画家函数) +transparency, referential: 引用透明性 +transpose a matrix: 转置矩阵 +tree: 树 +tree (binary): 树 (二叉) +tree (B-tree): 树 (B树) +tree (combination viewed as): 树 (组合式视为) +tree (counting leaves of): 树 (计算叶节点数) +tree (enumerating leaves of): 树 (枚举叶节点) +tree (fringe of): 树 (叶节点列表) +tree (Huffman): 树 (霍夫曼) +tree (lazy): 树 (惰性) +tree (mapping over): 树 (映射) +tree (rational): 树 (有理/无限) +tree (red-black): 树 (红黑) +tree (represented as pairs): 树 (用序对表示) +tree (reversing at all levels): 树 (各层反转) +tree accumulation: 树累积 +tree_map: tree_map (树映射函数) +tree-recursive process: 树形递归过程 +tree-recursive process (order of growth): 树形递归过程 (增长阶) +tree_to_list_...: tree_to_list_... (树转列表系列函数) +trigonometric relations: 三角关系 +true (keyword): true (关键字) +truncation error: 截断误差 +truthiness: 真值性 (JavaScript 中的真值概念) +truth maintenance: 真值维护 +Turing, Alan M.: Turing, Alan M. (人名) +Turing machine: 图灵机 +Turner, David: Turner, David (人名) +type in query system: type (查询系统中的类型谓词) +type in register machine: type (寄存器机指令类型) +type(s): 类型 +type(s) (cross-type operations): 类型 (跨类型操作) +type(s) (dispatching on): 类型 (基于类型分派) +type(s) (hierarchy in symbolic algebra): 类型 (符号代数中的层次) +type(s) (hierarchy of): 类型 (层次结构) +type(s) (lowering): 类型 (降低) +type(s) (multiple subtype and supertype): 类型 (多重子类型和超类型) +type(s) (polymorphic): 类型 (多态) +type(s) (raising): 类型 (提升) +type(s) (subtype): 类型 (子类型) +type(s) (supertype): 类型 (超类型) +type(s) (tower of): 类型 (塔) +typed pointer: 带类型指针 +type field: 类型字段 +type-inferencing mechanism: 类型推断机制 +type_tag: type_tag (类型标签选择器) +type_tag (using JavaScript data types): type_tag (使用 JavaScript 数据类型) +type tag: 类型标签 +type tag (two-level): 类型标签 (两级) + +U + +unary operator: 一元运算符 +unbound name: 未绑定名称 / 自由变量 +undefined (predeclared name): undefined (预定义名称/值) +unev register: unev 寄存器 (未求值表达式寄存器) +unification: 合一 +unification (discovery of algorithm): 合一 (算法发现) +unification (implementation): 合一 (实现) +unification (pattern matching vs.): 合一 (与模式匹配比较) +unify_match: unify_match (合一匹配函数) +union_set: union_set (集合并集函数) +union_set (binary-tree representation): union_set (二叉树表示) +union_set (ordered-list representation): union_set (有序列表表示) +union_set (unordered-list representation): union_set (无序列表表示) +unique (query language): unique (查询语言中的去重) +unique_pairs: unique_pairs (唯一配对函数) +unit square: 单位正方形 +univariate polynomial: 单变量多项式 +universal machine: 通用机 +universal machine (explicit-control evaluator as): 通用机 (显式控制求值器作为) +universal machine (general-purpose computer as): 通用机 (通用计算机作为) +University of Edinburgh: 爱丁堡大学 +University of Marseille: 马赛大学 +UNIX: UNIX (操作系统) +UNIX (epoch): UNIX (纪元时间) +unknown_component_type: unknown_component_type (未知组件类型错误) +unknown_function_type: unknown_function_type (未知函数类型错误) +unordered-list representation of sets: 集合的无序列表表示 +unparse: unparse (反解析函数) +unparse (as inverse of parse): unparse (作为 parse 的逆) +unparse (in query interpreter): unparse (在查询解释器中) +update_insts: update_insts (更新指令列表函数) +upper_bound: upper_bound (上界选择器 - 区间) +up_split: up_split (上分裂函数 - 图片语言) +upward compatibility: 向上兼容性 +user_print: user_print (用户打印函数) +user_print (modified for compiled code): user_print (为编译代码修改) +user_read: user_read (用户读取函数) + +V + +V operation on semaphore: V 操作 (信号量) +val register: val 寄存器 (值寄存器) +value: 值 +value (of an expression): 值 (表达式的) +value (of a program): 值 (程序的) +value_fun: value_fun (值函数选择器 - 寄存器机) +variable: variable (变量检查/构造器 - 代数/多项式) +variable: 变量 +variable (assignment to): 变量 (赋值) +variable (declaration): 变量 (声明) +variable (declaration, parsing of): 变量 (声明解析) +variable (parameter as): 变量 (参数作为) +variable-length code: 变长编码 +vector (data structure): 向量 (数据结构) / 数组 +vector (data structure, for arguments of apply): 向量 (用于 apply 参数) +vector (data structure, used in spread and rest parameter syntax): 向量 (用于展开和剩余参数语法) +vector (mathematical): 向量 (数学) +vector (mathematical, operations on): 向量 (数学, 操作) +vector (mathematical, in picture-language frame): 向量 (数学, 在图片语言框架中) +vector (mathematical, represented as pair): 向量 (数学, 表示为序对) +vector (mathematical, represented as sequence): 向量 (数学, 表示为序列) +vector_ref (primitive function): vector_ref (向量引用原语函数) +vector_set (primitive function): vector_set (向量设置原语函数) +verbs: verbs (动词列表) +very high-level language: 超高级语言 + +W + +Wadler, Philip: Wadler, Philip (人名) +Wadsworth, Christopher: Wadsworth, Christopher (人名) +Wagner, Eric G.: Wagner, Eric G. (人名) +Walker, Francis Amasa: Walker, Francis Amasa (人名) +walking down a list with tail: 使用 tail 遍历列表 +Wallis, John: Wallis, John (人名) +Wand, Mitchell: Wand, Mitchell (人名) +Waters, Richard C.: Waters, Richard C. (人名) +web browser, interpreting JavaScript: Web 浏览器 (解释 JavaScript) +weight: weight (权重选择器) +weight_leaf: weight_leaf (叶节点权重选择器) +Weyl, Hermann: Weyl, Hermann (人名) +"what is" vs. "how to" description: "是什么" vs. "如何做" 的描述 +wheel (rule): wheel (规则: 轮子?) +while (keyword): while (关键字) +while loop: while 循环 +while loop (implementing in analyzing evaluator): while 循环 (在分析求值器中实现) +while loop (implementing in metacircular evaluator): while 循环 (在元循环求值器中实现) +whitespace characters: 空白字符 +width: width (宽度选择器 - 区间) +width of an interval: 区间宽度 +Wilde, Oscar (Perlis's paraphrase of): Wilde, Oscar (Perlis 的化用) +Wiles, Andrew: Wiles, Andrew (人名) +Winograd, Terry: Winograd, Terry (人名) +Winston, Patrick Henry: Winston, Patrick Henry (人名) +wire, in digital circuit: 导线 (在数字电路中) +Wise, David S.: Wise, David S. (人名) +wishful thinking: 愿望思维 / 乐观假设 +withdraw: withdraw (取款函数) +withdraw (problems in concurrent system): withdraw (在并发系统中的问题) +world line of a particle: 世界线 (粒子的) +Wright, E. M.: Wright, E. M. (人名) +Wright, Jesse B.: Wright, Jesse B. (人名) +Wrigstad, Tobias, daughter of: Wrigstad, Tobias 的女儿 + +X + +xcor_vect: xcor_vect (向量 X 坐标选择器) +Xerox Palo Alto Research Center: 施乐帕洛阿尔托研究中心 (Xerox PARC) + +Y + +Y operator: Y 组合子 / Y 算子 +Yang Hui: 杨辉 (人名) +ycor_vect: ycor_vect (向量 Y 坐标选择器) +Yochelson, Jerome C.: Yochelson, Jerome C. (人名) + +Z + +Zabih, Ramin: Zabih, Ramin (人名) +zero crossings of a signal: 信号过零点 +zero test (generic): 零值测试 (通用) +zero test (generic, for polynomials): 零值测试 (通用, 用于多项式) +Zilles, Stephen N.: Zilles, Stephen N. (人名) +Zippel, Richard E.: Zippel, Richard E. (人名) \ No newline at end of file diff --git a/i18n/config.ts b/i18n/config.ts new file mode 100644 index 000000000..ec4e10190 --- /dev/null +++ b/i18n/config.ts @@ -0,0 +1,19 @@ +// maximum permissible concurrent translations +export const max_trans_num = Number(process.env.MAX_TRANSLATION_NO) || 5; + +// log file configs +export const translationSummaryPrefix: string = "translation-summary"; +export const jsonSummaryPrefix: string = "json-summary"; +export const ignoredTags: string[] = [ + "LATEXINLINE", + "LATEX", + "SNIPPET", + "SCHEMEINLINE", + "SCHEME", + "LONG_PAGE", + "LABEL", + "HISTORY", + "REF", + "FIGURE", +]; +export const max_chunk_len: Number = Number(process.env.MAX_LEN) || 3000; \ No newline at end of file diff --git a/i18n/controllers/fileUtilities.ts b/i18n/controllers/fileUtilities.ts new file mode 100644 index 000000000..a6b27bc0e --- /dev/null +++ b/i18n/controllers/fileUtilities.ts @@ -0,0 +1,45 @@ +import path from "path"; +import fs from "fs"; + +export async function needsTranslation( + enFilePath: string, + lang: string +): Promise { + const cnFilePath = enFilePath.replace( + path.sep + "en" + path.sep, + path.sep + lang + path.sep + ); + try { + const cnStats = await fs.promises.stat(cnFilePath); + if (!cnStats.isFile()) { + return true; + } + + const enStats = await fs.promises.stat(enFilePath); + return enStats.mtime > cnStats.mtime; + } catch (error) { + throw error; + } +} + +// Function to recursively find all XML files in a directory +export async function findAllXmlFiles(directory: string): Promise { + const files = await fs.promises.readdir(directory); + const xmlFiles: string[] = []; + + for (const file of files) { + const fullPath = path.join(directory, file); + const stat = await fs.promises.stat(fullPath); + + if (stat.isDirectory()) { + // Recursively search subdirectories + const subDirFiles = await findAllXmlFiles(fullPath); + xmlFiles.push(...subDirFiles); + } else if (path.extname(file).toLowerCase() === ".xml") { + // Add XML files to the list + xmlFiles.push(fullPath); + } + } + + return xmlFiles; +} diff --git a/i18n/controllers/loggers.ts b/i18n/controllers/loggers.ts new file mode 100644 index 000000000..c72d4cfc3 --- /dev/null +++ b/i18n/controllers/loggers.ts @@ -0,0 +1,116 @@ +import OpenAI from "openai"; +import path from "path"; +import fs from "fs"; +import { getFileErrors } from "./translator"; +import { translationSummaryPrefix } from "../config"; +import { fileURLToPath } from "url"; +import { dirname } from "path"; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = dirname(__filename); + +// Function to save summary log - can be called from signal handlers +export async function saveSummaryLog( + xmlFiles: string[], + failures: { file: string; error: any }[], + translateNum: number, + failureCount: number, + successCount: number +) { + try { + const ai = new OpenAI({ + apiKey: process.env.API_KEY, + baseURL: process.env.AI_BASEURL + }); + + // list and delete all assistants + const assistants = await ai.beta.assistants.list({ limit: 100 }); + const failedDel: string[] = []; + await Promise.all( + assistants.data.map(async assistant => { + try { + await ai.beta.assistants.del(assistant.id); + } catch (error) { + failedDel.push(assistant.id); + } + }) + ).then(() => console.log("successfully removed all assistants")); + + // list and delete all uploaded files + const files = await ai.files.list(); + await Promise.all( + files.data.map(async file => { + try { + await ai.files.del(file.id); + } catch (error) { + failedDel.push(file.id); + } + }) + ).then(() => console.log("successfully deleted all files")); + + const timestamp = new Date().toISOString().replace(/[:.]/g, "-"); + let summaryLog = ` +Translation Summary (${timestamp}) +================================ +Total files scanned: ${xmlFiles.length} +Files needing translation: ${translateNum} +Successfully translated: ${successCount} +Failed translations: ${failureCount} +Success rate: ${translateNum > 0 ? ((successCount / translateNum) * 100).toFixed(2) : 0}% +`; + + if (failedDel.length > 0) { + summaryLog += `\nFailed to remove ${failedDel.length} assistants\n`; + failedDel.forEach( + (assistant, index) => (summaryLog += `${index + 1}. ${assistant}\n`) + ); + } + + // Add failed translations to the log + if (failures.length > 0) { + summaryLog += `\nFailed Translations (High-level errors):\n`; + failures.forEach((failure, index) => { + summaryLog += `${index + 1}. ${failure.file}\n Error: ${failure.error}\n\n`; + }); + } + + // Add detailed errors captured during translation process + const fileErrors = getFileErrors(); + if (Object.keys(fileErrors).length > 0) { + failureCount = Object.keys(fileErrors).length; + summaryLog += `\nDetailed Translation Errors:\n`; + summaryLog += `============================\n`; + + for (const [filePath, errors] of Object.entries(fileErrors)) { + summaryLog += `\nFile: ${filePath}\n`; + errors.forEach((error, index) => { + summaryLog += ` ${index + 1}. ${error.error}\n`; + if (error.error) { + // Format the error object/message for better readability + const errorStr = + typeof error.error === "object" + ? JSON.stringify(error.error, null, 2).substring(0, 500) // Limit very long errors + : String(error.error); + summaryLog += ` Details: ${errorStr}\n`; + } + }); + } + } + + const logDir = path.resolve(__dirname, "../logs"); + if (!fs.existsSync(logDir)) { + fs.mkdirSync(logDir, { recursive: true }); + } + + const logPath = path.join( + logDir, + `${translationSummaryPrefix}-${timestamp}.log` + ); + fs.writeFileSync(logPath, summaryLog); + console.log( + `Summary log saved to i18n/logs/${translationSummaryPrefix}-${timestamp}.log` + ); + } catch (logError) { + console.error("Failed to save log file:", logError); + } +} diff --git a/i18n/controllers/parsers.ts b/i18n/controllers/parsers.ts new file mode 100644 index 000000000..997e06e46 --- /dev/null +++ b/i18n/controllers/parsers.ts @@ -0,0 +1,309 @@ +import sax from "sax"; +import { escapeXML, formatAttributes, strongEscapeXML } from "./xmlUtilities"; +import { Readable } from "stream"; +import { ignoredTags, max_chunk_len } from "../config"; +import fs, { PathLike } from "fs"; + +const createParser = () => + (sax as any).createStream(false, { trim: false }, { strictEntities: true }); + +export async function cleanParser( + text: string, + filePath: string, + logError: Function +): Promise { + let translatedChunk = ""; + const safeText = escapeXML(text); + const textStream = Readable.from("" + safeText + ""); + await new Promise((resolve, reject) => { + // Create a SAX parser in strict mode for cleaning up translations. + const clean = createParser(); + + // SAX parser to remove any excess text (artifacts, annotations etc.) from LLM outside of XML tags + let currDepth = -1; + + clean.on("text", text => { + if (currDepth >= 1) { + translatedChunk += strongEscapeXML(text); + } + }); + + clean.on("opentag", node => { + currDepth++; + if (node.name != "WRAPPER" && node.name != "TRANSLATE") { + translatedChunk += `<${node.name}${formatAttributes(node.attributes)}>`; + } + }); + + clean.on("closetag", tagName => { + if (tagName != "WRAPPER" && tagName != "TRANSLATE") { + translatedChunk += ``; + } + currDepth--; + }); + + clean.on("cdata", cdata => { + translatedChunk += ``; + }); + + clean.on("comment", comment => { + translatedChunk += ``; + }); + + clean.on("error", error => { + // Log only once with abbreviated content + logError(`Error validating AI response for ${filePath}`, error, filePath); + + // Attempt to recover using the internal parser + try { + clean._parser.error = null; + clean._parser.resume(); + // Continue processing despite the error + resolve(); + } catch (e) { + // Add error comment and resolve instead of rejecting + translatedChunk += ``; + resolve(); + } + }); + + clean.once("end", resolve); + + textStream.pipe(clean); + }); + return translatedChunk; +} + +export async function splitParser( + filePath: PathLike, + logError: Function +): Promise<[boolean, string][]> { + // Create a SAX parser in strict mode to split source into chunks. + const parser = createParser(); + + const segments: [boolean, string][] = []; + await new Promise((resolve, reject) => { + // Variables to track current depth and segments. + let currentDepth = 0; + let currentSegment = ""; + + // In this context: + // - Depth 0: Before any element is opened. + // - Depth 1: The root element (). + // - Depth 2: Each direct child of the root that we want to capture. + let isRecording = false; + + parser.on("opentag", node => { + currentDepth++; + + if (currentDepth === 2 || isRecording) { + isRecording = true; + currentSegment += `<${node.name}${formatAttributes(node.attributes)}>`; + } else { + segments.push([ + false, + `<${node.name}${formatAttributes(node.attributes)}>` + ]); + } + }); + + parser.on("text", text => { + text = strongEscapeXML(text); + + if (isRecording) { + currentSegment += text; + } else { + segments.push([false, text]); + } + }); + + parser.on("cdata", cdata => { + if (isRecording) { + currentSegment += ``; + } + }); + + parser.on("closetag", tagName => { + if (isRecording) { + currentSegment += ``; + } + + if (currentDepth === 2) { + isRecording = false; + // We are closing a segment element. + if (ignoredTags.includes(tagName)) { + segments.push([false, currentSegment]); + } else { + if ( + segments.length > 0 && + segments[segments.length - 1][0] && + segments[segments.length - 1][1].length + currentSegment.length < + max_chunk_len + ) { + segments[segments.length - 1][1] += currentSegment; + } else { + segments.push([true, currentSegment]); + } + } + currentSegment = ""; + } + + if (currentDepth === 1) { + // We are closing the root element. + segments.push([false, ``]); + } + + currentDepth--; + }); + + parser.on("comment", comment => { + if (isRecording) { + currentSegment += ``; + } else { + segments.push([false, ``]); + } + }); + + parser.on("end", async () => { + resolve(); + }); + + parser.on("error", err => { + logError(`Parser error in ${filePath}:`, err, filePath); + // Try to recover and continue + try { + parser._parser.error = null; + parser._parser.resume(); + } catch (resumeErr) { + logError(`Could not recover from parser error:`, resumeErr, filePath); + reject(err); + } + }); + + // Use the file path directly without modification + fs.createReadStream(filePath).pipe(parser); + }); + + return segments; +} + +export async function recurSplitParser( + ori: string, + filePath: PathLike, + logError: Function +): Promise { + let subTranslated: string[] = []; + // continue splitting the chunk + // Create a SAX parser in strict mode to split source into chunks. + await new Promise((resolve, reject) => { + const subParser = createParser(); + + let subCurrentDepth = 0; + let subCurrentSegment = ""; + const subSegments: [boolean, string][] = []; + let subIsRecording = false; + + subParser.on("opentag", node => { + if (node.name === "WRAPPER") return; + + subCurrentDepth++; + + if (subCurrentDepth === 2) subIsRecording = true; + + if (subIsRecording) { + subCurrentSegment += `<${node.name}${formatAttributes(node.attributes)}>`; + } else { + subSegments.push([ + false, + `<${node.name}${formatAttributes(node.attributes)}>` + ]); + } + }); + + subParser.on("text", text => { + text = strongEscapeXML(text); + if (subIsRecording) { + subCurrentSegment += text; + } else if ( + subSegments.length > 0 && + subSegments[subSegments.length - 1][0] + ) { + subSegments[subSegments.length - 1][1] += text; + } else if ( + text.trim() === "" || + text.trim() === "," || + text.trim() === "." + ) { + subSegments.push([false, text]); + } else { + subSegments.push([true, text]); + } + }); + + subParser.on("cdata", cdata => { + if (subIsRecording) { + subCurrentSegment += ``; + } + }); + + subParser.on("closetag", tagName => { + if (tagName === "WRAPPER") { + return; + } + + subCurrentSegment += ``; + + if (subCurrentDepth === 2) { + // We are closing a segment element. + if (ignoredTags.includes(tagName)) { + subSegments.push([false, subCurrentSegment]); + } else if ( + subSegments.length > 0 && + subSegments[subSegments.length - 1][0] && + subSegments[subSegments.length - 1][1].length + + subCurrentSegment.length < + max_chunk_len + ) { + subSegments[subSegments.length - 1][1] += subCurrentSegment; + } else { + subSegments.push([true, subCurrentSegment]); + } + subCurrentSegment = ""; + subIsRecording = false; + } + + if (subCurrentDepth === 1) { + subSegments.push([false, ``]); + subCurrentSegment = ""; + } + + subCurrentDepth--; + }); + + subParser.on("comment", comment => { + if (subIsRecording) { + subCurrentSegment += ``; + } else { + subSegments.push([false, ``]); + } + }); + + subParser.on("end", async () => resolve()); + + subParser.on("error", err => { + logError(`Error in subParser for ${filePath}:`, err, filePath); + // Try to recover and continue + try { + subParser._parser.error = null; + subParser._parser.resume(); + } catch (resumeErr) { + logError(`Could not recover from parser error:`, resumeErr, filePath); + reject(err); + } + }); + + Readable.from("" + ori + "").pipe(subParser); + }); + + return subTranslated; +} diff --git a/i18n/controllers/path.ts b/i18n/controllers/path.ts new file mode 100644 index 000000000..907efa424 --- /dev/null +++ b/i18n/controllers/path.ts @@ -0,0 +1,21 @@ +import path from "path"; + +export default function PathGenerator(filePath: string) { + const pathArray: string[] = filePath.split("."); + let gitPath: string = ""; + const gitPathPrefix: string[] = ["chapter", "section", "subsection"]; + + let i = 0; + const len = pathArray.length; + + while (i <= len && i < 3) { + if (i === len) { + gitPath += `/${gitPathPrefix[i - 1]}${pathArray[i - 1]}`; + } else { + gitPath += `/${gitPathPrefix[i]}${pathArray[i]}`; + } + i++; + } + + return path.resolve("../xml/en" + gitPath + ".xml"); +} diff --git a/i18n/controllers/translator.ts b/i18n/controllers/translator.ts new file mode 100644 index 000000000..297f3a50d --- /dev/null +++ b/i18n/controllers/translator.ts @@ -0,0 +1,250 @@ +import fs from "fs"; +import OpenAI from "openai"; +import path from "path"; +import createAssistant from "../initializers/initialize"; +import dotenv from "dotenv"; +import sax from "sax"; +import { cleanParser, recurSplitParser, splitParser } from "./parsers"; +import { max_chunk_len } from "../config"; + +dotenv.config(); + +if (process.env.AI_MODEL === undefined || process.env.API_KEY === undefined) { + throw Error("Please specify AI_MODEL and API_KEY"); +} + +// initialize OpenAI API +const ai = new OpenAI({ + apiKey: process.env.API_KEY, + baseURL: process.env.AI_BASEURL +}); + +// change to true to avoid calling openai api, useful for troubleshooting +// chunking logic +const troubleshoot = false; +let languageNames = new Intl.DisplayNames(["en"], { type: "language" }); + +// Centralized logging to prevent duplicate messages +const errorMessages = new Set(); +// Track errors by file for summary reporting +const fileErrors: Record = {}; + +function logError(message: string, error: any, filePath: string) { + // Create a unique key for this error message + const errorKey = message + (error ? error.toString() : ""); + // Only log if we haven't seen this exact message before + if (!errorMessages.has(errorKey)) { + errorMessages.add(errorKey); + if (error) { + console.error(message, error); + } else { + console.error(message); + } + + // Store error for the summary log if filePath is provided + if (filePath) { + if (!fileErrors[filePath]) { + fileErrors[filePath] = []; + } + fileErrors[filePath].push({ message, error }); + } + } +} + +// Function to get all logged errors for summary +export function getFileErrors(): Record< + string, + { message: string; error?: any }[] +> { + return fileErrors; +} + +const createParser = () => + (sax as any).createStream(false, { trim: false }, { strictEntities: true }); + +async function translate(langCode: string, filePath: string): Promise { + const startTime = new Date().getTime(); + let assistant; + + try { + // Use the provided file path directly without modification + const input_path = filePath; + const language = languageNames.of(langCode.replace("_", "-")); + + if (language === undefined) { + throw new Error("Undefined language"); + } + + if (!troubleshoot) + assistant = await createAssistant(langCode, language, ai); + + // Generate output path by replacing "/en/" with "/../i18n/translation_output/zh_CN/" in the path + const output_path = filePath.replace( + path.sep + "en" + path.sep, + path.sep + + ".." + + path.sep + + "i18n" + + path.sep + + "translation_output" + + path.sep + + langCode + + path.sep + ); + + const translated: string = await recursivelyTranslate( + language, + input_path, + troubleshoot ? 0 : assistant.id + ); + + // Ensure directory exists + const dir = path.dirname(output_path); + fs.mkdirSync(dir, { recursive: true }); + + fs.writeFileSync(output_path, translated); + console.log(`Translation saved to ${output_path}`); + } catch (parseErr) { + logError(`Error processing file ${filePath}:`, parseErr, filePath); + } finally { + if (assistant) { + await ai.beta.assistants.del(assistant.id).catch(err => { + logError(`Error deleting assistant:`, err, filePath); + }); + } + const elapsed = new Date().getTime() - startTime; + console.log("Took " + elapsed / 1000.0 + " seconds"); + } +} + +// Function to translate the content of a file +async function recursivelyTranslate( + language: string, + filePath: string, + assistant_id: string +): Promise { + // Recursive function to split and translate + async function helper(ori: string): Promise { + if (ori.length < max_chunk_len) { + return await translateChunk(ori); // translate the chunk + } + + let subSegments: string[] = await recurSplitParser(ori, filePath, logError); + let subTranslated: string[] = []; + + for (const segment of subSegments) { + try { + if (segment[0]) { + subTranslated.push(await helper(segment[1])); + } else { + subTranslated.push(segment[1]); + } + } catch (error) { + logError(`Error translating segment in ${filePath}:`, error, filePath); + // Add error comment and continue with next segment + subTranslated.push( + segment[1] + `` + ); + } + } + + return subTranslated.join(""); + } + + // Create a SAX parser in strict mode to split source into chunks. + + const thread = await ai.beta.threads.create(); + + console.log( + "Translating " + filePath + " to " + language + " at " + thread.id + ); + let translated: String[] = []; + + try { + const segments: [boolean, string][] = await splitParser(filePath, logError); + + for (const segment of segments) { + try { + if (segment[0]) { + translated.push(await helper(segment[1])); + } else { + translated.push(segment[1]); + } + } catch (error) { + logError(`Error translating segment in ${filePath}:`, error, filePath); + // Add error comment and continue with next segment + translated.push(segment[1] + ``); + } + } + + return translated.join(""); + } catch (parseErr) { + logError(`Error parsing XML in ${filePath}:`, parseErr, filePath); + // Return what we have so far plus error comment + return translated.join("") + ``; + } + + async function translateChunk(chunk: string): Promise { + if (troubleshoot) return chunk; + if (chunk.trim() === "" || chunk.trim() === "," || chunk.trim() === ".") { + return chunk; + } + + try { + await ai.beta.threads.messages.create(thread.id, { + role: "user", + content: `Translate to ${language}: ${chunk} ` + }); + + const run = await ai.beta.threads.runs.createAndPoll(thread.id, { + assistant_id: assistant_id, + truncation_strategy: { + type: "last_messages", + last_messages: Number(process.env.CONTEXT) || 3 + } + }); + + const messages = await ai.beta.threads.messages.list(thread.id, { + run_id: run.id, + limit: Number(process.env.CONTEXT || 3) + }); + + const message = messages.data.pop(); + + if (message) { + if (message.status === "incomplete") { + throw new Error( + "AI Error: incomplete response: " + message.incomplete_details + ); + } + + if (message.content[0].type !== "text") { + throw new Error("AI Error: Unexpected response format"); + } + + if ( + run.usage && + run.usage.total_tokens > Number(process.env.TOKEN_WARNING || 10000) + ) { + console.warn("warning: high token usage", run.usage); + } + } else { + throw new Error("AI Error: Undefined Response"); + } + + const text = message.content[0].text; + + return await cleanParser(text.value, filePath, logError); + } catch (err) { + logError( + `Error occurred while translating chunk in ${filePath}:`, + err, + filePath + ); + // Return the original chunk with error comment rather than throwing + return chunk + ``; + } + } +} + +export default translate; diff --git a/i18n/controllers/xmlUtilities.ts b/i18n/controllers/xmlUtilities.ts new file mode 100644 index 000000000..6b3db70fe --- /dev/null +++ b/i18n/controllers/xmlUtilities.ts @@ -0,0 +1,25 @@ +function formatAttributes(attrs: string) { + const attrStr = Object.entries(attrs) + .map(([key, val]) => `${key}="${val}"`) + .join(" "); + return attrStr ? " " + attrStr : ""; +} + +function escapeXML(str: string): string { + return str + .replace(/&(?!(?:amp;|lt;|gt;|apos;|quot;))/g, "&") + .replace(/<([^a-zA-Z\/])/g, "<$1") // Fix lone < characters + .replace(/([^a-zA-Z0-9"'\s\/])>/g, "$1>"); // Fix lone > characters; +} + +function strongEscapeXML(str: string): string { + return str + .replace(/&(?!(?:amp;|lt;|gt;|apos;|quot;))/g, "&") + .replace(//g, ">") + .replace(/"/g, """) + .replace(/'/g, "'") + .replace(/【([\s\S]*?)】/g, ""); +} + +export { formatAttributes, escapeXML, strongEscapeXML }; diff --git a/i18n/index.ts b/i18n/index.ts new file mode 100644 index 000000000..8c3e3aedf --- /dev/null +++ b/i18n/index.ts @@ -0,0 +1,177 @@ +import PathGenerator from "./controllers/path.ts"; +import translate, { getFileErrors } from "./controllers/translator.ts"; +import fs from "fs"; +import util from "util"; +import path from "path"; +import { fileURLToPath } from "url"; +import { dirname } from "path"; +import { max_trans_num } from "./config.ts"; +import { saveSummaryLog } from "./controllers/loggers.ts"; +import { setupCleanupHandlers } from "./initializers/processHandler.ts"; +import { findAllXmlFiles, needsTranslation } from "./controllers/fileUtilities.ts"; + +// Get the directory name of the current module +const __filename = fileURLToPath(import.meta.url); +const __dirname = dirname(__filename); + +const readdir = util.promisify(fs.readdir); +const getDirectories = async (source: fs.PathLike) => + (await readdir(source, { withFileTypes: true })) + .filter(dirent => dirent.isDirectory()) + .map(dirent => dirent.name); + +// Global variables for tracking translation state +// These need to be accessible by signal handlers +let xmlFiles: string[] = []; +let filesToTranslate: string[] = []; +let successCount = 0; +let failureCount = 0; +let processedCount = 0; +let failures: { file: string; error: any }[] = []; + + +export default async function translateSingle(path: string, language: string) { + const fullPath = PathGenerator(path); + await translate(language, fullPath); +} + +(async () => { + await setupCleanupHandlers(xmlFiles, failures, filesToTranslate.length, failureCount, successCount); + + try { + const languages: string[] = await getDirectories( + path.join(__dirname, "ai_files") + ); + console.dir(languages); + + // Get the absolute path to the xml/en directory using proper path resolution + const enDirPath = path.resolve(__dirname, "../xml/en"); + let absent: boolean = false; + + if (process.argv[2] === "test") { + if (process.argv.length !== 5) { + console.log("syntax: yarn trans test
"); + return; + } + try { + console.log("start translating, may take a while ..."); + const fullPath = PathGenerator(process.argv[3]); + await translate(process.argv[4], fullPath); + } catch (e) { + console.error("test error: ", e); + } + return; + } + if ( + process.argv[2] === "all" || + process.argv.length <= 2 || + process.argv[2] === "abs" + ) { + if (process.argv[2] === "abs") { + absent = true; + } + // Find all XML files + console.log(`Scanning directory: ${enDirPath}`); + filesToTranslate = await findAllXmlFiles(enDirPath); + } else { + const [, , ...xmlFiles] = process.argv; + filesToTranslate = xmlFiles.map(file => path.join(__dirname, "..", file)); + } + + if (filesToTranslate.length === 0) { + console.log(`No files to translate.`); + return; + } + console.log(`${filesToTranslate.length} files need translation`); + + for (const lang of languages) { + // Process files in batches to avoid overwhelming the system + const batchSize: number = max_trans_num; + + // Track all failed translations with their errors + failures = []; + + for (let i = 0; i < filesToTranslate.length; i += batchSize) { + const batch = filesToTranslate.slice(i, i + batchSize); + console.log( + `Starting batch ${Math.floor(i / batchSize) + 1}/${Math.ceil(filesToTranslate.length / batchSize)}` + ); + + // Process each file in the batch, but handle errors individually + const results = await Promise.allSettled( + batch.map(async file => { + if (absent) { + if (!(await needsTranslation(file, lang))) { + console.log( + `Skipped translation for ${file} to language ${lang} (yarn trans abs)` + ); + return { file, success: true }; + } + } + try { + console.log(`Starting translation for ${file}`); + await translate(lang, file); + return { file, success: true }; + } catch (error) { + // Return failure with error but don't log yet + return { file, success: false, error }; + } + }) + ); + + // Count successes and failures + for (const result of results) { + processedCount++; + + if (result.status === "fulfilled") { + if (result.value.success) { + successCount++; + } else { + failures.push({ + file: result.value.file, + error: result.value.error + }); + console.error( + `Translation failed for ${result.value.file}: ${result.value.error}` + ); + } + } else { + // This is for Promise rejections (should be rare with our error handling) + failures.push({ + file: "Unknown file in batch", + error: result.reason + }); + console.error(`Promise rejected for file: ${result.reason}`); + } + } + + console.log( + `Completed batch ${Math.floor(i / batchSize) + 1}/${Math.ceil(filesToTranslate.length / batchSize)}` + ); + console.log( + `Progress: ${successCount} successful, ${failureCount} failed, ${processedCount} processed out of ${filesToTranslate.length} files` + ); + } + + console.log("All translations completed!"); + console.log( + `Final results: ${successCount} successful, ${failureCount} failed out of ${filesToTranslate.length} files` + ); + + // If there are failures, report them all at the end + if (failures.length > 0) { + console.log("\n===== FAILED TRANSLATIONS ====="); + failures.forEach((failure, index) => { + console.log(`${index + 1}. Failed file: ${failure.file}`); + console.log(` Error: ${failure.error}`); + }); + console.log("==============================\n"); + } + + // Save a detailed summary to a log file + await saveSummaryLog(xmlFiles, failures, filesToTranslate.length, failureCount, successCount); + } + } catch (e) { + console.error("Error during translation process:", e); + } +})(); diff --git a/i18n/initializers/initialize.ts b/i18n/initializers/initialize.ts new file mode 100644 index 000000000..b66977d50 --- /dev/null +++ b/i18n/initializers/initialize.ts @@ -0,0 +1,59 @@ +import fs from "fs"; +import OpenAI from "openai"; +import path, { dirname } from "path"; +import { fileURLToPath } from "url"; + +// Get the directory name of the current module +const __filename = fileURLToPath(import.meta.url); +const __dirname = dirname(__filename); + +export default async function createAssistant( + langCode: string, + language: string, + ai: OpenAI +) { + const assistant = await ai.beta.assistants.create({ + name: "SICP Translator", + instructions: `You are a professional translator with high technical skills in computer science. + You always translate all provided tags to ${language} + You MUST adhere to the following rules strictly: + 1. ALWAYS use the exact translations for technical terms found in the uploaded reference file. + 2. If a term appears in the reference file, you MUST use the provided translation without exception. + 3. Preserve all XML tags and structure exactly as given. + 4. Do not add any additional information or explanatory notes. + 5. When translating, search the reference file first for any technical terms before translating them. + 6. Do not format your response using markdown or any other formatting.`, + model: process.env.AI_MODEL as string, + tools: [{ type: "file_search" }] + }); + + const fileStreams = [ + path.join(__dirname, "../ai_files", langCode, "dictionary.txt") + ].map(filePath => { + const stream = fs.createReadStream(filePath); + + stream.on("error", err => { + throw new Error( + `Failed to read dictionary file at ${filePath}: ${err.message}` + ); + }); + + return stream; + }); + + // Create a vector store including our two files. + const vectorStore = await ai.vectorStores.create({ + name: "Translation instructions" + }); + + await ai.vectorStores.fileBatches.uploadAndPoll(vectorStore.id, { + files: fileStreams + }); + + await ai.beta.assistants.update(assistant.id, { + tool_resources: { file_search: { vector_store_ids: [vectorStore.id] } } + }); + + const updatedAssistant = await ai.beta.assistants.retrieve(assistant.id); + return updatedAssistant; +} diff --git a/i18n/initializers/processHandler.ts b/i18n/initializers/processHandler.ts new file mode 100644 index 000000000..938b4c40f --- /dev/null +++ b/i18n/initializers/processHandler.ts @@ -0,0 +1,60 @@ +import path from "path"; +import { saveSummaryLog } from "../controllers/loggers"; +import fs from "fs"; +import { fileURLToPath } from "url"; +import { dirname } from "path"; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = dirname(__filename); + +export async function setupCleanupHandlers( + xmlFiles: string[], + failures: { file: string; error: any }[], + translateNum: number, + failureCount: number, + successCount: number) { + // Handle normal exit + process.on("exit", () => { + console.log("Process is exiting, saving summary..."); + // Only synchronous operations work in 'exit' handlers + // We can't await here, as exit handlers must be synchronous + try { + // Use synchronous operations for final cleanup if needed + // Note: This won't actually call the async parts of saveSummaryLog properly + const timestamp = new Date().toISOString().replace(/[:.]/g, "-"); + const summaryContent = `Translation interrupted during exit at ${timestamp}`; + const logDir = path.resolve(__dirname, "../logs"); + if (!fs.existsSync(logDir)) { + fs.mkdirSync(logDir, { recursive: true }); + } + fs.writeFileSync( + path.join(logDir, `emergency-log-${timestamp}.log`), + summaryContent + ); + } catch (error) { + console.error("Failed to save emergency log during exit:", error); + } + }); + + // Handle Ctrl+C + process.on("SIGINT", async () => { + console.log("\nReceived SIGINT (Ctrl+C). Saving summary before exit..."); + await saveSummaryLog(xmlFiles, failures, translateNum, failureCount, successCount); + process.exit(1); + }); + + // Handle SIGTERM (kill command) + process.on("SIGTERM", async () => { + console.log("\nReceived SIGTERM. Saving summary before exit..."); + await saveSummaryLog(xmlFiles, failures, translateNum, failureCount, successCount); + process.exit(1); + }); + + // Handle uncaught exceptions + process.on("uncaughtException", async error => { + console.error("\nUncaught exception:", error); + console.log("Saving summary before exit..."); + await saveSummaryLog(xmlFiles, failures, translateNum, failureCount, successCount); + process.exit(1); + }); +} diff --git a/i18n/package.json b/i18n/package.json new file mode 100644 index 000000000..92781abfc --- /dev/null +++ b/i18n/package.json @@ -0,0 +1,23 @@ +{ + "type": "module", + "license": "Apache-2.0", + "contributors": [ + { + "name": "yihao", + "url": "https://github.com/yihao03/" + }, + { + "name": "Haodong", + "url": "https://github.com/coder114514" + } + ], + "dependencies": { + "dotenv": "^16.5.0", + "openai": "^4.96.2", + "sax": "^1.4.1" + }, + "devDependencies": { + "@types/node": "^22.15.3" + }, + "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" +} diff --git a/i18n/yarn.lock b/i18n/yarn.lock new file mode 100644 index 000000000..c2ef39b55 --- /dev/null +++ b/i18n/yarn.lock @@ -0,0 +1,278 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@types/node-fetch@^2.6.4": + version "2.6.12" + resolved "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.12.tgz" + integrity sha512-8nneRWKCg3rMtF69nLQJnOYUcbafYeFSjqkw3jCRLsqkWFlHaoQrr5mXmofFGOx3DKn7UfmBMyov8ySvLRVldA== + dependencies: + "@types/node" "*" + form-data "^4.0.0" + +"@types/node@*", "@types/node@^22.15.3": + version "22.15.3" + resolved "https://registry.npmjs.org/@types/node/-/node-22.15.3.tgz" + integrity sha512-lX7HFZeHf4QG/J7tBZqrCAXwz9J5RD56Y6MpP0eJkka8p+K0RY/yBTW7CYFJ4VGCclxqOLKmiGP5juQc6MKgcw== + dependencies: + undici-types "~6.21.0" + +"@types/node@^18.11.18": + version "18.19.86" + resolved "https://registry.npmjs.org/@types/node/-/node-18.19.86.tgz" + integrity sha512-fifKayi175wLyKyc5qUfyENhQ1dCNI1UNjp653d8kuYcPQN5JhX3dGuP/XmvPTg/xRBn1VTLpbmi+H/Mr7tLfQ== + dependencies: + undici-types "~5.26.4" + +abort-controller@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz" + integrity sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg== + dependencies: + event-target-shim "^5.0.0" + +agentkeepalive@^4.2.1: + version "4.6.0" + resolved "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.6.0.tgz" + integrity sha512-kja8j7PjmncONqaTsB8fQ+wE2mSU2DJ9D4XKoJ5PFWIdRMa6SLSN1ff4mOr4jCbfRSsxR4keIiySJU0N9T5hIQ== + dependencies: + humanize-ms "^1.2.1" + +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz" + integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== + +call-bind-apply-helpers@^1.0.1, call-bind-apply-helpers@^1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz" + integrity sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ== + dependencies: + es-errors "^1.3.0" + function-bind "^1.1.2" + +combined-stream@^1.0.8: + version "1.0.8" + resolved "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz" + integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== + dependencies: + delayed-stream "~1.0.0" + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz" + integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== + +dotenv@^16.5.0: + version "16.5.0" + resolved "https://registry.npmjs.org/dotenv/-/dotenv-16.5.0.tgz" + integrity sha512-m/C+AwOAr9/W1UOIZUo232ejMNnJAJtYQjUbHoNTBNTJSvqzzDh7vnrei3o3r3m9blf6ZoDkvcw0VmozNRFJxg== + +dunder-proto@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz" + integrity sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A== + dependencies: + call-bind-apply-helpers "^1.0.1" + es-errors "^1.3.0" + gopd "^1.2.0" + +es-define-property@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz" + integrity sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g== + +es-errors@^1.3.0: + version "1.3.0" + resolved "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz" + integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== + +es-object-atoms@^1.0.0, es-object-atoms@^1.1.1: + version "1.1.1" + resolved "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz" + integrity sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA== + dependencies: + es-errors "^1.3.0" + +es-set-tostringtag@^2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz" + integrity sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA== + dependencies: + es-errors "^1.3.0" + get-intrinsic "^1.2.6" + has-tostringtag "^1.0.2" + hasown "^2.0.2" + +event-target-shim@^5.0.0: + version "5.0.1" + resolved "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz" + integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== + +form-data-encoder@1.7.2: + version "1.7.2" + resolved "https://registry.npmjs.org/form-data-encoder/-/form-data-encoder-1.7.2.tgz" + integrity sha512-qfqtYan3rxrnCk1VYaA4H+Ms9xdpPqvLZa6xmMgFvhO32x7/3J/ExcTd6qpxM0vH2GdMI+poehyBZvqfMTto8A== + +form-data@^4.0.0: + version "4.0.2" + resolved "https://registry.npmjs.org/form-data/-/form-data-4.0.2.tgz" + integrity sha512-hGfm/slu0ZabnNt4oaRZ6uREyfCj6P4fT/n6A1rGV+Z0VdGXjfOhVUpkn6qVQONHGIFwmveGXyDs75+nr6FM8w== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.8" + es-set-tostringtag "^2.1.0" + mime-types "^2.1.12" + +formdata-node@^4.3.2: + version "4.4.1" + resolved "https://registry.npmjs.org/formdata-node/-/formdata-node-4.4.1.tgz" + integrity sha512-0iirZp3uVDjVGt9p49aTaqjk84TrglENEDuqfdlZQ1roC9CWlPk6Avf8EEnZNcAqPonwkG35x4n3ww/1THYAeQ== + dependencies: + node-domexception "1.0.0" + web-streams-polyfill "4.0.0-beta.3" + +function-bind@^1.1.2: + version "1.1.2" + resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz" + integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== + +get-intrinsic@^1.2.6: + version "1.3.0" + resolved "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz" + integrity sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ== + dependencies: + call-bind-apply-helpers "^1.0.2" + es-define-property "^1.0.1" + es-errors "^1.3.0" + es-object-atoms "^1.1.1" + function-bind "^1.1.2" + get-proto "^1.0.1" + gopd "^1.2.0" + has-symbols "^1.1.0" + hasown "^2.0.2" + math-intrinsics "^1.1.0" + +get-proto@^1.0.1: + version "1.0.1" + resolved "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz" + integrity sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g== + dependencies: + dunder-proto "^1.0.1" + es-object-atoms "^1.0.0" + +gopd@^1.2.0: + version "1.2.0" + resolved "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz" + integrity sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg== + +has-symbols@^1.0.3, has-symbols@^1.1.0: + version "1.1.0" + resolved "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz" + integrity sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ== + +has-tostringtag@^1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz" + integrity sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw== + dependencies: + has-symbols "^1.0.3" + +hasown@^2.0.2: + version "2.0.2" + resolved "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz" + integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== + dependencies: + function-bind "^1.1.2" + +humanize-ms@^1.2.1: + version "1.2.1" + resolved "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz" + integrity sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ== + dependencies: + ms "^2.0.0" + +math-intrinsics@^1.1.0: + version "1.1.0" + resolved "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz" + integrity sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g== + +mime-db@1.52.0: + version "1.52.0" + resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz" + integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== + +mime-types@^2.1.12: + version "2.1.35" + resolved "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz" + integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== + dependencies: + mime-db "1.52.0" + +ms@^2.0.0: + version "2.1.3" + resolved "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + +node-domexception@1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz" + integrity sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ== + +node-fetch@^2.6.7: + version "2.7.0" + resolved "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz" + integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== + dependencies: + whatwg-url "^5.0.0" + +openai@^4.96.2: + version "4.96.2" + resolved "https://registry.npmjs.org/openai/-/openai-4.96.2.tgz" + integrity sha512-R2XnxvMsizkROr7BV3uNp1q/3skwPZ7fmPjO1bXLnfB4Tu5xKxrT1EVwzjhxn0MZKBKAvOaGWS63jTMN6KrIXA== + dependencies: + "@types/node" "^18.11.18" + "@types/node-fetch" "^2.6.4" + abort-controller "^3.0.0" + agentkeepalive "^4.2.1" + form-data-encoder "1.7.2" + formdata-node "^4.3.2" + node-fetch "^2.6.7" + +sax@^1.4.1: + version "1.4.1" + resolved "https://registry.npmjs.org/sax/-/sax-1.4.1.tgz" + integrity sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg== + +tr46@~0.0.3: + version "0.0.3" + resolved "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz" + integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== + +undici-types@~5.26.4: + version "5.26.5" + resolved "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz" + integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== + +undici-types@~6.21.0: + version "6.21.0" + resolved "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz" + integrity sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ== + +web-streams-polyfill@4.0.0-beta.3: + version "4.0.0-beta.3" + resolved "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-4.0.0-beta.3.tgz" + integrity sha512-QW95TCTaHmsYfHDybGMwO5IJIM93I/6vTRk+daHTWFPhwh+C8Cg7j7XyKrwrj8Ib6vYXe0ocYNrmzY4xAAN6ug== + +webidl-conversions@^3.0.0: + version "3.0.1" + resolved "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz" + integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== + +whatwg-url@^5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz" + integrity sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw== + dependencies: + tr46 "~0.0.3" + webidl-conversions "^3.0.0" diff --git a/javascript/index.js b/javascript/index.js index 2271540f7..128adaff9 100644 --- a/javascript/index.js +++ b/javascript/index.js @@ -8,6 +8,7 @@ import { DOMParser as dom } from "xmldom"; const readdir = util.promisify(fs.readdir); const open = util.promisify(fs.open); const readFile = util.promisify(fs.readFile); +const errors = []; // latex (pdf version) import { @@ -36,7 +37,6 @@ import { setupSnippetsJs } from "./processingFunctions/processSnippetJs"; import { getAnswers } from "./processingFunctions/processExercisePdf"; // json (for cadet frontend) -import { testIndexSearch } from "./searchRewriteTest"; import { parseXmlJson } from "./parseXmlJson"; import { writeRewritedSearchData } from "./searchRewrite"; import { setupSnippetsJson } from "./processingFunctions/processSnippetJson"; @@ -58,6 +58,11 @@ const ensureDirectoryExists = (path, cb) => { }); }; +const getDirectories = async source => + (await readdir(source, { withFileTypes: true })) + .filter(dirent => dirent.isDirectory()) + .map(dirent => dirent.name); + async function translateXml(filepath, filename, option) { const fullFilepath = path.join(inputDir, filepath, filename); const fileToRead = await open(fullFilepath, "r"); @@ -157,31 +162,35 @@ async function translateXml(filepath, filename, option) { } if (parseType == "json") { - const relativeFilePath = path.join( - filepath, - filename.replace(/\.xml$/, "") + ".html" - ); - - if (option == "generateTOC") { - generateTOC(doc, tableOfContent, relativeFilePath); - return; - } else if (option == "setupSnippet") { - setupSnippetsJson(doc.documentElement); - setupReferencesJson(doc.documentElement, relativeFilePath); - return; - } else if (option == "parseXml") { - const jsonObj = []; - parseXmlJson(doc, jsonObj, relativeFilePath); - - const outputFile = path.join( - outputDir, - tableOfContent[relativeFilePath].index + ".json" + try { + const relativeFilePath = path.join( + filepath, + filename.replace(/\.xml$/, "") + ".html" ); - const stream = fs.createWriteStream(outputFile); - stream.once("open", fd => { - stream.write(JSON.stringify(jsonObj)); - stream.end(); - }); + + if (option == "generateTOC") { + generateTOC(doc, tableOfContent, relativeFilePath); + return; + } else if (option == "setupSnippet") { + setupSnippetsJson(doc.documentElement); + setupReferencesJson(doc.documentElement, relativeFilePath); + return; + } else if (option == "parseXml") { + const jsonObj = []; + parseXmlJson(doc, jsonObj, relativeFilePath); + + const outputFile = path.join( + outputDir, + tableOfContent[relativeFilePath].index + ".json" + ); + const stream = fs.createWriteStream(outputFile); + stream.once("open", fd => { + stream.write(JSON.stringify(jsonObj)); + stream.end(); + }); + } + } catch (error) { + errors.push(path.join(filepath, filename) + " " + error); } return; } @@ -200,12 +209,20 @@ async function recursiveXmlToHtmlInOrder(option) { } } -async function recursiveTranslateXml(filepath, option) { +async function recursiveTranslateXml(filepath, option, lang = "en") { let files; + + if (lang != null) { + filepath = path.join(filepath, lang); + console.log(filepath); + } + const fullPath = path.join(inputDir, filepath); + console.log(fullPath); files = await readdir(fullPath); const promises = []; files.forEach(file => { + console.log(file); if (file.match(/\.xml$/)) { // console.log(file + " being processed"); if ( @@ -222,7 +239,9 @@ async function recursiveTranslateXml(filepath, option) { promises.push(translateXml(filepath, file, option)); } } else if (fs.lstatSync(path.join(fullPath, file)).isDirectory()) { - promises.push(recursiveTranslateXml(path.join(filepath, file), option)); + promises.push( + recursiveTranslateXml(path.join(filepath, file), option, null) + ); } }); await Promise.all(promises); @@ -349,23 +368,53 @@ async function main() { console.log("setup snippets done\n"); recursiveTranslateXml("", "parseXml"); } else if (parseType == "json") { - outputDir = path.join(__dirname, "../json"); - - createMain(); - - console.log("\ngenerate table of content\n"); - await recursiveTranslateXml("", "generateTOC"); - allFilepath = sortTOC(allFilepath); - createTocJson(outputDir); - - console.log("setup snippets and references\n"); - await recursiveXmlToHtmlInOrder("setupSnippet"); - console.log("setup snippets and references done\n"); + const languages = await getDirectories(path.join(__dirname, "../xml")); + languages.sort(function (x, y) { + return x === "en" ? -1 : y === "en" ? 1 : 0; + }); // put "en" at front + console.dir(languages); + + for (const lang of languages) { + outputDir = path.join(__dirname, "../json", lang); + allFilepath = []; + tableOfContent = {}; + + createMain(); + + console.log(`\ngenerate table of content for ${lang}\n`); + await recursiveTranslateXml("", "generateTOC", lang); + allFilepath = sortTOC(allFilepath); + createTocJson(outputDir); + + console.log("setup snippets and references\n"); + await recursiveXmlToHtmlInOrder("setupSnippet"); + console.log("setup snippets and references done\n"); + await recursiveXmlToHtmlInOrder("parseXml"); + // only write search data for English XMLs + // todo: support for other langs + if (lang === "en") { + writeRewritedSearchData(); + } + // this is meant to be temp; also, will remove the original "generateSearchData" after the updation at the frontend is completed. + //testIndexSearch(); + } + } + try { + let summaryLog = "Parsing failed for: "; + const timestamp = new Date().toISOString().replace(/[:.]/g, "-"); + for (const err of errors) { + summaryLog += "\n" + err; + } + const logDir = path.resolve(__dirname, "../logs"); + if (!fs.existsSync(logDir)) { + fs.mkdirSync(logDir, { recursive: true }); + } - await recursiveXmlToHtmlInOrder("parseXml"); - writeRewritedSearchData(); - // this is meant to be temp; also, will remove the original "generateSearchData" after the updation at the frontend is completed. - //testIndexSearch(); + const logPath = path.join(logDir, `json-summary-${timestamp}.log`); + fs.writeFileSync(logPath, summaryLog); + console.log(`Summary log saved to logs/json-summary-${timestamp}.log`); + } catch (logError) { + console.error("Failed to save log file:", logError); } } diff --git a/package.json b/package.json index ee8cb5efe..f3a58fd7b 100644 --- a/package.json +++ b/package.json @@ -57,11 +57,13 @@ "test": "node ./scripts/test.js", "try": "cd docs_out; http-server --cors --port 8080", "tryjson": "http-server --cors --port 8080", - "nodetest": "./scripts/nodetest.sh" + "nodetest": "./scripts/nodetest.sh", + "trans": "cd ./i18n && yarn install && npx tsx index.ts" }, "husky": { "hooks": { "pre-push": "yarn lint" } - } + }, + "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" } diff --git a/xml/Makefile b/xml/en/Makefile similarity index 100% rename from xml/Makefile rename to xml/en/Makefile diff --git a/xml/chapter1/chapter1.xml b/xml/en/chapter1/chapter1.xml similarity index 100% rename from xml/chapter1/chapter1.xml rename to xml/en/chapter1/chapter1.xml diff --git a/xml/chapter1/section1/section1.xml b/xml/en/chapter1/section1/section1.xml similarity index 100% rename from xml/chapter1/section1/section1.xml rename to xml/en/chapter1/section1/section1.xml diff --git a/xml/chapter1/section1/subsection1.xml b/xml/en/chapter1/section1/subsection1.xml similarity index 100% rename from xml/chapter1/section1/subsection1.xml rename to xml/en/chapter1/section1/subsection1.xml diff --git a/xml/chapter1/section1/subsection2.xml b/xml/en/chapter1/section1/subsection2.xml similarity index 100% rename from xml/chapter1/section1/subsection2.xml rename to xml/en/chapter1/section1/subsection2.xml diff --git a/xml/chapter1/section1/subsection3.xml b/xml/en/chapter1/section1/subsection3.xml old mode 100755 new mode 100644 similarity index 100% rename from xml/chapter1/section1/subsection3.xml rename to xml/en/chapter1/section1/subsection3.xml diff --git a/xml/chapter1/section1/subsection4.xml b/xml/en/chapter1/section1/subsection4.xml similarity index 100% rename from xml/chapter1/section1/subsection4.xml rename to xml/en/chapter1/section1/subsection4.xml diff --git a/xml/chapter1/section1/subsection5.xml b/xml/en/chapter1/section1/subsection5.xml similarity index 100% rename from xml/chapter1/section1/subsection5.xml rename to xml/en/chapter1/section1/subsection5.xml diff --git a/xml/chapter1/section1/subsection6.xml b/xml/en/chapter1/section1/subsection6.xml similarity index 100% rename from xml/chapter1/section1/subsection6.xml rename to xml/en/chapter1/section1/subsection6.xml diff --git a/xml/chapter1/section1/subsection7.xml b/xml/en/chapter1/section1/subsection7.xml similarity index 100% rename from xml/chapter1/section1/subsection7.xml rename to xml/en/chapter1/section1/subsection7.xml diff --git a/xml/chapter1/section1/subsection8.xml b/xml/en/chapter1/section1/subsection8.xml similarity index 100% rename from xml/chapter1/section1/subsection8.xml rename to xml/en/chapter1/section1/subsection8.xml diff --git a/xml/chapter1/section2/section2.xml b/xml/en/chapter1/section2/section2.xml similarity index 100% rename from xml/chapter1/section2/section2.xml rename to xml/en/chapter1/section2/section2.xml diff --git a/xml/chapter1/section2/subsection1.xml b/xml/en/chapter1/section2/subsection1.xml similarity index 100% rename from xml/chapter1/section2/subsection1.xml rename to xml/en/chapter1/section2/subsection1.xml diff --git a/xml/chapter1/section2/subsection2.xml b/xml/en/chapter1/section2/subsection2.xml similarity index 100% rename from xml/chapter1/section2/subsection2.xml rename to xml/en/chapter1/section2/subsection2.xml diff --git a/xml/chapter1/section2/subsection3.xml b/xml/en/chapter1/section2/subsection3.xml similarity index 100% rename from xml/chapter1/section2/subsection3.xml rename to xml/en/chapter1/section2/subsection3.xml diff --git a/xml/chapter1/section2/subsection4.xml b/xml/en/chapter1/section2/subsection4.xml similarity index 100% rename from xml/chapter1/section2/subsection4.xml rename to xml/en/chapter1/section2/subsection4.xml diff --git a/xml/chapter1/section2/subsection5.xml b/xml/en/chapter1/section2/subsection5.xml similarity index 100% rename from xml/chapter1/section2/subsection5.xml rename to xml/en/chapter1/section2/subsection5.xml diff --git a/xml/chapter1/section2/subsection6.xml b/xml/en/chapter1/section2/subsection6.xml similarity index 100% rename from xml/chapter1/section2/subsection6.xml rename to xml/en/chapter1/section2/subsection6.xml diff --git a/xml/chapter1/section3/section3.xml b/xml/en/chapter1/section3/section3.xml similarity index 100% rename from xml/chapter1/section3/section3.xml rename to xml/en/chapter1/section3/section3.xml diff --git a/xml/chapter1/section3/subsection1.xml b/xml/en/chapter1/section3/subsection1.xml similarity index 100% rename from xml/chapter1/section3/subsection1.xml rename to xml/en/chapter1/section3/subsection1.xml diff --git a/xml/chapter1/section3/subsection2.xml b/xml/en/chapter1/section3/subsection2.xml similarity index 100% rename from xml/chapter1/section3/subsection2.xml rename to xml/en/chapter1/section3/subsection2.xml diff --git a/xml/chapter1/section3/subsection3.xml b/xml/en/chapter1/section3/subsection3.xml similarity index 100% rename from xml/chapter1/section3/subsection3.xml rename to xml/en/chapter1/section3/subsection3.xml diff --git a/xml/chapter1/section3/subsection4.xml b/xml/en/chapter1/section3/subsection4.xml similarity index 100% rename from xml/chapter1/section3/subsection4.xml rename to xml/en/chapter1/section3/subsection4.xml diff --git a/xml/chapter2/chapter2.xml b/xml/en/chapter2/chapter2.xml similarity index 100% rename from xml/chapter2/chapter2.xml rename to xml/en/chapter2/chapter2.xml diff --git a/xml/chapter2/section1/section1.xml b/xml/en/chapter2/section1/section1.xml similarity index 100% rename from xml/chapter2/section1/section1.xml rename to xml/en/chapter2/section1/section1.xml diff --git a/xml/chapter2/section1/subsection1.xml b/xml/en/chapter2/section1/subsection1.xml similarity index 100% rename from xml/chapter2/section1/subsection1.xml rename to xml/en/chapter2/section1/subsection1.xml diff --git a/xml/chapter2/section1/subsection2.xml b/xml/en/chapter2/section1/subsection2.xml similarity index 100% rename from xml/chapter2/section1/subsection2.xml rename to xml/en/chapter2/section1/subsection2.xml diff --git a/xml/chapter2/section1/subsection3.xml b/xml/en/chapter2/section1/subsection3.xml similarity index 100% rename from xml/chapter2/section1/subsection3.xml rename to xml/en/chapter2/section1/subsection3.xml diff --git a/xml/chapter2/section1/subsection4.xml b/xml/en/chapter2/section1/subsection4.xml similarity index 100% rename from xml/chapter2/section1/subsection4.xml rename to xml/en/chapter2/section1/subsection4.xml diff --git a/xml/chapter2/section2/section2.xml b/xml/en/chapter2/section2/section2.xml similarity index 100% rename from xml/chapter2/section2/section2.xml rename to xml/en/chapter2/section2/section2.xml diff --git a/xml/chapter2/section2/subsection1.xml b/xml/en/chapter2/section2/subsection1.xml similarity index 100% rename from xml/chapter2/section2/subsection1.xml rename to xml/en/chapter2/section2/subsection1.xml diff --git a/xml/chapter2/section2/subsection2.xml b/xml/en/chapter2/section2/subsection2.xml similarity index 100% rename from xml/chapter2/section2/subsection2.xml rename to xml/en/chapter2/section2/subsection2.xml diff --git a/xml/chapter2/section2/subsection3.xml b/xml/en/chapter2/section2/subsection3.xml similarity index 100% rename from xml/chapter2/section2/subsection3.xml rename to xml/en/chapter2/section2/subsection3.xml diff --git a/xml/chapter2/section2/subsection4.xml b/xml/en/chapter2/section2/subsection4.xml similarity index 100% rename from xml/chapter2/section2/subsection4.xml rename to xml/en/chapter2/section2/subsection4.xml diff --git a/xml/chapter2/section3/section3.xml b/xml/en/chapter2/section3/section3.xml similarity index 100% rename from xml/chapter2/section3/section3.xml rename to xml/en/chapter2/section3/section3.xml diff --git a/xml/chapter2/section3/subsection1.xml b/xml/en/chapter2/section3/subsection1.xml similarity index 100% rename from xml/chapter2/section3/subsection1.xml rename to xml/en/chapter2/section3/subsection1.xml diff --git a/xml/chapter2/section3/subsection2.xml b/xml/en/chapter2/section3/subsection2.xml similarity index 100% rename from xml/chapter2/section3/subsection2.xml rename to xml/en/chapter2/section3/subsection2.xml diff --git a/xml/chapter2/section3/subsection3.xml b/xml/en/chapter2/section3/subsection3.xml similarity index 100% rename from xml/chapter2/section3/subsection3.xml rename to xml/en/chapter2/section3/subsection3.xml diff --git a/xml/chapter2/section3/subsection4.xml b/xml/en/chapter2/section3/subsection4.xml similarity index 100% rename from xml/chapter2/section3/subsection4.xml rename to xml/en/chapter2/section3/subsection4.xml diff --git a/xml/chapter2/section4/section4.xml b/xml/en/chapter2/section4/section4.xml similarity index 100% rename from xml/chapter2/section4/section4.xml rename to xml/en/chapter2/section4/section4.xml diff --git a/xml/chapter2/section4/subsection1.xml b/xml/en/chapter2/section4/subsection1.xml similarity index 100% rename from xml/chapter2/section4/subsection1.xml rename to xml/en/chapter2/section4/subsection1.xml diff --git a/xml/chapter2/section4/subsection2.xml b/xml/en/chapter2/section4/subsection2.xml similarity index 100% rename from xml/chapter2/section4/subsection2.xml rename to xml/en/chapter2/section4/subsection2.xml diff --git a/xml/chapter2/section4/subsection3.xml b/xml/en/chapter2/section4/subsection3.xml similarity index 100% rename from xml/chapter2/section4/subsection3.xml rename to xml/en/chapter2/section4/subsection3.xml diff --git a/xml/chapter2/section5/section5.xml b/xml/en/chapter2/section5/section5.xml similarity index 100% rename from xml/chapter2/section5/section5.xml rename to xml/en/chapter2/section5/section5.xml diff --git a/xml/chapter2/section5/subsection1.xml b/xml/en/chapter2/section5/subsection1.xml similarity index 100% rename from xml/chapter2/section5/subsection1.xml rename to xml/en/chapter2/section5/subsection1.xml diff --git a/xml/chapter2/section5/subsection2.xml b/xml/en/chapter2/section5/subsection2.xml similarity index 100% rename from xml/chapter2/section5/subsection2.xml rename to xml/en/chapter2/section5/subsection2.xml diff --git a/xml/chapter2/section5/subsection3.xml b/xml/en/chapter2/section5/subsection3.xml similarity index 100% rename from xml/chapter2/section5/subsection3.xml rename to xml/en/chapter2/section5/subsection3.xml diff --git a/xml/chapter3/chapter3.xml b/xml/en/chapter3/chapter3.xml similarity index 100% rename from xml/chapter3/chapter3.xml rename to xml/en/chapter3/chapter3.xml diff --git a/xml/chapter3/section1/section1.xml b/xml/en/chapter3/section1/section1.xml similarity index 100% rename from xml/chapter3/section1/section1.xml rename to xml/en/chapter3/section1/section1.xml diff --git a/xml/chapter3/section1/subsection1.xml b/xml/en/chapter3/section1/subsection1.xml similarity index 100% rename from xml/chapter3/section1/subsection1.xml rename to xml/en/chapter3/section1/subsection1.xml diff --git a/xml/chapter3/section1/subsection2.xml b/xml/en/chapter3/section1/subsection2.xml similarity index 100% rename from xml/chapter3/section1/subsection2.xml rename to xml/en/chapter3/section1/subsection2.xml diff --git a/xml/chapter3/section1/subsection3.xml b/xml/en/chapter3/section1/subsection3.xml similarity index 100% rename from xml/chapter3/section1/subsection3.xml rename to xml/en/chapter3/section1/subsection3.xml diff --git a/xml/chapter3/section2/section2.xml b/xml/en/chapter3/section2/section2.xml similarity index 100% rename from xml/chapter3/section2/section2.xml rename to xml/en/chapter3/section2/section2.xml diff --git a/xml/chapter3/section2/subsection1.xml b/xml/en/chapter3/section2/subsection1.xml similarity index 100% rename from xml/chapter3/section2/subsection1.xml rename to xml/en/chapter3/section2/subsection1.xml diff --git a/xml/chapter3/section2/subsection2.xml b/xml/en/chapter3/section2/subsection2.xml similarity index 100% rename from xml/chapter3/section2/subsection2.xml rename to xml/en/chapter3/section2/subsection2.xml diff --git a/xml/chapter3/section2/subsection3.xml b/xml/en/chapter3/section2/subsection3.xml similarity index 100% rename from xml/chapter3/section2/subsection3.xml rename to xml/en/chapter3/section2/subsection3.xml diff --git a/xml/chapter3/section2/subsection4.xml b/xml/en/chapter3/section2/subsection4.xml similarity index 100% rename from xml/chapter3/section2/subsection4.xml rename to xml/en/chapter3/section2/subsection4.xml diff --git a/xml/chapter3/section2/subsection5.xml b/xml/en/chapter3/section2/subsection5.xml similarity index 100% rename from xml/chapter3/section2/subsection5.xml rename to xml/en/chapter3/section2/subsection5.xml diff --git a/xml/chapter3/section3/section3.xml b/xml/en/chapter3/section3/section3.xml similarity index 100% rename from xml/chapter3/section3/section3.xml rename to xml/en/chapter3/section3/section3.xml diff --git a/xml/chapter3/section3/subsection1.xml b/xml/en/chapter3/section3/subsection1.xml similarity index 100% rename from xml/chapter3/section3/subsection1.xml rename to xml/en/chapter3/section3/subsection1.xml diff --git a/xml/chapter3/section3/subsection2.xml b/xml/en/chapter3/section3/subsection2.xml similarity index 100% rename from xml/chapter3/section3/subsection2.xml rename to xml/en/chapter3/section3/subsection2.xml diff --git a/xml/chapter3/section3/subsection3.xml b/xml/en/chapter3/section3/subsection3.xml similarity index 100% rename from xml/chapter3/section3/subsection3.xml rename to xml/en/chapter3/section3/subsection3.xml diff --git a/xml/chapter3/section3/subsection4.xml b/xml/en/chapter3/section3/subsection4.xml old mode 100755 new mode 100644 similarity index 100% rename from xml/chapter3/section3/subsection4.xml rename to xml/en/chapter3/section3/subsection4.xml diff --git a/xml/chapter3/section3/subsection5.xml b/xml/en/chapter3/section3/subsection5.xml old mode 100755 new mode 100644 similarity index 100% rename from xml/chapter3/section3/subsection5.xml rename to xml/en/chapter3/section3/subsection5.xml diff --git a/xml/chapter3/section4/section4.xml b/xml/en/chapter3/section4/section4.xml similarity index 100% rename from xml/chapter3/section4/section4.xml rename to xml/en/chapter3/section4/section4.xml diff --git a/xml/chapter3/section4/subsection1.xml b/xml/en/chapter3/section4/subsection1.xml similarity index 100% rename from xml/chapter3/section4/subsection1.xml rename to xml/en/chapter3/section4/subsection1.xml diff --git a/xml/chapter3/section4/subsection2.xml b/xml/en/chapter3/section4/subsection2.xml old mode 100755 new mode 100644 similarity index 100% rename from xml/chapter3/section4/subsection2.xml rename to xml/en/chapter3/section4/subsection2.xml diff --git a/xml/chapter3/section5/section5.xml b/xml/en/chapter3/section5/section5.xml similarity index 100% rename from xml/chapter3/section5/section5.xml rename to xml/en/chapter3/section5/section5.xml diff --git a/xml/chapter3/section5/subsection1.xml b/xml/en/chapter3/section5/subsection1.xml similarity index 100% rename from xml/chapter3/section5/subsection1.xml rename to xml/en/chapter3/section5/subsection1.xml diff --git a/xml/chapter3/section5/subsection2.xml b/xml/en/chapter3/section5/subsection2.xml similarity index 100% rename from xml/chapter3/section5/subsection2.xml rename to xml/en/chapter3/section5/subsection2.xml diff --git a/xml/chapter3/section5/subsection3.xml b/xml/en/chapter3/section5/subsection3.xml similarity index 100% rename from xml/chapter3/section5/subsection3.xml rename to xml/en/chapter3/section5/subsection3.xml diff --git a/xml/chapter3/section5/subsection4.xml b/xml/en/chapter3/section5/subsection4.xml similarity index 100% rename from xml/chapter3/section5/subsection4.xml rename to xml/en/chapter3/section5/subsection4.xml diff --git a/xml/chapter3/section5/subsection5.xml b/xml/en/chapter3/section5/subsection5.xml similarity index 100% rename from xml/chapter3/section5/subsection5.xml rename to xml/en/chapter3/section5/subsection5.xml diff --git a/xml/chapter4/chapter4.xml b/xml/en/chapter4/chapter4.xml similarity index 100% rename from xml/chapter4/chapter4.xml rename to xml/en/chapter4/chapter4.xml diff --git a/xml/chapter4/section1/section1.xml b/xml/en/chapter4/section1/section1.xml similarity index 100% rename from xml/chapter4/section1/section1.xml rename to xml/en/chapter4/section1/section1.xml diff --git a/xml/chapter4/section1/subsection1.xml b/xml/en/chapter4/section1/subsection1.xml similarity index 100% rename from xml/chapter4/section1/subsection1.xml rename to xml/en/chapter4/section1/subsection1.xml diff --git a/xml/chapter4/section1/subsection2.xml b/xml/en/chapter4/section1/subsection2.xml similarity index 100% rename from xml/chapter4/section1/subsection2.xml rename to xml/en/chapter4/section1/subsection2.xml diff --git a/xml/chapter4/section1/subsection3.xml b/xml/en/chapter4/section1/subsection3.xml similarity index 100% rename from xml/chapter4/section1/subsection3.xml rename to xml/en/chapter4/section1/subsection3.xml diff --git a/xml/chapter4/section1/subsection4.xml b/xml/en/chapter4/section1/subsection4.xml similarity index 100% rename from xml/chapter4/section1/subsection4.xml rename to xml/en/chapter4/section1/subsection4.xml diff --git a/xml/chapter4/section1/subsection5.xml b/xml/en/chapter4/section1/subsection5.xml similarity index 100% rename from xml/chapter4/section1/subsection5.xml rename to xml/en/chapter4/section1/subsection5.xml diff --git a/xml/chapter4/section1/subsection6.xml b/xml/en/chapter4/section1/subsection6.xml similarity index 100% rename from xml/chapter4/section1/subsection6.xml rename to xml/en/chapter4/section1/subsection6.xml diff --git a/xml/chapter4/section1/subsection7.xml b/xml/en/chapter4/section1/subsection7.xml similarity index 100% rename from xml/chapter4/section1/subsection7.xml rename to xml/en/chapter4/section1/subsection7.xml diff --git a/xml/chapter4/section2/section2.xml b/xml/en/chapter4/section2/section2.xml similarity index 100% rename from xml/chapter4/section2/section2.xml rename to xml/en/chapter4/section2/section2.xml diff --git a/xml/chapter4/section2/subsection1.xml b/xml/en/chapter4/section2/subsection1.xml similarity index 100% rename from xml/chapter4/section2/subsection1.xml rename to xml/en/chapter4/section2/subsection1.xml diff --git a/xml/chapter4/section2/subsection2.xml b/xml/en/chapter4/section2/subsection2.xml similarity index 100% rename from xml/chapter4/section2/subsection2.xml rename to xml/en/chapter4/section2/subsection2.xml diff --git a/xml/chapter4/section2/subsection3.xml b/xml/en/chapter4/section2/subsection3.xml similarity index 100% rename from xml/chapter4/section2/subsection3.xml rename to xml/en/chapter4/section2/subsection3.xml diff --git a/xml/chapter4/section3/section3.xml b/xml/en/chapter4/section3/section3.xml similarity index 100% rename from xml/chapter4/section3/section3.xml rename to xml/en/chapter4/section3/section3.xml diff --git a/xml/chapter4/section3/subsection1.xml b/xml/en/chapter4/section3/subsection1.xml similarity index 100% rename from xml/chapter4/section3/subsection1.xml rename to xml/en/chapter4/section3/subsection1.xml diff --git a/xml/chapter4/section3/subsection2.xml b/xml/en/chapter4/section3/subsection2.xml similarity index 100% rename from xml/chapter4/section3/subsection2.xml rename to xml/en/chapter4/section3/subsection2.xml diff --git a/xml/chapter4/section3/subsection3.xml b/xml/en/chapter4/section3/subsection3.xml similarity index 100% rename from xml/chapter4/section3/subsection3.xml rename to xml/en/chapter4/section3/subsection3.xml diff --git a/xml/chapter4/section4/section4.xml b/xml/en/chapter4/section4/section4.xml similarity index 100% rename from xml/chapter4/section4/section4.xml rename to xml/en/chapter4/section4/section4.xml diff --git a/xml/chapter4/section4/subsection1.xml b/xml/en/chapter4/section4/subsection1.xml similarity index 100% rename from xml/chapter4/section4/subsection1.xml rename to xml/en/chapter4/section4/subsection1.xml diff --git a/xml/chapter4/section4/subsection2.xml b/xml/en/chapter4/section4/subsection2.xml similarity index 100% rename from xml/chapter4/section4/subsection2.xml rename to xml/en/chapter4/section4/subsection2.xml diff --git a/xml/chapter4/section4/subsection3.xml b/xml/en/chapter4/section4/subsection3.xml similarity index 100% rename from xml/chapter4/section4/subsection3.xml rename to xml/en/chapter4/section4/subsection3.xml diff --git a/xml/chapter4/section4/subsection4.xml b/xml/en/chapter4/section4/subsection4.xml similarity index 100% rename from xml/chapter4/section4/subsection4.xml rename to xml/en/chapter4/section4/subsection4.xml diff --git a/xml/chapter5/chapter5.xml b/xml/en/chapter5/chapter5.xml similarity index 100% rename from xml/chapter5/chapter5.xml rename to xml/en/chapter5/chapter5.xml diff --git a/xml/chapter5/section1/section1.xml b/xml/en/chapter5/section1/section1.xml similarity index 100% rename from xml/chapter5/section1/section1.xml rename to xml/en/chapter5/section1/section1.xml diff --git a/xml/chapter5/section1/subsection1.xml b/xml/en/chapter5/section1/subsection1.xml similarity index 100% rename from xml/chapter5/section1/subsection1.xml rename to xml/en/chapter5/section1/subsection1.xml diff --git a/xml/chapter5/section1/subsection2.xml b/xml/en/chapter5/section1/subsection2.xml similarity index 100% rename from xml/chapter5/section1/subsection2.xml rename to xml/en/chapter5/section1/subsection2.xml diff --git a/xml/chapter5/section1/subsection3.xml b/xml/en/chapter5/section1/subsection3.xml similarity index 100% rename from xml/chapter5/section1/subsection3.xml rename to xml/en/chapter5/section1/subsection3.xml diff --git a/xml/chapter5/section1/subsection4.xml b/xml/en/chapter5/section1/subsection4.xml similarity index 100% rename from xml/chapter5/section1/subsection4.xml rename to xml/en/chapter5/section1/subsection4.xml diff --git a/xml/chapter5/section1/subsection5.xml b/xml/en/chapter5/section1/subsection5.xml similarity index 100% rename from xml/chapter5/section1/subsection5.xml rename to xml/en/chapter5/section1/subsection5.xml diff --git a/xml/chapter5/section2/section2.xml b/xml/en/chapter5/section2/section2.xml similarity index 100% rename from xml/chapter5/section2/section2.xml rename to xml/en/chapter5/section2/section2.xml diff --git a/xml/chapter5/section2/subsection1.xml b/xml/en/chapter5/section2/subsection1.xml similarity index 100% rename from xml/chapter5/section2/subsection1.xml rename to xml/en/chapter5/section2/subsection1.xml diff --git a/xml/chapter5/section2/subsection2.xml b/xml/en/chapter5/section2/subsection2.xml similarity index 100% rename from xml/chapter5/section2/subsection2.xml rename to xml/en/chapter5/section2/subsection2.xml diff --git a/xml/chapter5/section2/subsection3.xml b/xml/en/chapter5/section2/subsection3.xml similarity index 100% rename from xml/chapter5/section2/subsection3.xml rename to xml/en/chapter5/section2/subsection3.xml diff --git a/xml/chapter5/section2/subsection4.xml b/xml/en/chapter5/section2/subsection4.xml similarity index 100% rename from xml/chapter5/section2/subsection4.xml rename to xml/en/chapter5/section2/subsection4.xml diff --git a/xml/chapter5/section3/section3.xml b/xml/en/chapter5/section3/section3.xml similarity index 100% rename from xml/chapter5/section3/section3.xml rename to xml/en/chapter5/section3/section3.xml diff --git a/xml/chapter5/section3/subsection1.xml b/xml/en/chapter5/section3/subsection1.xml similarity index 100% rename from xml/chapter5/section3/subsection1.xml rename to xml/en/chapter5/section3/subsection1.xml diff --git a/xml/chapter5/section3/subsection2.xml b/xml/en/chapter5/section3/subsection2.xml similarity index 100% rename from xml/chapter5/section3/subsection2.xml rename to xml/en/chapter5/section3/subsection2.xml diff --git a/xml/chapter5/section4/section4.xml b/xml/en/chapter5/section4/section4.xml similarity index 100% rename from xml/chapter5/section4/section4.xml rename to xml/en/chapter5/section4/section4.xml diff --git a/xml/chapter5/section4/subsection1.xml b/xml/en/chapter5/section4/subsection1.xml similarity index 100% rename from xml/chapter5/section4/subsection1.xml rename to xml/en/chapter5/section4/subsection1.xml diff --git a/xml/chapter5/section4/subsection2.xml b/xml/en/chapter5/section4/subsection2.xml similarity index 100% rename from xml/chapter5/section4/subsection2.xml rename to xml/en/chapter5/section4/subsection2.xml diff --git a/xml/chapter5/section4/subsection3.xml b/xml/en/chapter5/section4/subsection3.xml similarity index 100% rename from xml/chapter5/section4/subsection3.xml rename to xml/en/chapter5/section4/subsection3.xml diff --git a/xml/chapter5/section4/subsection4.xml b/xml/en/chapter5/section4/subsection4.xml similarity index 100% rename from xml/chapter5/section4/subsection4.xml rename to xml/en/chapter5/section4/subsection4.xml diff --git a/xml/chapter5/section5/section5.xml b/xml/en/chapter5/section5/section5.xml similarity index 100% rename from xml/chapter5/section5/section5.xml rename to xml/en/chapter5/section5/section5.xml diff --git a/xml/chapter5/section5/subsection1.xml b/xml/en/chapter5/section5/subsection1.xml similarity index 100% rename from xml/chapter5/section5/subsection1.xml rename to xml/en/chapter5/section5/subsection1.xml diff --git a/xml/chapter5/section5/subsection2.xml b/xml/en/chapter5/section5/subsection2.xml similarity index 100% rename from xml/chapter5/section5/subsection2.xml rename to xml/en/chapter5/section5/subsection2.xml diff --git a/xml/chapter5/section5/subsection3.xml b/xml/en/chapter5/section5/subsection3.xml similarity index 100% rename from xml/chapter5/section5/subsection3.xml rename to xml/en/chapter5/section5/subsection3.xml diff --git a/xml/chapter5/section5/subsection4.xml b/xml/en/chapter5/section5/subsection4.xml similarity index 100% rename from xml/chapter5/section5/subsection4.xml rename to xml/en/chapter5/section5/subsection4.xml diff --git a/xml/chapter5/section5/subsection5.xml b/xml/en/chapter5/section5/subsection5.xml similarity index 100% rename from xml/chapter5/section5/subsection5.xml rename to xml/en/chapter5/section5/subsection5.xml diff --git a/xml/chapter5/section5/subsection6.xml b/xml/en/chapter5/section5/subsection6.xml similarity index 100% rename from xml/chapter5/section5/subsection6.xml rename to xml/en/chapter5/section5/subsection6.xml diff --git a/xml/chapter5/section5/subsection7.xml b/xml/en/chapter5/section5/subsection7.xml similarity index 100% rename from xml/chapter5/section5/subsection7.xml rename to xml/en/chapter5/section5/subsection7.xml diff --git a/xml/contents.ent b/xml/en/contents.ent similarity index 100% rename from xml/contents.ent rename to xml/en/contents.ent diff --git a/xml/others/02foreword02.xml b/xml/en/others/02foreword02.xml similarity index 100% rename from xml/others/02foreword02.xml rename to xml/en/others/02foreword02.xml diff --git a/xml/others/02foreword84.xml b/xml/en/others/02foreword84.xml similarity index 100% rename from xml/others/02foreword84.xml rename to xml/en/others/02foreword84.xml diff --git a/xml/others/03prefaces03.xml b/xml/en/others/03prefaces03.xml similarity index 100% rename from xml/others/03prefaces03.xml rename to xml/en/others/03prefaces03.xml diff --git a/xml/others/03prefaces96.xml b/xml/en/others/03prefaces96.xml similarity index 100% rename from xml/others/03prefaces96.xml rename to xml/en/others/03prefaces96.xml diff --git a/xml/others/04acknowledgements04.xml b/xml/en/others/04acknowledgements04.xml similarity index 100% rename from xml/others/04acknowledgements04.xml rename to xml/en/others/04acknowledgements04.xml diff --git a/xml/others/06see06.xml b/xml/en/others/06see06.xml similarity index 100% rename from xml/others/06see06.xml rename to xml/en/others/06see06.xml diff --git a/xml/others/97references97.xml b/xml/en/others/97references97.xml similarity index 100% rename from xml/others/97references97.xml rename to xml/en/others/97references97.xml diff --git a/xml/others/98indexpreface98.xml b/xml/en/others/98indexpreface98.xml similarity index 100% rename from xml/others/98indexpreface98.xml rename to xml/en/others/98indexpreface98.xml diff --git a/xml/others/99making99.xml b/xml/en/others/99making99.xml similarity index 100% rename from xml/others/99making99.xml rename to xml/en/others/99making99.xml