论文标题
DXO:关系代数和分化的系统
dxo: A System for Relational Algebra and Differentiation
论文作者
论文摘要
我们提出DXO,这是一种用Minikanren编写的代数和分化的关系系统。 DXO通过数学表达式运行,表示为S-表达。 DXO支持加法,乘法,指示,变量(表示为标记的符号)和自然数(表示为小二进制列表)。我们显示DXO的完整代码,并详细描述组成DXO的四个主要关系。我们提出了DXO可以通过结合主要关系来解决的示例问题。我们的分化关系,DO可以区分多项式,并且通过向后运行,也可以集成。同样,我们的简化关系simpo可以简化包括添加,乘法,指示性,变量和自然数的表达式,并且通过向后运行,可以使任何表达式复杂化,以简化的形式复杂化。我们的评估关系evalo采用与simpo相同类型的表达式,以及将变量与自然数相关的环境。通过评估有关环境的表达,评估可以产生自然数量。通过向后运行,Evalo可以生成评估给定值的表达式(或关联的环境)。 ReOrdoro还采用与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.