计算机科学 > 程序设计语言
[提交于 2026年3月17日 (v1),最后修订于 2026年10月15日 (此版本, v9)]
标题:Dimensional Type Systems and Deterministic Memory Management
查看中文 PDF 查看原文 PDF EasyResearch 阅读摘要:We present a dimensional type system whose annotations remain available through the stages that require them, allowing numeric representation and deterministic memory management to be resolved within a single Program Semantic Graph (PSG). Based on Andrew Kennedy's Units of Measure, dimensions constrain admissible operations and the application of domain laws, forming our Native Type Universe (NTU). Range analysis combines those constraints with values, guards, and declared boundaries. A covering representation then determines word width and memory footprint, which participate in allocation and transfer decisions alongside lifetime and target constraints. Our Dimensional Type System (DTS) extends Hindley-Milner inference with abelian-group unification. Within that algebraic fragment, inference is decidable and admits principal types. Measures form part of source-level type identity, while numeric width and storage layout are coeffects resolved from context. A known range that exceeds every available representation produces an error at representation commitment. During program elaboration, unresolved facts can remain pending while further context is supplied. Deterministic Memory Management (DMM) uses the same graph to relate escape paths to storage lifetimes. Closure capture, return, and by-reference use supply different lifetime requirements. Allocation follows the lifetime classification and the platform's declared storage capabilities. Our unique implementation of a posit quire illustrates the interaction: exact accumulation requires a suitable numeric format, adequate capacity, and storage that persists across the accumulation. We also examine how these constraints would apply to automatic differentiation. A shared graph would allow language services to present dimensional resolution and proof status alongside the reasons for representation and placement decisions.
提交历史
来自:Houston Haynes[v1] 2026年3月17日 星期二 12:19:07 UTC (36 KB)
[v2] 2026年4月2日 星期四 16:04:27 UTC (37 KB)
[v3] 2026年4月8日 星期三 15:33:30 UTC (37 KB)
[v4] 2026年4月13日 星期一 21:29:35 UTC (39 KB)
[v5] 2026年4月19日 星期日 15:09:09 UTC (37 KB)
[v6] 2026年4月27日 星期一 17:48:52 UTC (39 KB)
[v7] 2026年6月16日 星期二 01:11:55 UTC (39 KB)
[v8] 2026年10月8日 星期四 14:56:35 UTC (31 KB)
[v9] 2026年10月15日 星期四 10:13:42 UTC (32 KB)