Package net.sf.kpex.prolog

Examples of net.sf.kpex.prolog.Source


  }

  @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;
  }
View Full Code Here


   * @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);
  }
View Full Code Here

   */
  @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);
  }
View Full Code Here

   * @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);
  }
View Full Code Here

   * @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);
  }
View Full Code Here

  }

  @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;
      }
View Full Code Here

  @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);
  }
View Full Code Here

   * @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);
  }
View Full Code Here

  }

  @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);
View Full Code Here

TOP

Related Classes of net.sf.kpex.prolog.Source

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.