Project

General

Profile

« Previous | Next » 

Revision 2fdbc781

Added by Pierre-Loïc Garoche about 8 years ago

Cleaning output:
- no more classic display for ocamlc
- compilation warnings removed

View differences:

src/pathConditions.ml
59 59
    let neg = List.map (compute_neg_expr cpt_pre) l in
60 60
    combine (fun l' -> {expr with expr_desc = Expr_tuple l'}) neg l
61 61

  
62
  | Expr_ite (i,t,e) when (Types.repr t.expr_type).Types.tdesc = Types.Tbool -> 
62
  | Expr_ite (i,t,e) when (Types.repr t.expr_type).Types.tdesc = Types.Tbool -> (
63 63
    let list = [i; t; e] in
64 64
    let neg = List.map (compute_neg_expr cpt_pre) list in
65
    combine (fun [i'; t'; e'] -> {expr with expr_desc = Expr_ite(i', t', e')}) neg list
65
    combine (fun l ->
66
      match l with
67
      | [i'; t'; e'] -> {expr with expr_desc = Expr_ite(i', t', e')}
68
      | _ -> assert false
69
    ) neg list
70
  )
66 71
  | Expr_ite (i,t,e) -> ( (* We return the guard as a new guard *)
67 72
    gen_mcdc_cond_guard i;
68 73
    let list = [i; t; e] in
69 74
    let neg = List.map (compute_neg_expr cpt_pre) list in
70
    combine (fun [i'; t'; e'] -> {expr with expr_desc = Expr_ite(i', t', e')}) neg list
75
    combine (fun l ->
76
      match l with
77
      | [i'; t'; e'] -> {expr with expr_desc = Expr_ite(i', t', e')}
78
      | _ -> assert false
79
    ) neg list
71 80
  )
72 81
  | Expr_arrow (e1, e2) -> 
73 82
    let e1' = compute_neg_expr cpt_pre e1 in
74 83
    let e2' = compute_neg_expr cpt_pre e2 in
75
    combine (fun [x;y] -> { expr with expr_desc = Expr_arrow (x, y) }) [e1'; e2'] [e1; e2]
84
    combine (fun l -> match l with
85
    | [x;y] -> { expr with expr_desc = Expr_arrow (x, y) }
86
    | _ -> assert false
87
    ) [e1'; e2'] [e1; e2]
76 88
  | Expr_pre e -> 
77 89
    List.map 
78 90
      (fun (v, negv) -> (v, { expr with expr_desc = Expr_pre negv } ))

Also available in: Unified diff