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:
John Dvorak
2026-05-22 12:05:43 -07:00
parent e17e4d6c20
commit 9b691b2c7c
4 changed files with 10 additions and 5 deletions
+1 -1
View File
@@ -134,7 +134,7 @@ export class PredicateRegistry {
}
}
// Global default instance for backward compatibility.
/** @deprecated Use explicit PredicateRegistry injection via LogicEngineOptions.predicateRegistry. */
export const globalPredicateRegistry = new PredicateRegistry();
export function registerPredicate(evaluator: PredicateEvaluator): void {