Search in sources :

Example 16 with Compound

use of nars.term.Compound in project narchy by automenta.

the class RevisionTest method testIntermpolationOrderPartialMismatch2.

@Test
public void testIntermpolationOrderPartialMismatch2() throws Narsese.NarseseException {
    Compound a = $.$("(a &&+1 (b &&+1 (d &&+1 c)))");
    Compound b = $.$("(a &&+1 (b &&+1 (c &&+1 d)))");
    String expected = "[((a &&+1 b) &&+1 (c&&d))]";
    permuteChoose(a, b, expected);
}
Also used : Compound(nars.term.Compound) Test(org.junit.jupiter.api.Test)

Example 17 with Compound

use of nars.term.Compound in project narchy by automenta.

the class RevisionTest method testIntermpolationOrderMixDternal2Reverse.

@Test
public void testIntermpolationOrderMixDternal2Reverse() throws Narsese.NarseseException {
    Compound a = $.$("(a &&+1 (b &&+1 (c &&+1 d)))");
    Compound b = $.$("((a && b) &&+1 (c &&+1 d))");
    permuteChoose(a, b, "[(((a&&b) &&+1 c) &&+1 d), (((a&&b) &&+1 c) &&+2 d), ((a&&b) &&+1 (c&|d))]");
}
Also used : Compound(nars.term.Compound) Test(org.junit.jupiter.api.Test)

Example 18 with Compound

use of nars.term.Compound in project narchy by automenta.

the class RevisionTest method testIntermpolationImplDirectionMismatch.

@Test
public void testIntermpolationImplDirectionMismatch() throws Narsese.NarseseException {
    Compound a = $.$("(a ==>+1 b)");
    Compound b = $.$("(a ==>-1 b))");
    permuteChoose(a, b, "[(a==>b)]");
}
Also used : Compound(nars.term.Compound) Test(org.junit.jupiter.api.Test)

Example 19 with Compound

use of nars.term.Compound in project narchy by automenta.

the class RevisionTest method testIntermpolationConj2OrderSwap.

@Test
public void testIntermpolationConj2OrderSwap() throws Narsese.NarseseException {
    Compound a = $.$("(a &&+1 b)");
    Compound b = $.$("(b &&+1 a))");
    permuteChoose(a, b, "[(a&&b)]");
}
Also used : Compound(nars.term.Compound) Test(org.junit.jupiter.api.Test)

Example 20 with Compound

use of nars.term.Compound in project narchy by automenta.

the class RevisionTest method testIntermpolationOrderMismatch.

@Test
public void testIntermpolationOrderMismatch() throws Narsese.NarseseException {
    Compound a = $.$("(c &&+1 (b &&+1 a))");
    Compound b = $.$("(a &&+1 (b &&+1 c))");
    permuteChoose(a, b, "[(&&,a,b,c)]");
}
Also used : Compound(nars.term.Compound) Test(org.junit.jupiter.api.Test)

Aggregations

Compound (nars.term.Compound)58 Test (org.junit.jupiter.api.Test)38 Term (nars.term.Term)20 Unify (nars.term.subst.Unify)3 FasterList (jcog.list.FasterList)2 XorShift128PlusRandom (jcog.math.random.XorShift128PlusRandom)2 Op (nars.Op)2 PatternCompound (nars.derive.PatternCompound)2 PatternIndex (nars.index.term.PatternIndex)2 Atomic (nars.term.atom.Atomic)2 Variable (nars.term.var.Variable)2 NotNull (org.jetbrains.annotations.NotNull)2 Nullable (org.jetbrains.annotations.Nullable)2 alice.tuprolog (alice.tuprolog)1 FileNotFoundException (java.io.FileNotFoundException)1 ArrayList (java.util.ArrayList)1 Random (java.util.Random)1 AtomicBoolean (java.util.concurrent.atomic.AtomicBoolean)1 Prioritized (jcog.pri.Prioritized)1 Narsese (nars.Narsese)1