From 4dafe3e6f13c3773348798c7252bec871204ae34 Mon Sep 17 00:00:00 2001 From: Kathy Gray Date: Wed, 19 Nov 2014 00:57:33 +0000 Subject: print sparse vectors --- src/lem_interp/printing_functions.ml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/lem_interp') diff --git a/src/lem_interp/printing_functions.ml b/src/lem_interp/printing_functions.ml index 3b98e04e..14701633 100644 --- a/src/lem_interp/printing_functions.ml +++ b/src/lem_interp/printing_functions.ml @@ -125,7 +125,8 @@ let rec val_to_string_internal ((Interp.LMem (_,memory)) as mem) = function with Failure _ -> sprintf "[%s]" (String.concat "; " (List.map (val_to_string_internal mem) l)) in sprintf "%s [%s..%s]" repr (string_of_big_int first_index) (string_of_big_int last_index) - | Interp.V_vector_sparse(first_index,last_index,inc,l,default) -> "sparse_vector: Didn't think this could happen" + | (Interp.V_vector_sparse(first_index,last_index,inc,l,default) as v) -> + val_to_string_internal mem (Interp_lib.fill_in_sparse v) | Interp.V_record(_, l) -> let pp (id, value) = sprintf "%s = %s" (id_to_string id) (val_to_string_internal mem value) in let repr = String.concat "; " (List.map pp l) in -- cgit v1.2.3