Skip to content

Latest commit

 

History

History
304 lines (267 loc) · 24.1 KB

kernel-conformance.md

File metadata and controls

304 lines (267 loc) · 24.1 KB

Kernel R-1RK conformance status

Generated by IronKernel.Tests/KernelConformanceTests.fs. Do not edit by hand; run the suite with IRONKERNEL_UPDATE_CONFORMANCE=1 to regenerate.

Features are those of the [Revised-1 Report on the Kernel Programming Language] (https://ftp.cs.wpi.edu/pub/techreports/pdf/05-07.pdf) (WPI TR 05-07), extracted from its table of contents by tools/extract-r-1rk-features.py into docs/kernel-r-1rk-features.json. The report decides what must be covered, so features IronKernel has never implemented still appear here.

Status Meaning
verified Every binding resolves and a behavioural check for this entry passes. The check exercises the entry; it does not prove every requirement in it.
bound Every binding resolves, but nothing checks its behaviour yet. This is not evidence of conformance.
partial Some bindings of the entry resolve and others do not.
absent No binding of the entry resolves.

IronKernel is a dialect, and drops the $ sigil the report uses for operatives ($if is spelled if, $define! is spelled define). Where a feature resolves under such a name the matrix records it as an alias, so the divergence is visible rather than hidden behind a pass.

Summary

Entries Share
verified 135 100%
bound 0 0%
partial 0 0%
absent 0 0%
total 135

34 of 135 entries belong to modules the report marks optional; an implementation may omit them and still conform.

Known divergences

Differences a status cannot express. A verified row means the entry was exercised, not that IronKernel matches the report exactly.

Report Divergence
7.2.5 Two things. First, applying a continuation object directly, as in (k 1), bypasses the selection and interception of 7.2.5: no guard is consulted. That is a dialect extension rather than a gap in the report, which does not make continuations applicable at all -- apply-continuation (7.3.1) and continuation->applicative (7.2.5) are its mechanisms, and both intercept correctly. Anything relying on a guard should use those, and since 7.2.7 now signals by abnormal pass, errors do go through interception while a direct application still does not. Second, a combination's operand tree is represented as a list, so the atomic operand tree the report also allows has no spelling: (divert #f) delivers (#f) rather than #f, which is why the report's $binds? derivation (6.7.1) needs a list on both paths here. apply-continuation takes the object directly and is unaffected.
3.6 Two spellings differ from the report's, and both round-trip through read, because IronKernel's reader accepts them. A dotted pair writes as (1 & 2) rather than (1 . 2), since . is the CLR interop operative here. A CLR value with no Kernel representation -- a DateTime, a complex number, an inexact infinity or NaN -- writes as <obj v : T>, which the reader cannot parse; 3.6 provides for objects that have no external representation, and those are IronKernel's.
12.9 The report specifies 12.9.2 through 12.9.6 by signature only. Appendix A.2 records that it is an incomplete draft whose unwritten portions were "only planned in rough outline", so verified there means the binding exists with its standard mathematical meaning, and the choices the report leaves open are IronKernel's: an argument outside a function's real domain takes its complex value now that 12.10 is supported, so (sqrt -1) is i; a result with no primary value follows 12.2's rule and so signals under strict arithmetic and is returned without it; and infinities are returned as values.
12.2 Inexact reals are non-robust with bounds of exact negative and positive infinity, which 12.2 sanctions explicitly ("an implementation can fully support module Inexact without making any effort to maintain finite bounds or robustness"). Two things follow. robust? is exactly "every argument is exact". And no number is ever created with its lower bound above its upper bound, so the report's undefined number never arises and undefined? is always false. Narrowing the bounds is what module Narrow inexact (12.7) asks for, and that module is absent.
12.7 Module Narrow inexact is supported in the sense the report requires -- the variable binds and reads, and the bounding information is no less restrictive when it is set than when it is cleared -- but setting it changes nothing observable. Narrowing is advice ("the implementation is advised to maintain the most restrictive bounding and robustness information it (correctly) can"), and IronKernel maintains the infinite bounds of 12.2 either way.
12.3.3 Under strict arithmetic, overflow and a result with no primary value both signal; underflow does not, and still gives zero. Telling an underflow apart needs the operation and not just its operands -- a zero result from non-zero operands is an underflow for multiplication and an exact answer for subtraction -- so it is left undetected rather than guessed at. The variable's initial value here is true, which the report leaves open.
7.2.6 root-continuation is not literally at the end of every continuation chain: IronKernel's drivers give each top-level form its own continuation. Its extent is instead defined to contain everything, which is what "the ancestor of all other continuations" means for the selection algorithm, so a clause selecting on it is always selected. Receiving a value ends the session, and the process exit status is 0.
4.7 Module Pair mutation is complete. Mutability follows where the structure came from: the reader produces immutable pairs, because a program is an algorithm rather than data the program made, while cons and list produce mutable ones. R-1RK 6.4.1 makes it an error for two arguments of append! to share a last pair; that condition is on the caller and is not checked, so appending such a pair to itself builds a cycle rather than signalling.
6.3 The derived list library divides on whether a derivation asks about a list's shape or walks its elements. length, finite-list? and countable-list? go through get-list-metrics, which measures a cycle rather than walking into one. list-tail, filter, reduce, append and the rest walk elements and diverge on a cyclic argument, as the report's own derivations of them do. reduce (6.3.10) is the exception and is complete: its six-argument syntax reduces a cyclic list through the caller's precycle/incycle/postcycle, with the call counts the report fixes. Its three-argument syntax still diverges on a cycle, which is what the report specifies -- there the second syntax "must be used".
12.10 Complex numbers are System.Numerics.Complex, so components are double precision and a result whose imaginary part is zero collapses back to a real. The report specifies 12.10 by signature only.
12.8 Exactness is carried by a value's representation rather than by a separate tag: 1/2 is an exact ratio and 0.5 is a double, and exact? reads the representation. Module Inexact (12.6) is supported on that basis. One consequence is that numerator and denominator of an inexact real return exact integers -- (denominator 0.1) is 2^55 -- rather than inexact ones.

Modules

R-1RK 1.3.2 makes the module the unit of conformance: "An implementation cannot claim to support a module M unless it both (1) supports all of the features in M, and (2) supports all of the modules assumed by M."

"All entries verified" is weaker than "supported". The column below says only that every entry of the module has a passing behavioural check. It does not assert 1.3.2 support, which additionally requires the module's assumed modules and the report's baseline representation requirements. Read the divergences before taking any row as a claim of conformance.

Module Required Entries Verified All entries verified
4.1 Core types and primitive features — Booleans required 1 1 yes
4.2 Core types and primitive features — Equivalence under mutation (optional) optional 1 1 yes
4.3 Core types and primitive features — Equivalence up to mutation required 1 1 yes
4.4 Core types and primitive features — Symbols required 1 1 yes
4.5 Core types and primitive features — Control required 2 2 yes
4.6 Core types and primitive features — Pairs and lists required 3 3 yes
4.7 Core types and primitive features — Pair mutation (optional) optional 2 2 yes
4.8 Core types and primitive features — Environments required 4 4 yes
4.9 Core types and primitive features — Environment mutation (optional) optional 1 1 yes
4.10 Core types and primitive features — Combiners required 5 5 yes
5.1 Core library features (I) — Control required 1 1 yes
5.2 Core library features (I) — Pairs and lists required 2 2 yes
5.3 Core library features (I) — Combiners required 2 2 yes
5.4 Core library features (I) — Pairs and lists required 1 1 yes
5.5 Core library features (I) — Combiners required 1 1 yes
5.6 Core library features (I) — Control required 1 1 yes
5.7 Core library features (I) — Pairs and lists required 2 2 yes
5.8 Core library features (I) — Pair mutation (optional) optional 1 1 yes
5.9 Core library features (I) — Combiners required 1 1 yes
5.10 Core library features (I) — Environments required 1 1 yes
6.1 Core library features (II) — Booleans required 5 5 yes
6.2 Core library features (II) — Combiners required 1 1 yes
6.3 Core library features (II) — Pairs and lists required 10 10 yes
6.4 Core library features (II) — Pair mutation (optional) optional 4 4 yes
6.5 Core library features (II) — Equivalence under mutation (optional) optional 1 1 yes
6.6 Core library features (II) — Equivalence up to mutation required 1 1 yes
6.7 Core library features (II) — Environments required 10 10 yes
6.8 Core library features (II) — Environment mutation (optional) optional 3 3 yes
6.9 Core library features (II) — Control required 1 1 yes
7.2 Continuations — Primitive features required 7 7 yes
7.3 Continuations — Library features required 4 4 yes
8.1 Encapsulations — Primitive features required 1 1 yes
9.1 Promises — Library features required 4 4 yes
10.1 Keyed dynamic variables — Primitive features required 1 1 yes
11.1 Keyed static variables — Primitive features required 1 1 yes
12.5 Numbers — Number features required 14 14 yes
12.6 Numbers — Inexact features optional 6 6 yes
12.7 Numbers — Narrow inexact features optional 1 1 yes
12.8 Numbers — Rational features optional 5 5 yes
12.9 Numbers — Real features optional 6 6 yes
12.10 Numbers — Complex features optional 3 3 yes
13.1 Strings — Primitive features required 1 1 yes
15.1 Ports — Primitive features required 8 8 yes
15.2 Ports — Library features required 3 3 yes

4 Core types and primitive features

Entry Feature Module Status Notes
4.1.1 boolean? Booleans verified 4 behavioural check(s)
4.2.1 eq? Equivalence under mutation (optional) verified optional module; 10 behavioural check(s)
4.3.1 equal? Equivalence up to mutation verified 6 behavioural check(s)
4.4.1 symbol? Symbols verified 3 behavioural check(s)
4.5.1 inert? Control verified 3 behavioural check(s)
4.5.2 $if Control verified 3 behavioural check(s)
4.6.1 pair? Pairs and lists verified 2 behavioural check(s)
4.6.2 null? Pairs and lists verified 2 behavioural check(s)
4.6.3 cons Pairs and lists verified 2 behavioural check(s)
4.7.1 set-car!, set-cdr! Pair mutation (optional) verified optional module; 6 behavioural check(s)
4.7.2 copy-es-immutable Pair mutation (optional) verified optional module; 7 behavioural check(s)
4.8.1 environment? Environments verified 1 behavioural check(s)
4.8.2 ignore? Environments verified 6 behavioural check(s)
4.8.3 eval Environments verified 1 behavioural check(s)
4.8.4 make-environment Environments verified 1 behavioural check(s)
4.9.1 $define! Environment mutation (optional) verified optional module; 2 behavioural check(s)
4.10.1 operative? Combiners verified 3 behavioural check(s)
4.10.2 applicative? Combiners verified 3 behavioural check(s)
4.10.3 $vau Combiners verified 1 behavioural check(s)
4.10.4 wrap Combiners verified 1 behavioural check(s)
4.10.5 unwrap Combiners verified 1 behavioural check(s)

5 Core library features (I)

Entry Feature Module Status Notes
5.1.1 $sequence Control verified 4 behavioural check(s)
5.2.1 list Pairs and lists verified 2 behavioural check(s)
5.2.2 list* Pairs and lists verified 1 behavioural check(s)
5.3.1 $vau Combiners verified 1 behavioural check(s)
5.3.2 $lambda Combiners verified 1 behavioural check(s)
5.4.1 car, cdr Pairs and lists verified 2 behavioural check(s)
5.5.1 apply Combiners verified 1 behavioural check(s)
5.6.1 $cond Control verified 1 behavioural check(s)
5.7.1 get-list-metrics Pairs and lists verified 7 behavioural check(s)
5.7.2 list-tail Pairs and lists verified 2 behavioural check(s)
5.8.1 encycle! Pair mutation (optional) verified optional module; 4 behavioural check(s)
5.9.1 map Combiners verified 1 behavioural check(s)
5.10.1 $let Environments verified 1 behavioural check(s)

6 Core library features (II)

Entry Feature Module Status Notes
6.1.1 not? Booleans verified 2 behavioural check(s)
6.1.2 and? Booleans verified 4 behavioural check(s)
6.1.3 or? Booleans verified 4 behavioural check(s)
6.1.4 $and? Booleans verified 4 behavioural check(s)
6.1.5 $or? Booleans verified 4 behavioural check(s)
6.2.1 combiner? Combiners verified 3 behavioural check(s)
6.3.1 length Pairs and lists verified 5 behavioural check(s)
6.3.2 list-ref Pairs and lists verified 2 behavioural check(s)
6.3.3 append Pairs and lists verified 4 behavioural check(s)
6.3.4 list-neighbors Pairs and lists verified 3 behavioural check(s)
6.3.5 filter Pairs and lists verified 2 behavioural check(s)
6.3.6 assoc Pairs and lists verified 2 behavioural check(s)
6.3.7 member? Pairs and lists verified 2 behavioural check(s)
6.3.8 finite-list? Pairs and lists verified 6 behavioural check(s)
6.3.9 countable-list? Pairs and lists verified 5 behavioural check(s)
6.3.10 reduce Pairs and lists verified 5 behavioural check(s)
6.4.1 append! Pair mutation (optional) verified optional module; 5 behavioural check(s)
6.4.2 copy-es Pair mutation (optional) verified optional module; 8 behavioural check(s)
6.4.3 assq Pair mutation (optional) verified optional module; 4 behavioural check(s)
6.4.4 memq? Pair mutation (optional) verified optional module; 3 behavioural check(s)
6.5.1 eq? Equivalence under mutation (optional) verified optional module; 6 behavioural check(s)
6.6.1 equal? Equivalence up to mutation verified 7 behavioural check(s)
6.7.1 $binds? Environments verified 4 behavioural check(s)
6.7.2 get-current-environment Environments verified 1 behavioural check(s)
6.7.3 make-kernel-standard-environment Environments verified 3 behavioural check(s)
6.7.4 $let* Environments verified 1 behavioural check(s)
6.7.5 $letrec Environments verified 1 behavioural check(s)
6.7.6 $letrec* Environments verified 1 behavioural check(s)
6.7.7 $let-redirect Environments verified 2 behavioural check(s)
6.7.8 $let-safe Environments verified 2 behavioural check(s)
6.7.9 $remote-eval Environments verified 1 behavioural check(s)
6.7.10 $bindings->environment Environments verified 2 behavioural check(s)
6.8.1 $set! Environment mutation (optional) verified optional module; 1 behavioural check(s)
6.8.2 $provide! Environment mutation (optional) verified optional module; 2 behavioural check(s)
6.8.3 $import! Environment mutation (optional) verified optional module; 1 behavioural check(s)
6.9.1 for-each Control verified 1 behavioural check(s)

7 Continuations

Entry Feature Module Status Notes
7.2.1 continuation? Primitive features verified 4 behavioural check(s)
7.2.2 call/cc Primitive features verified 1 behavioural check(s)
7.2.3 extend-continuation Primitive features verified 3 behavioural check(s)
7.2.4 guard-continuation Primitive features verified 4 behavioural check(s)
7.2.5 continuation->applicative Primitive features verified 4 behavioural check(s)
7.2.6 root-continuation Primitive features verified 2 behavioural check(s)
7.2.7 error-continuation Primitive features verified 3 behavioural check(s)
7.3.1 apply-continuation Library features verified 2 behavioural check(s)
7.3.2 $let/cc Library features verified 1 behavioural check(s)
7.3.3 guard-dynamic-extent Library features verified 4 behavioural check(s)
7.3.4 exit Library features verified 2 behavioural check(s)

8 Encapsulations

Entry Feature Module Status Notes
8.1.1 make-encapsulation-type Primitive features verified 1 behavioural check(s)

9 Promises

Entry Feature Module Status Notes
9.1.1 promise? Library features verified 1 behavioural check(s)
9.1.2 force Library features verified 1 behavioural check(s)
9.1.3 $lazy Library features verified 4 behavioural check(s)
9.1.4 memoize Library features verified 1 behavioural check(s)

10 Keyed dynamic variables

Entry Feature Module Status Notes
10.1.1 make-keyed-dynamic-variable Primitive features verified 7 behavioural check(s)

11 Keyed static variables

Entry Feature Module Status Notes
11.1.1 make-keyed-static-variable Primitive features verified 5 behavioural check(s)

12 Numbers

Entry Feature Module Status Notes
12.5.1 number?, finite?, integer? Number features verified 10 behavioural check(s)
12.5.2 =? Number features verified 5 behavioural check(s)
12.5.3 <?, <=?, >=?, >? Number features verified 8 behavioural check(s)
12.5.4 + Number features verified 4 behavioural check(s)
12.5.5 * Number features verified 4 behavioural check(s)
12.5.6 - Number features verified 2 behavioural check(s)
12.5.7 zero? Number features verified 4 behavioural check(s)
12.5.8 div, mod, div-and-mod Number features verified 8 behavioural check(s)
12.5.9 div0, mod0, div0-and-mod0 Number features verified 7 behavioural check(s)
12.5.10 positive?, negative? Number features verified 4 behavioural check(s)
12.5.11 odd?, even? Number features verified 5 behavioural check(s)
12.5.12 abs Number features verified 3 behavioural check(s)
12.5.13 max, min Number features verified 5 behavioural check(s)
12.5.14 lcm, gcd Number features verified 7 behavioural check(s)
12.6.1 exact?, inexact?, robust?, undefined? Inexact features verified optional module; 14 behavioural check(s)
12.6.2 get-real-internal-bounds, get-real-exact-bounds Inexact features verified optional module; 9 behavioural check(s)
12.6.3 get-real-internal-primary, get-real-exact-primary Inexact features verified optional module; 6 behavioural check(s)
12.6.4 make-inexact Inexact features verified optional module; 4 behavioural check(s)
12.6.5 real->inexact, real->exact Inexact features verified optional module; 6 behavioural check(s)
12.6.6 with-strict-arithmetic, get-strict-arithmetic? Inexact features verified optional module; 8 behavioural check(s)
12.7.1 with-narrow-arithmetic, get-narrow-arithmetic? Narrow inexact features verified optional module; 7 behavioural check(s)
12.8.1 rational? Rational features verified optional module; 7 behavioural check(s)
12.8.2 / Rational features verified optional module; 7 behavioural check(s)
12.8.3 numerator, denominator Rational features verified optional module; 12 behavioural check(s)
12.8.4 floor, ceiling, truncate, round Rational features verified optional module; 15 behavioural check(s)
12.8.5 rationalize, simplest-rational Rational features verified optional module; 5 behavioural check(s)
12.9.1 real? Real features verified optional module; 6 behavioural check(s)
12.9.2 exp, log Real features verified optional module; 3 behavioural check(s)
12.9.3 sin, cos, tan Real features verified optional module; 3 behavioural check(s)
12.9.4 asin, acos, atan Real features verified optional module; 4 behavioural check(s)
12.9.5 sqrt Real features verified optional module; 2 behavioural check(s)
12.9.6 expt Real features verified optional module; 6 behavioural check(s)
12.10.1 complex? Complex features verified optional module; 4 behavioural check(s)
12.10.2 make-rectangular, real-part, imag-part Complex features verified optional module; 3 behavioural check(s)
12.10.3 make-polar, magnitude, angle Complex features verified optional module; 3 behavioural check(s)

13 Strings

Entry Feature Module Status Notes
13.1.1 string->symbol Primitive features verified 2 behavioural check(s)

15 Ports

Entry Feature Module Status Notes
15.1.1 port? Primitive features verified 3 behavioural check(s)
15.1.2 input-port?, output-port? Primitive features verified 6 behavioural check(s)
15.1.3 with-input-from-file, with-output-to-file Primitive features verified 2 behavioural check(s)
15.1.4 get-current-input-port, get-current-output-port Primitive features verified 4 behavioural check(s)
15.1.5 open-input-file, open-output-file Primitive features verified 1 behavioural check(s)
15.1.6 close-input-file, close-output-file Primitive features verified 2 behavioural check(s)
15.1.7 read Primitive features verified 1 behavioural check(s)
15.1.8 write Primitive features verified 2 behavioural check(s)
15.2.1 call-with-input-file, call-with-output-file Library features verified 1 behavioural check(s)
15.2.2 load Library features verified 1 behavioural check(s)
15.2.3 get-module Library features verified 3 behavioural check(s)