Search in sources :

Example 6 with DeriveRuleSet

use of nars.derive.rule.DeriveRuleSet in project narchy by automenta.

the class PremiseRuleTest method testDoubleOnlyTruthAddsRequiresBeliefPredicate.

@Test
public void testDoubleOnlyTruthAddsRequiresBeliefPredicate() {
    // test that the constraint on %2 being of size > 1 is testable in the Proto phase
    DeriveRules d = new DeriveRuleSet(NARS.shell(), "X,Y |- (X&&Y), (Belief:Intersection)").compile();
    d.printRecursive();
    assertEquals("((\".!\"-->task),Belief,can({0}))", d.what.toString());
}
Also used : DeriveRuleSet(nars.derive.rule.DeriveRuleSet) Test(org.junit.jupiter.api.Test)

Aggregations

DeriveRuleSet (nars.derive.rule.DeriveRuleSet)6 Test (org.junit.jupiter.api.Test)5 DeriveRules (nars.derive.DeriveRules)2 PatternIndex (nars.index.term.PatternIndex)2 DeriveRuleSource (nars.derive.rule.DeriveRuleSource)1 Term (nars.term.Term)1 Termed (nars.term.Termed)1 NotNull (org.jetbrains.annotations.NotNull)1