A rational coefficient beside a variable never reaches a fixed point at the safe ceiling
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
从 ConstantFoldTest.ACoefficientBesideAVariableStallsRatherThanRunsAway 和 RunawayBreadthTest 开始,以复现测得的饱和行为。阅读 issue 中提到的 Rearranges 和 Common 规则,然后确定有理系数正规形或单向规则定向是否合适;完成的要求是得到一个有界且终止的结果,并具备所描述的回归覆盖。
由索引模型根据 Issue 内容生成。
描述
At the safe ceiling (RulesUpTo(Rearranges)), seven of the 3,630 shapes in the growth corpus never
report a fixed point, and they are one family: a rational coefficient beside a variable.
Measured (build 98a9420c, after #1198)
WorkBudget { Steps = 200_000, Time = 30 s }, one input per graph:
| input | fixed point | e-nodes after 30 s | e-nodes after 2 s | extracted |
|---|---|---|---|---|
2 * x * 1/2 |
no | 158 | — | x |
x * 1/2 * 2 |
no | 135 | — | x |
(2 - 0) * x * 1/2 |
no | 159 | 182 | x |
x / x * -x |
no | 583 | 464 | -x |
x / x * x * 1/2 |
no | 249 | 282 | x / 2 |
x / x * x ^ (-2) |
no | 317 | 291 | x ^ (-2) |
1 / (1/2) * x * 1/2 |
no | 159 | 181 | x |
x ^ 2 / x |
no | 145 | 109 | x |
2 ^ (-1) / sqrt(1/2) |
no, step ceiling | 1,565 | 1,072 | sqrt(1/2) |
So this is a stall, not a runaway: the graph barely grows with fifteen times the budget, and
every extraction is right. ConstantFoldTest.ACoefficientBesideAVariableStallsRatherThanRunsAway
pins it in both directions — an entry that starts saturating is to be deleted, and one that grows
past a thousand e-nodes has stopped being a stall.
What it is
The spellings of a coefficient beside a variable — 1/2 * x, x / 2, x * 2 ^ (-1),
2 ^ (-1) * x — are exchanged by Rearranges rules (a-reciprocal-rational-factor-is-a-division,
a-reciprocal-power-is-a-quotient, the quotient and product regrouping rules of Common), and a
fresh spelling keeps appearing at the edge of what has been rewritten, so a pass never comes back
empty. Before #1198 the same rules ran away on constant-only input (2 - 0 + 0 * 2, 54 cases),
because with nothing folding a number the spellings were unbounded; folding rationals on
insertion bounded the family without closing it. RunawayBreadthTest had called these rules
"confluent on plain arithmetic" from three inputs; it now says what was measured.
What would close it, not decided
Either a normal form for a rational coefficient inside the graph — c * x with c a literal,
folded on insertion the way a rational over rationals now is — or an orientation among the
spelling rules so that only one direction fires under saturation. The first is a mechanism; the
second is what the growth ceiling already does for expanding rules and would need a marker for
"rearranges, but one way". Neither is worth doing until something calls the graph on this shape;
Transformation.CanonicalizationOverGraph is offered, not applied.
Found while measuring #746 tier 2 item 4 (PR #1198). Related: the budget overshoot on these
same inputs, filed separately.
- 主要语言
- C#
- 星标
- 831
- 派生
- 79
- 平均合并
- 2 小时 22 分钟
- 30 天内合并 PR
- 507
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
ASC-Community/AngouriMath 的其他 Issue
-
难度 5/5 一周以上 新手友好度 30/100
ASC-Community/AngouriMath#1807 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 25/100
ASC-Community/AngouriMath#1692 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 30/100
ASC-Community/AngouriMath#1690 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 48/100
ASC-Community/AngouriMath#1689 · 5 条评论 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 35/100
ASC-Community/AngouriMath#1684 ·
维护者通常 1 天内回复
查看 ASC-Community/AngouriMath 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 62/100
PCL-Community/PCL-CE#3658 ·
维护者通常 1 天内回复
-
Deploy & Patch-issues opprettes ikke: create-pnd-issues.yml har feilet hver uke siden 2025-09-08未关闭
难度 2/5 1-3 小时 新手友好度 62/100
Altinn/altinn-auth#4359 ·
维护者通常 1 天内回复
-
type/automation type/tech-debt
难度 1/5 1 小时以内 新手友好度 72/100
维护者通常 1 天内回复
-
no-stack-trace
难度 2/5 1-3 小时 新手友好度 83/100
维护者通常 1 天内回复
-
S: Untriaged
难度 2/5 1-3 小时 新手友好度 62/100
project-wayfarer/wayfarer-14#1650 ·
维护者通常 2 天内回复