use of nars.term.Compound in project narchy by automenta.
the class RevisionTest method testIntermpolationOrderMixDternal.
@Test
public void testIntermpolationOrderMixDternal() throws Narsese.NarseseException {
Compound a = $.$("(a &&+1 (b &&+1 c))");
Compound b = $.$("(a &&+1 (b && c))");
permuteChoose(a, b, "[(a &&+1 (b&&c))]");
}
use of nars.term.Compound in project narchy by automenta.
the class RevisionTest method testIntermpolationWrongOrderSoDternalOnlyOption.
@Test
public void testIntermpolationWrongOrderSoDternalOnlyOption() throws Narsese.NarseseException {
Compound a = $.$("(((right-->tetris) &&+5 (rotCW-->tetris)) &&+51 (tetris-->[happy]))");
Compound b = $.$("(((tetris-->[happy])&&(right-->tetris)) &&+11 (rotCW-->tetris))");
permuteChoose(a, b, "[(&&,(tetris-->[happy]),(right-->tetris),(rotCW-->tetris))]");
}
use of nars.term.Compound in project narchy by automenta.
the class RevisionTest method testIntermpolation2.
@Test
public void testIntermpolation2() throws Narsese.NarseseException {
Compound f = $.$("(a &&+1 b)");
Compound g = $.$("(a &&-1 b)");
permuteChoose(f, g, "[(a&&b)]");
Compound h = $.$("(a &&+1 b)");
Compound i = $.$("(a &| b)");
permuteChoose(h, i, "[(a&|b), (a &&+1 b)]");
}
use of nars.term.Compound in project narchy by automenta.
the class PatternCompoundTest method testEqualityWithNonPatternDT.
@Test
public void testEqualityWithNonPatternDT() throws Narsese.NarseseException {
for (String s : new String[] { "(a ==> b)", "(a ==>+1 b)", "(a &&+1 b)" }) {
Compound t = $(s);
Compound p = (Compound) i.get(t, true).term();
assertEquals(t.dt(), p.dt());
assertEquals(t, p);
}
}
use of nars.term.Compound in project narchy by automenta.
the class PatternCompoundTest method testPatternCompoundWithXTERNAL.
@Test
public void testPatternCompoundWithXTERNAL() throws Narsese.NarseseException {
Compound p = (Compound) i.get($("((x) ==>+- (y))"), true).term();
assertEquals(XTERNAL, p.dt());
}
Aggregations