Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "Eclipse 4diacWiki/Development/Detecting Model Inconsistencies in 4diac Models with OCL"
Line 11: | Line 11: | ||
* Two options: | * Two options: | ||
** [https://wiki.eclipse.org/OCL/OCLinEcore Using OCLinEcore] | ** [https://wiki.eclipse.org/OCL/OCLinEcore Using OCLinEcore] | ||
− | ** [https://help.eclipse.org/2020-03/index.jsp?topic=%2Forg.eclipse.ocl.doc%2Fhelp%2FPivotEvaluatingConstraints.html&cp%3D38_6_5 Eclipse OCL project provides standalone usage to create and evaluate OCL constraints and queries in Java] (We should choose this option for better maintainability?) | + | ** [https://help.eclipse.org/2020-03/index.jsp?topic=%2Forg.eclipse.ocl.doc%2Fhelp%2FPivotEvaluatingConstraints.html&cp%3D38_6_5 Eclipse OCL project provides standalone usage to create and evaluate OCL constraints and queries in Java] (We should choose this option for better maintainability? Advantage: It is easier to combine Java code with OCL constraints.) |
* Besides OCL constraints, additional Java code may be required to implement certain requirements (e.g. detecting self-cycles in ECC) | * Besides OCL constraints, additional Java code may be required to implement certain requirements (e.g. detecting self-cycles in ECC) | ||
Revision as of 05:08, 29 May 2020
Overview page of GSoC 2020 Project
The aim of this project is to develop OCL constraints and well-formedness rules to the metamodels of 4diac in order to improve the usability of the IDE.
Contents
Milestones
Requirement specification
- Requirements
- Precise and traceable requirement list for rules which should be validated on the Ecore models
- Assigning the requirements to OCL constraints to facilitate traceability
- OCL constraints: Invariant, pre- and postcondition, derived element, operation body, initial value
- Two options:
- Using OCLinEcore
- Eclipse OCL project provides standalone usage to create and evaluate OCL constraints and queries in Java (We should choose this option for better maintainability? Advantage: It is easier to combine Java code with OCL constraints.)
- Besides OCL constraints, additional Java code may be required to implement certain requirements (e.g. detecting self-cycles in ECC)
Improving 4diac Ecore models
- Adding new elements (e.g. classes and helper operations) to the Ecore models to facilitate the introduction of OCL constraints
- Making suggestions for improvements on the Ecore models (without side-effects!)
Validity view for displaying validation results
- Displaying the violated OCL constraints and the problematic model elements in a user-friendly way
- View:
- Validation Message Dialog?
- Something like the errors and warning view?
- Customizing built-in OCL Validation view?
- Extra feature: Highlighting the problematic model elements in the model editor
Implementing OCL constraints
- Developing the OCL constraints and well-formedness rules based upon the requirement list
- Testing the newly implemented features and constraints
Idea: Function Block Constraint Language (FBCL)
- How should we handle the constraints related to individual FB types?
- How should we handle the semantic issues of individual FB types?
- When creating a Function Block Type in 4diac IDE, users could specify constraints on the particular FB type using a declarative representation (not necessarily a textual DSL) or a graphical interface. e.g. something like MustHaveValue constraints or preventing loops on certain FB types)
- The constraint elements could be saved in .fbt files. Once loaded, they could be translated to OCL constraints and additional Java code.