let uid_from_loc = function
        | GlobalVar(uid, _) -> uid
        | LocalVar(uid, _, _) -> uid