Skip to main content
Jump to: navigation, search

Eclipse 4diacWiki/Development/Detecting Model Inconsistencies in 4diac Models with OCL

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.


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:
  • 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.

Back to the top