From ea47086be3b724968053525e8fa795b9cdd77800 Mon Sep 17 00:00:00 2001 From: Maxime Dénès Date: Mon, 30 Dec 2013 10:40:39 -0500 Subject: Support for evars and metas in native compiler. Experimental. Turned out to be much harder to implement than I thought. The main issue is that the reification in the native compiler and the VM is not quite untyped. Indeed, type annotations for lambdas have to be reconstructed. Hence, when reifying an application u = t a1 ... an, the type of t has to be known or reconstructed. It is always possible to do so in plain CIC, when u is in normal form and its type is known. However, with partial terms this may no longer be the case, as in: ?1 a1 ... an. So we also compile and evaluate the type of evars and metas. This still has to be tested more extensively, but the correction of the kernel native conversion (on terms without evars or metas) should not be impacted. Much of this could be reused for the VM. --- kernel/nativecode.mli | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'kernel/nativecode.mli') diff --git a/kernel/nativecode.mli b/kernel/nativecode.mli index f6a0c79f4f..7e70949635 100644 --- a/kernel/nativecode.mli +++ b/kernel/nativecode.mli @@ -38,6 +38,10 @@ val get_match : symbol array -> int -> Nativevalues.annot_sw val get_ind : symbol array -> int -> inductive +val get_meta : symbol array -> int -> metavariable + +val get_evar : symbol array -> int -> existential + val get_symbols_tbl : unit -> symbol array type code_location_update @@ -56,8 +60,8 @@ val compile_constant_field : env -> string -> constant -> val compile_mind_field : string -> module_path -> label -> global list -> mutual_inductive_body -> global list -val mk_conv_code : env -> string -> constr -> constr -> linkable_code -val mk_norm_code : env -> string -> constr -> linkable_code +val mk_conv_code : env -> evars -> string -> constr -> constr -> linkable_code +val mk_norm_code : env -> evars -> string -> constr -> linkable_code val mk_library_header : dir_path -> global list -- cgit v1.2.3