REFERENCE / 05
Verify Clauses
Use verify when source should declare structural expectations explicitly.
(model
(verify
(tag front_gap body.front_window_1)
(metric gap (clearance min-distance body lid))
(expect gap (>= 3)))
(part body (box 10 10 10))
(part lid (box 10 10 10)))- model verification is top-level under
model - component-owned verification is the one exception: a
verifyclause may
sit directly inside define-component, before its geometry expression, and expands once per instance
- one verify clause requires three sections in order:
tagmetricexpect- nested
verifyinside geometry or helper expressions is rejected - empty
(verify)is rejected
tag
(tag body_shell body.front_window_1)- carries authored labels, ids, or references
- payload stays opaque to compiler/core IR
- useful for human grouping and later diagnostics
metric
(metric check (manifest has-step))
(metric triangles (stl triangle-count))
(metric gap (clearance min-distance body.front_window_1 lid.front_skirt))- first item usually names local check alias
- second item is metric expression
- current runtime metric namespaces:
manifeststlclearance
Current shipped metric keys:
manifest has-stepmanifest has-preview-stlmanifest edge-target-countmanifest face-target-countmanifest export-format-countmanifest part-countstl triangle-countstl connected-component-countstl non-manifold-edge-countstl overhang-face-countclearance min-distance
clearance min-distance compares the minimum distance between two named selectors.
- selectors can name parts, selection targets, or correspondence outputs
- part selectors use manifest bounds
- edge and face selectors use runtime mesh target geometry when available
- unresolved selectors fail authored verify with a raw runtime error
expect
(expect check (= true))
(expect triangles (> 100))- first item should reference the metric alias used above
- second item is comparator form
- current shipped comparators:
=>>=<<=
Authoring rule:
- fix geometry or exports until
verifypasses - do not remove
verifyclauses to bypass authored requirements