Project

General

Profile

Revision a6df3992 src/automata.ml

View differences:

src/automata.ml
69 69

  
70 70
let rec unless_read reads handler =
71 71
  let res =
72
  List.fold_left (fun read (_, c, _, _) -> get_expr_vars read c) reads handler.hand_unless
72
  List.fold_left (fun read (_, c, _, _) -> Utils.ISet.union read (get_expr_vars c)) reads handler.hand_unless
73 73
  in
74 74
(
75 75
(*
......
80 80
)
81 81

  
82 82
let rec until_read reads handler =
83
  List.fold_left (fun read (_, c, _, _) -> get_expr_vars read c) reads handler.hand_until
83
  List.fold_left (fun read (_, c, _, _) -> Utils.ISet.union read (get_expr_vars c)) reads handler.hand_until
84 84

  
85 85
let rec handler_read reads handler =
86 86
  let locals = List.fold_left (fun locals v -> ISet.add v.var_id locals) ISet.empty handler.hand_locals in
87 87
  let allvars =
88 88
    List.fold_left (fun read stmt ->
89 89
      match stmt with
90
      | Eq eq -> get_expr_vars read eq.eq_rhs
90
      | Eq eq -> Utils.ISet.union read (get_expr_vars eq.eq_rhs)
91 91
      | Aut aut -> automata_read read aut) reads handler.hand_stmts
92 92
  in let res = ISet.diff allvars locals
93 93
     in

Also available in: Unified diff