Skip to content

Commit ce74e05

Browse files
docs: clarify AbstractSystem mutability contract
Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
1 parent 0f91456 commit ce74e05

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

docs/src/API/abstract_system_interface.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,8 @@ The following rules apply to every subtype:
4040
is itself an `AbstractSystem`. It never returns transitive descendants.
4141
- The hierarchy reachable through [`ModelingToolkit.get_systems`](@ref) must be finite and
4242
acyclic. Every generic accessor below recurses through it without cycle detection.
43-
- Systems are treated as immutable values. A generic function may retain, compare, or hash
44-
a system, and may assume that a system it received earlier still describes the same
45-
model.
43+
- Generic accessors do not mutate a system. Treat the system and the collections returned
44+
by its accessors as read-only unless a function explicitly documents a mutating operation.
4645

4746
## Optional Storage and the `has_x`/`get_x` Protocol
4847

0 commit comments

Comments
 (0)