let help_array_reference_pattern_term s t =
match delta_array_term t with
| None ->
(match bracket_term t with
| None -> Any
| Some (x,n) ->
if is_lformal x then
begin
debug "%s %a[]<%d>" s !Ast_printer.d_logic_var x n;
let dim = brackets_lv_typ x.lv_type in
if n < dim
then
(debug "%s %a has dimension %d ok!"
s !Ast_printer.d_logic_var x n;
Ok (x,false,n))
else
( if dim = n then Any else
(debug "%s %a has dimension %d when need %d!"
s !Ast_printer.d_logic_var x dim n;
Ko (x,false,n)))
end
else Ok(x,false,n)
)
| Some (x,n) ->
debug "%s %a in delta_array term" s !Ast_printer.d_logic_var x;
Ok (x,false,n)