07ed316135
compiler.ts: normalizeOptionValue now rejects NaN numbers and empty strings. Previously typeof NaN === 'number' passed through and propagated into option values, causing predicate comparisons like value >= NaN to produce silent wrong results. grammar.ts: parseAssertion now emits console.warn when silently skipping unexpected tokens or failed clauses. Previously these returns-null were invisible to developers. 454 solver+DSL + 57 E2E tests pass.
imhotep-dsl
Domain-specific language for Imhotep assertions. Provides a fluent assertion API, a dense string-based DSL parser, FOL compilation/validation, canonical lowering, and property-run builders.
Key Exports
| Export | Description |
|---|---|
expect(subject) |
Fluent assertion builder |
spec(src) |
Dense DSL parser (parseSpec alias) |
compile(source) |
Compile DSL to assertion nodes |
compileDenseFOLToFormula(src) |
Compile dense FOL to solver-ready AST |
validateAssertion(node) |
Pre-flight validation without extraction |
lowerToCanonical(nodes) |
Canonical lowering for IR equivalence |
component, enumerate |
Property-run fluent builders |
forAll, exists, predicate, domain |
FOL fluent builders |