Is OWL/RDF typed or untyped? Should it be?
In his paper Knowledge Representation in Bicategories of Relations Evan Patterson shows how one can use the very elegant concept of ologs developed by David Spivak to explain how DataBases work, and by applying it to the category of relations Rel instead of Set, one gets something very close to RDF and description logics. One major difference is that one gets a system that is by default typed. See first three paragraphs of §7.
Some questions:
- How useful would a typed RDF be? Would it actually work?
- Can one retrofit RDF to be typed?
- Can one map the one to the other?
- Is RDF implicitly typed?
To make the last question more comprehensible, let me give an example from programming on the web. JavaScript would I believe be considered to be an untyped language and Scala a typed language. Yet Scala allows one to annotate JavaScript with typed Scala-JS interfaces, thereby revealing the typed nature of the original JS libraries. This can be seen for example in the Scala-JS Crypto wrapper of the W3C Crypto API. As I contributed to that code, it made me wonder if one can really write untyped functions? If one did how would they ever be used? How would the calling function know what to do with the returned value of the function? In fact it seems, even untyped JS code is used as if it were typed. The difference between JS and Scala-JS is that the first does not document the types leaving them implicit, meaning the programmer needs to trust the documentation if there is any or read the whole program in which it appears to know what to expect. Writing such a mapping to Scala-JS is just a way to make the type information explicit. The relation between explicit knowledge and implicit knowledge is developed by Robert Brandom and interestingly he ties this to pragmatics: how one does things. So is this a case of making types explicit?
An interesting feature of RDF is that it allows one to reason with partial information. This is important because one does not know in advance what concepts an RDF document will contain nor which ontology it will need to use. One may first discover the data, then look for the ontology. So one may discover the types after the data. Indeed in science this can often be the case, where one is looking for concepts to explain the data.
Is there a mathematical way to reconcile typed and untyped that would allow for late discovery to types?