Project

General

Profile

« Previous | Next » 

Revision 3e07a17b

Added by Pierre-Loïc Garoche over 2 years ago

Sorting expressions: less bugs

View differences:

src/tools/seal/seal_extract.ml
774 774
          prefix
775 775
        :
776 776
          ((expr * bool) list * (ident * expr) list ) list =
777
  Format.eprintf "Build_switch with %a@."
778
    (Utils.fprintf_list ~sep:",@ "
779
       (fun fmt (id, gel) -> Format.fprintf fmt "%s -> [@[<v 0>%a@ ]@]"
780
                               id
781
                               pp_mdefs gel))
782
    mem_defs;
777
  if !debug then
778
    Format.eprintf "Build_switch with %a@."
779
      (Utils.fprintf_list ~sep:",@ "
780
         (fun fmt (id, gel) -> Format.fprintf fmt "%s -> [@[<v 0>%a@ ]@]"
781
                                 id
782
                                 pp_mdefs gel))
783
      mem_defs;
783 784
  (* if all mem_defs have empty guards, we are done, return prefix,
784 785
     mem_defs expr.
785 786

  
......
1157 1158

  
1158 1159
      )
1159 1160
    in
1160
    Format.eprintf "Map: %i elements@." (UpMap.cardinal map);
1161
    if !debug then Format.eprintf "Map: %i elements@." (UpMap.cardinal map);
1161 1162
    UpMap.fold (fun up (common, disj) accu ->
1162
        Format.eprintf
1163
          "Guards:@.shared: [%a]@.disj: [@[<v 0>%a@ ]@]@.Updates: %a@."
1164
          Guards.pp_short common
1165
          (fprintf_list ~sep:";@ " Guards.pp_long) disj
1166
          UpMap.pp up;
1163
        if !debug then
1164
          Format.eprintf
1165
            "Guards:@.shared: [%a]@.disj: [@[<v 0>%a@ ]@]@.Updates: %a@."
1166
            Guards.pp_short common
1167
            (fprintf_list ~sep:";@ " Guards.pp_long) disj
1168
            UpMap.pp up;
1167 1169
        let disj = clean_disj disj in
1168 1170
        let guard_expr = (gl_as_expr common)@disj in
1169 1171
        

Also available in: Unified diff