package archetype
Module Archetype.TypingSource
Source
type error_desc = | TODO| AEntryExpected of A.ptyp| AlienPattern| AnonymousFieldInEffect| AssertInGlobalSpec| AssetExpected of A.ptyp| AssetOrRecordExpected of A.ptyp| AssetWithoutFields| AssetWithoutPKey| BeforeIrrelevant of [ `Local | `State ]| BeforeOrLabelInExpr| BindingInExpr| CannotAssignArgument of Ident.ident| CannotAssignLoopIndex of Ident.ident| CannotCaptureLocal| CannotInfer| CannotInferAnonAssetOrRecord| CannotInferCollectionType| CannotInitShadowField| CannotUpdatePKey| CollectionExpected| ContainerOfNonAsset| ContractInvariantInLocalSpec| DivergentExpr| DoesNotSupportMethodCall| DuplicatedArgName of Ident.ident| DuplicatedCtorName of Ident.ident| DuplicatedFieldInAssetDecl of Ident.ident| DuplicatedFieldInAssetOrRecordLiteral of Ident.ident| DuplicatedFieldInRecordDecl of Ident.ident| DuplicatedInitMarkForCtor| DuplicatedPkeyField of Ident.ident| DuplicatedVarDecl of Ident.ident| EffectInGlobalSpec| EmptyEnumDecl| ExpressionExpected| ForeignState of Ident.ident option * Ident.ident option| FormulaExpected| IncompatibleTypes of A.ptyp * A.ptyp| IndexOutOfBoundForTuple| InvalidArcheTypeDecl| InvalidAssetCollectionExpr of A.ptyp| InvalidAssetExpression| InvalidCallByExpression| InvalidEffectForCtn of A.container * A.container list| InvalidEntryDescription| InvalidEntryExpression| InvalidExpression| InvalidExpressionForEffect| InvalidExprressionForTupleAccess| InvalidFieldsCountInAssetOrRecordLiteral| InvalidForIdentMap| InvalidForIdentSimple| InvalidFormula| InvalidInstruction| InvalidLValue| InvalidMapType| InvalidMethodInExec| InvalidMethodInFormula| InvalidMethodWithBigMap of Ident.ident| InvalidNumberOfArguments of int * int| InvalidRecordFieldType| InvalidRoleExpression| InvalidSecurityEntry| InvalidSecurityRole| InvalidShadowFieldAccess| InvalidShadowVariableAccess| InvalidSortingExpression| InvalidStateExpression| InvalidTypeForDoFailIf| InvalidTypeForDoRequire| InvalidTypeForEntrypoint| InvalidTypeForContract| InvalidTypeForFail| InvalidTypeForMapKey| InvalidTypeForMapValue| InvalidTypeForPk| InvalidTypeForSet| InvalidVarOrArgType| LabelInNonInvariant| LetInElseInInstruction| LetInElseOnNonOption| MethodCallInPredicate| MisorderedPkeyFields| MissingFieldInAssetOrRecordLiteral of Ident.ident| MissingInitValueForShadowField| MixedAnonInAssetOrRecordLiteral| MixedFieldNamesInAssetOrRecordLiteral of Ident.ident list| MoreThanOneInitState of Ident.ident list| MultipleAssetStateDeclaration| MultipleInitialMarker| MultipleMatchingFunction of Ident.ident * A.ptyp list * (A.ptyp list * A.ptyp) list| MultipleMatchingOperator of PT.operator * A.ptyp list * opsig list| MultipleStateDeclaration| NameIsAlreadyBound of Ident.ident * Location.t option| NoLetInInstruction| NoMatchingFunction of Ident.ident * A.ptyp list| NoMatchingOperator of PT.operator * A.ptyp list| NonCodeLabel of Ident.ident| NonIterable| NonIterableBigMapAsset of Ident.ident| NonLoopLabel of Ident.ident| NoSuchMethod of Ident.ident| NoSuchSecurityPredicate of Ident.ident| NotAKeyOfType| NotAnAssetType| NotAnEnumType| NotAPrimitiveType| NotARole of Ident.ident| NumericExpressionExpected| NumericOrCurrencyExpressionExpected| OpInRecordLiteral| OrphanedLabel of Ident.ident| PackUnpackOnNonPrimitive| PartialMatch of Ident.ident list| PostConditionInGlobalSpec| PredicateCallInExpr| ReadOnlyGlobal of Ident.ident| RecordExpected| ReturnInVoidContext| SecurityInExpr| ShadowPKey| ShadowSKey| SpecOperatorInExpr| StringLiteralExpected| TransferWithoutDest| UninitializedVar| UnknownAsset of Ident.ident| UnknownAssetToProperty of Ident.ident| UnknownEntry of Ident.ident| UnknownEnum of Ident.ident| UnknownField of Ident.ident * Ident.ident| UnknownFieldName of Ident.ident| UnknownLabel of Ident.ident| UnknownLocalOrVariable of Ident.ident| UnknownProcedure of Ident.ident| UnknownState of Ident.ident| UnknownTypeName of Ident.ident| UnpureInFormula| UpdateEffectOnPkey| UpdateEffectWithoutDefault| UselessPattern| UsePkeyOfInsteadOfAsset| VoidMethodInExpr| VSetInExpr| VSetOnNonAsset
Source
type groups = {gr_archetypes : (PT.lident * PT.exts) Location.loced list;gr_states : PT.enum_decl Location.loced list;gr_enums : (PT.lident * PT.enum_decl) Location.loced list;gr_assets : PT.asset_decl Location.loced list;gr_records : PT.record_decl Location.loced list;gr_vars : PT.variable_decl Location.loced list;gr_funs : PT.s_function Location.loced list;gr_acttxs : acttx Location.loced list;gr_specs : PT.specification Location.loced list;gr_secs : PT.security Location.loced list;
}Source
type ('args, 'rty) gmethod_ = {mth_name : A.const;mth_place : [ `Both | `OnlyFormula | `OnlyExec ];mth_purity : [ `Pure | `Effect of A.container list ];mth_totality : [ `Total | `Partial ];mth_map_type : [ `Both | `Standard ];mth_sig : 'args * 'rty option;
}Source
type opinfo =
string
* A.const
* [ `Partial | `Total ]
* A.type_ option
* A.type_ list
* A.type_
* Type.trestr Tools.Mint.tSource
val pp_assetdecl :
Ppx_deriving_runtime.Format.formatter ->
assetdecl ->
Ppx_deriving_runtime.unitSource
val pp_fielddecl :
Ppx_deriving_runtime.Format.formatter ->
fielddecl ->
Ppx_deriving_runtime.unitSource
val pp_recorddecl :
Ppx_deriving_runtime.Format.formatter ->
recorddecl ->
Ppx_deriving_runtime.unitSource
val pp_rfielddecl :
Ppx_deriving_runtime.Format.formatter ->
rfielddecl ->
Ppx_deriving_runtime.unitSource
type 'env ispecification = [ | `Predicate of A.lident * (A.lident * A.ptyp) list * A.pterm| `Definition of A.lident * (A.lident * A.ptyp) * A.pterm| `Fails of (A.lident * A.lident * A.ptyp * A.pterm) list| `Variable of A.lident * A.pterm option| `Asset of A.lident * A.pterm * (A.lident * A.pterm list) list * A.lident list| `Effect of 'env * A.instruction| `Postcondition of A.lident * A.pterm * (A.lident * A.pterm list) list * A.lident list
]Source
type 'env fundecl = {fs_name : A.lident;fs_kind : A.fun_kind;fs_args : (A.lident * A.ptyp) list;fs_retty : A.ptyp;fs_body : A.instruction;fs_spec : 'env ispecification list option;
}Source
type txeffect = {tx_state : A.lident;tx_when : A.pterm option;tx_effect : A.instruction option;
}Source
type 'env tentrydecl = {ad_name : A.lident;ad_args : (A.lident * A.ptyp) list;ad_callby : A.pterm option Location.loced list;ad_effect : [ `Raw of A.instruction | `Tx of transition ] option;ad_funs : 'env fundecl option list;ad_reqs : (A.lident option * A.pterm * A.pterm option) list;ad_fais : (A.lident option * A.pterm * A.pterm option) list;ad_spec : 'env ispecification list;ad_actfs : bool;
}Source
type statedecl = {sd_name : A.lident;sd_state : bool;sd_ctors : ctordecl list;sd_init : Ident.ident;
}Source
val for_xexpr :
emode_t ->
?autoview:bool ->
?capture:[ `No | `Yes of (Location.t * A.ptyp) Ident.Mid.t ref option ] ->
env ->
?ety:A.ptyp ->
PT.expr ->
PT.lident A.term_node A.struct_polySource
val for_gen_matchwith :
emode_t ->
env ->
Location.t ->
PT.expr ->
PT.branch list ->
(statedecl
* Tools.Mstr.key Location.loced A.term_gen
* (int option * int option Tools.Mstr.t)
* PT.expr list)
optionSource
val for_asset_expr :
emode_t ->
env ->
PT.expr ->
PT.lident A.term_node A.struct_poly * assetdecl optionSource
val for_asset_collection_expr :
emode_t ->
env ->
[ `Parsed of PT.expr | `Typed of PT.lident A.term_node A.struct_poly ] ->
PT.lident A.term_gen * (assetdecl * A.container) optionSource
val for_api_call :
emode_t ->
env ->
Location.t ->
([< `Parsed of PT.expr
| `Typed of PT.lident A.term_node A.struct_poly Typed ]
* PT.lident
* PT.expr list) ->
(A.pterm * smethod_ * A.lident A.term_arg list) optionSource
val for_gen_method_call :
emode_t ->
env ->
Location.t ->
([ `Parsed of PT.expr | `Typed of PT.lident A.term_node A.struct_poly ]
* PT.lident
* PT.expr list) ->
(A.pterm
* (assetdecl * A.container)
* method_
* A.lident A.term_arg list
* A.type_ Tools.Mint.t)
optionSource
val for_arg_effect :
emode_t ->
env ->
update:bool ->
assetdecl ->
PT.expr ->
(PT.lident * A.operator * PT.lident A.term_gen) list optionSource
val for_assign_expr :
?autoview:bool ->
?asset:bool ->
emode_t ->
env ->
Location.t ->
(A.assignment_operator * A.ptyp * A.ptyp) ->
PT.expr ->
PT.lident A.term_genSource
val for_specification_item :
spmode ->
(env * env) ->
PT.specification_item ->
(env * env) * env ispecification listSource
val for_specification :
spmode ->
(env * env) ->
PT.specification ->
env * env ispecification listSource
val for_core_enum_decl :
env ->
enum_core Location.loced ->
env * (Ident.ident * (PT.lident * PT.label_expr list) list) optionSource
val for_enum_decl :
env ->
(PT.lident * PT.enum_decl) Location.loced ->
env * (statedecl option * PT.label_expr list list option)Source
val for_enums_decl :
env ->
(PT.lident * PT.enum_decl) Location.loced list ->
env * (statedecl option * PT.label_expr list list option) listSource
val for_var_decl :
env ->
PT.variable_decl Location.loced ->
env * (vardecl option * PT.label_exprs option)Source
val for_vars_decl :
env ->
PT.variable_decl Location.loced list ->
env * (vardecl option * PT.label_exprs option) listSource
val for_asset_decl :
Ident.ident list ->
env ->
(assetdecl * PT.asset_decl Location.loced) ->
Env.t * pre_assetdecl optionSource
val for_records_decl :
env ->
PT.record_decl Location.loced list ->
env * recorddecl option listSource
val for_specs_decl :
env ->
PT.specification Location.loced list ->
env * env ispecification list listSource
type decls = {state : statedecl option;variables : vardecl option list;enums : statedecl option list;records : recorddecl option list;assets : assetdecl option list;functions : env fundecl option list;acttxs : env tentrydecl option list;specs : env ispecification list list;secspecs : A.security list;
}