Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

A rational coefficient beside a variable never reaches a fixed point at the safe ceiling

未关闭
#1,200 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
csharp
领域
backend

调研方向

从 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 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

ASC-Community/AngouriMath 的其他 Issue

查看 ASC-Community/AngouriMath 的全部 Issue

相似的 Issue

更多 C# Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。