Fixing cross product in getPropertyAsGraphString (parameter root not bound in all cases, fixing using a bindingetset)

This commit is contained in:
REDMOND\brodes
2025-03-07 12:11:12 -05:00
parent 32d29ffde3
commit cf72fde911

View File

@@ -32,13 +32,16 @@ module CryptographyBase<LocationSig Location, InputSig<Location> Input> {
UnknownPropertyValue() { this = "<unknown>" }
}
bindingset[root]
private string getPropertyAsGraphString(NodeBase node, string key, Location root) {
result =
strictconcat(any(string value, Location location, string parsed |
node.properties(key, value, location) and
if location = root or location instanceof UnknownLocation
then parsed = value
else parsed = "(" + value + "," + location.toString() + ")"
(
if location = root or location instanceof UnknownLocation
then parsed = value
else parsed = "(" + value + "," + location.toString() + ")"
)
|
parsed
), ","