Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Diagnostics

Every diagnostic contains severity, code, path, message and hint. Paths use RFC 6901 (~1 for a slash, ~0 for a tilde); the empty path denotes the root. A type error may name the containing object when the parser cannot name a missing or unknown child. Messages give detail; the code and the path are the machine contract. Codes are stable: a number is never reused for another meaning.

Codes with the prefix CRN-E belong to documents, files, the sampler and the tools around the engine. Codes with the prefix CRN-R belong to models and run requests; they are listed below the first tables. A failed check reports every error it finds. Parsing stops at the first syntax or type error of a document, and semantic validation accumulates.

Documents, files and tools (CRN-E…)

CodeMeaningTypical repair
CRN-E001Invalid JSON, encoding or trailing contentSupply one UTF-8 JSON document
CRN-E002Duplicate JSON key at any depthKeep one value per decoded key
CRN-E003Wrong type, unknown or missing field, schema version or enum variantUse the generated schema (crn-craft describe KIND)
CRN-E004Input depth or size limit, or a model collection limitReduce size or depth
CRN-E015Non-finite or out-of-domain numberUse the required finite domain
CRN-E030Input or output filesystem or stream failureSupply a readable regular file or a writable stream
CRN-E031Unsupported command or wrong argumentsUse --help
CRN-E033A network model (crn-craft.model/0.1) given where a rules or 1.0 model is read (run, check MODEL REQUEST, crn_craft.rules.prepare, finite state projection), reported at /schemaConvert it with crn-craft convert MODEL or crn_craft.convert; crn_craft.ensemble, crn_craft.prepare and Model.from_dict convert it themselves
CRN-E041Invalid state for analyze or the projection: a missing or extra name, or an invalid countName every species with a valid count
CRN-E044crn-diffsol only: the ODE trajectory of a network model passes a species’ population_limitStop earlier or revise the limit; the ODE never clips a state
CRN-E050The export target cannot preserve a requested featureKeep to the documented subset
CRN-E051An exported coefficient cannot be halved exactly in f64, reported at /rules/i/rateRescale the model; no source is emitted
CRN-E065Archive I/O, integrity, size or relational failureKeep the evidence; use a new directory and verify the complete file set
CRN-E070Finite state projection: capacity, work, normalization, output or interruption; for a prepared projection (crn_craft.prepare_fsp) also its state, edge, rate-table and intervention budgets, max_work, the midpoint rule’s stall, a BDF step that cannot advance the clock, a sparse LU factorization whose memory bound exceeds max_factor_bytes (at /projection/memory), a factorization failure (/projection/solver) and a stationary law with invalid probabilities or a residual above its tolerance (raised in Python as RuntimeError); for forward sensitivities (crn_craft.sensitivities) also an augmented generator above 250,000 rows or 2,000,000 entriesLower the bounds or raise max_states within the cap; raise max_factor_bytes within the memory of the machine
CRN-E071Prepared projection input it cannot represent: an initial law outside the bounds, a decrement below zero, an outcome outside the prepared states, reactant combinatorics beyond the solver range, a signal on a count-dependent rule, a negative or non-finite rate, a stationary law asked of a generator with another number of closed communicating classes than one or of a state outside every closed class, a retained state set that is empty, larger than max_states or has a tuple of another length or outside the bounds, and for forward sensitivities generator bindings of another size, with signals or stop states, more than 16 directions, a nonpositive or nonfinite difference step, or an invalid initial state, report time or tolerance (at /projection/sensitivities) (raised in Python as ValueError, or OverflowError for a multiplicity above the largest double)Revise the bounds, the initial law, the protocol or the rates
CRN-E080ODE right-hand side: domain, unsupported smooth extension or solver failure; a negative propensityRevise the model; see crn-diffsol
CRN-E090Importer: syntax, unsupported semantics, missing explicit convention or resource failureFollow the message; pass convention=

None of these codes denotes biological validation or a certified floating-point error bound.

Reading a network model

crn-craft check, analyze, convert and export read a network crn-craft.model/0.1 through the converter. Its checks report these codes:

CodeMeaning
CRN-E010Invalid identifier
CRN-E011Duplicate name, or a species and parameter with one name
CRN-E012Unknown species name
CRN-E013Stoichiometry outside 1 to 2147483647
CRN-E014Unknown parameter name
CRN-E016Negative population or insufficient population limit
CRN-E032The document given to the converter (crn-craft convert, crn_craft.convert) is a crn-craft.model/1.0 or crn-craft.rules-* document, which needs no conversion; reported at /schema

The converter reports a model that the unified model cannot hold with CRN-R016.

Warnings of analysis

CodeMeaning
CRN-W001A species has a net-producing reaction and no net-consuming one (at /species/i); analyze drops it for a species with a proven conservation bound. It does not prove unboundedness
CRN-W002A reaction’s rate is the constant 0 (at /reactions/i)
CRN-W003A reaction has no net population effect (at /reactions/i)
CRN-W010Exact conservation analysis exceeds 64 species or 256 reactions: no laws are claimed or excluded
CRN-W011Checked i128 conservation arithmetic exceeds its range: no partial basis is reported
CRN-W012The nonnegative cone exceeds 64 species or 256 reactions
CRN-W013The cone exhausts its intermediate-ray or work cap: only sound basis bounds remain
CRN-W014Checked i128 cone arithmetic overflows: no partial rays or bounds are emitted
CRN-W015Internal verification of the cone failed: report a defect, no cone result is trusted

Retired codes

The network engine is gone, and so are the codes that only it reported. They are not reused: CRN-E020, CRN-E021, CRN-E022, CRN-E023, CRN-E040, CRN-E042, CRN-E043, CRN-E060, CRN-E061, CRN-E062, CRN-E064, CRN-E067 and CRN-E085. CRN-E044 is left only in crn-diffsol. Their replacements are the CRN-R codes: a run request, budget or method problem is CRN-R020, a numerical failure CRN-R030 and CRN-R031, a budget stop CRN-R040 to CRN-R045, and a document of the wrong family CRN-E033 or CRN-R020 at /schema.

Models and run requests (CRN-R…)

The engine for dynamic, attributed species (model reference) shares CRN-E001–CRN-E004 for JSON input and the read error CRN-E030, and has its own codes: CRN-R010 names, CRN-R011 unknown types, CRN-R012 expressions and scopes, CRN-R013 rule shapes and product attributes (in crn-craft.model/1.0 also a pattern count outside 1 to 2,147,483,647 and a higher-order pattern over an attributed type or with where or factor), CRN-R014 initial state, CRN-R015 model limits (64 types, 1,024 parameters, 256 observables and 1,024 rules up to rules-model/0.4; 4,096 types, 16,384 parameters, 4,096 observables and 65,536 rules in crn-craft.model/1.0), CRN-R016 a network model that the converter (crn-craft convert, crn_craft.convert) cannot write as a rules model yet (no reaction, more than 64 product molecules in a reaction, an initial count above 2^53, or a population limit; the path points into the network model), CRN-R017 a model that has no flat view, which finite state projection (and from 0.7.0 analysis, ODE and export) needs: a model whose products can create attribute tuples during a run, with random product attributes, a whole-rule propensity over a type with several tuples or above the static lowering limits (at /rules), with an atp block (at /atp) or with continuous variables (at /continuous), CRN-R020 run requests (including method, tracker, log and version gates, a request with method fsp where a simulation is expected (at /method), the fsp request’s version (at /schema), max_states, tolerance and bounds (a missing bound, a bound below the initial count, or an unknown species label, at /method/bounds/LABEL), a crn-craft.model/1.0 model with a rules-run request, a higher-order rule with tree, mtdna_direct, binomial or a generated rates kernel, outputs.quantiles in a request before crn-craft.run/1.0 (at /schema), more than 16 or not strictly increasing quantile probabilities in (0, 1), a quantile buffer above the 2 GiB workspace limit (at /outputs/quantiles), method.selector in a request before crn-craft.run/1.0 (at /schema), a generated event loop or rates kernel with a Static Direct selector other than linear, also when auto picks one (at /method/selector), and a generated-kernel fingerprint mismatch), CRN-R030 numerical failures during a replicate (with the selectors of crn-craft.run/1.0 also a non-finite total, a composition or acceptance draw rounded to its bound, and a propensity outside its RSSA-CR bounds; at /time a clock that fails to advance: every rules-run version fails at the first positive wait below half an ulp of the time, every method under crn-craft.run/1.0 accepts such a wait and fails only after 1,000,000 consecutive steps without an advance), CRN-R031 weights below 53-bit resolution (in the tree a rule or instance weight; in Static Direct and its fallbacks, with every selector, a channel below 2⁻⁵³ of the total or lost in the total’s pairwise sums; with RSSA-CR the smallest positive propensity of a channel’s population box, so use tree or rescale), CRN-R040–CRN-R045 event, sampling, instance, wall-time, cancellation and output limits, and the warnings CRN-R050 for an incomplete ensemble and CRN-R051 for a requested specialization that did not apply (an mtdna_direct fallback, or an explicit sparse_trackers: true without an eligible tracker; the rules-run/0.6 default does not warn).

The CRN-R codes at a glance

CodeMeaning
CRN-E001–E004malformed JSON, duplicate keys, unknown fields or wrong types (E003), size limits
CRN-R010invalid, reserved or duplicate name; observable shadowing a parameter
CRN-R011unknown type
CRN-R012expression syntax, unknown name, out-of-scope name or random draw outside products; an independent variable’s derivative that reads an observable or a dependent variable
CRN-R013unsupported rule shape, missing or unknown attribute, bad copy; both or neither of rate and propensity, where or factor on a propensity rule’s reactant; lower_bound without on_bound or the reverse
CRN-R014invalid initial count or attribute; a continuous variable’s initial value or bound that is not finite, or an initial value below its bound
CRN-R013 and R020for model/1.0: a pattern count outside 1 to 2,147,483,647, or on an attributed type or with where or factor (R013); a higher-order rule under a method that refuses it (R020 at /method)
CRN-R015model size limit (the limits; also 64 continuous variables); a field used before its model version (atp in 0.1, propensity and continuous in 0.1 or 0.2, independent before 0.4); atp together with continuous
CRN-R016, R017a network model the converter cannot write (R016); a model without a flat view, which finite state projection, analysis, ODE export and GillesPy2 export need (R017)
CRN-R020invalid run request (hash, path, grid, ensemble, budget, method, selector, quantiles, tracker, log or version gate; generated-kernel fingerprint mismatch); under run/1.1, an invalid protocol (fields, times, probabilities, conflicting assignments) or a method that does not accept a protocol (at /method)
CRN-R030negative or non-finite rate, factor, weight or product attribute; overflow; under run/1.0, 1,000,000 consecutive waits that do not advance the clock; under run/1.1, a protocol count change below 0 or above the count limit (at /protocol/actions/i) and more pending completions than the budget; an invalid spatial_turnover setup
CRN-R031weight below 53-bit resolution (Static Direct: a channel below 2⁻⁵³ of the total; spatial_turnover: a positive weight below 16 × 2⁻⁵³ of its total)
CRN-R040–R045event, sampling, instance (including a count above 2⁵³), wall-time, cancellation and output limits
CRN-R050warning: incomplete ensemble, statistics withheld
CRN-R051warning: a requested specialization did not apply (mtdna_direct could not certify the model and ran Static Direct, or an explicit sparse_trackers: true found no eligible tracker; the rules-run/0.6 default does not warn); the message gives the reason