Repository navigation
Reference 07 Derived properties
github-actions[bot] edited this page Oct 15, 2026
·
1 revision
A property can be defined as a computation over other properties instead of stored data:
balance: Money = amount - sum(payments, amount)
Derived properties are recomputed from current data, not cached/stored — they're the mechanism by which refinement membership can change without any explicit action (see ## Refinements, §8).
A derived property's formula may reference the same property one hop away through a relationship (self-reference) — e.g. root: one Foo? = if parent is none then none else (if parent.root is none then parent else parent.root). This needs no special syntax; correctly evaluating it is a compiler obligation (## Principles), not a language concern — see Predicate expressions, below.
Reference
- §1 Principles
- §2 Philosophy
- §3 shape
- §4 State and commits
- §5 Scalars
- §6 Relationships (one, many)
- §7 Derived properties
- §8 Refinements (where)
- §9 Composing refinements (and, or)
- §10 Predicate expressions
- §11 rule ... when ... on ...
- §12 Assignment (mutation in place)
- §13 Exit triggers (when leaving)
- §14 for
- §15 then
- §16 Sweeps: rules fire per record
- [[§17 Schedule triggers (on )|Reference-17-Schedule-triggers]]
- §18 Run-once guards
- §19 Self-referential folds and tolerates
- §20 State-change patterns
- §21 never
- §22 Open / unresolved
Normative documents
Guides
Notes