Files
Imhotep/packages/imhotep-dsl
John Dvorak 283ab1b39f refactor: convert grammar predicate detection to spec table
Replace 21-item hardcoded isKeywordThatCanBePredicate array with
isPredicateName() from PredicateSpec (+ 'size' special case for
fluent API FOL bodies).

Replace 24-item parseRelation relationKinds array with
collectSpatialPredicateNames() from spec. Error message now also
auto-derives from the spec.

595 SDK + 57 E2E tests pass.
2026-05-22 12:51:20 -07:00
..

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