diff options
| author | Kathy Gray | 2014-11-19 00:57:33 +0000 |
|---|---|---|
| committer | Kathy Gray | 2014-11-19 00:57:33 +0000 |
| commit | 4dafe3e6f13c3773348798c7252bec871204ae34 (patch) | |
| tree | 38f02035fdaa786580dd180a9a806d9a09382fd2 /src | |
| parent | 523aae808235dcfdea7358b01fc4eccab70c9f4d (diff) | |
print sparse vectors
Diffstat (limited to 'src')
| -rw-r--r-- | src/lem_interp/printing_functions.ml | 3 |
1 files changed, 2 insertions, 1 deletions
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 |
