Refinement & Models · Page 2 of 5
Finite Models & Domains
A Model is the Python equivalent of a TLC .cfg file: it makes a
specification finite by giving concrete values for its constants and finite
collections (range, frozenset, list) for the types it
quantifies over in domains.
When resolving the domain of a parameter's type, the front-end checks in strict order:
- Exact entry in
domains(including a type alias likePriority). Optional[T]/T | None: the domain ofTplusNone.- Inherently finite types:
bool,Literal[...], andEnum— these need no entry! - The underlying base type under any
Whereclauses (e.g.,intforPriority), then narrowed byWhere.
Golden rule: A checker never invents a domain. If an action
quantifies over a type with no domain, the front-end rejects the model with
missing-domain.
Try it: Notice
Status (an Enum) needs no domain,
while Priority does. Delete , domains={Priority: range(1, 4)} from
worker_model and click Check to see ERROR [missing-domain]!