use of nars.derive.op.TaskBeliefHasOrHasnt in project narchy by automenta.
the class DeriveRuleProto method termIs.
private static void termIs(Set<PrediTerm<PreDerivation>> pres, Term taskPattern, Term beliefPattern, SortedSet<MatchConstraint> constraints, Term x, Op v) {
constraints.add(OpIs.the(x, v));
boolean isTask = taskPattern.equals(x);
boolean isBelief = beliefPattern.equals(x);
if (isTask || isBelief)
pres.add(new TaskBeliefOp(v, isTask, isBelief));
boolean inTask = (!isTask && taskPattern.containsRecursively(x));
boolean inBelief = (!isBelief && beliefPattern.containsRecursively(x));
if (inTask || inBelief) {
pres.add(new TaskBeliefHasOrHasnt(v, isTask || inTask, isBelief || inBelief, true));
}
}
use of nars.derive.op.TaskBeliefHasOrHasnt in project narchy by automenta.
the class DeriveRuleProto method eventPrefilter.
static void eventPrefilter(Set<PrediTerm<PreDerivation>> pres, Term conj, Term taskPattern, Term beliefPattern) {
// includesOp(pres, taskPattern, beliefPattern, conj, CONJ.bit, true, true);
boolean isTask = taskPattern.equals(conj);
boolean isBelief = beliefPattern.equals(conj);
if (isTask || isBelief)
pres.add(new TaskBeliefOp(CONJ, isTask, isBelief));
boolean inTask = !isTask && taskPattern.containsRecursively(conj);
boolean inBelief = !isBelief && beliefPattern.containsRecursively(conj);
if (inTask || inBelief) {
pres.add(new TaskBeliefHasOrHasnt(CONJ.bit, isTask || inTask, isBelief || inBelief, true));
}
}
Aggregations