Skip to content

Commit

Permalink
Shared: Address model generator review comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelnebel committed Sep 30, 2024
1 parent 0b39c5b commit baae8d0
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -673,23 +673,21 @@ module MakeModelGenerator<
}

private string getReversedHash(PropagateContentFlow::AccessPath ap) {
result = concat(int i | | getHashAtIndex(ap, i), "" order by i desc)
result = strictconcat(int i | | getHashAtIndex(ap, i), "." order by i desc)
}

private string getHash(PropagateContentFlow::AccessPath ap) {
result = concat(int i | | getHashAtIndex(ap, i), "" order by i)
result = strictconcat(int i | | getHashAtIndex(ap, i), "." order by i)
}

/**
* Gets all access paths that contains the synthetic fields
* Gets all access paths that contain the synthetic fields
* from `ap` in reverse order (if `ap` contains at least one synthetic field).
* These are the possible candidates for synthetic path continuations.
*/
private PropagateContentFlow::AccessPath getSyntheticPathCandidate(
PropagateContentFlow::AccessPath ap
) {
hasSyntheticContent(ap) and
hasSyntheticContent(result) and
getHash(ap) = getReversedHash(result)
}

Expand Down

0 comments on commit baae8d0

Please sign in to comment.