Shared: Make sure getMadRepresentation is unique

This commit is contained in:
Tom Hvitved
2025-06-16 13:47:51 +02:00
parent 30ab9b7b84
commit 41f7138627

View File

@@ -686,6 +686,11 @@ module Make<
derivedFluentFlowPush(_, _, _, head, tail, _) derivedFluentFlowPush(_, _, _, head, tail, _)
} }
pragma[nomagic]
private string getUniqueMadRepresentation(SummaryComponent c) {
result = strictconcat(string s | s = c.getMadRepresentation() | s, "/")
}
/** /**
* A (non-empty) stack of summary components. * A (non-empty) stack of summary components.
* *
@@ -732,7 +737,7 @@ module Make<
exists(SummaryComponent head, SummaryComponentStack tail | exists(SummaryComponent head, SummaryComponentStack tail |
head = this.head() and head = this.head() and
tail = this.tail() and tail = this.tail() and
result = tail.getMadRepresentation() + "." + head.getMadRepresentation() result = tail.getMadRepresentation() + "." + getUniqueMadRepresentation(head)
) )
or or
exists(SummaryComponent c | exists(SummaryComponent c |