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.
This commit is contained in:
@@ -616,6 +616,8 @@ export function clauseEquivalent(a: CanonicalClauseDescriptor, b: CanonicalClaus
|
||||
a.flags === b.flags &&
|
||||
a.quantifier === b.quantifier &&
|
||||
a.envGuard === b.envGuard &&
|
||||
a.compoundOperator === b.compoundOperator &&
|
||||
a.compoundGroupId === b.compoundGroupId &&
|
||||
frameEquivalent(a.frame, b.frame) &&
|
||||
stateEquivalent(a.state, b.state) &&
|
||||
toleranceEquivalent(a.tolerance, b.tolerance) &&
|
||||
|
||||
Reference in New Issue
Block a user