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

Implement LMS API endpoint for Model validation #37

Open
hpopov opened this issue Oct 16, 2023 · 0 comments
Open

Implement LMS API endpoint for Model validation #37

hpopov opened this issue Oct 16, 2023 · 0 comments

Comments

@hpopov
Copy link
Contributor

hpopov commented Oct 16, 2023

  1. I need to Override Langium DefaultDocumentValidator to customize acceptor creation in method validateAst.
  2. LMS-aware acceptor should not just accumulate Diagnostic (and later attach it to LangiumDocument), but also add validation info (including messages and, most importantly, AstNodes) to Semantic Domain provided that consumed AstNode is semantically Valid
    1. So far it is easier to implement this for AstNode-based LMS models, leaving out ArtificialAstNodes (perhaps?). However,
    2. You should impove creation of Artificial AstNodes by:
      • Removing name from the Transition -- it is relevant for TransitionIdentity only, it is not used in Transition LMS Model! It will pose some difference in Reconciler (which is OK), but at the same time, Valid Transitions (ArtificialAstNodes) will be available at the same time as Valid Tasks
    3. acceptor can check, if the Valid node is present (or, is the node Valid?), so that validation checks, which do semantic validation only (invalid nodes are not part of LMS model), are ignored
hpopov added a commit that referenced this issue Oct 18, 2023
…he default Langium implementation

This is needed to customize acceptor
hpopov added a commit that referenced this issue Oct 18, 2023
hpopov added a commit that referenced this issue Oct 18, 2023
1. Transition extends ArtificialAstNode
2. Validated
3. sem.Validated (dependent nodes are identified)
4. IdentifiedTransition (Transition itself is identified)
hpopov added a commit that referenced this issue Oct 18, 2023
So that they also take part in LMS Model Validation API endpoint
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