Files
Imhotep/packages/imhotep-dsl
John Dvorak 9b691b2c7c fix: close out remaining audit findings — type safety, equivalence, deprecations
lower-to-canonical.ts: clauseEquivalent now compares compoundOperator
  and compoundGroupId. Previously, compound assertions with different
  operators (.and vs .or) were considered equivalent.

fol-compiler.ts: adaptGrammarFormulaToLogicAst validates node.kind
  against known formula kinds (forall/exists/and/or/not/implies/predicate)
  before passing through as FormulaNode. Previously any object with a
  'kind' property was blindly cast.

predicates.ts / registry.ts: @deprecated tags on globalPredicateRegistry
  and globalClauseRegistry. Both are still functional but consumers should
  transition to explicit injection via LogicEngineOptions / EvaluationOptions.

454 solver+DSL tests pass, zero regressions.
2026-05-22 12:05:43 -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