New command in mgf_dev
to test isomorphism between two syntax trees #197
Labels
No labels
Compat/Breaking
Kind
Bad merge
Kind
Bug
Kind
Documentation
Kind
Enhancement
Kind
Feature
Kind
New language
Kind
Security
Kind
Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: mergiraf/mergiraf#197
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When evaluating merge drivers, it is a common approach to search for merge commits in a large set of git repositories, and use the files in those merge commits as gold standard to compare the outputs of merge drivers to (in the case of a conflict-free result). This was done for instance when developing Spork.
Comparing the files for exact contents equality is quite strict. For instance, I don't care too much about the indentation details of the merge driver's output, because those will get normalized by a linter afterwards. It still makes sense to produce a formatting that's as good as possible, but I find it more important to work on bugs which affect the correctness of the merged code.
Therefore, I would find it useful to have a new command in the
mgf_dev
binary, which compares two files for isomorphism of their AST.In a first version, the command could simply use the existing method
AstNode::is_isomorphic_to
on the roots of the parsed files, which would already ignore formatting differences.In an improved version, the algorithm could be refined to accept differences of ordering within the children of commutative parents.
The first version of this isomorphism is implemented, leaving this issue open to add support for commutative parents.