
<b>Code snippet</b>: One of PES’s core functions for checking that the purpose of access is allowed by the GDA, checked by our lattice-theoretic Flows-To checker. The function first collects all of the purpose limitations from all of the source datasets being accessed. It then loops through each GDA’s requirements to see if the allowed purposes of the GDA satisfies our flows-to checker on the intended consumption purpose. If not, the flow is marked as unsafe.