feat: semantic validation and conflict detection (#11) #17
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/semantic-validation-conflicts"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Add DSL.Validate with validate :: UnvalidatedConfiguration ->
Either [ValidationError] IRDocument as the authoritative pipeline
stage between the DSL builder and the IR.
Three error phases accumulate independently: structural (empty names,
multiple conditions, condition-in-service, empty port lists,
poll/cpu/battery range checks), duplicates (repeated profile or service
names), and conflicts (intra-section enable+disable of the same service;
inter-section opposing intents across unconditional profiles).
ValidationError carries SectionKind and section name for every error.
Lowering from UnvalidatedConfiguration to IRDocument runs only when
no errors are found.
Retire IR.Validated (superseded). Add Arbitrary instances for
UnvalidatedProfile, UnvalidatedService, UnvalidatedConfiguration.
Add containers ^>=0.7 for nubOrd (replaces quadratic nub).
Closes #11