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

How fine-grained do we want to split up commands? #317

Open
enikao opened this issue Nov 15, 2024 · 6 comments
Open

How fine-grained do we want to split up commands? #317

enikao opened this issue Nov 15, 2024 · 6 comments
Labels

Comments

@enikao
Copy link
Contributor

enikao commented Nov 15, 2024

In #284, we decided to have fine-grained events, e.g. add/change/remove property as three commands instead of one.

We have other axes to decide upon granularity:

For references:

"entry" = [target, resolveInfo] tuple
We currently have 3 x 3 commands for (adding / changing / removing) x (entry / target / resolveInfo).
This could be reduced to 3 x 1.
Issue: If either target or resolveInfo is optional, but both of them can also be set to null, how to distinguish?

For annotations:

We currently mirrored all containment commands for annotations.
We could handle annotations with containment commands and assume "if feature == null we refer to annotations"

For annotations / containments

We currently have special commands for moving nodes between annotations and containments.
We could handle them without special commands if we assumed "feature == null refers to annotations"

@enikao enikao added the delta label Nov 15, 2024
@joswarmer
Copy link
Contributor

This raises a question: do we allow instances of annotations to appear in a containment? I would expect not to allow this, but I cannot find this in the spec.

@enikao
Copy link
Contributor Author

enikao commented Nov 18, 2024

This raises a question: do we allow instances of annotations to appear in a containment?

We don't distinguish between them on serialization level -- they are all nodes, and only by their meta-pointer (and their containment) we can tell whether they are instances of annotations or concepts.

In M3, Link.type points to Classifier, so an annotation instance can appear in a containment.

@joswarmer
Copy link
Contributor

On the serialisation level we allow many incorrect models according to their languages. My question is whether we find this valid with respect to the language definition. As you say, this is possible now.
But we need to improve this, as we need to either:

  • add a constraint that annotates must be empty/null if the annotation instance is part of a containment, or
  • don't allow instances of annotations to appear in a containment

@dslmeinte
Copy link
Contributor

(These are equivalent statements: we can only disallow instances of annotations to appear in a containment by implementing a constraint.)

@joswarmer
Copy link
Contributor

You are right! The choice still remains to be made.

@dslmeinte
Copy link
Contributor

I'm very much in favor of adding the constraint :)

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

No branches or pull requests

3 participants