public override Predicate exec(Prolog engine) { Term a1, a2, a3; a1 = engine.aregs[1].Dereference(); a2 = engine.aregs[2].Dereference(); a3 = engine.aregs[3].Dereference(); Predicate cont = engine.cont; if (!s1.Unify(a1, engine.trail)) { return(engine.fail()); } return(cont); }
public override Predicate exec(Prolog engine) { Term a1, a2, a3; Predicate p1, p2; a1 = engine.aregs[1].Dereference(); a2 = engine.aregs[2].Dereference(); Predicate cont = engine.cont; if (!s1.Unify(a2, engine.trail)) { return(engine.fail()); } a3 = engine.makeVariable(); p1 = new Predicates.dollar_cut_1(a3, cont); p2 = new Predicates.dollar_lessOrEqual_2(a1, s2, p1); return(new Predicates.dollar_getLevel_1(a3, p2)); }