类型算术:基于类型理论的计算
Type Arithmetics: Computation based on the theory of types
摘要:
本文展示了元编程轮编程,它是丰富的,足以表示任意算术计算。我们展示了一个类型系统,实现皮亚诺算术,略广义负数。本系统中的某些类型表示数字。对这些类型的算术运算--数字--加法、减法、甚至除法--被表示为由编译器执行的类型归约规则。一个显著的特点是被零除会变成一个类型错误--并被编译器这样报告。
英文摘要:
The present paper shows meta-programming turn programming, which is rich enough to express arbitrary arithmetic computations. We demonstrate a type system that implements Peano arithmetics, slightly generalized to negative numbers. Certain types in this system denote numerals. Arithmetic operations on such types-numerals - addition, subtraction, and even division - are expressed as type reduction rules executed by a compiler. A remarkable trait is that division by zero becomes a type error - and reported as such by a compiler.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。