Search in sources :

Example 36 with Compound

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

the class RevisionTest method testIntermpolationOrderMixDternalReverse.

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

Example 37 with Compound

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

the class RevisionTest method testIntermpolationOrderPartialMismatchReverse2.

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

Example 38 with Compound

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

the class RevisionTest method testIntermpolation0.

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

Example 39 with Compound

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

the class RevisionTest method testIntermpolationOrderPartialMismatchReverse.

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

Example 40 with Compound

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

the class RevisionTest method testIntermpolationImplDirectionDternalAndTemporal.

@Test
public void testIntermpolationImplDirectionDternalAndTemporal() throws Narsese.NarseseException {
    Compound a = $.$("(a ==>+1 b)");
    Compound b = $.$("(a ==> b))");
    permuteChoose(a, b, "[(a==>b)]");
}
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