-
Notifications
You must be signed in to change notification settings - Fork 4
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
Cannot build a top level PossibleWorld #194
Comments
Yes, this is expected and known behaviour. You can call this a paradox in the original HQDM model. The The challenges arise when things being represented using Magma Core are aggregated together in some maximal way. Rather than changing the MC code to address this (which is possible, but probably worth trying the following first) is to generate the seed possible_worlds manually. This is straightforward. Example possible world created by generating the underlying triples Example possible world being generated manually, but as a an object Treat a single root model as a constant Each of these approaches is manual, but is a quick way to create what is needed to satisfy the MagmaCore builders and hasn't caused many practical issues so far AFAIK. If it becomes a problem for you then we can carry on discussing it here and could lead to changes to MC itself if the case is solid. |
Hi @Fabalab @ClimbingAl , I was going to answer this yesterday but was too busy. The examples from @ClimbingAl are all good, but here are my thoughts as well. I didn't want to update the builder for possible world to refer to itself because this would end up being the default and people wouldn't then think about the problem, so I'm glad to see that you have looked into it! Another alternative I considered earlier was to have a well-known IRI defined in the library for a possible world that represents our world, the world outside any computer system, to act as the root of all possible worlds within any computer system. The 'universal possible world' could then be supplied when using the builder. It's something to think about but in the meantime any of the alternatives above will do. |
Describe the bug
Every possible_world inherits from state and, therefore, must be part of a possible_world. To break the recursion, (ie. for a top-level possible_world) a self reference is needed. However, this is not possible using the builder classes supplied in hqdm-canonical. Should there be an extra,
partOfOwnPossibleWorld()
method on thePossibleWorldBuilder
class that allows you to make this self-referential relationship?To Reproduce
Steps to reproduce the behavior:
Run the following code:
It will return the following error:
The text was updated successfully, but these errors were encountered: