A datatype defining rewrite system (DDRS) is a ground-complete term rewriting system, intended to be used for the specification of datatypes. First we define two concise DDRSes 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) or on the successor function. Then 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 yield comparable normal forms, which for that view admits expressions that are algorithmically more involved. These DDRSes are incorporated because they are closer to existing literature. For all DDRSes considered, ground-completeness is either proved, or references to a proof are provided.
翻译:数据类型定义重写系统(DDRS)是一个地面完整的术语重写系统(DDRS),用于对数据类型进行规格。首先,我们为整数环定义两个简明的DLSS,每个整数环由12个重写规则组成,并证明其地面完整性。然后,我们根据单视图,即基于后缀单尾附加构建器(一种计数形式)或后续功能的算术,引入自然数字和整数计算。然后,我们根据后缀附加器(即基于后缀单尾附加器构建器的算术(一种计数形式)或后继功能来指定算术。然后,我们根据另外两种视图:二进制和小数符号。二进制和小数小数视图的特征是,每个正常格式都类似于普通数字符号,即数字或数字串数字,没有前导零,或后导版本的数串数字。二进数和小数的计算方法基于(后缀)数附加功能。对于每一种观点,我们定义一个数据类型是可比较的代数代数代数代数代数代代代代数。然后,我们考虑进算算算算为更精确的版本,这些代的代代代代代代代的代代代代代代代代代代代代代代数是用于的代数是用于格式,这些代数是更精确的代数。我们比较的代算法化法化法是更精确的代为制的代为更精确式的代为制的代为制的。