Dear members,
I just started looking at the implementation of OpenNars and trying to understand the logic and was wondering whether NAL conjunctions should be commutative.
I was trying to simulate the following
by doing the following unit test:
@Test
public void testCommutativety() {
Term termA = new Term("A");
Term termB = new Term("B");
Conjunction conjunctionOne = new Conjunction(new Term[]{termA, termB}, TemporalRules.ORDER_NONE, false, false);
Conjunction conjunctionTwo = new Conjunction(new Term[]{termB, termA}, TemporalRules.ORDER_NONE, false, false);
assertTrue(conjunctionTwo.equals(conjunctionOne));
}
The test fails because eventually the names of the conjunctions are compared instead of the terms in the Conjunction. Is that the expected behaviour and if so why are conjunctions not commutative.
With kind regards,
Mark Schenk