当前位置: X-MOL 学术arXiv.cs.LO › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Datatype defining rewrite systems for naturals and integers
arXiv - CS - Logic in Computer Science Pub Date : 2016-08-22 , DOI: arxiv-1608.06212
Jan A. Bergstra and Alban Ponse

A datatype defining rewrite system (DDRS) is an algebraic (equational) specification intended to specify a concrete datatype. When interpreting the equations from left-to-right, a DDRS defines a term rewriting system that must be ground-complete. First we define two DDRSs for the ring of integers, each comprising twelve rewrite rules, and prove their ground-completeness. Then we introduce natural number and integer arithmetic specified according to unary view, that is, arithmetic based on a postfix unary append constructor (a form of tallying). Next we specify arithmetic based on two other views: binary and decimal notation. The binary and decimal view have as their characteristic that each normal form resembles common number notation, that is, either a digit, or a string of digits without leading zero, or the negated versions of the latter. Integer arithmetic in binary and decimal notation is based on (postfix) digit append functions. For each view we define a DDRS, and in each case the resulting datatype is a canonical term algebra that extends a corresponding canonical term algebra for natural numbers. Then, for each view, we consider an alternative DDRS based on tree constructors that yields comparable normal forms, which for that view admits expressions that are algorithmically more involved. For all DDRSs considered, ground-completeness is proven.

中文翻译:

定义自然数和整数的重写系统的数据类型

定义重写系统 (DDRS) 的数据类型是一种代数(等式)规范,旨在指定具体的数据类型。当从左到右解释方程时,DDRS 定义了一个必须完全完整的术语重写系统。首先,我们为整数环定义了两个 DDRS,每个都包含 12 条重写规则,并证明它们的基本完备性。然后我们介绍根据一元视图指定的自然数和整数算术,即基于后缀一元追加构造函数(计数的一种形式)的算术。接下来,我们根据其他两个视图指定算术:二进制和十进制表示法。二进制和十进制视图的特点是每个范式都类似于常见的数字符号,即一个数字或一串没有前导零的数字,或后者的否定版本。二进制和十进制表示法中的整数算术基于(后缀)数字附加函数。对于每个视图,我们定义了一个 DDRS,并且在每种情况下,结果数据类型都是一个规范项代数,它扩展了自然数的相应规范项代数。然后,对于每个视图,我们考虑基于树构造器的替代 DDRS,该树构造函数产生可比较的范式,对于该视图,该视图承认算法上更多涉及的表达式。对于所有考虑的 DDRS,都证明了地面完整性。我们考虑了一种基于树构造器的替代 DDRS,它产生可比较的范式,对于该视图,它允许在算法上更复杂的表达式。对于所有考虑的 DDRS,都证明了地面完整性。我们考虑了一种基于树构造器的替代 DDRS,它产生可比较的范式,对于该视图,它允许在算法上更复杂的表达式。对于所有考虑的 DDRS,都证明了地面完整性。
更新日期:2020-07-16
down
wechat
bug