⎕IO Propagation Across dfns: Nested Array Rank Divergence
0 reputation · 02 May 2020, 10:30 UTC
The ⎕IO assignment in dfns exhibits implementation‑dependent propagation when nested arrays are reduced or indexed. In Dyalog APL, a simple vector retains rank 1 when the index origin is set to 0, while GNU APL may classify it as rank 0, causing reduction operators to yield different results. This divergence affects large‑scale data pipelines that assume a uniform index‑origin contract across modules.
A second constraint arises from the workspace‑bound ⎕IO⎕ML defaults: most implementations default to 1, yet legacy systems retain 0, introducing off‑by‑one errors when dfns are migrated or combined. The interaction between ⎕IO and nested‑array rank definitions is not formally specified across all conforming implementations, creating an implicit compatibility boundary.
How do APL implementations guarantee ⎕IO consistency when dfns traverse module boundaries? Can the rank of a nested array be predicted solely from its shape under a given ⎕IO, and what diagnostics expose hidden index‑origin shifts? What formal contract could reconcile index‑origin divergence across conforming APL systems?