Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate class finalization from Universal Translator #14

Closed
aamedina opened this issue Aug 31, 2023 · 1 comment
Closed

Separate class finalization from Universal Translator #14

aamedina opened this issue Aug 31, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request wontfix This will not be worked on

Comments

@aamedina
Copy link
Owner

aamedina commented Aug 31, 2023

Problem:
The Universal Translator component does too much right now. If people want to use a metaobject protocol it isn't clear how to effectively configure it. I think it was useful to develop the MOP but now it presents a challenge introducing the technology to other people. I want to perform the minimum amount of metaobject inferencing when bootstrapping instead and move the full MOP (which does class finalization on every loaded OWL class) into its own component. I originally did write it like this but the cyclic dependencies of the RDF module and MOP module made it convenient to move everything into one library.

Solution:
The essential elements of the MOP I have found are:

  • compute-class-precedence-list / class-precedence-list
  • compute-slots / class-slots / class-direct-slots
  • class-direct-subclasses / class-direct-superclasses

In the MOP RDF vocabulary these are represented by the following RDF properties:

  • :mop/classPrecedenceList
  • :mop/classSlots / :mop/classDirectSlots
  • :mop/classDirectSubclasses

class-direct-superclasses just looks at :rdfs/subClassOf so it doesn't need to be materialized beyond RDFS.

The approach I am considering taking during bootstrap is as follows:

  1. Gather your vocabulary by requiring Clojure namespaces that represent RDF models
  2. Transact all of the vocabulary into Asami local storage "asami:local://.vocab"
  3. Query Asami for all classes (not individuals)
  4. Run the "poor mans" finalize in parallel materializing those essential properties per class.
  5. Transact the updated metaobjects into Asami which becomes your RDF graph
@aamedina aamedina self-assigned this Aug 31, 2023
@aamedina aamedina added the enhancement New feature or request label Aug 31, 2023
@aamedina aamedina added the wontfix This will not be worked on label Sep 7, 2023
@aamedina
Copy link
Owner Author

aamedina commented Sep 7, 2023

After integrating Asami I decided against this

@aamedina aamedina closed this as completed Sep 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant