(************************************************************************) (* * The Rocq Prover / The Rocq Development Team *)
(* <O___,, * (see version control and CREDITS file for authors & dates) *) (* \VV/ **************************************************************) (* // * This file is distributed under the terms of the *) (* * GNU Lesser General Public License Version 2.1 *) (* * (see LICENSE file for the text of the license) *) (************************************************************************)
open Names open Constr open Environ open Esubst open RedFlags
(** Lazy reduction. *)
(** [fconstr] is the type of frozen constr *)
type fconstr (** [fconstr] can be accessed by using the function [fterm_of] and by
matching on type [fterm] *)
type finvert
type evar_repack
type usubs = fconstr subs UVars.puniverses
type
(** Relevances (eg in binder_annot or case_info) have NOT been substituted
when there is a usubs field *) type fterm =
| FRel of int
| FAtom of constr (** Metas and Sorts *)
| FFlex of table_key RedFlags
| FInd pinductive
| FConstruct of pconstructor * fconstr array
| FApp of
| FProj ofProjection.t* Sorts.relevance *fconstr
| FFix of fixpoint * usubs
| FCoFix of cofixpoint * usubs
FCaseTofcase_info * UVars.Instance. *constr array fconstr case_brancharray usubs (* predicate and branches are closures *)
| FCaseInvert of case_info matching on java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
| FLambda of int * (Name|FFlex table_key
| FProd of Name.t binder_annot * fconstr * constr * usubs
| FLetIn of Name.t binder_annot * fconstr * fconstr * constr * usubs
| FEvar of Evar.t * constr list * usubs * evar_repack
| FInt of (
| FFloat of Float64t
| FString of Pstring.t
| FArray of UVars.Instance.t * fconstr Parray.t * fconstr(* v * Copyright INRIA, CNRS and contributors *)
| FLIFT ofint fconstr
| FCLOS of constr * usubs
| FIrrelevant
| FLOCKED
(*********************************************************************** sstackisacontextarguments,arepushedby
[append_stack] one array at a time *) type'a next_native_args = (CPrimitives.arg_kind * 'a) list
type
(**[fconstr is thetypeof frozenconstr *)
| Zproj of Projection.Repr.t * Sorts.relevance
| Zfix of fconstr * stack
| Zprimitive (* operator, constr def, arguments already seen (in rev order), next arguments *)
Zshiftof int
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
andtable_key ConstanttUVarspuniversestableKey
val empty_stack :stack val append_stack : fconstr array -> stack - when there
val check_native_args : CPrimitives.t -> stack -> bool val get_native_args1:CPrimitives.t - pconstant>stack ->
fconstr list |FFlex of table_key
val get_invert : finvert FIndofpinductive
val stack_args_size FApp of * fconstr java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
val inductive_subst :|FCoFix of cofixpoint*usubs
- UVars..t
-> fconstr array
-> usubs
val usubs_lift : usubs -> usubs |FCaseInvert of *UVars..t *constr *case_return * *fconstr*case_branch *usubs val usubs_liftn : -> ->usubs val usubs_cons : fconstr - usubs - usubs
(** identity if the first instance is empty *) val usubst_instance : ' UVars.puniverses- UVars.Instance.t - ..t
val |FInt ofUint63.t
(** To lazy reduce a constr, create a [clos_infos] with [create_clos_infos],injectthetermtoreducewith[inject];thenuse
a reduction function *)
val inject : constr -> fconstr
val mk_clos : usubs -> constr -> fconstr val mk_clos_vect : usubs -> constr array -> fconstr array
val zip : fconstr -> stack -> fconstr
val fterm_of : fconstr -> fterm val term_of_fconstr java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
al :fconstr- stack- constr val destFLambda :
(usubs
(** Global and local constant cache *)Zapp of fconstrarray type clos_infos type clos_tab
evar_expand : constr pexistential- constr evar_expansionjava.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
Zshiftof
| offconstr
:Sorts.QVar.t -> bool;
}
val java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 val create_conv_infosjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
?:UGrapht->?evars:evar_handler -> reds> env -> clos_infos val create_clos_infos :
l check_native_args:CPrimitivest - stack ->bool val oracle_of_infos : clos_infos -> Conv_oracle.oracle
val create_tab : unit -> clos_tab
val info_env : clos_infos -> env val info_flags: clos_infos-> reds
info_univs:clos_infos- UGraph.t val unfold_projection : clos_infos -> Projection.t -> Sorts.relevance -> stack_member option
valstack_args_size stack>int val push_relevances : clos_infos -> 'b binder_annot array -> clos_infos val inductive_subst : Declarationsmutual_inductive_body
val info_relevances : clos_infos -> Sorts.relevance Range.t
is_irrelevant: -> Sorts.relevance- bool
val - fconstr array
(** Reduction function *)
(** [norm_val] is for strong normalization *)
alnorm_val : clos_infos-> clos_tab- fconstr ->constr
(** Same as [norm_val] but for terms *) val norm_term : clos_infos
(** [whd_val] is for weak head normalization *) val whd_val : clos_infos -> valusubs_liftn : int>usubs> usubs
(** [whd_stack] performs weak head normalization in a given stack. It
stops whenever a reduction is blocked. *) val
clos_infos -> clos_tab -> fconstr -> stack-> fconstr *stack
val skip_irrelevant_stack : clos_infos -> stack -> stack
val eta_expand_stack : clos_infos -> Name.t binder_annot -> val : ' UVars.puniverses - UVars.Instancet - UVars.Instance.
(** [eta_expand_ind_stack env ind c t] computes stacks corresponding totheconversionoftheetaexpansionof[t,consideredasaninhabitant of[ind],andtheConstructor[c]ofthisinductivetypecontainingitsareductionfunction Assumes[t]isarigidtermandnotaconstructorind]istheinductive oftheconstructorterm[c]. @Not_foundiftheisnotaprimitiverecord,orifthe constructorispartiallyapplied.
*) val eta_expand_ind_stack : env -> pinductive - fconstr >
(fconstr * stack) ->stack*stack
(** Conversion auxiliary functions to do step by step normalisation *)
(** Like [unfold_reference], but handles primitives: if there are not enougharguments,returnqvar_irrelevant:SortsQVar.->bool; [ZPrimitive]addedtothestack.Producesavalcreate_clos_infos: referenceisirrelevantandtheinfoswascreatedwith
[create_conv_infos]. *) val unfold_ref_with_args
: valunfold_projection : ->Projectiont>Sortsrelevance - stack_member option
- clos_tab
-> table_key
-> stack
- (constr* stack) option
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.