arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2008.03441cs.PL
收藏

dxo:一个关系代数和微分系统

dxo: A System for Relational Algebra and Differentiation

Julie Steele, William Byrd

摘要:

我们提出dxo,代数和微分的关系系统,写在miniKanren。dxo对表示为s表达式的数学表达式进行操作。DXO支持加法、乘法、取幂、变量(表示为标记符号)和自然数(表示为小端二进制列表)。我们展示了dxo的完整代码,并详细描述了组成dxo的四个主要关系。我们提出了dxo可以通过结合主要关系来解决的示例问题。我们的微分关系,do,可以对多项式求微分,并且通过向后运行,也可以积分。类似地,我们的简化关系simpo可以简化包括加法、乘法、取幂、变量和自然数的表达式,并且通过向后运行,可以使简化形式的任何表达式复杂化。我们的求值关系evalo采用与simpo相同类型的表达式,以及将变量与自然数关联的环境。通过相对于环境计算表达式,evalo可以产生一个自然数;通过向后运行,evalo可以生成计算为给定值的表达式(或相关环境)。reordero也采用与simpo相同类型的表达式,并关联重新排序的表达式。

英文摘要:

We present dxo, a relational system for algebra and differentiation, written in miniKanren. dxo operates over math expressions, represented as s-expressions. dxo supports addition, multiplication, exponentiation, variables (represented as tagged symbols), and natural numbers (represented as little-endian binary lists). We show the full code for dxo, and describe in detail the four main relations that compose dxo. We present example problems dxo can solve by combining the main relations. Our differentiation relation, do, can differentiate polynomials, and by running backwards, can also integrate. Similarly, our simplification relation, simpo, can simplify expressions that include addition, multiplication, exponentiation, variables, and natural numbers, and by running backwards, can complicate any expression in simplified form. Our evaluation relation, evalo, takes the same types of expressions as simpo, along with an environment associating variables with natural numbers. By evaluating the expression with respect to the environment, evalo can produce a natural number; by running backwards, evalo can generate expressions (or the associated environments) that evaluate to a given value. reordero also takes the same types of expressions as simpo, and relates reordered expressions.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑