For fans of Gabriel's "Worse is Better" it may be ironic that C++, by way of MLIR, serves as the scaffold for compiling an ML-family language whose correctness properties are structural. A crucial intersection in our Composer compiler initiates its lowering with a fixed-point combinator that preserves the dimensional, grade, escape, and numeric-representation structure from the Program Semantic Graph. And the MLIR that's witnessed from the PSG is no passive host. Its use of static single assignment, attribute system and dialects carry that structure materially. We show that our compiler middle end uses categorical construction for lowering code with companion verification to that strata: a functor from the compilation poset to a target category, subject to the compositionality equation. The grounding of our approach comes from three sources, each on its own algebraic object: Ohori's machine-code proof theory grounds the compilation axis, parametricity grounds the content at the base, and adjoint mode logic grounds the traversal between our verification tiers. To extend the thesis we introduce compact-closed negative and fractional types, and show the type machinery can be carried with preserved structure and realized through tooling MLIR provides. More broadly, the same fixed-point primitive that preserves types through compilation also supplies proof terms that can continue to be exercised in MLIR to verify its integrity as lowering proceeds through the pipeline. We argue that this foundation is a unique additional point anticipated by our framework that includes dimensional types, Tarau's groupoid, and cellular sheaves. Throughout, the formalism is instrumented as an internal scaffold: the abstractions support the compiler's mechanics, where a developer is never required to reach for category theory in order to rely on the guarantees the compiler provides.


翻译:对于推崇Gabriel"更糟即更好"理念的开发者而言,颇具讽刺意味的是,C++通过MLIR平台成为编译一个结构正确性属性显著的ML家族语言的脚手架。在Composer编译器中,关键交汇点始于一个定点组合子:该组合子在程序语义图(PSG)降级过程中保持维度、阶次、逃逸及数值表示结构。而作为见证者的MLIR绝非被动宿主——其静态单赋值机制、属性系统及方言体系将上述结构实质化。我们证明编译器中间端通过范畴论构造实现代码降级,并附带对应层级的验证:即从编译偏序集到目标范畴的函子,满足组合性方程。该方法的基础源于三个代数对象:Ohori的机器码证明理论奠基编译轴线,参数化范式奠基基层内容,伴随模态逻辑则贯通验证层级间的遍历。为扩展该理论,我们引入紧闭负类型与分数类型,并展示类型机制可通过MLIR工具链保持结构且可实例化。更广泛而言,贯穿编译过程保持类型的定点原语,同样能提供证明项,这些证明项可在MLIR中持续运作,以验证降级流水线各阶段的完整性。我们认为该基础框架预见了包含维度类型、Tarau群胚及细胞层状结构的独特扩展点。整个形式系统作为内部脚手架实现:抽象层支撑编译器运作机制,开发者无需理解范畴论即可依赖编译器提供的保障。

0
下载
关闭预览

相关内容

如何提示?浙大最新《大型语言模型提示框架》综述
专知会员服务
83+阅读 · 2023年11月23日
【干货书】C++实战编程指南,附549页pdf与Slides
专知会员服务
84+阅读 · 2021年4月23日
专知会员服务
161+阅读 · 2021年3月6日
CenterNet:目标即点(代码已开源)
极市平台
25+阅读 · 2019年5月24日
自定义损失函数Gradient Boosting
AI研习社
14+阅读 · 2018年10月16日
Caffe 深度学习框架上手教程
黑龙江大学自然语言处理实验室
14+阅读 · 2016年6月12日
国家自然科学基金
0+阅读 · 2017年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
最新内容
深入Project Maven:为何人工智能在战场上依然失灵
专知会员服务
4+阅读 · 今天15:21
锻造未来士兵:外骨骼、基因工程与赛博格
专知会员服务
0+阅读 · 今天15:12
《无人机蜂群通信技术研究》50页
专知会员服务
4+阅读 · 今天14:55
战力倍增器:自主武器系统与乌克兰及加沙冲突
人工智能赋能战场情报:提速决策进程
专知会员服务
3+阅读 · 7月17日
《拥抱新兴技术:面向未来军官的教育革新》
专知会员服务
7+阅读 · 7月17日
相关VIP内容
如何提示?浙大最新《大型语言模型提示框架》综述
专知会员服务
83+阅读 · 2023年11月23日
【干货书】C++实战编程指南,附549页pdf与Slides
专知会员服务
84+阅读 · 2021年4月23日
专知会员服务
161+阅读 · 2021年3月6日
相关基金
国家自然科学基金
0+阅读 · 2017年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员