Commit 9004bddb authored by DAILLER Sylvain's avatar DAILLER Sylvain

Merge branch 'ce_model_value_indices' into 'master'

counterexamples: Indices are now model_value

See merge request !125
parents a3751678 8b2d4302
......@@ -15,6 +15,7 @@ Tools
API
* `Call_provers.print_prover_result` now takes an additional argument
`~json_model` to indicate whether counterexamples are printed using JSON :x:
* Counterexamples: indices of array are now model_value. :x:
Transformations
* `apply`/`rewrite` behaves better in presence of `let`;
......
......@@ -29,15 +29,19 @@ a at 'Old, [[@introduced], [@at:'Old],
[@at:'Old:loc:location],
[@at:'Old:loc:location] = {"type" : "Record" ,
"val" : {"Field" : [{"field" : "elts" , "value" : {"type" : "Array" ,
"val" : [{"indice" : "0" , "value" : {"type" : "Integer" , "val" : "42" } },
{"indice" : "1" , "value" : {"type" : "Integer" , "val" : "42" } },
"val" : [{"indice" : {"type" : "Integer" , "val" : "0" } ,
"value" : {"type" : "Integer" , "val" : "42" } },
{"indice" : {"type" : "Integer" , "val" : "1" } ,
"value" : {"type" : "Integer" , "val" : "42" } },
{"others" : {"type" : "Integer" , "val" : "0" } }] } }, {"field" : "length" ,
"value" : {"type" : "Integer" ,
"val" : "2" } }] } }
a, [[@introduced]] = {"type" : "Record" ,
"val" : {"Field" : [{"field" : "elts" , "value" : {"type" : "Array" ,
"val" : [{"indice" : "0" , "value" : {"type" : "Integer" , "val" : "42" } },
{"indice" : "1" , "value" : {"type" : "Integer" , "val" : "42" } },
"val" : [{"indice" : {"type" : "Integer" , "val" : "0" } ,
"value" : {"type" : "Integer" , "val" : "42" } },
{"indice" : {"type" : "Integer" , "val" : "1" } ,
"value" : {"type" : "Integer" , "val" : "42" } },
{"others" : {"type" : "Integer" , "val" : "0" } }] } }, {"field" : "length" ,
"value" : {"type" : "Integer" ,
"val" : "2" } }] } }
......@@ -45,24 +49,30 @@ Line 38:
a, [[@introduced], [@at:'Old], [@at:'Old:loc:location],
[@at:'Old:loc:location] = {"type" : "Record" ,
"val" : {"Field" : [{"field" : "elts" , "value" : {"type" : "Array" ,
"val" : [{"indice" : "0" , "value" : {"type" : "Integer" , "val" : "42" } },
{"indice" : "1" , "value" : {"type" : "Integer" , "val" : "42" } },
"val" : [{"indice" : {"type" : "Integer" , "val" : "0" } ,
"value" : {"type" : "Integer" , "val" : "42" } },
{"indice" : {"type" : "Integer" , "val" : "1" } ,
"value" : {"type" : "Integer" , "val" : "42" } },
{"others" : {"type" : "Integer" , "val" : "0" } }] } }, {"field" : "length" ,
"value" : {"type" : "Integer" ,
"val" : "2" } }] } }
Line 40:
a, [[@introduced], [@model_trace:a]] = {"type" : "Record" ,
"val" : {"Field" : [{"field" : "elts" , "value" : {"type" : "Array" ,
"val" : [{"indice" : "0" , "value" : {"type" : "Integer" , "val" : "42" } },
{"indice" : "1" , "value" : {"type" : "Integer" , "val" : "42" } },
"val" : [{"indice" : {"type" : "Integer" , "val" : "0" } ,
"value" : {"type" : "Integer" , "val" : "42" } },
{"indice" : {"type" : "Integer" , "val" : "1" } ,
"value" : {"type" : "Integer" , "val" : "42" } },
{"others" : {"type" : "Integer" , "val" : "0" } }] } }, {"field" : "length" ,
"value" : {"type" : "Integer" ,
"val" : "2" } }] } }
Line 41:
a, [[@introduced]] = {"type" : "Record" ,
"val" : {"Field" : [{"field" : "elts" , "value" : {"type" : "Array" ,
"val" : [{"indice" : "0" , "value" : {"type" : "Integer" , "val" : "42" } },
{"indice" : "1" , "value" : {"type" : "Integer" , "val" : "42" } },
"val" : [{"indice" : {"type" : "Integer" , "val" : "0" } ,
"value" : {"type" : "Integer" , "val" : "42" } },
{"indice" : {"type" : "Integer" , "val" : "1" } ,
"value" : {"type" : "Integer" , "val" : "42" } },
{"others" : {"type" : "Integer" , "val" : "0" } }] } }, {"field" : "length" ,
"value" : {"type" : "Integer" ,
"val" : "2" } }] } }
......
......@@ -29,15 +29,19 @@ a at 'Old, [[@introduced], [@at:'Old],
[@at:'Old:loc:location],
[@at:'Old:loc:location] = {"type" : "Record" ,
"val" : {"Field" : [{"field" : "elts" , "value" : {"type" : "Array" ,
"val" : [{"indice" : "0" , "value" : {"type" : "Integer" , "val" : "42" } },
{"indice" : "1" , "value" : {"type" : "Integer" , "val" : "42" } },
"val" : [{"indice" : {"type" : "Integer" , "val" : "0" } ,
"value" : {"type" : "Integer" , "val" : "42" } },
{"indice" : {"type" : "Integer" , "val" : "1" } ,
"value" : {"type" : "Integer" , "val" : "42" } },
{"others" : {"type" : "Integer" , "val" : "0" } }] } }, {"field" : "length" ,
"value" : {"type" : "Integer" ,
"val" : "2" } }] } }
a, [[@introduced]] = {"type" : "Record" ,
"val" : {"Field" : [{"field" : "elts" , "value" : {"type" : "Array" ,
"val" : [{"indice" : "0" , "value" : {"type" : "Integer" , "val" : "42" } },
{"indice" : "1" , "value" : {"type" : "Integer" , "val" : "42" } },
"val" : [{"indice" : {"type" : "Integer" , "val" : "0" } ,
"value" : {"type" : "Integer" , "val" : "42" } },
{"indice" : {"type" : "Integer" , "val" : "1" } ,
"value" : {"type" : "Integer" , "val" : "42" } },
{"others" : {"type" : "Integer" , "val" : "0" } }] } }, {"field" : "length" ,
"value" : {"type" : "Integer" ,
"val" : "2" } }] } }
......@@ -45,24 +49,30 @@ Line 38:
a, [[@introduced], [@at:'Old], [@at:'Old:loc:location],
[@at:'Old:loc:location] = {"type" : "Record" ,
"val" : {"Field" : [{"field" : "elts" , "value" : {"type" : "Array" ,
"val" : [{"indice" : "0" , "value" : {"type" : "Integer" , "val" : "42" } },
{"indice" : "1" , "value" : {"type" : "Integer" , "val" : "42" } },
"val" : [{"indice" : {"type" : "Integer" , "val" : "0" } ,
"value" : {"type" : "Integer" , "val" : "42" } },
{"indice" : {"type" : "Integer" , "val" : "1" } ,
"value" : {"type" : "Integer" , "val" : "42" } },
{"others" : {"type" : "Integer" , "val" : "0" } }] } }, {"field" : "length" ,
"value" : {"type" : "Integer" ,
"val" : "2" } }] } }
Line 40:
a, [[@introduced], [@model_trace:a]] = {"type" : "Record" ,
"val" : {"Field" : [{"field" : "elts" , "value" : {"type" : "Array" ,
"val" : [{"indice" : "0" , "value" : {"type" : "Integer" , "val" : "42" } },
{"indice" : "1" , "value" : {"type" : "Integer" , "val" : "42" } },
"val" : [{"indice" : {"type" : "Integer" , "val" : "0" } ,
"value" : {"type" : "Integer" , "val" : "42" } },
{"indice" : {"type" : "Integer" , "val" : "1" } ,
"value" : {"type" : "Integer" , "val" : "42" } },
{"others" : {"type" : "Integer" , "val" : "0" } }] } }, {"field" : "length" ,
"value" : {"type" : "Integer" ,
"val" : "2" } }] } }
Line 41:
a, [[@introduced]] = {"type" : "Record" ,
"val" : {"Field" : [{"field" : "elts" , "value" : {"type" : "Array" ,
"val" : [{"indice" : "0" , "value" : {"type" : "Integer" , "val" : "42" } },
{"indice" : "1" , "value" : {"type" : "Integer" , "val" : "42" } },
"val" : [{"indice" : {"type" : "Integer" , "val" : "0" } ,
"value" : {"type" : "Integer" , "val" : "42" } },
{"indice" : {"type" : "Integer" , "val" : "1" } ,
"value" : {"type" : "Integer" , "val" : "42" } },
{"others" : {"type" : "Integer" , "val" : "0" } }] } }, {"field" : "length" ,
"value" : {"type" : "Integer" ,
"val" : "2" } }] } }
......
......@@ -34,7 +34,8 @@ a at 'Old, [[@introduced], [@at:'Old],
"val" : "2" } }] } }
a, [[@introduced]] = {"type" : "Record" ,
"val" : {"Field" : [{"field" : "elts" , "value" : {"type" : "Array" ,
"val" : [{"indice" : "0" , "value" : {"type" : "Integer" , "val" : "42" } },
"val" : [{"indice" : {"type" : "Integer" , "val" : "0" } ,
"value" : {"type" : "Integer" , "val" : "42" } },
{"others" : {"type" : "Integer" , "val" : "4" } }] } }, {"field" : "length" ,
"value" : {"type" : "Integer" ,
"val" : "2" } }] } }
......@@ -48,14 +49,16 @@ a, [[@introduced], [@at:'Old], [@at:'Old:loc:location],
Line 40:
a, [[@introduced], [@model_trace:a]] = {"type" : "Record" ,
"val" : {"Field" : [{"field" : "elts" , "value" : {"type" : "Array" ,
"val" : [{"indice" : "0" , "value" : {"type" : "Integer" , "val" : "42" } },
"val" : [{"indice" : {"type" : "Integer" , "val" : "0" } ,
"value" : {"type" : "Integer" , "val" : "42" } },
{"others" : {"type" : "Integer" , "val" : "4" } }] } }, {"field" : "length" ,
"value" : {"type" : "Integer" ,
"val" : "2" } }] } }
Line 41:
a, [[@introduced]] = {"type" : "Record" ,
"val" : {"Field" : [{"field" : "elts" , "value" : {"type" : "Array" ,
"val" : [{"indice" : "0" , "value" : {"type" : "Integer" , "val" : "42" } },
"val" : [{"indice" : {"type" : "Integer" , "val" : "0" } ,
"value" : {"type" : "Integer" , "val" : "42" } },
{"others" : {"type" : "Integer" , "val" : "4" } }] } }, {"field" : "length" ,
"value" : {"type" : "Integer" ,
"val" : "2" } }] } }
......
......@@ -34,7 +34,8 @@ a at 'Old, [[@introduced], [@at:'Old],
"val" : "2" } }] } }
a, [[@introduced]] = {"type" : "Record" ,
"val" : {"Field" : [{"field" : "elts" , "value" : {"type" : "Array" ,
"val" : [{"indice" : "0" , "value" : {"type" : "Integer" , "val" : "42" } },
"val" : [{"indice" : {"type" : "Integer" , "val" : "0" } ,
"value" : {"type" : "Integer" , "val" : "42" } },
{"others" : {"type" : "Integer" , "val" : "4" } }] } }, {"field" : "length" ,
"value" : {"type" : "Integer" ,
"val" : "2" } }] } }
......@@ -48,14 +49,16 @@ a, [[@introduced], [@at:'Old], [@at:'Old:loc:location],
Line 40:
a, [[@introduced], [@model_trace:a]] = {"type" : "Record" ,
"val" : {"Field" : [{"field" : "elts" , "value" : {"type" : "Array" ,
"val" : [{"indice" : "0" , "value" : {"type" : "Integer" , "val" : "42" } },
"val" : [{"indice" : {"type" : "Integer" , "val" : "0" } ,
"value" : {"type" : "Integer" , "val" : "42" } },
{"others" : {"type" : "Integer" , "val" : "4" } }] } }, {"field" : "length" ,
"value" : {"type" : "Integer" ,
"val" : "2" } }] } }
Line 41:
a, [[@introduced]] = {"type" : "Record" ,
"val" : {"Field" : [{"field" : "elts" , "value" : {"type" : "Array" ,
"val" : [{"indice" : "0" , "value" : {"type" : "Integer" , "val" : "42" } },
"val" : [{"indice" : {"type" : "Integer" , "val" : "0" } ,
"value" : {"type" : "Integer" , "val" : "42" } },
{"others" : {"type" : "Integer" , "val" : "4" } }] } }, {"field" : "length" ,
"value" : {"type" : "Integer" ,
"val" : "2" } }] } }
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -3,16 +3,18 @@ bench/ce/record_map.mlw M VC map_record_proj_test1: Timeout or Unknown
Counter-example model:File record_map.mlw:
Line 41:
map_rec, [[@model_projected], [@introduced]] = {"type" : "Array" ,
"val" : [{"indice" : "true" , "value" : {"type" : "Record" ,
"val" : {"Field" : [{"field" : ".field_f" , "value" : {"type" : "Integer" ,
"val" : "-1" } }, {"field" : "g" , "value" : {"type" : "Boolean" ,
"val" : false } }] } } }, {"others" : {"type" : "Record" ,
"val" : {"Field" : [{"field" : ".field_f" , "value" : {"type" : "Integer" ,
"val" : "0" } }, {"field" : "g" , "value" : {"type" : "Boolean" ,
"val" : [{"indice" : {"type" : "Boolean" , "val" : true } ,
"value" : {"type" : "Record" , "val" : {"Field" : [{"field" : ".field_f" ,
"value" : {"type" : "Integer" , "val" : "-1" } }, {"field" : "g" ,
"value" : {"type" : "Boolean" , "val" : false } }] } } },
{"others" : {"type" : "Record" , "val" : {"Field" : [{"field" : ".field_f" ,
"value" : {"type" : "Integer" , "val" : "0" } }, {"field" : "g" ,
"value" : {"type" : "Boolean" ,
"val" : false } }] } } }] }
Line 42:
map_rec, [[@model_projected], [@introduced],
[@model_trace:map_rec]] = {"type" : "Array" , "val" : [{"indice" : "true" ,
[@model_trace:map_rec]] = {"type" : "Array" ,
"val" : [{"indice" : {"type" : "Boolean" , "val" : true } ,
"value" : {"type" : "Record" , "val" : {"Field" : [{"field" : ".field_f" ,
"value" : {"type" : "Integer" , "val" : "-1" } }, {"field" : "g" ,
"value" : {"type" : "Boolean" , "val" : false } }] } } },
......@@ -26,17 +28,19 @@ Counter-example model:File record_map.mlw:
Line 46:
rec_map, [[@model_projected], [@introduced]] = {"type" : "Record" ,
"val" : {"Field" : [{"field" : "f_map" , "value" : {"type" : "Array" ,
"val" : [{"indice" : "true" , "value" : {"type" : "Integer" ,
"val" : "-1" } }, {"others" : {"type" : "Integer" , "val" : "0" } }] } },
{"field" : "g_bool" , "value" : {"type" : "Boolean" ,
"val" : [{"indice" : {"type" : "Boolean" , "val" : true } ,
"value" : {"type" : "Integer" , "val" : "-1" } },
{"others" : {"type" : "Integer" , "val" : "0" } }] } }, {"field" : "g_bool" ,
"value" : {"type" : "Boolean" ,
"val" : false } }] } }
Line 47:
rec_map, [[@model_projected], [@introduced],
[@model_trace:rec_map]] = {"type" : "Record" ,
"val" : {"Field" : [{"field" : "f_map" , "value" : {"type" : "Array" ,
"val" : [{"indice" : "true" , "value" : {"type" : "Integer" ,
"val" : "-1" } }, {"others" : {"type" : "Integer" , "val" : "0" } }] } },
{"field" : "g_bool" , "value" : {"type" : "Boolean" ,
"val" : [{"indice" : {"type" : "Boolean" , "val" : true } ,
"value" : {"type" : "Integer" , "val" : "-1" } },
{"others" : {"type" : "Integer" , "val" : "0" } }] } }, {"field" : "g_bool" ,
"value" : {"type" : "Boolean" ,
"val" : false } }] } }
bench/ce/record_map.mlw M VC record_map_proj_test3: Timeout or Unknown
......
......@@ -3,16 +3,18 @@ bench/ce/record_map.mlw M VC map_record_proj_test1: Timeout or Unknown
Counter-example model:File record_map.mlw:
Line 41:
map_rec, [[@model_projected], [@introduced]] = {"type" : "Array" ,
"val" : [{"indice" : "true" , "value" : {"type" : "Record" ,
"val" : {"Field" : [{"field" : ".field_f" , "value" : {"type" : "Integer" ,
"val" : "-1" } }, {"field" : "g" , "value" : {"type" : "Boolean" ,
"val" : false } }] } } }, {"others" : {"type" : "Record" ,
"val" : {"Field" : [{"field" : ".field_f" , "value" : {"type" : "Integer" ,
"val" : "0" } }, {"field" : "g" , "value" : {"type" : "Boolean" ,
"val" : [{"indice" : {"type" : "Boolean" , "val" : true } ,
"value" : {"type" : "Record" , "val" : {"Field" : [{"field" : ".field_f" ,
"value" : {"type" : "Integer" , "val" : "-1" } }, {"field" : "g" ,
"value" : {"type" : "Boolean" , "val" : false } }] } } },
{"others" : {"type" : "Record" , "val" : {"Field" : [{"field" : ".field_f" ,
"value" : {"type" : "Integer" , "val" : "0" } }, {"field" : "g" ,
"value" : {"type" : "Boolean" ,
"val" : false } }] } } }] }
Line 42:
map_rec, [[@model_projected], [@introduced],
[@model_trace:map_rec]] = {"type" : "Array" , "val" : [{"indice" : "true" ,
[@model_trace:map_rec]] = {"type" : "Array" ,
"val" : [{"indice" : {"type" : "Boolean" , "val" : true } ,
"value" : {"type" : "Record" , "val" : {"Field" : [{"field" : ".field_f" ,
"value" : {"type" : "Integer" , "val" : "-1" } }, {"field" : "g" ,
"value" : {"type" : "Boolean" , "val" : false } }] } } },
......@@ -26,17 +28,19 @@ Counter-example model:File record_map.mlw:
Line 46:
rec_map, [[@model_projected], [@introduced]] = {"type" : "Record" ,
"val" : {"Field" : [{"field" : "f_map" , "value" : {"type" : "Array" ,
"val" : [{"indice" : "true" , "value" : {"type" : "Integer" ,
"val" : "-1" } }, {"others" : {"type" : "Integer" , "val" : "0" } }] } },
{"field" : "g_bool" , "value" : {"type" : "Boolean" ,
"val" : [{"indice" : {"type" : "Boolean" , "val" : true } ,
"value" : {"type" : "Integer" , "val" : "-1" } },
{"others" : {"type" : "Integer" , "val" : "0" } }] } }, {"field" : "g_bool" ,
"value" : {"type" : "Boolean" ,
"val" : false } }] } }
Line 47:
rec_map, [[@model_projected], [@introduced],
[@model_trace:rec_map]] = {"type" : "Record" ,
"val" : {"Field" : [{"field" : "f_map" , "value" : {"type" : "Array" ,
"val" : [{"indice" : "true" , "value" : {"type" : "Integer" ,
"val" : "-1" } }, {"others" : {"type" : "Integer" , "val" : "0" } }] } },
{"field" : "g_bool" , "value" : {"type" : "Boolean" ,
"val" : [{"indice" : {"type" : "Boolean" , "val" : true } ,
"value" : {"type" : "Integer" , "val" : "-1" } },
{"others" : {"type" : "Integer" , "val" : "0" } }] } }, {"field" : "g_bool" ,
"value" : {"type" : "Boolean" ,
"val" : false } }] } }
bench/ce/record_map.mlw M VC record_map_proj_test3: Timeout or Unknown
......
......@@ -5,7 +5,8 @@ Line 5:
i, [[@introduced]] = {"type" : "Integer" ,
"val" : "0" }
t, [[@introduced]] = {"type" : "Array" ,
"val" : [{"indice" : "0" , "value" : {"type" : "Integer" , "val" : "43" } },
"val" : [{"indice" : {"type" : "Integer" , "val" : "0" } ,
"value" : {"type" : "Integer" , "val" : "43" } },
{"others" : {"type" : "Integer" ,
"val" : "0" } }] }
......@@ -5,7 +5,8 @@ Line 5:
i, [[@introduced]] = {"type" : "Integer" ,
"val" : "0" }
t, [[@introduced]] = {"type" : "Array" ,
"val" : [{"indice" : "0" , "value" : {"type" : "Integer" , "val" : "43" } },
"val" : [{"indice" : {"type" : "Integer" , "val" : "0" } ,
"value" : {"type" : "Integer" , "val" : "43" } },
{"others" : {"type" : "Integer" ,
"val" : "0" } }] }
......@@ -5,7 +5,8 @@ Line 5:
i, [[@introduced]] = {"type" : "Integer" ,
"val" : "0" }
t, [[@introduced]] = {"type" : "Array" ,
"val" : [{"indice" : "0" , "value" : {"type" : "Integer" , "val" : "1" } },
"val" : [{"indice" : {"type" : "Integer" , "val" : "0" } ,
"value" : {"type" : "Integer" , "val" : "1" } },
{"others" : {"type" : "Integer" ,
"val" : "1" } }] }
......@@ -5,7 +5,8 @@ Line 5:
i, [[@introduced]] = {"type" : "Integer" ,
"val" : "0" }
t, [[@introduced]] = {"type" : "Array" ,
"val" : [{"indice" : "0" , "value" : {"type" : "Integer" , "val" : "1" } },
"val" : [{"indice" : {"type" : "Integer" , "val" : "0" } ,
"value" : {"type" : "Integer" , "val" : "1" } },
{"others" : {"type" : "Integer" ,
"val" : "1" } }] }
......@@ -105,7 +105,7 @@ type model_value =
| Apply of string * model_value list
| Unparsed of string
and arr_index = {
arr_index_key : string; (* Even array indices can exceed MAX_INT with Z3 *)
arr_index_key : model_value;
arr_index_value : model_value;
}
and model_array = {
......@@ -225,7 +225,7 @@ and convert_indices indices =
match indices with
| [] -> []
| index :: tail ->
let m = Mstr.add "indice" (Json_base.String index.arr_index_key) Mstr.empty in
let m = Mstr.add "indice" (convert_model_value index.arr_index_key) Mstr.empty in
let m = Mstr.add "value" (convert_model_value index.arr_index_value) m in
Json_base.Record m :: convert_indices tail
......@@ -279,16 +279,19 @@ let print_float_human fmt f =
| Float_hexa(s,f) -> fprintf fmt "%s (%g)" s f
let rec print_array_human fmt (arr: model_array) =
let print_others fmt v =
fprintf fmt "@[others =>@ %a@]"
print_model_value_human v in
let print_key_val fmt arr =
let {arr_index_key = key; arr_index_value = v} = arr in
fprintf fmt "@[%s =>@ %a@]"
key print_model_value_human v in
fprintf fmt "@[%a =>@ %a@]"
print_model_value_human key print_model_value_human v in
fprintf fmt
"@[(%a%a)@]"
(Pp.print_list_delim
~start:Pp.nothing ~stop:Pp.comma ~sep:Pp.comma print_key_val)
arr.arr_indices
print_key_val {arr_index_key = "others"; arr_index_value=arr.arr_others}
print_others arr.arr_others
and print_record_human fmt r =
match r with
......
......@@ -40,7 +40,7 @@ type model_value =
| Apply of string * model_value list
| Unparsed of string
and arr_index = {
arr_index_key : string;
arr_index_key : model_value;
arr_index_value : model_value;
}
and model_array = {
......@@ -59,14 +59,13 @@ val array_create_constant :
val array_add_element :
array : model_array ->
index : string ->
index : model_value ->
value : model_value ->
model_array
(** Adds an element to the array.
@param array : the array to that the element will be added
@param index : the index on which the element will be added.
Note that the index must be of value model_value.Integer
@param value : the value of the element to be added
*)
......
......@@ -371,15 +371,6 @@ let refine_variable_value table key t =
let encountered_key = Hstr.create 16 in
refine_variable_value ~enc:encountered_key table key t
(* Conversion to value referenced as defined in model_parser.
We assume that array indices fit into an integer *)
let convert_to_indice t =
match t with
| Sval (Integer i) -> i
| Sval (Bitvector bv) -> bv
| Sval (Boolean b) -> string_of_bool b
| _ -> raise Not_value
let convert_simple_to_model_value (v: simple_value) =
match v with
| Integer i -> Model_parser.Integer i
......@@ -403,7 +394,7 @@ let rec convert_array_value lf (a: array) : Model_parser.model_array =
Model_parser.arr_others = convert_to_model_value lf t}
| Store (a, t1, t2) ->
let new_index =
{ Model_parser.arr_index_key = convert_to_indice t1;
{ Model_parser.arr_index_key = convert_to_model_value lf t1;
Model_parser.arr_index_value = convert_to_model_value lf t2} in
array_indices := new_index :: !array_indices;
create_array_value a in
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment