A theory of data types based on category theory is presented. We organize data types under a new categorical notion of F,G-dialgebras which is an extension of the notion of adjunctions as well as that of T-algebras. T-algebras are also used in domain theory, but while domain theory needs some primitive data types, like products, to start with, we do not need any. Products, coproducts and exponentiations (i.e. function spaces) are defined exactly like in category theory using adjunctions. F,G-dialgebras also enable us to define the natural number object, the object for finite lists and other familiar data types in programming. Furthermore, their symmetry allows us to have the dual of the natural number object and the object for infinite lists (or lazy lists). We also introduce a programming language in a categorical style using F,G-dialgebras as its data type declaration mechanism. We define the meaning of the language operationally and prove that any program terminates using Tait's computability method.
翻译:基于类别理论的数据类型理论被提出。我们根据F,G-ialgebras的新绝对概念组织数据类型,这个概念是附加概念和T-algebras概念的延伸。T-algebras也用于域论理论,但是,虽然域论需要一些原始数据类型,如产品,我们不需要任何数据。产品、共同产品和出处(即功能空间)与类别理论中使用辅助词定义的完全相同。F,G-dialgebras也使我们能够在编程中定义自然数字对象、定数清单对象和其他熟悉的数据类型。此外,它们的对称使我们能够在自然数字对象和无限清单(或懒列)对象之间拥有双重性。我们还采用绝对风格的编程语言,使用F,G-dialgebras作为数据类型声明机制。我们界定了操作语言的含义,并证明任何程序都使用Tait的可比较方法终止。