Ignore:
Timestamp:
Nov 28, 2011, 3:13:14 PM (9 years ago)
Author:
tranquil
Message:
  • corrected previous bug
  • finished propagating immediates
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Deliverables/D2.2/8051/src/RTLabs/constPropagation.ml

    r1569 r1572  
    1717
    1818module L  = struct
    19        
    20         (* bottom will be when the map is undefined, so we do not need it explicitly*)
    21         type t =
    22                 | T
    23                 | V of Mem.Value.t
    24                 | S (* stack: could add offset *)
    25                 | A of AST.ident (* address symbol *)
     19
     20  (* bottom will be when the map is undefined, so we do not need it explicitly*)
     21  type t =
     22    | T
     23    | V of Mem.Value.t
     24    | S (* stack: could add offset *)
     25    | A of AST.ident (* address symbol *)
    2626
    2727  type property =
     
    2929
    3030  let bottom : property =
    31                 Register.FlexMap.empty
     31    Register.FlexMap.empty
    3232
    3333  let join_t x y = match x, y with
    34                 | V v1, V v2 when Mem.Value.equal v1 v2 -> V v1
    35                 | S, S -> S
    36                 | A i, A j when i = j -> A i
    37                 | _ -> T
     34    | V v1, V v2 when Mem.Value.equal v1 v2 -> V v1
     35    | S, S -> S
     36    | A i, A j when i = j -> A i
     37    | _ -> T
    3838
    3939  let join : property -> property -> property =
    40                 let choose i b1 b2 = match b1, b2 with
    41                         | Some v, Some v' -> Some (join_t v v')
    42                         | Some v, None | None, Some v -> Some v
    43                         | _ -> None in
    44                 Register.FlexMap.merge choose
    45 
    46         let bind = Register.FlexMap.add
    47        
    48         let find = Register.FlexMap.find
    49        
    50         let rem = Register.FlexMap.remove
    51                
    52         let mem = Register.FlexMap.mem
    53        
    54         let is_cst i p =
    55                 try
    56                         match find i p with
    57                                 | T -> false
    58                                 | _ -> true
    59                 with
    60                         | Not_found -> false
     40    let choose i b1 b2 = match b1, b2 with
     41      | Some v, Some v' -> Some (join_t v v')
     42      | Some v, None | None, Some v -> Some v
     43      | _ -> None in
     44    Register.FlexMap.merge choose
     45
     46  let bind = Register.FlexMap.add
     47
     48  let find = Register.FlexMap.find
     49
     50  let rem = Register.FlexMap.remove
     51
     52  let mem = Register.FlexMap.mem
     53
     54  let is_cst i p =
     55    try
     56      match find i p with
     57        | T -> false
     58        | _ -> true
     59    with
     60      | Not_found -> false
    6161
    6262  let find_cst i p =
    6363    match find i p with
    64             | T -> raise Not_found
    65             | v -> v
    66 
    67                
     64      | T -> raise Not_found
     65      | v -> v
    6866
    6967  let is_top i p =
    7068    try
    71         match find i p with
    72             | T -> true
    73                                                 | _ -> false
     69      match find i p with
     70        | T -> true
     71        | _ -> false
    7472    with
    75         | Not_found -> false
    76        
    77         let is_zero i p =
    78                 try
     73      | Not_found -> false
     74
     75  let is_zero i p =
     76    try
    7977      match find i p with
    80                                 | V v -> Mem.Value.is_false v
     78        | V v -> Mem.Value.is_false v
    8179        | _ -> false
    82       with
    83                                 | Not_found -> false
    84        
     80    with
     81      | Not_found -> false
     82
    8583  let equal : property -> property -> bool =
    86                 Register.FlexMap.equal (fun x y -> match x, y with
    87                         | T, T | S, S -> true
    88                         | V v1, V v2 -> Mem.Value.equal v1 v2
    89                         | A i, A j -> i = j
    90                         | _ -> false)
     84    Register.FlexMap.equal (fun x y -> match x, y with
     85      | T, T | S, S -> true
     86      | V v1, V v2 -> Mem.Value.equal v1 v2
     87      | A i, A j -> i = j
     88      | _ -> false)
    9189
    9290  let is_maximal _ = false
    93        
    94         let print = function
     91
     92  let print = function
    9593    | T -> "T"
    9694    | V v -> Mem.Value.to_string v
     
    103101
    104102module Eval = CminorInterpret.Eval_op (Mem)
    105   (* evaluation happens in RTLabs memory model ... *)
     103(* evaluation happens in RTLabs memory model ... *)
    106104
    107105module MemTarget = Memory.Make (Driver.TargetArch)
    108   (* ... but for sizeof and offsets, which rely on the target memory model *)
     106(* ... but for sizeof and offsets, which rely on the target memory model *)
    109107
    110108open AST
     
    123121  | Cst_offset off -> L.V (Mem.Value.of_int (MemTarget.concrete_offset off))
    124122  | Cst_sizeof t' ->
    125           L.V (cast_to_std t (Mem.Value.of_int (MemTarget.concrete_size t')))
    126         | Cst_stack -> L.S
    127         | Cst_addrsymbol i -> L.A i
    128         | _ -> assert false (* won't call in these cases *)
    129 
    130 let do_the_op1 type_of i j op x = match op, x with
    131         | _, L.V v -> L.V (Eval.op1 (type_of i) (type_of j) op v)
    132         | Op_id, _ -> x
     123    L.V (cast_to_std t (Mem.Value.of_int (MemTarget.concrete_size t')))
     124  | Cst_stack -> L.S
     125  | Cst_addrsymbol i -> L.A i
     126  | _ -> assert false (* won't call in these cases *)
     127
     128let arg_type type_of = function
     129  | Reg r -> type_of r
     130  | Imm (_, t) -> t
     131
     132let find_arg a prop = match a with
     133  | Reg r -> L.find r prop
     134  | Imm (k, t) -> cst t k
     135
     136let do_the_op1
     137    (op : op1)
     138    (type_of : Register.t -> sig_type)
     139    (prop : F.property)
     140    (i : Register.t)
     141    (j : Register.t)
     142    : L.t =
     143  let x = L.find j prop in
     144  match op, x with
     145  | _, L.V v -> L.V (Eval.op1 (type_of i) (type_of j) op v)
     146  | Op_id, _ -> x
    133147  | _ -> L.T
    134148
    135 let do_the_op2 type_of i j k op x y = match x, y, op with
    136         (* consider a constant division by 0 as not constant *)
    137         | L.V _, L.V v2, (Op_div | Op_divu | Op_mod | Op_modu)
    138           when Mem.Value.is_false v2 -> L.T
    139         | L.V v1, L.V v2, _ ->
    140                 L.V (Eval.op2 (type_of i) (type_of j) (type_of k) op v1 v2)
    141         (* ops with stack and address symbols are not considered constant, unless *)
    142         (* clearly so *)
    143         | x, L.V v, (Op_addp | Op_subp) when Mem.Value.is_false v -> x
    144         | _ -> L.T
     149let do_the_op2
     150    (op : op2)
     151    (type_of : Register.t -> sig_type)
     152    (prop : F.property)
     153    (i : Register.t)
     154    (a : argument)
     155    (b : argument)
     156    : L.t =
     157  let x = find_arg a prop in
     158  let y = find_arg b prop in
     159  match x, y, op with
     160  (* consider a constant division by 0 as not constant *)
     161  | L.V _, L.V v2, (Op_div | Op_divu | Op_mod | Op_modu)
     162    when Mem.Value.is_false v2 -> L.T
     163  | L.V v1, L.V v2, _ ->
     164    L.V (Eval.op2
     165           (type_of i)
     166           (arg_type type_of a)
     167           (arg_type type_of b) op v1 v2)
     168  (* ops with stack and address symbols are not considered constant, unless *)
     169  (* clearly so *)
     170  | x, L.V v, (Op_addp | Op_subp) when Mem.Value.is_false v -> x
     171  | _ -> L.T
     172
     173let is_zero_arg a prop = match a with
     174  | Reg r -> L.is_zero r prop
     175  | Imm (Cst_int i, _) -> i = 0
     176  | _ -> false
    145177
    146178(* this is used to mark some results of a bin op as constant even if its *)
    147179(* operands are not both constant *)
    148 let mark_const_op op i j k prop =
    149         match L.is_zero j prop, L.is_zero k prop, op with
    150                 | true, _, (Op_mul | Op_div | Op_divu | Op_mod | Op_modu | Op_and |
    151                             Op_shl | Op_shr | Op_shru | Op_cmpu Cmp_gt)
    152           | _, true, (Op_mul | Op_and | Op_cmpu Cmp_lt) ->
    153                   L.bind i (L.V Mem.Value.zero) prop
     180let mark_const_op op i a b prop =
     181  match is_zero_arg a prop, is_zero_arg b prop, op with
     182    | true, _, (Op_mul | Op_div | Op_divu | Op_mod | Op_modu | Op_and |
     183        Op_shl | Op_shr | Op_shru | Op_cmpu Cmp_gt)
     184    | _, true, (Op_mul | Op_and | Op_cmpu Cmp_lt) ->
     185      L.bind i (L.V Mem.Value.zero) prop
    154186    | true, _, Op_cmpu Cmp_le
    155                 | _, true, Op_cmpu Cmp_ge -> L.bind i (L.V (Mem.Value.of_bool true)) prop
    156                 | _, _, (Op_cmp Cmp_eq | Op_cmpu Cmp_eq | Op_cmpp Cmp_eq)
    157                   when Register.equal j k -> L.bind i (L.V (Mem.Value.of_bool true)) prop
     187    | _, true, Op_cmpu Cmp_ge -> L.bind i (L.V (Mem.Value.of_bool true)) prop
     188    | _, _, (Op_cmp Cmp_eq | Op_cmpu Cmp_eq | Op_cmpp Cmp_eq) ->
     189      (match a, b with
     190        | Reg j, Reg k when Register.equal j k ->
     191          L.bind i (L.V (Mem.Value.of_bool true)) prop
     192        | _ -> L.rem i prop)
    158193    | _, _, (Op_cmp Cmp_ne | Op_cmp Cmp_gt | Op_cmp Cmp_lt |
    159                          Op_cmpu Cmp_ne | Op_cmpu Cmp_gt | Op_cmpu Cmp_lt |
    160                                                  Op_cmpp Cmp_ne | Op_cmpp Cmp_gt | Op_cmpp Cmp_lt)
    161       when Register.equal j k -> L.bind i (L.V (Mem.Value.of_bool false)) prop
    162                 | _ -> L.rem i prop
     194             Op_cmpu Cmp_ne | Op_cmpu Cmp_gt | Op_cmpu Cmp_lt |
     195             Op_cmpp Cmp_ne | Op_cmpp Cmp_gt | Op_cmpp Cmp_lt |
     196             Op_xor) ->
     197      (match a, b with
     198        | Reg j, Reg k when Register.equal j k ->
     199          L.bind i (L.V (Mem.Value.of_bool false)) prop
     200        | _ -> L.rem i prop)
     201    | _ -> L.rem i prop
     202
     203let is_cst_arg prop = function
     204  | Reg r -> L.mem r prop
     205  | Imm _ -> true
    163206
    164207let semantics
    165208    (types : sig_type Register.Map.t)
    166209    (graph : statement Label.Map.t)
    167                 (pred_table : Label.Set.t Label.Map.t)
    168                 (lbl : Label.t)
    169                 (valu : F.valuation)
    170                 : F.property =
    171         let pred_prop = (* the situation at the entry of the statement (in [valu]) *)
    172                 let f pred prop =
    173                         L.join (valu pred) prop in
    174                 Label.Set.fold f (Label.Map.find lbl pred_table) L.bottom in
    175         let type_of r = Register.Map.find r types in
    176         match Label.Map.find lbl graph with
     210    (pred_table : Label.Set.t Label.Map.t)
     211    (lbl : Label.t)
     212    (valu : F.valuation)
     213    : F.property =
     214  let pred_prop = (* the situation at the entry of the statement (in [valu]) *)
     215    let f pred prop =
     216      L.join (valu pred) prop in
     217    Label.Set.fold f (Label.Map.find lbl pred_table) L.bottom in
     218  let type_of r = Register.Map.find r types in
     219  match Label.Map.find lbl graph with
    177220    | St_cst (_, Cst_float _, _) -> error_float ()
    178                 | St_cst (i, k, _) -> L.bind i (cst (type_of i) k) pred_prop
     221    | St_cst (i, k, _) -> L.bind i (cst (type_of i) k) pred_prop
    179222    | St_op1 (op, i, j, _) ->
    180223      (try
    181                                 L.bind i (do_the_op1 type_of i j op (L.find j pred_prop)) pred_prop
    182                         with
    183                                 | Not_found -> L.rem i pred_prop)
    184 
    185     | St_op2 (op,i,Reg j,Reg k,_) when L.mem j pred_prop && L.mem k pred_prop ->
    186                         let j_val = L.find j pred_prop in
    187                         let k_val = L.find k pred_prop in
    188       L.bind i (do_the_op2 type_of i j k op j_val k_val) pred_prop
    189                 | St_op2 (op, i, Reg j, Reg k, _) ->
    190                         mark_const_op op i j k pred_prop
    191                 | St_load (_, _, i, _)
    192                 | St_call_id (_, _, Some i, _, _)
    193                 | St_call_ptr (_, _, Some i, _, _) -> L.rem i pred_prop
     224         L.bind i (do_the_op1 op type_of pred_prop i j) pred_prop
     225       with
     226         | Not_found -> L.rem i pred_prop)
     227    | St_op2 (op, i, a, b, _)
     228      when is_cst_arg pred_prop a && is_cst_arg pred_prop b ->
     229      L.bind i (do_the_op2 op type_of pred_prop i a b) pred_prop
     230    | St_op2 (op, i, a, b, _) ->
     231      mark_const_op op i a b pred_prop
     232    | St_load (_, _, i, _)
     233    | St_call_id (_, _, Some i, _, _)
     234    | St_call_ptr (_, _, Some i, _, _) -> L.rem i pred_prop
    194235    | _ -> pred_prop
    195236
    196237let analyze
    197238    (f_def : internal_function)
    198                 : F.valuation =
    199         (* extract types of registers from the definition *)
     239    : F.valuation =
     240  (* extract types of registers from the definition *)
    200241  let types = RTLabsUtilities.computes_type_map f_def in
    201                
    202         let graph = f_def.f_graph in
    203        
    204         let pred_table = RTLabsUtilities.compute_predecessors graph in
    205        
    206         F.lfp (semantics types graph pred_table)
    207                
     242
     243  let graph = f_def.f_graph in
     244
     245  let pred_table = RTLabsUtilities.compute_predecessors graph in
     246
     247  F.lfp (semantics types graph pred_table)
     248
    208249(* now that the info for constants can be gathered, let's put that to use *)
    209250
    210251(* this will be used to turn values back into constants. Notice: *)
    211 (* 1) if we have mapped a register to a value, it must be an integer *)
    212 (* 2) we are turning abstract offsets and sizes into integers *)
    213 (* 3) this shares the problem with AST constants of representability *)
     252(* 1) we are turning abstract offsets and sizes into integers *)
     253(* 2) this shares the problem with AST constants of representability *)
    214254(*    with ocaml 31 bits integers *)
    215255let cst_of_value = function
    216         | L.V v -> Cst_int (Mem.Value.to_int v)
    217         | L.S -> Cst_stack
    218         | L.A i -> Cst_addrsymbol i
    219         | _ -> invalid_arg "cst_of_value"
     256  | L.V v -> Cst_int (Mem.Value.to_int v)
     257  | L.S -> Cst_stack
     258  | L.A a -> Cst_addrsymbol a
     259  | _ -> invalid_arg "cst_of_value"
     260
     261let arg_from_reg prop types r =
     262  try
     263    Imm (cst_of_value (L.find_cst r prop), Register.Map.find r types)
     264  with
     265    | Not_found -> Reg r
     266
     267let arg_from_arg prop types = function
     268  | Reg i -> arg_from_reg prop types i
     269  | _ as a -> a
     270
     271let copy i a l = match a with
     272  | Reg j -> St_op1 (Op_id, i, j, l)
     273  | _ -> assert false (* should already have been substituted *)
     274
     275let negate i a l = match a with
     276  | Reg j -> St_op1 (Op_negint, i, j, l)
     277  | _ -> assert false (* should already have been substituted *)
    220278
    221279let simpl_imm_op2 op i j k types prop l =
    222         let f r =
    223                 try
    224                         Some (L.find_cst r prop)
    225                 with
    226                         | Not_found -> None in
    227         let one = Mem.Value.of_int 1 in
    228         let type_of r = Register.Map.find r types in
    229         match f j, f k, op with
    230   | Some (L.V v), _, (Op_add | Op_or | Op_xor ) when Mem.Value.is_false v ->
    231     St_op1(Op_id, i, k, l)
    232   | Some (L.V v), _, Op_mul when Mem.Value.equal v one ->
    233     St_op1(Op_id, i, k, l)
    234   | _, Some (L.V v), (Op_add | Op_sub | Op_addp | Op_subp | Op_or | Op_xor)
    235           when Mem.Value.is_false v ->
    236     St_op1(Op_id, i, j, l)
    237   | _, Some (L.V v), Op_mul when Mem.Value.equal v one ->
    238     St_op1(Op_id, i, j, l)
    239   | Some (L.V v), _, Op_sub when Mem.Value.is_false v ->
    240                 St_op1(Op_negint, i, k, l)
    241   | Some v, Some u, _ ->
    242                 let a1 = Imm (cst_of_value v, type_of j) in
    243                 let a2 = Imm (cst_of_value u, type_of k) in
    244                 St_op2(op, i, a1, a2, l)
    245   | Some v, _, _ -> St_op2(op, i, Imm (cst_of_value v, type_of j), Reg k, l)
    246   | _, Some v, _ -> St_op2(op, i, Reg j, Imm (cst_of_value v, type_of k), l)
    247         | _ -> St_op2(op, i, Reg j, Reg k, l)
    248 
    249 let simpl_imm_load q i j types prop l =
    250         try
    251                 let v = L.find_cst i prop in
    252                 St_load(q, Imm (cst_of_value v, Register.Map.find i types), j, l)
    253         with
    254                 | Not_found -> St_load (q, Reg i, j, l)
    255 
    256 let simpl_imm_store q i j types prop l =
    257         let f r =
    258                 try
    259                     Some (L.find_cst r prop)
    260                 with
    261                     | Not_found -> None in
    262         let type_of r = Register.Map.find r types in
    263         match f i, f j with
    264                 | Some v, Some u ->
    265             let a1 = Imm (cst_of_value v, type_of i) in
    266             let a2 = Imm (cst_of_value u, type_of j) in
    267             St_store(q, a1, a2, l)
    268                 | Some v, _ ->
    269                         St_store(q, Imm (cst_of_value v, type_of i), Reg j, l)
    270     | _, Some u ->
    271       St_store(q, Reg i, Imm (cst_of_value u, type_of j), l)
    272                 | _ -> St_store(q, Reg i, Reg j, l)
     280  let f = function
     281    | Imm _ -> None
     282    | Reg r ->
     283      try
     284        Some (L.find_cst r prop)
     285      with
     286        | Not_found -> None in
     287  let one = Mem.Value.of_int 1 in
     288  match f j, f k, op with
     289    | Some (L.V v), _, (Op_add | Op_addp | Op_or | Op_xor )
     290      when Mem.Value.is_false v ->
     291      copy i k l
     292    | Some (L.V v), _, Op_mul when Mem.Value.equal v one ->
     293      copy i j l
     294    | _, Some (L.V v), (Op_add | Op_sub | Op_addp | Op_subp | Op_or | Op_xor)
     295      when Mem.Value.is_false v ->
     296      copy i j l
     297    | _, Some (L.V v), (Op_mul | Op_div)  when Mem.Value.equal v one ->
     298      copy i j l
     299    | Some (L.V v), _, Op_sub when Mem.Value.is_false v ->
     300      negate i j l
     301    | _ ->
     302      St_op2(op, i, arg_from_arg prop types j, arg_from_arg prop types k, l)
    273303
    274304(* we transform statements according to the valuation found out by analyze *)
     
    276306let transform_statement
    277307    (valu : F.valuation)
    278                 (types: sig_type Register.Map.t)
     308    (types: sig_type Register.Map.t)
    279309    (p    : Label.t)
    280                 : statement -> statement = function
    281   | St_cst (i, (Cst_offset _ | Cst_sizeof _), next) ->
    282                 (* we are sure valu has a binding for i, we change the abstract quantities*)
    283                 (* into actual integers *)
    284                 St_cst (i, cst_of_value (L.find_cst i (valu p)), next)
    285         | (St_op1 (_,i,_,next) | St_op2(_,i,_,_,next)) when L.is_cst i (valu p) ->
    286                 St_cst (i, cst_of_value (L.find_cst i (valu p)), next)
    287         | St_op2 (op, i, Reg j, Reg k, l) ->
    288                 simpl_imm_op2 op i j k types (valu p) l
    289   | St_load (q, Reg i, j, l) ->
    290                 simpl_imm_load q i j types (valu p) l
    291         | St_store (q, Reg i, Reg j, l) ->
    292                 simpl_imm_store q i j types (valu p) l
    293   | St_op2 _ | St_load _ | St_store _ ->
    294           assert false (* there should not be any imm argument *)
    295         | St_cond (i, if_true, if_false) as s when L.is_cst i (valu p) ->
    296                 let s = match L.find_cst i (valu p) with
    297                         | L.V v when Mem.Value.is_false v -> St_skip if_false
    298                         | L.V _ | L.A _ -> St_skip if_true
    299                         | _ -> s in s
    300         | stmt -> stmt
    301 
    302 let dom (map : 'a Label.Map.t) : Label.Set.t =
    303         let add key _ = Label.Set.add key in
    304         Label.Map.fold add map Label.Set.empty
     310    : statement -> statement = function
     311      | St_cst (i, (Cst_offset _ | Cst_sizeof _), next) ->
     312        (* we are sure valu has a binding for i, we change the abstract
     313           quantities into actual integers *)
     314        St_cst (i, cst_of_value (L.find_cst i (valu p)), next)
     315      | (St_op1 (_,i,_,next) | St_op2(_,i,_,_,next)) when L.is_cst i (valu p) ->
     316        St_cst (i, cst_of_value (L.find_cst i (valu p)), next)
     317      | St_op2 (op, i, a, b, l) ->
     318        simpl_imm_op2 op i a b types (valu p) l
     319      | St_load (q, a, j, l) ->
     320        St_load(q, arg_from_arg (valu p) types a, j, l)
     321      | St_store (q, a, b, l) ->
     322        St_store (q, arg_from_arg (valu p) types a,
     323                     arg_from_arg (valu p) types b, l)
     324      | St_cond (i, if_true, if_false) as s when L.is_cst i (valu p) ->
     325        let s = match L.find_cst i (valu p) with
     326          | L.V v when Mem.Value.is_false v -> St_skip if_false
     327          | L.V _ | L.A _ -> St_skip if_true
     328          | _ -> s in s
     329      | St_return (Some a) ->
     330        St_return (Some (arg_from_arg (valu p) types a))
     331      | St_call_id (f, args, ret, sg, l) ->
     332        St_call_id (f, List.map (arg_from_arg (valu p) types) args, ret, sg, l)
     333      | St_call_ptr (f, args, ret, sg, l) ->
     334        St_call_ptr (f, List.map (arg_from_arg (valu p) types) args, ret, sg, l)
     335      | St_tailcall_id (f, args, sg) ->
     336        St_tailcall_id (f, List.map (arg_from_arg (valu p) types) args, sg)
     337      | St_tailcall_ptr (f, args, sg) ->
     338        St_tailcall_ptr (f, List.map (arg_from_arg (valu p) types) args, sg)
     339      | stmt -> stmt
    305340
    306341let transform_int_function
    307342    (f_def  : internal_function)
    308                 : internal_function =
    309         let valu = analyze f_def in
    310         (* we transform the graph according to the analysis *)
    311         let types = RTLabsUtilities.computes_type_map f_def in
    312         let graph = Label.Map.mapi (transform_statement valu types) f_def.f_graph in
    313         (* and we eliminate resulting dead code *)
    314         let graph = RTLabsUtilities.dead_code_elim graph f_def.f_entry in
    315         {f_def with f_graph = graph}
     343    : internal_function =
     344  let valu = analyze f_def in
     345        (* we transform the graph according to the analysis *)
     346  let types = RTLabsUtilities.computes_type_map f_def in
     347  let graph = Label.Map.mapi (transform_statement valu types) f_def.f_graph in
     348        (* and we eliminate resulting dead code *)
     349  let graph = RTLabsUtilities.dead_code_elim graph f_def.f_entry in
     350  {f_def with f_graph = graph}
    316351
    317352let transform_function = function
    318         | (id, F_int f_def) -> (id, F_int (transform_int_function f_def))
    319         | f -> f
     353  | (id, F_int f_def) -> (id, F_int (transform_int_function f_def))
     354  | f -> f
    320355
    321356let trans = Languages.RTLabs, function
    322         | Languages.AstRTLabs p ->
    323                 Languages.AstRTLabs {p with functs = List.map transform_function p.functs}
    324         | _ -> assert false
    325 
    326          
     357  | Languages.AstRTLabs p ->
     358    Languages.AstRTLabs {p with functs = List.map transform_function p.functs}
     359  | _ -> assert false
     360
     361
Note: See TracChangeset for help on using the changeset viewer.