● Done. I agree with the reporter, and the fix is in. #37
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "issue36"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Verdict on the issue
#36
The reporter is correct on every point: the atom path passed a bare atom as the
type_error(evaluable, _) culprit while the compound path correctly built Name/Arity,
ISO 13211-1 §7.8.9/§8.6 mandates a predicate indicator (so foo/0), the locus was line
~121, and the low-severity assessment is right.
What changed
crates/runtime/src/builtins/arith.rs
culprit term.
keeps its bare-term culprit (out of the issue's scope).
output, less duplication).
Tests (the 4 you approved updating to ISO):
deliberate ISO-over-v1 divergence (issue #36), in the same style as the documented
cut divergence
Verification
consistent indicators.
differential all green; clippy clean on the runtime crate.
Review — Phase fix for issue #36 (evaluable atom culprit →
Atom/0)Verdict: approve. Correct, minimal, well-scoped, and the divergence is documented in all the right places. I verified the claims against the source and re-ran the affected suites — all green.
The fix is right
predicate_indicator(m, name, arity)builds/(Name, Arity)once and both the atom path and the unknown-operator path now route through it. The old unknown-operator path constructed the same three heap words inline, so this is a byte-identical refactor on that side (confirmed: the test atarith.rs:728still reads/(foo, 1)unchanged) while fixing the atom side. Good deduplication — the two culprit shapes can no longer drift apart, which is exactly the class of bug #36 was.Atom/0, matching the compound path'sfoo/1. End-to-end the reporter's repro is now consistent (foo/0vsfoo/1), which was the whole point.The TAG_ATOM / TAG_LST split is the correct call
Splitting the old combined
TAG_ATOM | TAG_LSTarm and leaving the list case on the bare-term culprit is the right scoping decision — the issue is about the atom indicator only, and you've said so in the comment. One note for a future issue (not this PR): a list literal like_ is [1,2]still yieldstype_error(evaluable, [1,2]), where strict ISO would want the functor indicator ('.'/2/'[|]'/2). The single-element list[X]is also an ISO evaluable-as-Xspecial case that isn't handled here. Both are pre-existing and explicitly out of scope — flagging only so the list arm's// out of scopecomment has a paper trail pointing at what's deferred.Tests / docs
control_arith.rscarries a clearDELIBERATE ISO-over-v1 divergence (issue #36)comment in the same style as the documented cut divergence, so the next person who diffs against v1 won't "fix" it back.ISO_COMPLIANCE.mdrecords the rule and the v1 contrast. This is the right way to retire a v1-bug-compatible expectation.patch-prolog-runtime --lib arith(12 passed, incl.err_type_evaluable_atom_and_compound) andcontrol_arith+integration+iso_atom_concat(30 + 9 passed). Clean.Nit (non-blocking)
The
iso_atom_concat.rschange is a pure rustfmt reflow of theerrors()helper — unrelated to #36. Harmless, just slightly muddies the diff's "this is the #36 fix" story. No action needed.Nothing blocking. Ship it.