Execution Requirements
constraint(...) expresses execution requirements.
It is separate from env(...): environment describes physical conditions, while constraints describe how execution should be performed.
Block Form
with constraint(gentle, preserve_boundary) {
target << [source:5uL];
}The block form applies requirements to the statements inside the block.
Single-Step Form
target << [source:5uL] with constraint(gentle);This is equivalent to wrapping that single statement in a constraint block.
Trailing with is only for constraints. It is not used for env(...).
Requirement Names
Requirements are flat names in source code.
Examples:
| Category | Requirements |
|---|---|
| Structure preservation | preserve_boundary, preserve_layering, preserve_fraction_order |
| Contamination control | aseptic, low_carryover, cross_contam_control |
| Material integrity | gentle, avoid_resuspension, avoid_shear, preserve_viability |
| Environmental protection | cold_chain, dark_protected, controlled_atmosphere |
| Quantitative quality | high_precision, low_loss, quantitative_recovery |
| Measurement quality | stabilized_reading, low_noise, noninvasive |
Customized Constraints
Use customized with a schema when a requirement does not fit the named set.
let req_schema = data_schema(label = "CustomRequirement", fields = [target_state]);
with constraint(customized, schema_ref = req_schema) {
target << [source:5uL];
}customized is exclusive: do not mix it with standard requirements in the same constraint list.
Compatibility
Constraint compatibility is checked semantically. For example, a requirement may be valid for transfer but not for an unrelated operation family.
