Revision 3b2bd83d
Added by Teme Kahsai about 8 years ago
src/typing.ml | ||
---|---|---|
103 | 103 |
| Tydec_any -> new_var () |
104 | 104 |
| Tydec_int -> Type_predef.type_int |
105 | 105 |
| Tydec_real -> Type_predef.type_real |
106 |
| Tydec_float -> Type_predef.type_real
|
|
106 |
(* | Tydec_float -> Type_predef.type_real *)
|
|
107 | 107 |
| Tydec_bool -> Type_predef.type_bool |
108 | 108 |
| Tydec_clock ty -> Type_predef.type_clock (type_coretype type_dim ty) |
109 | 109 |
| Tydec_const c -> Type_predef.type_const c |
... | ... | |
261 | 261 |
match c with |
262 | 262 |
| Const_int _ -> Type_predef.type_int |
263 | 263 |
| Const_real _ -> Type_predef.type_real |
264 |
| Const_float _ -> Type_predef.type_real
|
|
264 |
(* | Const_float _ -> Type_predef.type_real *)
|
|
265 | 265 |
| Const_array ca -> let d = Dimension.mkdim_int loc (List.length ca) in |
266 | 266 |
let ty = new_var () in |
267 | 267 |
List.iter (fun e -> try_unify ty (type_const loc e) loc) ca; |
... | ... | |
344 | 344 |
*) |
345 | 345 |
and type_appl env in_main loc const f args = |
346 | 346 |
let targs = List.map (type_expr env in_main const) args in |
347 |
if Basic_library.is_internal_fun f && List.exists is_tuple_type targs
|
|
347 |
if Basic_library.is_homomorphic_fun f && List.exists is_tuple_type targs
|
|
348 | 348 |
then |
349 | 349 |
try |
350 | 350 |
let targs = Utils.transpose_list (List.map type_list_of_type targs) in |
... | ... | |
542 | 542 |
in environment [env] *) |
543 | 543 |
let type_coreclock env ck id loc = |
544 | 544 |
match ck.ck_dec_desc with |
545 |
| Ckdec_any | Ckdec_pclock (_,_) -> ()
|
|
545 |
| Ckdec_any -> () |
|
546 | 546 |
| Ckdec_bool cl -> |
547 | 547 |
let dummy_id_expr = expr_of_ident id loc in |
548 | 548 |
let when_expr = |
... | ... | |
575 | 575 |
let type_dim d = |
576 | 576 |
begin |
577 | 577 |
type_subtyping_arg (env, vd_env) false true (expr_of_dimension d) Type_predef.type_int; |
578 |
|
|
579 | 578 |
Dimension.eval Basic_library.eval_env eval_const d; |
580 | 579 |
end in |
581 | 580 |
let ty = type_coretype type_dim vdecl.var_dec_type.ty_dec_desc in |
582 | 581 |
|
583 | 582 |
let ty_static = |
584 | 583 |
if vdecl.var_dec_const |
585 |
then Type_predef.type_static (Dimension.mkdim_var ()) ty
|
|
584 |
then Type_predef.type_static (Dimension.mkdim_var ()) ty |
|
586 | 585 |
else ty in |
587 | 586 |
(match vdecl.var_dec_value with |
588 | 587 |
| None -> () |
Also available in: Unified diff
updating to onera version 30f766a:2016-12-04