AToMPM / AToMPM/atompm

[Transformation Rule Language] Groups of elements fail to have their attributes updated when dropped into RHS

Open
#21 3 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
JavaScript
Stars
25
Forks
15
PR merge metrics
No merged PRs in 30d

Description

opened 10 months ago by claudio

While editing a transformation rule, if a single node is moved into the LHS or RHS, its attributes are updated to contain the default text (result=True, or result=getAttr()), respectively.

This behavior is nice. But it is not consistently implemented.

For example, if I drag two connected nodes to the RHS, the attributes are not updated.

To see why failing to updated the attributes of groups of elements is a terrible thing, consider that the experienced user in creating model transformations (such as myself :p) will first create the match pattern, then duplicate it, drag it to the RHS, and add the remaining changes.

Furthermore, if I create a single link that has attributes, the attributes of the link are not updated at all.

This behavior results in very hard to debug transformations, because the matching rules will fail if the attributes of the elements do not have the code result=True.

If this is hard to implement, then it is better that attributes are not updated at all, since at least the behavior is consistent, and the user can get used to checking that attributes are set correctly. That is basically what I am doing anyway.

Another possible way of mitigating this is to make debugging easier, by issuing a warning whenever motif processes an element which has the default attributes. This should indicate that the user forgot to update those attributes to the correct value.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the single-node, connected-group, and attributed-link drag cases while editing a transformation rule, comparing behavior on the LHS and RHS. Determine the intended consistent behavior before changing anything; done means grouped elements and links handle attributes predictably, with any warning behavior explicitly agreed.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.