The number layer on the next runtime is at a stop after three failed reviews

オープン
#78 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
8/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
lua
領域
compilers

調査の方向性

Read the three review findings, the current number-layer ledger, and tools/numlines.sh; start by resolving the pinned runtime behavior tracked in InauguralSystems/EigenScript#2444. Then define and generate the blind review bar covering the listed numeric operations and operand classes, and record its head count with named exclusions. Done means a builder brings the count to zero or documents runtime limits, the ledger is regenerated, an independent review passes, and pull request #77's row is updated.

索引モデルが issue の本文から書いたものです。

説明

Where this stands. Pull request #77 moves this repository to the next EigenScript runtime, whose number model changed (a number is an exact 64-bit integer or an IEEE double; infinities exist). Its number layer has had three sets of builder rounds, each followed by an independent review against the reference Lua. All three reviews failed it in the same layer:

review head measured on its largest gap
1 192a2d65 the reviewer's own differentials a float of magnitude 2^63 or more printed as inf
2 f6911e8c 1,091 new expressions, each three ways, and 80 with real non-finite values math.fmod on floats wrong and worse than before the change, charged to a runtime gap that did not exist; infinity and NaN reaching the runtime's floor, ceil, abs
3 612c9fd3 five new classes again the numeric for loop when its iteration count reaches 2^63

The third review's reproducer (the reference prints 0, -9223372036854775808, 1, end; this branch stops with integer overflow in '-'; before the change it matched the reference):

for i = 0, math.huge do print(i) break end
for i = math.mininteger, math.maxinteger do print(i) break end
for i = 1, math.mininteger, -1 do print(i) break end
print("end")

Also from the third review, each reproduced against the reference and none recorded in the ledger:

  • Infinity and NaN still reach the runtime's sqrt, exp, log, the trigonometric functions, ^ and string.pack('d'/'n'), which raise expected a finite number. The last round's census looked at six builtin names. math.atan(math.huge) and string.pack('d', math.huge) were right before the change.
  • string.format('%E', math.huge) (also %G, %A) raises undefined variable 'upper'.
  • Repairs of the last round that are wrong by the reference: math.fmod(-0.0, 1) gives 0.0 (the head before it gave -0.0); for i = 1, 0/0, -1 is skipped (the reference runs it); table.unpack's limit of 999987 is one measured point (the reference's limit moved between 999932 and 999972 in the review's runs).
  • The ledger's new math.lua row is false: its first failure is line 450 (a NUL in a string), not line 106.
  • tools/numlines.sh exits 2 on a clean head, because one of the second review's files stops at its own last line on both sides.

What holds (the third review, by execution): tools/numlines.sh on its fourteen rows gives TOTAL differ=3 incomplete=0 as claimed, tools/review2/ is byte-identical to the second reviewer's files, the early-death plant and an undone repair both move the count; the D side of the grade is as claimed (D=165/172); this repository's own CI is green on the head.

The stop. A piece that fails three independent reviews of one kind is not patched a fourth time. What the three have in common: each round repaired the expressions a review had written, and the next review wrote new ones and found the same kind of fault somewhere the last population did not reach. The number layer here is many separate rules over a runtime whose own number functions refuse values that Lua's accept, and no round had the whole of it in view.

Two things change before another round:

  1. The runtime's side is decided first. Most of what the last two reviews found is one fact: the runtime produces infinity by default and its math builtins refuse it as an argument (InauguralSystems/EigenScript#2444). If those builtins take the IEEE answer, most guards here are not needed and the ones nobody wrote stop mattering. A round written before that decision is written against a moving runtime.
  2. A bar first, generated, reviewed blind before a builder gets it (as InauguralSystems/eigen-sheet#104 does for its number layer): every place a Lua number goes (each arithmetic and bitwise operator, comparison, the numeric for with each kind of start, limit and step, each conversion, each string.format conversion, each function of math, the string functions that take a count or a position, table keys) crossed with operand classes (the ends of the integer range, 2^53 and its neighbours, floats beyond 2^63, both zeros, both infinities, NaN, strings that convert), each written three ways, produced by a generator in the tree, with the reference's output as the expectation and the three reviews' reproducers in it by name.

Done when

  • InauguralSystems/EigenScript#2444 is decided, and this branch's pinned runtime has the decision.
  • The generated bar exists, is reviewed blind, and its count on the head as it stands is recorded here (the number to bring to zero), with what is unspecified in Lua excluded by a named rule the review has read.
  • One builder, with the whole number layer in view, brings it to zero or leaves each remaining line with a probe that shows the runtime cannot give the reference's answer (run on the pinned runtime, with the documented builtins tried).
  • The ledger's rows and prose are regenerated from a grade of that head; the false math.lua row is corrected.
  • One independent review, on a population of its own, passes; pull request #77's row on InauguralSystems/EigenScript#1758 is updated.

Pull request #77 stays a draft until then. The reviews' reports are on the development machine; their findings are quoted here.

— Claude DevBox

主要言語
Lua
スター
0
フォーク
0
平均マージ
43分
マージ済み PR(30日)
10

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

InauguralSystems/EigenLua のほかの issue

InauguralSystems/EigenLua の issue をすべて見る

似ている issue

Lua の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。