You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add natural language explanations/descriptions in case OCL constraints are invalid during model validation #499
Currently, I don't think in the OCL metamodel there is a way to specify additional messages to be shown to users when validating models.
In its current form, when modeling objects in the graphical editor, if a constraint is not valid, a "technical" message will be displayed, such as the one below:
Yet, depending on who the user is, this message would be too difficult to understand. This is especially for examples where maybe a technical user defines a DSL with BESSER with constraints, but another less technical attempts to instantiates objects.
It would be helpful to be able to define messages to be displayed depending on the invalid constraints. In the given example, something like "Be sure to choose a realistic age" would make sense.
There was a paper at some point that was proposing this and also even put a "criticality" level so that some constraints should be treated as hard constraints while others could be treated more as warnings
Thank you @Aran30 for pointing this out. We can have both. The criticality as Enum and custom message as String. I'll add this functionality in main/499-add-natural-language-explanationsdescriptions-in-case-ocl-constraints-are-invalid-during-model-validation branch
Activity
jcabot commentedon Apr 17, 2026
There was a paper at some point that was proposing this and also even put a "criticality" level so that some constraints should be treated as hard constraints while others could be treated more as warnings
FitashUlHaq commentedon Apr 17, 2026
Thank you @Aran30 for pointing this out. We can have both. The criticality as Enum and custom message as String. I'll add this functionality in main/499-add-natural-language-explanationsdescriptions-in-case-ocl-constraints-are-invalid-during-model-validation branch
feat: add natural-language descriptions for OCL constraints (#499)
feat: add natural-language descriptions for OCL constraints (#499)
release: v7.6.0 — OCL pre/post end-to-end (metamodel + WME) and Full …