Source the conformance corpus from JVM Clojure; retire the prelude gate
corpus.edn :expected is now the value reference JVM Clojure produces, set by the new test/conformance/regen-corpus.clj (one JVM process, per-row thread watchdog). 167 rows moved to the JVM value: ratios (/ 1 2)=>1/2, doubles (double 3)=>3.0, shared-heap concurrency (the future/pmap/agent cases), clojure.math doubles. The JVM is the spec; jolt is measured against it. known-divergences.edn shrinks to the rows whose JVM value is an opaque host object that can't round-trip to source (Java arrays, transients, atoms, beans, proxies, chunks all print as #object[..@addr]) plus (fn* foo) and a few racy concurrency cases (:flaky). The zero-janet gate's allowlist becomes the set of host gaps vs the JVM spec (no Class/array/BigDecimal, :jolt reader, jolt's own printing). Math/clojure.math sqrt/pow/floor/trig now return doubles (Chez returns exact for exact args, e.g. (sqrt 9)=>3); JVM always returns a double. extract-corpus.janet no longer writes corpus.edn unless asked (the test runner imported it and was silently overwriting the JVM corpus with the spec sources' placeholder answers). The prelude parity gate is deleted — the zero-janet spine + certify.clj are the oracles. zero-janet 2678 (0 new divergences), certify 0 new / 0 stale, emit-test 330/330.
This commit is contained in:
parent
467ad75ff7
commit
da775802d6
13 changed files with 435 additions and 823 deletions
|
|
@ -73,11 +73,9 @@
|
|||
;; jolt models EVERY number as a double (emit-const lowers integer literals to
|
||||
;; flonums too), so the reader coerces every parsed number to inexact — else a
|
||||
;; read int (exact) is not jolt= to a source int literal (flonum).
|
||||
;; Preserve exactness for the Chez numeric tower (JVM parity): integer literals
|
||||
;; read as exact integers (= Long/BigInt, arbitrary precision), a/b ratios as
|
||||
;; exact rationals (= Ratio), and decimal/exponent literals as flonums (= double).
|
||||
;; Only the zero-Janet path (this reader) carries exactness through to runtime;
|
||||
;; the Janet-reader prelude path stays all-flonum (Janet has only doubles).
|
||||
;; Numeric tower (JVM parity): integer literals read as exact integers (= Long/
|
||||
;; BigInt, arbitrary precision), a/b ratios as exact rationals (= Ratio), and
|
||||
;; decimal/exponent literals as flonums (= double).
|
||||
(define (rdr-try-number tok)
|
||||
(rdr-try-number-raw tok))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue