1 / 42

Meta-Circularity and MOP in Common Lisp for OWL Full

Meta-Circularity and MOP in Common Lisp for OWL Full. Seiji Koide The Graduate Univ. Advanced Studies (SOKENDAI) Hideaki Takeda National Institute of Informatics and SOKENDAI. Computer Language Semantics. Procedural Semantics Denotational Semantics Axiomatic Semantics.

dash
Download Presentation

Meta-Circularity and MOP in Common Lisp for OWL Full

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Meta-Circularity and MOP in Common Lisp for OWL Full Seiji Koide The Graduate Univ. Advanced Studies (SOKENDAI) Hideaki Takeda National Institute of Informatics and SOKENDAI

  2. Computer Language Semantics • Procedural Semantics • Denotational Semantics • Axiomatic Semantics

  3. Denotational Semantics in CLOS (defpackage :a (:export "Dog""Brian""Species")) (defparameter a:Species (defclass a:Species (cl:standard-class) () (:metaclass cl:standard-class))) (defparameter a:Dog (defclass a:Dog () () (:metaclass a:Species))) (defparameter a:Brian (make-instance 'a:Dog)) Brian Dog Species #<Species Dog> #<standard-class Species> #<a:Dog @ #x20ff6742> World Brian a dog a species

  4. Denotational Semantics in CLOS (defpackage :a (:export "Dog""Brian""Species")) (defparameter a:Species (defclass a:Species (cl:standard-class) () (:metaclass cl:standard-class))) (defparameter a:Dog (defclass a:Dog () () (:metaclass a:Species))) (defparameter a:Brian (make-instance 'a:Dog)) Brian Dog Species #<Species Dog> #<standard-class Species> #<a:Dog @ #x20ff6742> World BrianI DogI SpeciesI

  5. Extensional Semantics in CLOS standard-classI ∈ CEXTI (standard-classI) standard-classI ∈ standard-classI Species #<standard-class standard-class> #<standard-class Species> Dog #<standard-class standard-object> #<Species Dog> BrianI ∈ CEXTI (DogI) DogI ∈ CEXTI (SpeciesI) SpeciesI ∈ CEXTI (standard-classI) Brian #<a:Dog @ #x20ff6742> World BrianI DogI SpeciesI

  6. Meta-Circularity of rdfs:Class • Axiom1: Every class that is an instance of rdfs:ClassI is a subclass of rdfs:ResourceI. • x∈CI=CEXTI(rdfs:ClassI) ⇒ x ⊑ rdfs:ResourceI • Axiom 2: Any class in super-subclass relation is an instance of rdfs:ClassI. • x ⊑ y ⇒ x ∈CI⋀ y ∈CI • Axiom 3: rdfs:ClassI is a subclass of rdfs:ResourceI . • rdfs:ClassI⊑ rdfs:ResourceI ⇒ rdfs:ClassI∈CI ⇒ rdfs:ResourceI∈CI

  7. Meta-Circularity of rdfs:Class • Axiom1: Every class that is an instance of rdfs:ClassI is a subclass of rdfs:ResourceI. • x∈CI=CEXTI(rdfs:ClassI) ⇒ x ⊑ rdfs:ResourceI • Axiom 2: Any class in super-subclass relation is an instance of rdfs:ClassI. • x ⊑ y ⇒ x ∈CI⋀ y ∈CI • Axiom 3: rdfs:ClassI is a subclass of rdfs:ResourceI . • rdfs:ClassI⊑ rdfs:ResourceI Meta-Circularity ⇒ rdfs:ClassI∈CEXTI(rdfs:Class ⇒ rdfs:ResourceI∈CEXTI(rdf ⇒ rdfs:ResourceI⊑rdfs:ResourceI

  8. Meta-Circularity of rdfs:Class • Axiom1: Every class that is an instance of rdfs:ClassI is a subclass of rdfs:ResourceI. • x∈CI=CEXTI(rdfs:ClassI) ⇒ x ⊑ rdfs:ResourceI • Axiom 2: Any class in super-subclass relation is an instance of rdfs:ClassI. • x ⊑ y ⇒ x ∈CI⋀ y ∈CI • Axiom 3: rdfs:ClassI is a subclass of rdfs:ResourceI . • rdfs:ClassI⊑ rdfs:ResourceI ⇒ rdfs:ClassI∈CEXTI(rdfs:Class ⇒ rdfs:ResourceI∈CEXTI(rdf ⇒ rdfs:ResourceI⊑rdfs:ResourceI

  9. Twist Relation of rdfs:Resource and rdfs:Class • rdfs:ClassI⊑ rdfs:ResourceI ⋀ rdfs:ResourceI∈CEXTI(rdfs:ClassI) rdfs:Class rdfs:Resource

  10. Twist Relation of cl:standard-object and cl:standard-class • cl:standard-classI⊑ cl:standard-objectI ⋀ cl:standard-objectI∈CEXTI(cl:standard-classI) cl:standard-class cl:standard-object

  11. Twist Relation of rdfs:Resource and rdfs:Class • cl:standard-classI⊑ cl:standard-objectI ⋀ cl:standard-objectI∈CEXTI(cl:standard-classI) • rdfs:ClassI⊑ rdfs:ResourceI ⋀ rdfs:ResourceI∈CEXTI(rdfs:ClassI) cl:standard-class rdfs:Class cl:standard-object rdfs:Resource

  12. Twist Relation of rdfs:Resource and rdfs:Class • cl:standard-classI⊑ cl:standard-objectI ⋀ cl:standard-objectI∈CEXTI(cl:standard-classI) • rdfs:ClassI⊑ rdfs:ResourceI ⋀ rdfs:ResourceI∈CEXTI(rdfs:ClassI) cl:standard-class rdfs:Class cl:standard-object rdfs:Resource

  13. Twist Relation of rdfs:Resource and rdfs:Class • cl:standard-classI⊑ cl:standard-objectI ⋀ cl:standard-objectI∈CEXTI(cl:standard-classI) metaRDFSclass RDFSclass cl:standard-class rdfs:Class cl:standard-object rdfs:Resource

  14. Twist Relation of rdfs:Resource and rdfs:Class • cl:standard-classI⊑ cl:standard-objectI ⋀ cl:standard-objectI∈CEXTI(cl:standard-classI) metaRDFSclass RDFSclass cl:standard-class rdfs:Class ICEXT(IS(cl:standard-object)) ICEXT(IS(rdfs:Resource)) cl:standard-object rdfs:Resource

  15. Twist Relation of rdfs:Resource and rdfs:Class • cl:standard-classI⊑ cl:standard-objectI ⋀ cl:standard-objectI∈CEXTI(cl:standard-classI) metaRDFSclass RDFSclass cl:standard-class rdfs:Class ICEXT(IS(cl:standard-object)) ICEXT(IS(rdfs:Resource)) IS(cl:standard-class) cl:standard-object rdfs:Resource

  16. Twist Relation of rdfs:Resource and rdfs:Class • cl:standard-classI⊑ cl:standard-objectI ⋀ cl:standard-objectI∈CEXTI(cl:standard-classI) metaRDFSclass RDFSclass cl:standard-class rdfs:Class ICEXT(IS(cl:standard-object)) ICEXT(IS(rdfs:Resource)) IS(cl:standard-class) cl:standard-object rdfs:Resource IS(rdfs:Class)

  17. Twist Relation of rdfs:Resource and rdfs:Class • cl:standard-classI⊑ cl:standard-objectI ⋀ cl:standard-objectI∈CEXTI(cl:standard-classI) metaRDFSclass RDFSclass cl:standard-class rdfs:Class ICEXT(IS(cl:standard-object)) ICEXT(IS(rdfs:Resource)) IS(cl:standard-class) cl:standard-object rdfs:Resource IS(rdfs:Class)

  18. Cyc Ontology 6, * VariedOrderCollection 2,.3,4,5,6, * 2,.3,4,5,6, * 2,.3,4,5,6, * CollectionType SetOrCollectionType CollectionTypeType 1,2,3,4,5,6, * 1,2,3,4,5,6, * 4 SetOrCollection Collection FourthOrderCollection 1,2,3,4,5 3 ThirdOrderCollection FixedOrderCollection 2 SecondOrderCollection 1 FirstOrderCollection

  19. CLOS-Clean Ontology • No class can have any direct and indirect cyclic loop in subclass relation. • No class can have any direct and indirect membership loop but the direct loop of cl:standard-class. • A parallel relation of subclass and membership can exist anywhere among metaclasses. • A twist relation of subclass and membership can exist anywhere among classes and metaclasses.

  20. CLOS Clean Ontology Pattern k1 c m1 m2 m3 o c1 c2 c3

  21. CLOS Clean Ontology Pattern k1 c m1 m2 m3 o c1 c2 c3 O = ICEXT(o) C2 C M2

  22. CLOS Clean Ontology Pattern k1 c m1 m2 m3 o c1 c2 c3 O M1 C M2

  23. Naive Hierarchical Structure of SUMO rdfs:Class sumo:UnitOfMeasure sumo:SystemeInternationalUnit rdfs:Resource sumo:Entity sumo:Abstract sumo:Quantity sumo:PhysicalQuantity sumo:ConstantQuantity sumo:LengthMeasure sumo:Meter

  24. Naive Hierarchical Structure of SUMO rdfs:Class sumo:UnitOfMeasure sumo:SystemeInternationalUnit rdfs:Resource sumo:Entity sumo:Abstract sumo:Quantity sumo:PhysicalQuantity sumo:ConstantQuantity sumo:LengthMeasure sumo:Meter

  25. Naive Hierarchical Structure of SUMO rdfs:Class sumo:UnitOfMeasure sumo:SystemeInternationalUnit rdfs:Resource sumo:Entity sumo:Abstract sumo:Quantity sumo:PhysicalQuantity sumo:ConstantQuantity sumo:LengthMeasure sumo:Meter

  26. Naive Hierarchical Structure of SUMO rdfs:Class sumo:UnitOfMeasure sumo:SystemeInternationalUnit rdfs:Resource sumo:Entity sumo:Abstract sumo:Quantity sumo:PhysicalQuantity sumo:ConstantQuantity sumo:LengthMeasure sumo:Meter

  27. Hierarchical Structure of SUMO rdfs:Class sumo:UnitOfMeasure sumo:SystemeInternationalUnit rdfs:Resource sumo:Entity sumo:Abstract sumo:Quantity sumo:PhysicalQuantity sumo:ConstantQuantity sumo:LengthMeasure sumo:Meter

  28. Domain Inclusiveness of CLOS eql-specializer standard-class specializer class forward-referenced-class t standard-object metaobject slot-definition built-in-class method-combination funcallable-standard-class method standard-method ICEXT(IS(cl:standard-class)) ICEXT(IS(cl:standard-object)) ICEXT(IS(cl:meta-object)) ICEXT(IS(cl:specializer)) ICEXT(IS(cl:class))

  29. Compound Type Specifieres • And • denotes the set of all objects of the type determined by the intersection of the type specs • Or • denotes the set of all objects of the type determined by the union of the type specs • Not • denotes the set of all objects that are not of the type specs ANSI Common Lisp specifies the compound type specifieres;

  30. Compound Type Specifieres • And • denotes the set of all objects of the type determined by the intersection of the type specs • Or • denotes the set of all objects of the type determined by the union of the type specs • Not • denotes the set of all objects that are not of the type specs ANSI Common Lisp specifies the compound type specifieres; determin? class extensions determin? class extensions class extensions

  31. Ternary Truth Table • cl:subtypep • In ANSI Common Lisp returns two values. Then, 〈t, t〉 or 〈nil, t〉 when it is determined but 〈nil, nil〉 when it is not determined. True False Unknown

  32. Ternary Truth Table Conjunction Disjunction Negation

  33. Ternary Truth Table Rewriting Rules for Inclusiveness

  34. Simple Query for Compound Types (defparameter a (defclass a () ())) (defparameter b (defclass b () ())) Query 1: (subtypep ' (and a b) a) Query 2: (subtypep a ' (and a b)) Query 3: (subtypep ' (or a b) a) Query 4: (subtypep a ' (or a b)) Query 5: (subtypep ' (not a) a) Query 6: (subtypep a ' (not a))

  35. Simple Query for Compound Types • And • CEXTI(x ⋀ y)≡ CEXTI(x) ⋂ CEXTI(y) • Or • CEXTI(x⋁y)≡ CEXTI(x) ⋃ CEXTI(y) • Not • ¬CEXTI(x)≡ CEXTI(cl:standard-object) ∖ CEXTI(y) ICEXT(IS(cl:standard-object)) ICEXT(IS(y))

  36. Meta-modeling and Reflection • Meta-modeling in SWCLOS UnitOfMeasureClass rdfs:Class sumo:UnitOfMeasure sumo:SystemeInternationalUnit

  37. Meta-modeling and Reflection • Meta-modeling in SWCLOS (defConcept UnitOfMeasureClass (rdfs:type rdfs:Class) (rdfs:subClassOf rdfs:Class)) (defProperty p1 (rdfs:domain UnitofMeasureClass))

  38. Conclusion • Explained meta-circularity and meta-modeling in CLOS in terms of denotational and extensional semantics, which are obtained from the W3C document of RDF Semantics Recommendation. • The membership loop of the cl:standard-class and the twist relation between cl:standard-class and cl:standard-object are similar to those of the rdfs:Class and rdfs:Resource. • Addressed the CLOS clean meta-modeling for ontology construction.

  39. Steel-Bank-Common-Lisp SB-MOP:SPECIALIZER SB-PCL::EXACT-CLASS-SPECIALIZER SB-PCL::SPECIALIZER-WITH-OBJECT SB-MOP:SLOT-DEFINITION SB-PCL::STANDARD-SPECIALIZER SB-MOP::METAOBJECT METHOD-COMBINATION METHOD GENERIC-FUNCTION T SB-PCL::SLOT-OBJECT STANDRD-OBJECT FUNDAMENTAL-STREAM SB-PCL::PLIST-MIXIN SB-PCL::DEFINITION-SOURCE-MIXIN STRUCTURE-OBJECT SB-MOP:FUNCALLABLE-STANDARD-OBJECT CONDITION

  40. Steel-Bank-Common-Lisp BUILT-IN-CLASS SB-MOP::FORWARD-REFERENCED-CLASS SB-PCL::STANDARD-SPECIALIZER CLASS SB-PCL::PCL-CLASS SB-PCL::SLOT-CLASS SB-MOP:EQL-SPECIALIZER SB-PCL::CLASS-PROTOTYPE-SPECIALIZER SB-PCL::CLASS-EQ-SPECIALIZER STRUCTURE-CLASS SB-PCL::CONDITION-CLASS SB-PCL::STD-CLASS STANDARD-CLASS SB-MOP:FUNCALLABLE-STANDARD-CLASS

  41. LispWorks STRUCTURE-CLASS STANDARD-CLASS CLASS FORWARD-REFERENCED-CLASS BUILT-IN-CLASS METAOBJECT SLOT-DEFINITION METHOD-COMBINATION METHOD GENERIC-FUNCTION T STANDRD-OBJECT LISPWORKS-TOOLS::APPLICATION CAPI:GRAPH-OBJECT CAPI::DROP-OBJECT :

  42. Allegro aclmop:funcallable-standard-class excl::std-class standard-class excl::clos-class structure-class excl::nonstd-class class foreign-functions::foreign-structure aclmop:specializer aclmop:eql-specializer aclmop:metaobject aclmop:slot-definition method-combination method generic-function t standard-object excl::plist-mixin aclmop:funcallable-standard-object condition :

More Related