简体   繁体   English

类型理论中所有类型实例的常见超类型是什么

[英]What is the common supertype of all instances of Kind in Type Theory

I'm trying to design an ontology such as could be defined with OWL or Topic Maps that includes support for polymorphic types such as List[T] where T is a type parameter of the Interval Kind In(Nothing, Any) and List is the Function Kind * -> *. 我正在尝试设计一个本体,例如可以用OWL或Topic Maps定义,包括对多态类型的支持,例如List [T],其中T是Interval Kind In(Nothing,Any)的类型参数,List是功能种类* - > *。 Ultimately, I want to describe a type system ontology in semantic language with sufficient detail and rigour that it could be the basis for type-safe software code written in the same semantic language. 最后,我想用语义语言描述一种类型系统本体,它具有足够的细节和严谨性,它可以成为用同一语义语言编写的类型安全软件代码的基础。

With this goal in mind, I'm trying to figure out a hierarchical structure of Kinds where Type, Interval Kind and Function Kind are all instances of Kind. 考虑到这个目标,我试图弄清楚种类的层次结构,其中类型,区间种类和函数种类都是种类的实例。 Is there a formal name for the common 'superkind' of all Kinds? 所有种类的共同“超级”都有正式名称吗? The best term I can come up with is 'Kind Instance'. 我能提出的最好的术语是“实例”。 Is this even a meaningful concept in type theory? 这在类型理论中甚至是一个有意义的概念吗? Even if it isn't, I need such a concept to say things such as (in Topic Maps terminology) "a function-argument-type-constraint association has a Role 'allowed-type' whose player must be of type 'Kind Instance'". 即使不是这样,我也需要这样一个概念,例如(在Topic Maps术语中)“函数 - 参数 - 类型 - 约束关联有一个角色'允许类型',其播放器必须是'Kind Instance'类型“”。

Beyond this, I've only just begun teaching myself type theory for this project and I have a lot more to learn before I'll be able to complete it. 除此之外,我刚刚开始为这个项目教授自己的类型理论,在完成它之前我还有很多东西需要学习。 I have read a few scala-related papers on type-theory including Generics of a Higher Kind (http://adriaanm.github.com/files/higher.pdf) and started working my way through Safe Type-level Abstraction in Scala (http://adriaanm.github.com/files/scalina-final.pdf) and Type Constructor Polymorphism for Scala[pdf] . 我已经阅读了一些关于类型理论的scala相关论文,包括更高级的泛型(http://adriaanm.github.com/files/higher.pdf),并开始通过Scala中的安全类型级抽象工作( http://adriaanm.github.com/files/scalina-final.pdf)和Scala的类型构造函数多态[pdf] I have less familiarity with Haskell than Scala but I have encountered some relevant-looking papers such as System F with Type Equality Coercions[pdf] that I'll need a much more advanced grasp of Haskell to understand. 我对Haskell的熟悉程度不如Scala,但是我遇到了一些相关的论文,比如System F with Type Equality Coercions [pdf] ,我需要更深入地掌握Haskell才能理解。 If anyone can suggest a progression of reading material for learning Haskell's type system starting from the beginner level and leading all the way to advanced principles like Generalized Algebraic Data Types, that would also be much appreciated. 如果任何人都可以建议从初学者级别开始学习Haskell类型系统的阅读材料的进展,并一直领导到广义代数数据类型等高级原则,那也是非常值得赞赏的。

Finally, if you know of any existing attempts to describe a type system in a semantic ontology language like OWL or Topic Maps, or if you have any suggestions about how to do this, I'd love to hear that too. 最后,如果您知道任何现有的尝试用语义本体语言(如OWL或Topic Maps)描述类型系统,或者您对如何执行此操作有任何建议,我也很乐意听到。

There is no better introduction to type theory than Benjamin Pierce's "Types and Programming Languages". 没有比本杰明皮尔斯的“类型和编程语言”更好的类型理论介绍。 I don't think there are standardized names for the levels above kind, but "sort" is one common choice. 我认为上述级别没有标准名称,但“排序”是一种常见的选择。 Another common choice is to jump straight to dependent types and flatten the hierarchy, so that there is only one level after all. 另一个常见的选择是直接跳转到依赖类型并展平层次结构,这样毕竟只有一个级别。 One common typing rule to add in this situation (when dealing with day-to-day programming languages whose logical content isn't usually so important) is the "Type : Type" rule, so that, for example, 3 : Int : Type : Type : Type : ... 在这种情况下添加一个常见的输入规则(当处理其逻辑内容通常不那么重要的日常编程语言时)是“类型:类型”规则,因此,例如,3:Int:Type :类型:类型:...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM