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

DebugMarker assets should be relatable to other assets #175

Open
mike1813 opened this issue Oct 10, 2024 · 1 comment
Open

DebugMarker assets should be relatable to other assets #175

mike1813 opened this issue Oct 10, 2024 · 1 comment

Comments

@mike1813
Copy link
Member

mike1813 commented Oct 10, 2024

The asset class DebugMarker in the network domain model was introduced to provide a way to debug certain construction patterns.

System modeller already provides one construction pattern debugging diagnostic: when an inferred asset is created, system modeller adds a property core#createdByPattern referring to the domain model construction pattern that created it. However, this is of limited use, because:

  • if the asset is created by two CP (both creating an asset with the same URI), the core#createdByPattern property may only refer to one CP
  • the core#createdByPattern indicates which domain model CP was responsible, but not which assets matched to trigger the CP
  • the core#createdByPattern does not exist for relationships, so it provides no information about a domain model CP that only creates relationships

Adding a DebugMarker to the CP as an inferred asset overcomes the last point, by providing a created asset with a core#createdByPattern property even if the original CP created no assets.

The other points can then be overcome by including every root node in the 'INS Includes' list for the inferred DebugMarker. The INS Includes lists the roles of assets whose URI should be used to generate a unique URI for the inferred asset. However, hash functions of the matching asset URIs are used in the new URI, so it is not easy to decode the new URI to find out which assets matched the CP and triggered DebugMarker creation.

Adding links from the inferred DebugMarker asset to assets that matched to trigger the CP provides a better solution. It is much easier to find assets that matched and triggered the CP by following links than by comparing hash values. If two CP created one asset, it should be possble to ensure that each will create a distinct DebugMarker asset, each linked to a different set of matched assets.

Propose that the new relationship should be something like debugLink, from a DebugMarker to any core#Asset.

@mike1813
Copy link
Member Author

We might also want to make DebugMarker and the proposed debugLink into core model entities.

Debugging diagnostic facilities should be available in any domain model, but currently DebugMarker is defined in this domain model, and so is only available in this domain model.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant