Skip to content

Document SciMLBase interface contracts - #1432

Merged
ChrisRackauckas merged 59 commits into
SciML:masterfrom
ChrisRackauckas-Claude:doc-interface-docstrings
Jul 10, 2026
Merged

ChrisRackauckas merged 59 commits into
SciML:masterfrom
ChrisRackauckas-Claude:doc-interface-docstrings

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member

Summary

  • flesh out abstract problem, function, solution, algorithm, callback, clock, PDE, ensemble, and integrator interface contracts
  • document common downstream extension rules gathered from SciML solver usage, tests, and existing manuals
  • add canonical concrete problem, function, and solution reference pages
  • add the public problem_type trait so downstream packages do not inspect internal problem layout fields
  • declare documented interface bindings public and bump the package version to 3.35.0
  • correct stale or inaccurate guidance for remake, Jacobian prototypes, plotting, ensemble statistics, RNG handling, and PDE discretization

Motivation

SciMLBase abstract types and extension hooks were substantially less specific than the interface manuals and downstream solver behavior. This made ownership, required methods, mutation rules, trait semantics, and supported data layouts difficult to infer without reading multiple solver packages. The new contracts make those rules explicit at the declarations and render public concrete bindings canonically in the manual.

Process

  • audited SciMLBase abstract types, exported/public bindings, tests, and current interface pages
  • compared problem layout use in OrdinaryDiffEq, DelayDiffEq, BoundaryValueDiffEq, and StochasticDiffEq
  • replaced direct problem_type field assumptions with a public trait
  • split concrete references into focused pages to stay below Documenter page-size limits
  • rebased onto current origin/master, preserving upstream public-API documentation and removing duplicate canonical entries

Verification

  • Runic.jl across all changed Julia files: no changes required
  • focused interface documentation suite on Julia 1.10: 155/155 passed
  • full Pkg.test() on Julia 1.10: passed; Remake 4430/4430
  • full Documenter build with cross-reference and link checking: passed
  • remaining uncaptured docstrings were audited and are internal bindings

Ignore this PR until it has been reviewed by @ChrisRackauckas.

Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Chris Rackauckas <[email protected]>
Co-Authored-By: Chris Rackauckas <[email protected]>
@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member Author

Implementation record:

  1. Audited abstract/public interface declarations, interface manuals, tests, and downstream solver usage.
  2. Added downstream-derived extension contracts and canonical concrete reference pages.
  3. Added and adopted the public problem_type trait, with a 3.35.0 minor version bump.
  4. Rebased the full stack onto current master; retained upstream deprecation implementations and did not reintroduce the removed QuadratureSolution binding.
  5. Removed canonical @docs duplicates exposed by the rebase.

Local verification after rebasing: focused interface suite 155/155, full Pkg.test() passed (Remake 4430/4430), Runic clean, and linked Documenter build passed.

The interface rewrite replaced the checkable algebraic type laws
(`x::T + y::T = z::T`, `similar(x::T)::T`, `ArrayInterface.zeromatrix`,
the mutable broadcast-assignment rules, the Newton-shift diagonal rule,
etc.) with prose descriptions. The value of this page is that it is a
specification a type can be checked against, so restore the type-signature
laws as the normative contract.

Where the prose surfaced genuinely-required operations that the old page
omitted, add them as additional laws rather than dropping the old ones:
subtraction on `T`, promotion closure, `copy`/`copyto!`/`fill!`, `mul!`,
`similar` with element-type/dims, and the state-geometry inspection ops.
Keep the accurate problem-algorithm-pair framing, the algorithm-capability
traits, and the corrected note that no keyword bypasses interface checks
(`interface_checks` does not exist in the source).

Co-Authored-By: Chris Rackauckas <[email protected]>
@ChrisRackauckas
ChrisRackauckas marked this pull request as ready for review July 10, 2026 15:33
test/public_interface.jl pins that Array_and_Number.md mentions the
generated `LinearProblem(A, b)` linear system. The type-law rewrite had
replaced it with the typed `LinearProblem(A::M, b::C)` form and dropped
the bare mention, failing the assertion at public_interface.jl:65. Restore
the human-facing summary sentence alongside the typed law.

Co-Authored-By: Chris Rackauckas <[email protected]>
@ChrisRackauckas
ChrisRackauckas merged commit 6895007 into SciML:master Jul 10, 2026
46 of 63 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants