123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697(* Yoann Padioleau
*
* Copyright (C) 2019 r2c
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation, with the
* special exception on linking described in file license.txt.
*
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the file
* license.txt for more details.
*)openOcamlopenAst_generic(*****************************************************************************)(* Prelude *)(*****************************************************************************)(* hooks *)typevisitor_in={kexpr:(expr->expr)*visitor_out->expr->expr;kstmt:(stmt->stmt)*visitor_out->stmt->stmt;kinfo:(tok->tok)*visitor_out->tok->tok;}andvisitor_out={vitem:item->item;vprogram:program->program;vexpr:expr->expr;vany:any->any;}letdefault_visitor={kexpr=(fun(k,_)x->kx);kstmt=(fun(k,_)x->kx);kinfo=(fun(k,_)x->kx);}let(mk_visitor:visitor_in->visitor_out)=funvin->(* start of auto generation *)(* generated by ocamltarzan with: camlp4o -o /tmp/yyy.ml -I pa/ pa_type_conv.cmo pa_map.cmo pr_o.cmo /tmp/xxx.ml *)letrecmap_tokv=(* old: Parse_info.map_info v *)letkx=matchxwith{Parse_info.token=v_pinfo;transfo=v_transfo;}->letv_pinfo=(* todo? map_pinfo v_pinfo *)v_pinfoin(* not recurse in transfo ? *){Parse_info.token=v_pinfo;(* generete a fresh field *)transfo=v_transfo;}invin.kinfo(k,all_functions)vandmap_wrap:'a.('a->'a)->'awrap->'awrap=fun_of_a(v1,v2)->letv1=_of_av1andv2=map_tokv2in(v1,v2)andmap_identv=map_wrapmap_of_stringvandmap_dotted_identv=map_of_listmap_identvandmap_qualifierv=map_dotted_identvandmap_module_name=function|FileNamev1->letv1=map_wrapmap_of_stringv1inFileName((v1))|DottedNamev1->letv1=map_dotted_identv1inDottedName((v1))andmap_resolved_name=function|Localv1->letv1=map_gensymv1inLocal((v1))|Paramv1->letv1=map_gensymv1inParam((v1))|EnclosedVarv1->letv1=map_gensymv1inEnclosedVar((v1))|Globalv1->letv1=map_dotted_identv1inGlobal((v1))|ImportedModulev1->letv1=map_dotted_identv1inImportedModule((v1))|Macro->Macro|EnumConstant->EnumConstantandmap_gensymv=map_of_intvandmap_name(v1,v2)=letv1=map_identv1andv2=map_name_infov2in(v1,v2)andmap_name_info{name_qualifier=v_name_qualifier;name_typeargs=v_name_typeargs}=letv_name_typeargs=map_of_optionmap_type_argumentsv_name_typeargsinletv_name_qualifier=map_of_optionmap_qualifierv_name_qualifierin{name_qualifier=v_name_qualifier;name_typeargs=v_name_typeargs}andmap_id_info{id_resolved=v_id_resolved;id_type=v_id_type}=letv_id_type=map_of_ref(map_of_optionmap_type_)v_id_typeinletv_id_resolved=map_of_ref(map_of_optionmap_resolved_name)v_id_resolvedin{id_resolved=v_id_resolved;id_type=v_id_type}andmap_xmlv1=map_of_listmap_anyv1andmap_exprx=letkx=matchxwith|Lv1->letv1=map_literalv1inL((v1))|Container((v1,v2))->letv1=map_container_operatorv1andv2=map_of_listmap_exprv2inContainer((v1,v2))|Tuplev1->letv1=map_of_listmap_exprv1inTuple((v1))|Recordv1->letv1=map_of_listmap_fieldv1inRecord((v1))|Constructor((v1,v2))->letv1=map_namev1andv2=map_of_listmap_exprv2inConstructor((v1,v2))|Lambda((v1))->letv1=map_function_definitionv1inLambda((v1))|AnonClass((v1))->letv1=map_class_definitionv1inAnonClass((v1))|Nop->Nop|Xmlv1->letv1=map_xmlv1inXmlv1|Name((v1,v2))->letv1=map_namev1andv2=map_id_infov2inName((v1,v2))|IdSpecialv1->letv1=map_wrapmap_specialv1inIdSpecial((v1))|Call((v1,v2))->letv1=map_exprv1andv2=map_argumentsv2inCall((v1,v2))|Assign((v1,v2))->letv1=map_exprv1andv2=map_exprv2inAssign((v1,v2))|AssignOp((v1,v2,v3))->letv1=map_exprv1andv2=map_wrapmap_arithmetic_operatorv2andv3=map_exprv3inAssignOp((v1,v2,v3))|LetPattern((v1,v2))->letv1=map_patternv1andv2=map_exprv2inLetPattern((v1,v2))|ObjAccess((v1,v2))->letv1=map_exprv1andv2=map_identv2inObjAccess((v1,v2))|ArrayAccess((v1,v2))->letv1=map_exprv1andv2=map_exprv2inArrayAccess((v1,v2))|Conditional((v1,v2,v3))->letv1=map_exprv1andv2=map_exprv2andv3=map_exprv3inConditional((v1,v2,v3))|MatchPattern((v1,v2))->letv1=map_exprv1andv2=map_of_listmap_actionv2inMatchPattern((v1,v2))|Yieldv1->letv1=map_exprv1inYield((v1))|Awaitv1->letv1=map_exprv1inAwait((v1))|Cast((v1,v2))->letv1=map_type_v1andv2=map_exprv2inCast((v1,v2))|Seqv1->letv1=map_of_listmap_exprv1inSeq((v1))|Refv1->letv1=map_exprv1inRef((v1))|DeRefv1->letv1=map_exprv1inDeRef((v1))|Ellipsesv1->letv1=map_tokv1inEllipses((v1))|OtherExpr((v1,v2))->letv1=map_other_expr_operatorv1andv2=map_of_listmap_anyv2inOtherExpr((v1,v2))invin.kexpr(k,all_functions)xandmap_literal=function|Unitv1->letv1=map_tokv1inUnit((v1))|Boolv1->letv1=map_wrapmap_of_boolv1inBool((v1))|Intv1->letv1=map_wrapmap_of_stringv1inInt((v1))|Floatv1->letv1=map_wrapmap_of_stringv1inFloat((v1))|Charv1->letv1=map_wrapmap_of_stringv1inChar((v1))|Stringv1->letv1=map_wrapmap_of_stringv1inString((v1))|Regexpv1->letv1=map_wrapmap_of_stringv1inRegexp((v1))|Nullv1->letv1=map_tokv1inNull((v1))|Undefinedv1->letv1=map_tokv1inUndefined((v1))andmap_container_operator=function|Array->Array|List->List|Set->Set|Dict->Dictandmap_special=function|This->This|Super->Super|Self->Self|Parent->Parent|Eval->Eval|Typeof->Typeof|Instanceof->Instanceof|Sizeof->Sizeof|New->New|Concat->Concat|Spread->Spread|ArithOpv1->letv1=map_arithmetic_operatorv1inArithOp((v1))|IncrDecr((v1,v2))->letv1=map_of_incdecv1andv2=map_of_prepostv2inIncrDecr((v1,v2))andmap_of_incdecx=xandmap_of_prepostx=xandmap_arithmetic_operatorx=xandmap_argumentsv=map_of_listmap_argumentvandmap_argument=function|Argv1->letv1=map_exprv1inArg((v1))|ArgTypev1->letv1=map_type_v1inArgType((v1))|ArgKwd((v1,v2))->letv1=map_identv1andv2=map_exprv2inArgKwd((v1,v2))|ArgOther((v1,v2))->letv1=map_other_argument_operatorv1andv2=map_of_listmap_anyv2inArgOther((v1,v2))andmap_other_argument_operatorx=xandmap_action(v1,v2)=letv1=map_patternv1andv2=map_exprv2in(v1,v2)andmap_other_expr_operatorx=xandmap_type_=function|TyBuiltinv1->letv1=map_wrapmap_of_stringv1inTyBuiltin((v1))|TyFun((v1,v2))->letv1=map_of_listmap_type_v1andv2=map_type_v2inTyFun((v1,v2))|TyApply((v1,v2))->letv1=map_namev1andv2=map_type_argumentsv2inTyApply((v1,v2))|TyVarv1->letv1=map_identv1inTyVar((v1))|TyArray((v1,v2))->letv1=map_of_optionmap_exprv1andv2=map_type_v2inTyArray((v1,v2))|TyPointerv1->letv1=map_type_v1inTyPointer((v1))|TyTuplev1->letv1=map_of_listmap_type_v1inTyTuple((v1))|TyQuestionv1->letv1=map_type_v1inTyQuestion((v1))|OtherType((v1,v2))->letv1=map_other_type_operatorv1andv2=map_of_listmap_anyv2inOtherType((v1,v2))andmap_type_argumentsv=map_of_listmap_type_argumentvandmap_type_argument=function|TypeArgv1->letv1=map_type_v1inTypeArg((v1))|OtherTypeArg((v1,v2))->letv1=map_other_type_argument_operatorv1andv2=map_of_listmap_anyv2inOtherTypeArg((v1,v2))andmap_other_type_argument_operator=function|OTA_Question->OTA_Questionandmap_other_type_operator=function|OT_Expr->OT_Expr|OT_Arg->OT_Arg|OT_StructName->OT_StructName|OT_UnionName->OT_UnionName|OT_EnumName->OT_EnumName|OT_Shape->OT_Shape|OT_Variadic->OT_Variadicandmap_attribute=function|Recursive->Recursive|MutuallyRecursive->MutuallyRecursive|Static->Static|Volatile->Volatile|Extern->Extern|Public->Public|Private->Private|Protected->Protected|Abstract->Abstract|Final->Final|Var->Var|Let->Let|Const->Const|Mutable->Mutable|Generator->Generator|Async->Async|Ctor->Ctor|Dtor->Dtor|Getter->Getter|Setter->Setter|Variadic->Variadic|NamedAttr((v1,v2))->letv1=map_identv1andv2=map_of_listmap_anyv2inNamedAttr((v1,v2))|OtherAttribute((v1,v2))->letv1=map_other_attribute_operatorv1andv2=map_of_listmap_anyv2inOtherAttribute((v1,v2))andmap_other_attribute_operatorx=xandmap_stmtx=letkx=matchxwith|ExprStmtv1->letv1=map_exprv1inExprStmt((v1))|DefStmtv1->letv1=map_definitionv1inDefStmt((v1))|DirectiveStmtv1->letv1=map_directivev1inDirectiveStmt((v1))|Blockv1->letv1=map_of_listmap_stmtv1inBlock((v1))|If((v1,v2,v3))->letv1=map_exprv1andv2=map_stmtv2andv3=map_stmtv3inIf((v1,v2,v3))|While((v1,v2))->letv1=map_exprv1andv2=map_stmtv2inWhile((v1,v2))|DoWhile((v1,v2))->letv1=map_stmtv1andv2=map_exprv2inDoWhile((v1,v2))|For((v1,v2))->letv1=map_for_headerv1andv2=map_stmtv2inFor((v1,v2))|Switch((v1,v2))->letv1=map_exprv1andv2=map_of_listmap_case_and_bodyv2inSwitch((v1,v2))|Returnv1->letv1=map_exprv1inReturn((v1))|Continuev1->letv1=map_of_optionmap_exprv1inContinue((v1))|Breakv1->letv1=map_of_optionmap_exprv1inBreak((v1))|Label((v1,v2))->letv1=map_labelv1andv2=map_stmtv2inLabel((v1,v2))|Gotov1->letv1=map_labelv1inGoto((v1))|Throwv1->letv1=map_exprv1inThrow((v1))|Try((v1,v2,v3))->letv1=map_stmtv1andv2=map_of_listmap_catchv2andv3=map_of_optionmap_finallyv3inTry((v1,v2,v3))|Assert((v1,v2))->letv1=map_exprv1andv2=map_of_optionmap_exprv2inAssert((v1,v2))|OtherStmtWithStmt((v1,v2,v3))->letv1=map_other_stmt_with_stmt_operatorv1andv2=map_exprv2andv3=map_stmtv3inOtherStmtWithStmt((v1,v2,v3))|OtherStmt((v1,v2))->letv1=map_other_stmt_operatorv1andv2=map_of_listmap_anyv2inOtherStmt((v1,v2))invin.kstmt(k,all_functions)xandmap_other_stmt_with_stmt_operatorx=xandmap_case_and_body(v1,v2)=letv1=map_of_listmap_casev1andv2=map_stmtv2in(v1,v2)andmap_case=function|Casev1->letv1=map_exprv1inCase((v1))|Default->Defaultandmap_catch(v1,v2)=letv1=map_patternv1andv2=map_stmtv2in(v1,v2)andmap_finallyv=map_stmtvandmap_labelv=map_identvandmap_for_header=function|ForClassic((v1,v2,v3))->letv1=map_of_listmap_for_var_or_exprv1andv2=map_exprv2andv3=map_exprv3inForClassic((v1,v2,v3))|ForEach((v1,v2))->letv1=map_patternv1andv2=map_exprv2inForEach((v1,v2))andmap_for_var_or_expr=function|ForInitVar((v1,v2))->letv1=map_entityv1andv2=map_variable_definitionv2inForInitVar((v1,v2))|ForInitExprv1->letv1=map_exprv1inForInitExpr((v1))andmap_other_stmt_operatorx=xandmap_pattern=function|PatRecordv1->letv1=map_of_list(fun(v1,v2)->letv1=map_namev1andv2=map_patternv2in(v1,v2))v1inPatRecord((v1))|PatVar((v1,v2))->letv1=map_identv1andv2=map_id_infov2inPatVar((v1,v2))|PatLiteralv1->letv1=map_literalv1inPatLiteral((v1))|PatConstructor((v1,v2))->letv1=map_namev1andv2=map_of_listmap_patternv2inPatConstructor((v1,v2))|PatTuplev1->letv1=map_of_listmap_patternv1inPatTuple((v1))|PatListv1->letv1=map_of_listmap_patternv1inPatList((v1))|PatKeyVal((v1,v2))->letv1=map_patternv1andv2=map_patternv2inPatKeyVal((v1,v2))|PatUnderscorev1->letv1=map_tokv1inPatUnderscore((v1))|PatDisj((v1,v2))->letv1=map_patternv1andv2=map_patternv2inPatDisj((v1,v2))|PatTyped((v1,v2))->letv1=map_patternv1andv2=map_type_v2inPatTyped((v1,v2))|PatAs((v1,v2))->letv1=map_patternv1andv2=(matchv2with|(v1,v2)->letv1=map_identv1andv2=map_id_infov2in(v1,v2))inPatAs((v1,v2))|PatWhen((v1,v2))->letv1=map_patternv1andv2=map_exprv2inPatWhen((v1,v2))|OtherPat((v1,v2))->letv1=map_other_pattern_operatorv1andv2=map_of_listmap_anyv2inOtherPat((v1,v2))andmap_other_pattern_operatorx=xandmap_definition(v1,v2)=letv1=map_entityv1andv2=map_definition_kindv2in(v1,v2)andmap_entity{name=v_name;attrs=v_attrs;type_=v_type_;tparams=v_tparams;info=v_info;}=letv_info=map_id_infov_infoinletv_tparams=map_of_listmap_type_parameterv_tparamsinletv_type_=map_of_optionmap_type_v_type_inletv_attrs=map_of_listmap_attributev_attrsinletv_name=map_identv_namein{name=v_name;attrs=v_attrs;type_=v_type_;tparams=v_tparams;info=v_info;}andmap_definition_kind=function|FuncDefv1->letv1=map_function_definitionv1inFuncDef((v1))|VarDefv1->letv1=map_variable_definitionv1inVarDef((v1))|ClassDefv1->letv1=map_class_definitionv1inClassDef((v1))|TypeDefv1->letv1=map_type_definitionv1inTypeDef((v1))|ModuleDefv1->letv1=map_module_definitionv1inModuleDef((v1))|MacroDefv1->letv1=map_macro_definitionv1inMacroDef((v1))|Signaturev1->letv1=map_type_v1inSignature((v1))andmap_module_definition{mbody=v_mbody}=letv_mbody=map_module_definition_kindv_mbodyin{mbody=v_mbody;}andmap_module_definition_kind=function|ModuleAliasv1->letv1=map_namev1inModuleAlias((v1))|ModuleStruct((v1,v2))->letv1=map_of_optionmap_dotted_identv1andv2=map_of_listmap_itemv2inModuleStruct((v1,v2))|OtherModule((v1,v2))->letv1=map_other_module_operatorv1andv2=map_of_listmap_anyv2inOtherModule((v1,v2))andmap_other_module_operator=function|OMO_Functor->OMO_Functorandmap_macro_definition{macroparams=v_macroparams;macrobody=v_macrobody}=letv_macrobody=map_of_listmap_anyv_macrobodyinletv_macroparams=map_of_listmap_identv_macroparamsin{macroparams=v_macroparams;macrobody=v_macrobody}andmap_type_parameter(v1,v2)=letv1=map_identv1andv2=map_type_parameter_constraintsv2in(v1,v2)andmap_type_parameter_constraintsv=map_of_listmap_type_parameter_constraintvandmap_type_parameter_constraint=function|Extendsv1->letv1=map_type_v1inExtends((v1))andmap_function_definition{fparams=v_fparams;frettype=v_frettype;fbody=v_fbody}=letv_fbody=map_stmtv_fbodyinletv_frettype=map_of_optionmap_type_v_frettypeinletv_fparams=map_parametersv_fparamsin{fparams=v_fparams;frettype=v_frettype;fbody=v_fbody}andmap_parametersv=map_of_listmap_parametervandmap_parameter=function|ParamClassicv1->letv1=map_parameter_classicv1inParamClassic((v1))|ParamPatternv1->letv1=map_patternv1inParamPattern((v1))|OtherParam((v1,v2))->letv1=map_other_parameter_operatorv1andv2=map_of_listmap_anyv2inOtherParam((v1,v2))andmap_parameter_classic{pname=v_pname;pdefault=v_pdefault;ptype=v_ptype;pattrs=v_pattrs;pinfo=v_pinfo;}=letv_pinfo=map_id_infov_pinfoinletv_pattrs=map_of_listmap_attributev_pattrsinletv_ptype=map_of_optionmap_type_v_ptypeinletv_pdefault=map_of_optionmap_exprv_pdefaultinletv_pname=map_identv_pnamein{pname=v_pname;pdefault=v_pdefault;ptype=v_ptype;pattrs=v_pattrs;pinfo=v_pinfo;}andmap_other_parameter_operatorx=xandmap_variable_definition{vinit=v_vinit;vtype=v_vtype}=letv_vtype=map_of_optionmap_type_v_vtypeinletv_vinit=map_of_optionmap_exprv_vinitin{vinit=v_vinit;vtype=v_vtype}andmap_field=function|FieldVar((v1,v2))->letv1=map_entityv1andv2=map_variable_definitionv2inFieldVar((v1,v2))|FieldMethod((v1,v2))->letv1=map_entityv1andv2=map_function_definitionv2inFieldMethod((v1,v2))|FieldDynamic((v1,v2,v3))->letv1=map_exprv1andv2=map_of_listmap_attributev2andv3=map_exprv3inFieldDynamic((v1,v2,v3))|FieldSpreadv1->letv1=map_exprv1inFieldSpread((v1))|FieldStmtv1->letv1=map_stmtv1inFieldStmt((v1))andmap_type_definition{tbody=v_tbody}=letv_tbody=map_type_definition_kindv_tbodyin{tbody=v_tbody}andmap_type_definition_kind=function|OrTypev1->letv1=map_of_listmap_or_type_elementv1inOrType((v1))|AndTypev1->letv1=map_of_listmap_fieldv1inAndType((v1))|AliasTypev1->letv1=map_type_v1inAliasType((v1))|Exception((v1,v2))->letv1=map_identv1andv2=map_of_listmap_type_v2inException((v1,v2))|OtherTypeKind((v1,v2))->letv1=map_other_type_kind_operatorv1andv2=map_of_listmap_anyv2inOtherTypeKind((v1,v2))andmap_other_type_kind_operatorx=xandmap_or_type_element=function|OrConstructor((v1,v2))->letv1=map_identv1andv2=map_of_listmap_type_v2inOrConstructor((v1,v2))|OrEnum((v1,v2))->letv1=map_identv1andv2=map_exprv2inOrEnum((v1,v2))|OrUnion((v1,v2))->letv1=map_identv1andv2=map_type_v2inOrUnion((v1,v2))|OtherOr((v1,v2))->letv1=map_other_or_type_element_operatorv1andv2=map_of_listmap_anyv2inOtherOr((v1,v2))andmap_other_or_type_element_operatorx=xandmap_class_definition{ckind=v_ckind;cextends=v_cextends;cimplements=v_cimplements;cbody=v_cbody}=letv_cbody=map_of_listmap_fieldv_cbodyinletv_cimplements=map_of_listmap_type_v_cimplementsinletv_cextends=map_of_listmap_type_v_cextendsinletv_ckind=map_class_kindv_ckindin{ckind=v_ckind;cextends=v_cextends;cimplements=v_cimplements;cbody=v_cbody}andmap_class_kind=function|Class->Class|Interface->Interface|Trait->Traitandmap_directive=function|ImportFrom((v1,v2))->letv1=map_module_namev1andv2=map_of_listmap_aliasv2inImportFrom((v1,v2))|ImportAs((v1,v2))->letv1=map_module_namev1andv2=map_of_optionmap_identv2inImportAs((v1,v2))|OtherDirective((v1,v2))->letv1=map_other_directive_operatorv1andv2=map_of_listmap_anyv2inOtherDirective((v1,v2))andmap_alias(v1,v2)=letv1=map_identv1andv2=map_of_optionmap_identv2in(v1,v2)andmap_other_directive_operatorx=xandmap_item=function|IStmtv1->letv1=map_stmtv1inIStmt((v1))|IDefv1->letv1=map_definitionv1inIDef((v1))|IDirv1->letv1=map_directivev1inIDir((v1))andmap_programv=map_of_listmap_itemvandmap_any=function|Idv1->letv1=map_identv1inId((v1))|Nv1->letv1=map_namev1inN((v1))|Env1->letv1=map_entityv1inEn((v1))|Ev1->letv1=map_exprv1inE((v1))|Sv1->letv1=map_stmtv1inS((v1))|Ssv1->letv1=map_of_listmap_stmtv1inSs((v1))|Tv1->letv1=map_type_v1inT((v1))|Pv1->letv1=map_patternv1inP((v1))|Defv1->letv1=map_definitionv1inDef((v1))|Dirv1->letv1=map_directivev1inDir((v1))|Fldv1->letv1=map_fieldv1inFld((v1))|Div1->letv1=map_dotted_identv1inDi((v1))|Iv1->letv1=map_itemv1inI((v1))|Pav1->letv1=map_parameterv1inPa((v1))|Arv1->letv1=map_argumentv1inAr((v1))|Atv1->letv1=map_attributev1inAt((v1))|Dkv1->letv1=map_definition_kindv1inDk((v1))|Prv1->letv1=map_programv1inPr((v1))andall_functions={vitem=map_item;vprogram=map_program;vexpr=map_expr;vany=map_any;}inall_functions