let add v d = match d with
    | Top -> Top
    | Value d -> Value (StmtSet.add v d)