Version: dev

Go API index

Every stable name Go exports, and its extension seams.

Package: github.com/EarthSciML/EarthSciAST/pkg/earthsci-ast-go/pkg/esm 0.6.0

Documentation extracted with go/doc go1.22.12.

Capability profiles: core, classification.

Extension-tier names are on the Go extension page .

Stable names

GoCanonicalKindSummary
AddContinuousEventadd_continuous_eventfunctionAddContinuousEvent returns a copy of model with event appended.
AddCouplingadd_couplingfunctionAddCoupling returns a copy of file with entry appended to its coupling list.
AddDiscreteEventadd_discrete_eventfunctionAddDiscreteEvent returns a copy of model with event appended.
AddEquationadd_equationfunctionAddEquation returns a copy of model with equation appended.
AddReactionadd_reactionfunctionAddReaction returns a copy of system with reaction appended.
AddSpeciesadd_speciesfunctionAddSpecies returns a copy of system carrying species under name.
AddVariableadd_variablefunctionAddVariable returns a copy of model carrying variable under name.
AffectEquationaffect_equationtypeAffectEquation represents an equation that affects a variable (for events)
AlgebraicUnknownsalgebraic_unknownsfunctionAlgebraicUnknowns returns the model’s unknowns constrained only IMPLICITLY — those that are neither differentiated nor DEFINED, so the only equations mentioning them have an…
ApplyDAEContractapply_dae_contractfunctionApplyDAEContract applies the Go binding’s trivial-DAE strategy to every applicable model in file (mutating each in place) and classifies the result.
BrownianParametersbrownian_parametersfunctionBrownianParameters returns the parameters whose update is wiener — the SDE noise sources, resampled every step with √dt increment scaling.
BuildReferenceGraphbuild_reference_graphfunctionBuildReferenceGraph resolves the reference edges of one raw model view into a graph.
BuildUnitEnvbuild_unit_envfunctionBuildUnitEnv converts a map of name→unit-string into a map of name→Unit.
CadencecadencetypeCadence is a value’s evaluation class, forming the total order CadenceConst ⊏ CadenceDiscrete ⊏ CadenceContinuous (CONFORMANCE_SPEC §5.7.1).
CadenceErrorcadence_errorerrorCadenceError is a cadence-partition contract violation: an observed-definition cycle (§5.7.2), a failed expect_cadence assertion (§5.7.6 guard 3), or a relational node on the…
CanMigratecan_migratefunctionCanMigrate reports whether a migration from sourceVersion to targetVersion is supported.
CanonicalizecanonicalizefunctionCanonicalize applies RFC §5.4 canonical form to an expression tree.
CanonicalJSONcanonical_jsonfunctionCanonicalJSON emits the canonical on-wire JSON form of an expression per §5.4.6: keys sorted, no extraneous whitespace, shortest-round-trip float literals with trailing-.0…
ClosedFunctionErrorclosed_function_errorerrorClosedFunctionError carries the spec-defined diagnostic codes pinned by esm-spec §9.1–§9.2 / §9.3:
ClosedFunctionNamesclosed_function_namesfunctionClosedFunctionNames returns the v0.3.0 closed function set as a sorted slice.
ComponentGraphcomponent_graphtypeComponentGraph is a specialized graph for system components
ComponentNodecomponent_nodetypeComponentNode represents a node in the component graph
ComposecomposefunctionCompose returns a copy of file with an operator_compose coupling entry linking systems a and b.
ConflictingDerivativeErrorconflicting_derivative_errorerrorConflictingDerivativeError reports that two source systems define non-additive equations for the same dependent variable (esm-libraries-spec §4.7.5 step 4’s over-determination…
ConstantParametersconstant_parametersfunctionConstantParameters returns the parameters carrying neither a distribution nor an update — plain constants.
ContainscontainsfunctionContains checks if a specific variable appears anywhere in an expression.
ContinuousEventcontinuous_eventtypeContinuousEvent represents a continuous event.
ContributioncontributiontypeContribution is one summand of a flattened equation’s right-hand side, with its authors.
CoordinatecoordinatetypeCoordinate is one entry of the document-scoped coordinates registry (RFC streaming-output-sinks §8): it marks an existing data array — a model unknown or parameter named by…
CoupleMultiplicativeNoTendencyErrorcouple_multiplicative_no_tendency_errorerrorCoupleMultiplicativeNoTendencyError reports that a couple connector equation applies the multiplicative transform to a target with no D(to) equation in the flattened system…
CouplingCouplecoupling_coupletypeCouplingCouple represents bi-directional coupling via connector equations
CouplingEdgecoupling_edgetypeCouplingEdge represents an edge in the component graph
CouplingEntrycoupling_entrytypeCouplingEntry represents different types of coupling rules This is a discriminated union based on the “type” field
CouplingImportcoupling_importtypeCouplingImport reuses a coupling-library file (esm-spec §10.9, §10.10): it imports the library named by Ref and binds each of its declared roles to a component in the assembly…
CouplingImportOptionscoupling_import_optionstypeCouplingImportOptions controls how coupling_import refs are resolved at flatten (mirrors the TS CouplingImportOptions).
CouplingRolecoupling_roletypeCouplingRole is one entry in a coupling-library file’s coupling_roles map (esm-spec §10.9): a formal component role (a name, not a type), carrying an optional human-readable…
DAEInfodae_infotypeDAEInfo records the outcome of ApplyDAEContract on an ESMFile.
DataSourcedata_sourcetypeDataSource is a runtime-agnostic description of an external dataset, reduced to a single responsibility: locate, read, decode, slice, and filter bytes on disk (esm-spec 8).
DataSourceBindingdata_source_bindingtypeDataSourceBinding binds a PARAMETER to one file variable of a data_sources entry, through the from value form of a data update (esm-spec 8.5).
DataSourceDeterminismdata_source_determinismtypeDataSourceDeterminism is the reproducibility contract a source advertises to bindings (esm-spec 8.1).
DataSourceLocationdata_source_locationtypeDataSourceLocation describes file discovery for a data source.
DataSourceTemporaldata_source_temporaltypeDataSourceTemporal describes the temporal coverage and record layout (esm-spec 8.3).
DeclaredSystemKinddeclared_system_kindfunctionDeclaredSystemKind returns the model’s EXPLICIT system_kind field, or nil when the document declares none.
DependencyEdgedependency_edgetypeDependencyEdge represents an edge in the expression graph.
DeriveODEsderive_odesfunctionDeriveODEs converts a reaction network into a Model whose equations are the species’ ODEs under mass-action kinetics (esm-spec §7.4).
DimensiondimensiontypeDimension is a vector of RATIONAL exponents over the 7 SI base units plus radian.
DimensionPromotionErrordimension_promotion_errorerrorDimensionPromotionError reports that a variable or equation cannot be promoted onto the target grid (esm-libraries-spec §4.7.6): here, that the pointwise spatial lift (esm-spec…
DiscreteEventdiscrete_eventtypeDiscreteEvent represents a discrete event.
DiscreteEventTriggerdiscrete_event_triggertypeDiscreteEventTrigger represents different trigger types for discrete events
DiscreteParametersdiscrete_parametersfunctionDiscreteParameters returns the parameters carrying any update OTHER than wiener — piecewise-constant between refreshes.
DistributiondistributiontypeDistribution is a parameter’s value drawn from a closed set of probability distributions (esm-spec 6.3): normal (Mean + Std|Cov), lognormal (Mu + Sigma|Cov), or uniform…
DomaindomaintypeDomain represents the spatiotemporal domain.
EdgeKindedge_kindtypeEdgeKind is one of the three kinds of reference edge (RFC §6.1 “Propagation”).
EditErroredit_errorerrorEditError is the base diagnostic for a failed editing operation, and the error type for failures with no more specific type.
EffectiveSystemKindeffective_system_kindfunctionEffectiveSystemKind is what a consumer choosing a solver should branch on: the DECLARED system_kind when the model carries one, and the SystemKind derivation otherwise…
EntityNotFoundErrorentity_not_found_errorerrorEntityNotFoundError reports an operation on a non-existent entity.
EnumLoweringErrorenum_lowering_errorerrorEnumLoweringError carries the spec-defined diagnostic codes for the load-time lowering pass:
EquationequationtypeEquation represents a mathematical equation with LHS and RHS
ESMFileesm_filetypeESMFile represents the top-level ESM file structure
EvaluateevaluatefunctionEvaluate numerically evaluates an expression with variable bindings.
EvaluateClosedFunctionevaluate_closed_functionfunctionEvaluateClosedFunction dispatches a closed function call.
ExactScaleexact_scaletypeExactScale is the EXACT scale of a unit relative to SI (esm-spec §4.8.1 “Scales are EXACT”): a product of prime powers and a power of pi, each with a rational exponent, so mi is…
ExpandexpandfunctionExpand fully expands every surviving apply_expression_template reference in a loaded document by pure substitution to the acyclic fixpoint (esm-spec §9.6.4 rule 2), producing…
ExpressionGraphexpression_graphtypeExpressionGraph is a specialized graph for variable dependencies
ExpressionGraphOptionsexpression_graph_optionstypeExpressionGraphOptions tunes ExpressionGraphFromFileWithOptions.
ExpressionParseErrorexpression_parse_errorerrorExpressionParseError reports that an expression string could not be parsed.
ExpressionTemplateErrorexpression_template_errorerrorExpressionTemplateError is the error type raised by the expression-template expansion pass.
ExprNodeexpr_nodetypeExprNode represents an operator node in the expression tree
ExtractextractfunctionExtract returns a new file containing only the component componentName, together with every coupling entry that references it.
FlattenflattenfunctionFlatten takes an ESMFile containing multiple models and/or reaction systems and returns a FlattenedSystem with dot-namespaced variables (esm-libraries-spec §4.7.5).
FlattenedEquationflattened_equationtypeFlattenedEquation is a single equation of the flattened system, with dot-namespaced Expression TREES on both sides.
FlattenedSystemflattened_systemtypeFlattenedSystem is a coupled system flattened into a single system — the canonical intermediate form between an ESMFile and any downstream consumer, and the API boundary all of…
FlattenedVariableflattened_variabletypeFlattenedVariable is one variable of the flattened system, carrying the FULL declared metadata step 4 requires (“Full metadata, not names”): a consumer must be able to build a…
FlattenMetadataflatten_metadatatypeFlattenMetadata records provenance information about the flattening operation.
FlattenWithOptionsflatten_with_optionsfunctionFlattenWithOptions is Flatten with control over how coupling_import refs are resolved (esm-spec §10.10).
FreeVariablesfree_variablesfunctionFreeVariables returns the set of all variable names that appear in an expression, including those reachable ONLY through a sidecar (non-args) field — an aggregate’s…
FunctionalUpdatefunctional_updatetypeFunctionalUpdate is a registered handler that computes a parameter’s new value when its update fires (esm-spec 5.5).
FunctionTablefunction_tabletypeFunctionTable is a sampled function table (esm-spec §9.5).
FunctionTableAxisfunction_table_axistypeFunctionTableAxis is a single named axis inside a FunctionTable.
GraphgraphtypeGraph is the domain of the three graph renderers — ToDOT, ToMermaid and ToJSONGraph — and is satisfied by exactly the two graph types this package builds: *ComponentGraph…
GraphEdgegraph_edgetypeGraphEdge represents an edge in a directed graph
IsODEStateis_ode_statefunctionIsODEState reports whether the named variable is an unknown appearing under a time derivative on some equation LHS.
LibraryVersionlibrary_versionconstantLibraryVersion is this Go module’s OWN version — NOT the .esm format version, which is SchemaVersion.
LoadDocumentload_documentfunctionLoadDocument parses an ESM document that is ALREADY decoded into a Go map — the same document a .esm file holds, just already unmarshalled.
LoaderFieldloader_fieldtypeLoaderField is a data-fed PARAMETER lowered to a flattened array input (esm-spec §8.5).
LoadPathload_pathfunctionLoadPath reads an ESM document from the specified filesystem path and validates it against the JSON schema.
LoadStringload_stringfunctionLoadString parses an ESM file from JSON TEXT and validates it against the JSON schema
LowerEnumslower_enumsfunctionLowerEnums resolves every enum op in the file to a {op: "const", value: <int>} node per esm-spec §9.3, and returns the lowered document.
LowerEnumsMutlower_enums_mutfunctionLowerEnumsMut is LowerEnums applied IN PLACE: it walks every expression tree in the file and resolves each enum op to a {op: "const", value: <int>} node per esm-spec §9.3,…
LowerExpressionTemplateslower_expression_templatesfunctionLowerExpressionTemplates runs the outermost-first + priority + bounded-fixpoint rewrite over view and strips the expression_templates blocks.
MapVariablemap_variablefunctionMapVariable returns a copy of file with a variable_map coupling entry forwarding from into to.
MaxTemplateExpansionDepthmax_template_expansion_depthconstantMaxTemplateExpansionDepth is the maximum template-body reference-chain depth (counted in TEMPLATES along the longest chain, so a 33-template chain is rejected and a 32-template…
MergemergefunctionMerge returns a new file combining a and b.
MetadatametadatatypeMetadata represents file metadata
MigratemigratefunctionMigrate migrates an ESM file from its declared schema version to targetVersion.
MigrationErrormigration_errorerrorMigrationError is returned when a migration cannot be performed.
ModelmodeltypeModel represents an ODE system
ModelVariablemodel_variabletypeModelVariable represents a variable in a mathematical model.
ObservedDefinitionobserved_definitionfunctionObservedDefinition returns the defining RHS of an observed unknown — the RHS of the first equation whose LHS names it, bare (y ~ f(…)) or indexed (y[i] ~ f(…)) — and whether…
ObservedUnknownsobserved_unknownsfunctionObservedUnknowns returns the model’s unknowns an equation DEFINES — its LHS naming them, bare (y ~ f(…)) or indexed (y[i] ~ f(…), which defines the whole array y) —…
ODEStatesode_statesfunctionODEStates returns the model’s unknowns that appear under a time derivative D(·, t) on some equation LHS, sorted lexicographically.
OperatorComposeAmbiguousBareNameErroroperator_compose_ambiguous_bare_name_errorerrorOperatorComposeAmbiguousBareNameError reports that the bare-name fallback would unify two STATE variables and the document has not said which spelling survives…
OperatorComposeNoMergeErroroperator_compose_no_merge_errorerrorOperatorComposeNoMergeError reports that an operator_compose entry merged NOTHING (esm-libraries-spec §4.7.1 step 5).
OperatorComposeRequireMatchErroroperator_compose_require_match_errorerrorOperatorComposeRequireMatchError reports that an operator_compose entry declared require_match: true and one of Systems\[1\]’s equations found no equation of Systems\[0\] to…
ParameterparametertypeParameter represents a reaction-system parameter — rate constant, temperature, photolysis rate.
ParameterSweepparameter_sweeptypeParameterSweep is a parameter sweep specification (currently only cartesian).
ParameterUpdateparameter_updatetypeParameterUpdate is ONE rule of a parameter’s update block (esm-spec 5.4): WHEN the parameter refreshes (Kind, plus the kind’s own trigger fields) and WHAT from (exactly one of…
ParseEquationparse_equationfunctionParseEquation parses lhs = rhs into an Equation.
ParseExpressionparse_expressionfunctionParseExpression parses a single expression string into an AST expression — the inverse of ToASCII.
ParseUnitparse_unitfunctionParseUnit parses a unit string into a Unit.
PlotplottypePlot is a plot specification associated with an Analysis.
PlotAxisplot_axistypePlotAxis is an axis specification for a plot.
PlotSeriesplot_seriestypePlotSeries is a single named series for multi-series line/scatter plots.
PlotValueplot_valuetypePlotValue is a scalar value derived from a trajectory, used for heatmap color channels.
ReactionreactiontypeReaction represents a chemical reaction
ReactionSystemreaction_systemtypeReactionSystem represents a chemical reaction network
ReferencereferencetypeReference represents a scientific reference
ReferenceEdgereference_edgetypeReferenceEdge is a directed source → target edge: SOURCE REFERENCES / DEPENDS ON TARGET.
ReferenceGraphreference_graphtypeReferenceGraph is the resolved reference DAG for one model — the partition pass’s input.
ReferenceResolutionErrorreference_resolution_errorerrorReferenceResolutionError reports that a reference could not be resolved, or that the reference graph has a cycle.
ReferenceVertexreference_vertextypeReferenceVertex is a vertex in the reference graph, addressed by a kind-namespaced Key.
RejectExpressionTemplatesPreV04reject_expression_templates_pre_v04functionRejectExpressionTemplatesPreV04 rejects expression_templates blocks and apply_expression_template ops in files declaring esm < 0.4.0.
RejectSolverExternalPreV13reject_solver_external_pre_v13functionRejectSolverExternalPreV13 rejects solver.external in files declaring esm < 1.3.0 with solver_external_version_too_old at /solver/external (esm-spec §2.2.4 requirement 4).
RejectSolverPreV11reject_solver_pre_v11functionRejectSolverPreV11 rejects a top-level solver block in files declaring esm < 1.1.0.
RejectSolverTimeSpanPreV13reject_solver_time_span_pre_v13functionRejectSolverTimeSpanPreV13 rejects solver.time_span in files declaring esm < 1.3.0 with solver_time_span_version_too_old at /solver/time_span (esm-spec §2.2.4…
RejectTemplateImportsPreV08reject_template_imports_pre_v08functionRejectTemplateImportsPreV08 rejects the §9.7 constructs in files declaring esm < 0.8.0: expression_template_imports, top-level expression_templates (template-library…
RemoveCouplingremove_couplingfunctionRemoveCoupling returns a copy of file without the coupling entry at index.
RemoveEventremove_eventfunctionRemoveEvent returns a copy of model with every event named name removed.
RemoveReactionremove_reactionfunctionRemoveReaction returns a copy of system without the reaction whose ID is id.
RemoveSpeciesremove_speciesfunctionRemoveSpecies returns a copy of system without the species name, after checking that no reaction still references it.
RemoveVariableremove_variablefunctionRemoveVariable returns a copy of model without the variable name, after checking that nothing still references it.
RenameVariablerename_variablefunctionRenameVariableInFile when the document is available; it resolves scoped references and rewrites coupling endpoints too.
ResolveReferencesresolve_referencesfunctionResolveReferences resolves the reference edges of every model in a raw document view, returning a {model name: graph} map.
ResolveSubsystemRefsresolve_subsystem_refsfunctionResolveSubsystemRefs walks all subsystem maps in models and reaction systems, resolving any entries that contain a “ref” field by loading and inlining the referenced ESM file…
ResolveTimeSpanresolve_time_spanfunctionResolveTimeSpan resolves the run interval by the esm-spec §2.2.7 chain: the call-site interval when callSite is non-nil (it always wins, both bounds), else the document’s…
SampledParameterssampled_parametersfunctionSampledParameters returns the parameters carrying a distribution and NO update — drawn once at setup (uncertainty quantification, ensembles).
SchemaErrorschema_errorerrorSchemaError represents a JSON Schema violation
SchemaVersionschema_versionconstantSchemaVersion is the schema version this library implements, derived from the embedded schema’s $id so it cannot hand-drift from the canonical esm-schema.json.
SimplifysimplifyfunctionSimplify performs constant folding and basic algebraic simplification.
SolversolvertypeSolver carries numerics the document knows about ITSELF — stiffness, integration tolerances, and a splitting hint — which each binding maps to its own integrator (esm-spec §2.2).
SolverExternalLocationsolver_external_locationfunctionSolverExternalLocation resolves the document’s solver.external to a location by esm-spec §2.2.6, or returns "" when the root document’s solver block carries none (an authored…
SolverTimeSpansolver_time_spantypeSolverTimeSpan is the interval the document’s author means it to be simulated over (esm-spec §2.2.7).
SpeciesspeciestypeSpecies represents a chemical species
StoichiometricMatrixstoichiometric_matrixfunctionStoichiometricMatrix returns the NET stoichiometric matrix of a reaction network: rows are species in declaration order (see the file header), columns are reactions in…
StructuralErrorstructural_errorerrorStructuralError represents equation/unknown balance, reference integrity issues
SubstitutesubstitutefunctionSubstitute performs variable substitution in expressions.
SubstituteInEquationssubstitute_in_equationsfunctionSubstituteInEquations applies bindings across a model.
SubstituteInModelsubstitute_in_modelfunctionSubstituteInModel performs substitution across an entire model.
SubstituteInModelWithContextsubstitute_in_model_with_contextfunctionSubstituteInModelWithContext performs substitution across an entire model with scoped reference support.
SubstituteInReactionSystemsubstitute_in_reaction_systemfunctionSubstituteInReactionSystem performs substitution across an entire reaction system.
SubstituteInReactionSystemWithContextsubstitute_in_reaction_system_with_contextfunctionSubstituteInReactionSystemWithContext performs substitution across an entire reaction system with scoped reference support.
SubstituteWithContextsubstitute_with_contextfunctionSubstituteWithContext performs variable substitution in a SCOPE CONTEXT: the (file, currentSystem) pair against which a dotted binding key like “OtherModel.x” is resolved.
SupportedMigrationTargetssupported_migration_targetsfunctionSupportedMigrationTargets returns the schema versions sourceVersion can be migrated to.
SweepDimensionsweep_dimensiontypeSweepDimension is one axis of a parameter sweep; exactly one of Values or Range is set.
SweepRangesweep_rangetypeSweepRange is a generated range of parameter values.
SystemKindsystem_kindfunctionSystemKind derives what the system_kind field declares (esm-spec §6.3.1), testing four conditions IN ORDER and taking the first that holds:
TemporalDomaintemporal_domaintypeTemporalDomain represents temporal bounds
TermOriginterm_origintypeTermOrigin names who authored one contribution to a flattened equation.
TimePointtime_pointtypeTimePoint is one bound of a SolverTimeSpan: either a number in the document’s time units (seconds of the independent variable) or an RFC 3339 UTC timestamp…
TimeSpantime_spantypeTimeSpan is a simulation time interval expressed in the component’s time units.
ToASCIIto_asciifunctionToASCII converts an expression, equation or container to a plain-text string using the ascii render format (function-call notation, no Unicode symbols in the operator layer).
ToDOTto_dotfunctionToDOT renders a graph in DOT (Graphviz) format.
ToJSONto_jsonfunctionToJSON validates an ESM file and returns it as an indented canonical JSON string.
ToJSONCompactto_json_compactfunctionToJSONCompact validates an ESM file and returns it as a compact canonical JSON string (no indentation).
ToJSONGraphto_json_graphfunctionToJSONGraph renders a graph as a JSON adjacency list.
ToLatexto_latexfunctionToLatex converts an expression, equation or container to a LaTeX string with chemical subscripts and operator precedence.
TolerancetolerancetypeTolerance is a numerical comparison tolerance.
ToMermaidto_mermaidfunctionToMermaid renders a graph in Mermaid format.
ToUnicodeto_unicodefunctionToUnicode converts an expression, equation or container to a Unicode string with chemical subscripts and operator precedence.
UnitunittypeUnit is a named physical unit with a dimension vector and a scale factor relative to the canonical SI combination represented by Dim.
UnitFindingAnalysisunit_finding_analysisconstantUnit-finding codes.
UnitFindingDimensionalMismatchunit_finding_dimensional_mismatchconstantUnit-finding codes.
UnitFindingDimensionlessLiteralunit_finding_dimensionless_literalconstantUnitFindingDimensionlessLiteral — a check site the CURRENT neutral-literal rule passes or skips fails once a nonzero bare numeric literal is read as dimensionless at scale 1…
UnitFindingUnparseableunit_finding_unparseableconstantUnit-finding codes.
UnitWarningunit_warningtypeUnitWarning represents a finding from dimensional analysis.
ValidatevalidatefunctionValidate performs semantic validation of an already-parsed ESM document and returns the four-field ValidationResult of esm-libraries-spec §3.4.
ValidateEquationDimensionsvalidate_equation_dimensionsfunctionValidateEquationDimensions checks that the LHS and RHS of an equation have the same dimension.
ValidateStructuralvalidate_structuralfunctionValidateStructural performs comprehensive structural validation of an ESM file and returns the legacy message-oriented DetailedValidationResult.
ValidateTextvalidate_textfunctionValidateText validates an ESM document supplied as JSON TEXT: the schema check the document AS WRITTEN must pass, then — only if it passes — the semantic checks Validate runs…
ValidationResultvalidation_resulttypeValidationResult holds the result of validation per ESM Libraries Spec Section 3.4
VariableInUseErrorvariable_in_use_errorerrorVariableInUseError reports an attempt to remove a name that is still referenced.
VariableNodevariable_nodetypeVariableNode represents a node in the expression graph
VertexKindvertex_kindtypeVertexKind is one of the three kinds of vertex in a reference graph.
WritePathwrite_pathfunctionWritePath writes an ESM file to path as indented canonical JSON.