spec: debugger() 恒为暂停;补 ndarray / duration 用例(3 条钉住实现缺口) - #350
Merged
Merged
Conversation
原文说「非调试模式下为 no-op」,但 runtime 根本没有调试模式这个概念:`debugger()`
就是源码内联暂停点,恒置 ‥status=paused。把 no-op 那条分支从规范里删掉——留着它
就等于留了一条「同一个内建有两种行为」的路,而 runtime 里没有对应的开关。
- 02-kvspace模型/10-系统变量:§debugger() 去掉模式之分,只说恒 ≡ vthread·setstatus("paused")
- 附录/07-内建函数:builtin 注释同步
- 05-runtime语义/02-执行模型-续:锚例列表去掉已不存在的 fib.kv
- tutorial/09-debugger/pauses.kv:锁住该语义(debugger() 之后的指令不运行)
Co-Authored-By: Claude Code <noreply@anthropic.com>
规范依据 02-kvspace模型/07-数组两种物理形态:array·append / array·slice 作用于 compact 数组时要先自动 scatter,即 compact 必须能直接 append / slice,调用方不必 先手动散开。 两个用例当前 FAIL(numel 返 0 而非 4 / 2),钉住的正是这条规范与实现之间的缺口。 Co-Authored-By: Claude Code <noreply@anthropic.com>
time/duration·sub 与 add 是同族对称算子,实现必须按 opcode 区分。用例当前 FAIL: 5h - 3h 打出 8(= 5 + 3),说明 sub 走到了加法分支。 Co-Authored-By: Claude Code <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
三组独立改动,按主题分三个 commit。
1. spec:
debugger()恒为暂停原文说「非调试模式下为 no-op」,但 runtime 根本没有调试模式这个概念:
debugger()就是源码内联暂停点,恒置‥status=paused。留着 no-op 那条分支等于留了一条「同一个内建有两种行为」的路,而 runtime 里没有对应开关 —— 按规范驱动原则删掉。02-kvspace模型/10-系统变量:§debugger()去掉模式之分,只说恒 ≡vthread·setstatus("paused")附录/07-内建函数:builtin 注释同步05-runtime语义/02-执行模型-续:锚例列表去掉已不存在的fib.kvtutorial/09-debugger/pauses.kv:锁住该语义(debugger()之后的指令不运行)✅2 & 3. 新增用例(当前 FAIL,钉住实现缺口)
04-ndarray/array_append.kv4004-ndarray/array_slice.kv2013-stdlib/duration/sub.kv285h-3h打出5+3:sub走到加法分支,未按 opcode 区分三条都没有
// wip/// extern标记,是当活用例写的,故预期 CI 双后端皆红(shm 另有既存的列举分歧两条,与本 PR 无关)。🤖 Generated with Claude Code