MCPcopy Create free account
hub / github.com/cortex-js/compute-engine / visit

Function visit

src/compute-engine/symbolic/logic-utils.ts:674–690  ·  view source on GitHub ↗
(e: Expression)

Source from the content-addressed store, hash-verified

672 }
673 // For n-ary Xor negation, first convert Xor to binary, then negate
674 return toNNF(ce._fn('Not', [toNNF(inner, ce)]), ce);
675 }
676
677 // Negation of Nand: ¬NAND(A, B) ≡ A ∧ B
678 if (innerOp === 'Nand') {
679 return toNNF(ce._fn('And', fnOps(inner)!), ce);
680 }
681
682 // Negation of Nor: ¬NOR(A, B) ≡ A ∨ B
683 if (innerOp === 'Nor') {
684 return toNNF(ce._fn('Or', fnOps(inner)!), ce);
685 }
686
687 // Literal: ¬x stays as is
688 return expr;
689 }
690
691 // Handle Implies: A → B ≡ ¬A ∨ B
692 if (op === 'Implies') {
693 const a = fnOp1(expr)!;

Callers 3

extractVariablesFunction · 0.70
visitMethod · 0.50
analyzeReferencesMethod · 0.50

Calls 4

symFunction · 0.90
isSymbolFunction · 0.90
isFunctionFunction · 0.90
addMethod · 0.65

Tested by

no test coverage detected