A rational coefficient beside a variable never reaches a fixed point at the safe ceiling
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
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分
- マージ済み PR(30日)
- 507
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ASC-Community/AngouriMath のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
ASC-Community/AngouriMath#1807 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
ASC-Community/AngouriMath#1692 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
ASC-Community/AngouriMath#1690 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
ASC-Community/AngouriMath#1689 · コメント 5 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
ASC-Community/AngouriMath#1684 ·
メンテナーはふだん 1 日以内に返信
ASC-Community/AngouriMath の issue をすべて見る
似ている issue
-
Bug pulumi/pulumi
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
activescott/lessmsi#306 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
HTML sitemap lists unpublished pages対応中かも @KrzysztofPajak が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
grandnode/grandnode2#883 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信