Metaclass Framework of CLOS, Python, and RDF(S)

All entities in RDF and RDFSAs shown in the RDF Schema file, rdfs:Resource is a superclass of all classes including rdfs:Class, and rdfs:Class is a class of all classes including rdfs:Resource. Surprisingly, two object oriented languages,
Common Lisp Object System (CLOS) and Python3.x show the same relation between cl:standard-object and cl:standard-class in CLOS and object and type in Python. See the following demonstrations. In the case of CLOS:

cl-user(1): (subtypep (find-class 'standard-class)
                      (find-class 'standard-object))
t
t
cl-user(2): (typep (find-class 'standard-object)
                   (find-class 'standard-class))
t

In the case of Python:

>>> issubclass(type,object)
True
>>> isinstance(object,type)
True

Furthermore, the type or class of rdfs:Class, cl:standard-class, and type in Python is itself, respectively.

cl-user(3): (type-of (find-class 'standard-class))
standard-class
cl-user(4): (typep (find-class 'standard-class)
                   (find-class 'standard-class))
t

In Python:

>>> type(type)
<class 'type'>
>>> isinstance(type,type)
True

Then, since rdfs:Resource is simultaneously an instance and a superclass of rdfs:Class, it is found that rdfs:Resource becomes an instance of rdfs:Resource itself through rdfs:Class by subsumption entailment, as cl:standard-object does.

cl-user(5): (typep (find-class 'standard-object)
                   (find-class 'standard-class))
t
cl-user(6): (typep (find-class 'standard-object)
                   (find-class 'standard-object))
t

And object in Python does.

>>> isinstance(object,type)
True
>>> isinstance(object,object)
True

Thus, this relation between rdfs:Resource and rdfs:Class is critical to establish the framework of the universe of discourse and enable meta-classing of RDF(S), as cl:standard-object/object in Python and cl-standard-class/type in Python are so. I would like to call this relation twisted relation. See the schematic relation between rdfs:Resource and rdfs:Class in the above figure. Note that rdfs:Class, which is a class of all classes in the universe, is a metaclass. So, I would like to call rdfs:Class universal metaclass.

rdfs:Class has the direct membership loop, whereby rdfs:Resource has the indirect membership loop as cl:standard-class and type in Python do. So, how RDF(S), CLOS, and Python can avoid paradoxes from vicious circle? No, no! To begin with, who and on what authority says RDF(S) has a paradox? I claim that there is no paradox in RDF(S) to begin with, and I will clear the misunderstanding from RDF(S).

Advertisements

About seijikoide

Please check my page as researcher of computer scientist.
This entry was posted in OOP, RDF and tagged , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s