/** * Inference between a component term (of the current term) and a statement * * @param compound The compound term * @param index The location of the current term in the compound * @param statement The statement * @param side The location of the current term in the statement * @param memory Reference to the memory */ private static void componentAndStatement( CompoundTerm compound, short index, Statement statement, short side, Memory memory) { if (!memory.currentTask.isStructural()) { if (statement instanceof Inheritance) { StructuralRules.structuralDecompose1(compound, index, statement, memory); if (!(compound instanceof SetExt) && !(compound instanceof SetInt)) { StructuralRules.structuralDecompose2( statement, memory); // {(C-B) --> (C-A), A @ (C-A)} |- A --> B } else { StructuralRules.transformSetRelation(compound, statement, side, memory); } } else if (statement instanceof Similarity) { StructuralRules.structuralDecompose2( statement, memory); // {(C-B) --> (C-A), A @ (C-A)} |- A --> B if ((compound instanceof SetExt) || (compound instanceof SetInt)) { StructuralRules.transformSetRelation(compound, statement, side, memory); } } else if ((statement instanceof Implication) && (compound instanceof Negation)) { StructuralRules.contraposition(statement, memory); } } }