计算机科学 > 程序设计语言
[提交于 2023年11月13日]
标题:CHAD for Expressive Total Languages
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读摘要:We show how to apply forward and reverse mode Combinatory Homomorphic Automatic Differentiation (CHAD) to total functional programming languages with expressive type systems featuring the combination of - tuple types; - sum types; - inductive types; - coinductive types; - function types. We achieve this by analysing the categorical semantics of such types in $\Sigma$-types (Grothendieck constructions) of suitable categories. Using a novel categorical logical relations technique for such expressive type systems, we give a correctness proof of CHAD in this setting by showing that it computes the usual mathematical derivative of the function that the original program implements. The result is a principled, purely functional and provably correct method for performing forward and reverse mode automatic differentiation (AD) on total functional programming languages with expressive type systems.
提交历史
来自:Fernando Lucatelli Nunes[v1] 2023年11月13日 星期一 00:00:00 UTC