equal
deleted
inserted
replaced
323 val restrict_sort = minimize_sort algebra o filter P o Graph.all_succs classes; |
323 val restrict_sort = minimize_sort algebra o filter P o Graph.all_succs classes; |
324 fun restrict_arity tyco (c, (_, Ss)) = |
324 fun restrict_arity tyco (c, (_, Ss)) = |
325 if P c then case sargs (c, tyco) |
325 if P c then case sargs (c, tyco) |
326 of SOME sorts => SOME (c, (c, Ss |> map2 (curry (inter_sort algebra)) sorts |
326 of SOME sorts => SOME (c, (c, Ss |> map2 (curry (inter_sort algebra)) sorts |
327 |> map restrict_sort)) |
327 |> map restrict_sort)) |
|
328 | NONE => NONE |
328 else NONE; |
329 else NONE; |
329 val classes' = classes |> Graph.subgraph P; |
330 val classes' = classes |> Graph.subgraph P; |
330 val arities' = arities |> Symtab.map' (map_filter o restrict_arity); |
331 val arities' = arities |> Symtab.map' (map_filter o restrict_arity); |
331 in (restrict_sort, rebuild_arities pp (make_algebra (classes', arities'))) end; |
332 in (restrict_sort, rebuild_arities pp (make_algebra (classes', arities'))) end; |
332 |
333 |