Files
Imhotep/packages/imhotep-dsl/src/index.ts
T

161 lines
2.9 KiB
TypeScript

// Package entry point for imhotep-dsl
// Exports fluent API, compiler, validator, and parser surface
export {
expect,
assert,
FluentAssertion,
FluentRelation,
FluentBinding,
FluentQuantifier,
FluentCardinality,
ToProxy,
BeProxy,
HaveProxy,
SizeProxy,
frame,
state,
type RelationOptions,
type FrameDescriptor,
type StateDescriptor,
type Quantifier,
} from './fluent.js'
export {
compile,
compileToFormula,
compileDenseFOLToFormula,
type CompilerOptions,
type CompileResult,
} from './compiler.js'
export {
validateRelation,
validateAssertion,
validateProgram,
parseTolerance,
parseGap,
type ValidationResult,
} from './validator.js'
export {
parseSpec,
type ParseResult,
type ParserOptions,
} from './parser.js'
// Lexer and grammar internals (for tooling and transforms)
export {
tokenize,
Lexer,
type Token,
type TokenKind,
} from './lexer.js'
export {
parseGrammar,
GrammarParser,
ParseError,
} from './grammar.js'
// Dense DSL entry point alias
export { parseSpec as spec } from './parser.js'
// Timeline constructors
export {
timeline,
type TimelineDescriptor,
} from './timeline.js'
// Configuration and environment guards
export {
configure,
project,
when,
getConfig,
getProjectConfig,
type ImhotepConfig,
type ProjectConfig,
} from './config.js'
// Quantifier combinators
export {
all,
any,
none,
type ComposableAssertion,
type QuantifiedGroup,
} from './quantifiers.js'
// FOL fluent builders
export {
forAll,
exists,
predicate,
domain,
FluentFormula,
FluentDomain,
type FormulaNode,
type ForAllFormula,
type ExistsFormula,
type AndFormula,
type OrFormula,
type NotFormula,
type ImpliesFormula,
type PredicateCall,
type VariableRef,
type DomainRef,
} from './logic-fluent.js'
// Logic compiler (lowering)
export {
lowerFormula,
lowerProgram,
type LogicIrNode,
type LogicForAll,
type LogicExists,
type LogicAnd,
type LogicOr,
type LogicNot,
type LogicImplies,
type LogicPredicate,
type LogicVariable,
type LogicDomain,
type LogicCompilerOptions,
type LowerResult,
} from './logic-compiler.js'
// Logic validator
export {
validateFormula as validateLogicFormula,
validateProgram as validateLogicProgram,
type LogicValidationResult,
type LogicDiagnostic,
type PredicateDescriptor,
type PredicateRegistry,
} from './logic-validator.js'
// Property-run fluent builders
export {
component,
enumerate,
PropertyRunBuilder,
PropertyScene,
PropertyContext,
PropertyAssertionBuilder,
type InputDomain,
type RenderCase,
type PropertyRunDescriptor,
type PropertyAssertion,
} from './property-fluent.js'
// Shared canonical lowering for IR equivalence testing
export {
lowerToCanonical,
extractFOLFormulas,
areEquivalent,
areSemanticallyEquivalent,
reconstructFromCanonical,
type CanonicalClauseDescriptor,
} from './lower-to-canonical.js'