Skip to content

Add natural language explanations/descriptions in case OCL constraints are invalid during model validation #499

Closed

Description

@Aran30

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:
Image

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.

Activity

  1. added theissue type on Apr 17, 2026
  2. jcabot commented on Apr 17, 2026

    @jcabot
    Collaborator

    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

  3. FitashUlHaq commented on Apr 17, 2026

    @FitashUlHaq
    Collaborator

    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

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

Metadata

Metadata

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions