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

Improvement of the EMF metamodel and model languages #1545

Merged
merged 23 commits into from
Feb 16, 2024

Conversation

tsaglam
Copy link
Member

@tsaglam tsaglam commented Feb 7, 2024

This PR addresses multiple issues with the three EMF language modules, thus improving the modeling plagiarism detection with JPlag. Relates to #576.

This PR includes:

  • Fix subtree reordering normalization for the EMF model language
  • Fix the metamodel parsing for EMF model language
  • Improve the generic textual syntax for EMF (meta)models (GenericEmfTreeView)'
  • Updates to the EMF language module readmes
  • Enables the use of the --normalize flag for the model tree normalization, thus effectively disabling it per default.

The last point references an overhaul of the textual syntax. It now parses any EMF-based model and attempts to derive a textual view from the available information, including names, types, features, values, and so on. This might look good for some models, but not for others. In an ideal world, each metamodel has a dedicated language model with a metamodel-specific visualization. However, as a fallback, this simple textual view should be fine.

Previously, it looked like this:

BookStore
  Book
  Book

Now, it looks like this:

BookStore #0: owner="David Brown", location="Street 12, Top Town, ...", books=["Parry Hotter and the Hallow Deathly", "Harry Potter and the Deathly Hallows"]
  Book #0: name="Parry Hotter and the...", isbn="175112"
  Book #1: name="Harry Potter and the...", isbn="157221"

@tsaglam tsaglam added bug Issue/PR that involves a bug enhancement Issue/PR that involves features, improvements and other changes minor Minor issue/feature/contribution/change language PR / Issue deals (partly) with new and/or existing languages for JPlag labels Feb 7, 2024
@tsaglam tsaglam marked this pull request as ready for review February 13, 2024 10:34
@tsaglam tsaglam added this to the v5.0.0 milestone Feb 13, 2024
@tsaglam tsaglam requested a review from a team February 13, 2024 14:16
@tsaglam tsaglam requested a review from uuqjz February 16, 2024 10:08
Copy link
Contributor

@uuqjz uuqjz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most of my issues stem from EMF

@uuqjz uuqjz self-requested a review February 16, 2024 13:30
Copy link

Quality Gate Passed Quality Gate passed for 'JPlag Plagiarism Detector'

Issues
0 New issues

Measures
0 Security Hotspots
93.2% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

@tsaglam tsaglam merged commit 156b1da into develop Feb 16, 2024
9 checks passed
@tsaglam tsaglam deleted the feature/emf-mode-fixes branch February 16, 2024 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue/PR that involves a bug enhancement Issue/PR that involves features, improvements and other changes language PR / Issue deals (partly) with new and/or existing languages for JPlag minor Minor issue/feature/contribution/change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants