use of nars.derive.op.UnifyTerm in project narchy by automenta.
the class DebugDerivationPredicate method onExit.
@Override
protected void onExit(PrediTerm<Derivation> p, Derivation d, boolean returnValue, Throwable thrown, long nanos) {
if (p instanceof Fork || p instanceof AndCondition) {
} else {
Ansi.Color fg;
if (p instanceof UnifyTerm) {
fg = Ansi.Color.MAGENTA;
} else {
fg = Ansi.Color.YELLOW;
}
Ansi ansi = Ansi.ansi();
String pAnsi = ansi.a(Texts.iPad(nanos, 6) + "nS ").a(' ').a(d.toString()).a(' ').fg(fg).a(p.toString()).fg(Ansi.Color.DEFAULT).a(' ').a((thrown != null ? (" " + thrown) : ' ')).fg(returnValue ? Ansi.Color.GREEN : Ansi.Color.RED).a(returnValue ? "TRUE" : "FALS").fg(Ansi.Color.DEFAULT).newline().toString();
System.out.print(pAnsi);
}
}
Aggregations