Skip to content

v0.3.0

Latest

Choose a tag to compare

@github-actions github-actions released this 25 Aug 02:17
· 43 commits to main since this release
ba4bf06

ReactiveDynamics v0.3.0

Diff since v0.2.7

ReactiveDynamics v0.3.0 — native discrete-event engine (breaking)

A ground-up rework. RD is now a timed, stochastic, resource-constrained Petri net / discrete-event engine built directly on AlgebraicAgents.jl, with no SciML or Catlab dependency. Everything is specified contract-first: a normative operational-semantics contract (spec/CONTRACT_DRAFT.md §1–§15) and 18 Architecture Decision Records (spec/adr/).

Breaking changes

Every previously-exported name below survives one release as a @deprecate / @deprecate_binding shim, then is removed.

Petri-net vocabulary (ADR 0017/0018). A resource pool is a place, its quantity a marking, a transition↔place participation an arc, and one in-flight execution of a transition a firing:

was now
@add_species @add_place
SetSpecies SetMarking
ReactantSpec ArcSpec
reactant_specs arcs
specname placename
register_structured_species! register_token_kind!
Transition (in-flight instance) Firing

Post-ACSets naming (ADR 0015). @ReactionNetworkSchema → @reaction_network; ReactionNetworkSchema → ReactionNetwork; the conventional variable acs → net and the field .acs → .network. Store verbs were renamed to store vocabulary (nrows, row_ids, column, cell, find_rows, …) and unexported — they are internal, RD.-qualified.

Serialized documents. JSON keys "species" → "places" and "set_species" → "set_marking"; the loader accepts the legacy keys for one release with a deprecation warning. The TOML/CSV/JLD2 format zoo is retired in favor of a single JSON format.

Dependencies. DifferentialEquations, OrdinaryDiffEq, DiffEqBase, Catlab, ACSets, GeneratedExpressions, Pluto, PlutoUI and IJulia are dropped; the DiscreteProblem transform is gone. Plots and Arrow are now weak dependencies behind package extensions. Julia ≥ 1.12.

New capabilities

  • Structured, agentic tokens — a token is a first-class entity with attributes and stable identity, not an anonymous count. TokenPredicate / @select pick tokens by predicate; @advance and SetField write fields in place.
  • Resource modality algebra — @conserved (held, returned at finish), @rate (metered per in-flight tick), @nonblock (claimed, not held), with a priority-weighted progressive-fill (water-filling) allocator under contention.
  • Endogenous decisions — typed Rules with triggers and action callbacks (SetMarking, SetParams, AddToken, SetTokens, Invoke) live in the model, not in host patch code.
  • Hierarchical refinement and open-port composition — @pipeline, @process, @compose, and refine for substitutable granularity.
  • Eval-free JSON serialization — from_json_model / to_json_model round-trip through a typed ExprNode IR with a validate pass, closing the import-time RCE. A model document carries no Julia.
  • Reproducibility — a run is fully determined by (model, seed); every stochastic draw goes through a state-owned RNG.
  • Construction-time validation — illegal resource-modality configurations are rejected with a clear ArgumentError before any tick, instead of failing late or silently.
  • Analysis and visualization — per-token trajectory logs, an ensemble runner with treatment effects, a results export bundle, Plots recipes, and a three-layer network "exec map" with bottleneck/starvation coloring.
  • AlgebraicAgents integration — a ReactionNetworkProblem is an AA agent, so a network is a node in a larger heterogeneous hierarchy, wired to foreign models via add_wire!.

Docs and tests

A Documenter.jl + Literate.jl site organized on Diátaxis lines (tiered tutorials, deep-dives, applied case studies, capability-organized API reference), where every code block executes against the engine at build time. The semantic test suite is two-tier (characterization and acceptance) with real assertions over operational semantics, green at 835 passing.

Merged pull requests:

Closed issues:

  • Failing to reproduce a model (#16)