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

Allowed characters for names in metamodels #48

Closed
enikao opened this issue Dec 9, 2022 · 1 comment
Closed

Allowed characters for names in metamodels #48

enikao opened this issue Dec 9, 2022 · 1 comment

Comments

@enikao
Copy link
Contributor

enikao commented Dec 9, 2022

Which characters can be used for instances of Metamodel.qualifiedName and NamespacedEntity.simpleName?

Arguments for limiting to small set (e.g. ASCII):

  • Safe

Arguments for big set (e.g. UTF-8):

  • We want to name semantic elements according to their domain, which might be Chinese characters for a chinese banking system.

Do we allow spaces in names?

@enikao enikao added the M3 label Dec 9, 2022
@enikao
Copy link
Contributor Author

enikao commented Jul 10, 2023

On 2023-07-07, we decided to only allow programming language identifiers. More specifically, we allow Java identifiers (https://docs.oracle.com/javase/specs/jls/se20/html/jls-3.html#jls-3.8) with the following modifications:

  • We do NOT allow $ (dollar sign)
  • ReservedKeyword, BooleanLiteral, and NullLiteral (as per Java identifier spec) are allowed identifiers.

Effectively:

  • Names MUST NOT start with a number.
  • Names MUST NOT be empty.
  • Names MUST NOT contain spaces.
  • Names CAN use Unicode characters, numbers, and underscore.

Note: These restrictions only apply to names of Language elements (i.e. M3 concepts/M2 instances). Any language that uses INamed on its own can establish their own constraints.

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

No branches or pull requests

1 participant