effective_system_kind
Stable function · Variable classification
Tier: stable · Kind: function · Topic: Variable classification
| Julia | TypeScript | Python | Rust | Go |
|---|---|---|---|---|
effective_system_kind | effectiveSystemKind | effective_system_kind | not exported | EffectiveSystemKind |
Julia
effective_system_kind(model::Model)
effective_system_kind(model::Model) -> String
declared_system_kind
when the model declares one, otherwise the
derived system_kind
. This is the question a caller choosing a solver
actually asks — the declaration wins, because an author who wrote it down meant
it, and validate separately reports a system_kind_mismatch when the two
disagree (API_SPEC.md §8 item 11).
TypeScript
function effectiveSystemKind(model: Model): SystemKind
The kind a caller choosing a solver actually asks for: the DECLARED
system_kind when the document states one, otherwise the DERIVED kind.
API_SPEC.md §8 item 11 rules the family as three distinct questions plus this
one composition — systemKind
derives, declaredSystemKind
reads the field, and this composes them as declared ?? derived. It never
returns null: an undeclared model still has a derived kind. Matches Go’s
EffectiveSystemKind.
Python
effective_system_kind(model: Any) -> str
The kind a caller choosing a solver should act on: the declared
system_kind field when the document states one, otherwise the §6.3.1
derivation.
This is the composition declared ?? derived of the other two members of
the family (API_SPEC.md §8 item 11) — the third of three distinct questions:
system_kind— what the model’s CONTENT implies (always answers);declared_system_kind— what the document SAYS, orNone;effective_system_kind— what to actually DO (always answers).
It deliberately does not diagnose disagreement between the two: a declared
field that contradicts the derivation is reported as
system_kind_mismatch by validate
, and a
caller that has already validated its document wants one answer, not a
second copy of the check.
Rust
Rust does not export this function.
Go
func EffectiveSystemKind(model *Model) string
EffectiveSystemKind is what a consumer choosing a solver should branch on: the DECLARED system_kind when the model carries one, and the SystemKind derivation otherwise (esm-spec §6.3.1, “a binding uses the derivation when the field is absent”) — i.e. declared ?? derived. The two are checked against each other by the structural validator, which reports system_kind_mismatch when a present field contradicts the derivation — so by the time a document validates, the two agree.