Built-in validation. The default
(full = FALSE) checks required fields and enum membership. With
full = TRUE it additionally checks referential integrity: that every id
is unique within its collection and that every cross-reference (proposition
endpoints, prediction derivations and diagnostics, and assumption, evidence and
test-outcome targets) points to a declared id. The full checks are
deterministic.
Arguments
- theory
A theory object (named list), e.g. from
tf_read().- full
When
TRUE, also run the referential-integrity checks.
Examples
theory <- tf_theory("demo-1", "A demonstration theory")
tf_validate(theory)
tf_validate(theory, full = TRUE)