36373839404142434445
} @Override public int exec(Prog p) { Source original = (Source) getArg(0); Const Xs = original.toList(); return putArg(1, new net.sf.kpex.prolog.ListSource(Xs, p), p) > 0 && putArg(2, new net.sf.kpex.prolog.ListSource(Xs, p), p) > 0 ? 1 : 0; }
404142434445464748
* @see net.sf.kpex.prolog.FunBuiltin#exec(net.sf.kpex.prolog.Prog) */ @Override public int exec(Prog p) { Source S = (Source) getArg(0); Term Xs = S.toList(); return putArg(1, Xs, p); }
4344454647484950
*/ @Override public int exec(Prog p) { DataBase db = (DataBase) ((JavaObject) getArg(0)).toObject(); Source S = new JavaSource(db.iterateAll(), p); return putArg(1, S, p); }
414243444546474849
* @see net.sf.kpex.prolog.FunBuiltin#exec(net.sf.kpex.prolog.Prog) */ @Override public int exec(Prog p) { Source S = (Source) getArg(0); Term Xs = p.getBuiltins().toBuiltin(((Const) S.toFun())); return putArg(1, Xs, p); }
3839404142434445
* @see net.sf.kpex.prolog.FunBuiltin#exec(net.sf.kpex.prolog.Prog) */ @Override public int exec(Prog p) { Source s = (Source) getArg(0); return putArg(1, new net.sf.kpex.prolog.SourceLoop(s, p), p); }
363738394041424344454647484950
} @Override public int exec(Prog p) { Source from = (Source) getArg(0); Sink to = (Sink) getArg(1); for (;;) { Term X = from.getElement(); if (null == X) { to.stop(); break; }
383940414243444546474849
@Override public int exec(Prog p) { // IO.mes("<<"+getArg(0)+"\n"+p+p.getTrail().pprint()); Source S = (Source) getArg(0); Term A = Const.the(S.getElement()); // if(null==A) A=Const.NO; // else A=new Fun("the",A); // IO.mes(">>"+A+"\n"+p+p.getTrail().pprint()); return putArg(1, A, p); }
4041424344454647
* @see net.sf.kpex.prolog.FunBuiltin#exec(net.sf.kpex.prolog.Prog) */ @Override public int exec(Prog p) { Source E = new net.sf.kpex.prolog.ListSource((Const) getArg(0), p); return putArg(1, E, p); }
39404142434445464748495051
} @Override public int exec(Prog p) { Source S = (Source) getArg(0); // S.setPersistent(true); Term X = S.getElement(); Term Xs = Const.NIL; if (null != X) { Xs = new LazyList(X, S, new Trail()); p.getTrail().push(Xs);