From 35bea85bf7a74f408484beebd7563c9c63cffbf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwena=C3=ABl=20Delaval?= Date: Thu, 26 Jul 2012 01:45:38 +0200 Subject: [PATCH] Boolean: no transformation on inputs/outputs Only translate local variables, so as to not modify node interfaces. --- compiler/heptagon/transformations/boolean.ml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/compiler/heptagon/transformations/boolean.ml b/compiler/heptagon/transformations/boolean.ml index 110e186..9fa34b2 100644 --- a/compiler/heptagon/transformations/boolean.ml +++ b/compiler/heptagon/transformations/boolean.ml @@ -882,15 +882,16 @@ let node ({ n_input = inputs; n_output = outputs; n_contract = contract; n_block = b } as n) = - let inputs,in_loc,in_eq,env = buildenv_var_dec_list Env.empty inputs in - let outputs,out_loc,out_eq,env = buildenv_var_dec_list env outputs in - let contract, env = translate_contract env contract in - let add_locals = in_loc@out_loc in - let add_eqs = in_eq@out_eq in - let b,_ = translate_block env add_locals add_eqs b in + (* let inputs,in_loc,in_eq,env = buildenv_var_dec_list Env.empty inputs in *) + (* let outputs,out_loc,out_eq,env = buildenv_var_dec_list env outputs in *) + let contract, env = translate_contract Env.empty contract in + (* let add_locals = in_loc@out_loc in *) + (* let add_eqs = in_eq@out_eq in *) + (* let b,_ = translate_block env add_locals add_eqs b in *) + let b,_ = translate_block env [] [] b in { n with - n_input = List.rev inputs; - n_output = List.rev outputs; + (* n_input = List.rev inputs; *) + (* n_output = List.rev outputs; *) n_contract = contract; n_block = b }