Skip to content

[PR] fix(verif): emit str.substr so cvc5 can parse slice queries — 3691 harness was silently solver-dead - #3980

Merged
ranxianglei merged 1 commit into
masterfrom
2026-10-20_verif-str-substr
Oct 20, 2026
Merged

ranxianglei merged 1 commit into
masterfrom
2026-10-20_verif-str-substr

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

(ai: zhipuai-lb/glm-5.3)

What broke

verif/terms.ts 序列 facade 的 extract() 发射 (str.extract s i j),但 cvc5 的 SMT-LIB 解析器只认识 str.substr。任何触到 String#slice 翻译的 query 在 InputParser.nextCommand 直接抛 RuntimeError: Symbol 'str.extract' not declared as a variable,而 harness 的 catch 把求解器异常转成 静默 skip。

自 #3935 截断窗口改造使截断 slice 偏移变成符号量后,bug3691 振荡 harness 在 master 上一直是 solver-dead —— 覆盖率丢了却没有红灯。

Fix

一行:发射名 str.extract → str.substr(z3 同样接受)。

Evidence

  • 修前:verif-bug3691-oscillation.test.ts 1 pass / 1 skipped(master 805c0a5 与 74090ac 均复现,cvc5 直接解析报错)
  • 修后:全套 verif 15/15 pass,0 skipped(VERIF_PYTHON=/tmp/verifenv12/bin/python)

Scope

仅 verif/ 一行,无 kernel 改动,与 #3961(wire 保真)无文件冲突。

Part of #3938(判官/证明层可用性)。

The Seq facade emitted (str.extract s i j); cvc5's SMT-LIB parser only
knows str.substr, so every query touching the String#slice translation
died in InputParser.nextCommand and the harness catch turned that into a
silent skip. Since the #3935 clip-window rework made the truncation
slice offsets symbolic, the bug3691 oscillation harness has been
solver-dead on master - coverage lost with no red signal.

Renamed to str.substr (also valid z3 syntax). Full verif suite: 15/15
pass, 0 skipped (was 14/15 with 1 silent skip).
@github-actions

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-10-20_verif-str-substr (d938b32)

Option A — Install this exact build (recommended)

npm install -g billion-context@0.0.4756-pr.3980.845a5bb

This exact version is immutable and reproducible. The rolling pr tag tracks the newest test build across all PRs.

Option B — Download artifact

  1. Download the artifact from the Actions run
  2. Extract the tarball and install:
tar xzf billion-context-pr3980.tgz
npm install -g package

Install instructions are refreshed on each push.

@ranxianglei ranxianglei changed the title fix(verif): emit str.substr so cvc5 can parse slice queries — 3691 harness was silently solver-dead [PR] fix(verif): emit str.substr so cvc5 can parse slice queries — 3691 harness was silently solver-dead Oct 20, 2026
@ranxianglei
ranxianglei merged commit 8589423 into master Oct 20, 2026
36 of 40 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

📦 Merged Build Published

This merge to master was published as 0.0.682-master.8589423 (rolling master tag).

npm install -g billion-context@0.0.682-master.8589423  # this exact build
npm install -g billion-context@master  # always the newest merged build

npm view billion-context@master prints the current version at any time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant