Add missing cases

This commit is contained in:
Cédric Pasteur 2010-07-09 10:28:16 +02:00
parent 3bf2d82d45
commit 3153a8f241
2 changed files with 9 additions and 2 deletions

View file

@ -82,10 +82,14 @@ and translate v acc_eq_list e =
let re = { re with e_desc = Evar x } in
v,acc_eq_list,
{ e with e_desc = Eiterator(it, op, n, e_list, Some re) }
| Eapp(op, e_list, None) ->
| Eapp(op, e_list, r) ->
let v, acc_eq_list, e_list = translate_list v acc_eq_list e_list in
v, acc_eq_list,
{ e with e_desc = Eapp(op, e_list, None) }
{ e with e_desc = Eapp(op, e_list, r) }
| Eiterator(it, op, n, e_list, r) ->
let v, acc_eq_list, e_list = translate_list v acc_eq_list e_list in
v, acc_eq_list,
{ e with e_desc = Eiterator(it, op, n, e_list, r) }
| Efield(e', field) ->
let v, acc_eq_list, e' = translate v acc_eq_list e' in
v,acc_eq_list,

View file

@ -65,6 +65,9 @@ and translate env e =
| Estruct(e_f_list) ->
{ e with e_desc =
Estruct(List.map (fun (f, e) -> (f, translate env e)) e_f_list) }
| Eiterator(it, app, n, e_list, r) ->
{ e with e_desc = Eiterator(it, app, n,
List.map (translate env) e_list, r) }
let translate_contract env contract =
match contract with