Examples of unify()


Examples of jp.ac.kobe_u.cs.prolog.lang.Term.unify()

        //END inline expansion
        a8 = new VariableTerm(engine);
        Term[] y1 = {a8};
        a9 = new StructureTerm(s12, y1);
        //START inline expansion of $unify(a(1),a(9))
        if (! a1.unify(a9, engine.trail)) {
            return engine.fail();
        }
        //END inline expansion
        p1 = new PRED_put_char_2(a6, s15, cont);
        p2 = new PRED_$write_term0_6(a8, si14, s9, new VariableTerm(engine), a5, a6, p1);
View Full Code Here

Examples of jp.ac.kobe_u.cs.prolog.lang.Term.unify()

        Term a1, a2, a3, a4, a5, a6, a7;
        Predicate p1, p2, p3, p4, p5, p6, p7, p8;
    // cafeteria:-['$get_level'(A),'$cafeteria_init',repeat,'$toplvel_loop',on_exception(B,'jp.ac.kobe_u.cs.prolog.builtin':'$cafeteria'(C),'jp.ac.kobe_u.cs.prolog.builtin':print_message(error,B)),'$equality_of_term'(C,end_of_file),'$cut'(A),nl,'$fast_write'(bye),nl]
        a1 = new VariableTerm(engine);
        //START inline expansion of $get_level(a(1))
        if (! a1.unify(new IntegerTerm(engine.B0), engine.trail)) {
            return engine.fail();
        }
        //END inline expansion
        a2 = new VariableTerm(engine);
        a3 = new VariableTerm(engine);
View Full Code Here

Examples of jp.ac.kobe_u.cs.prolog.lang.Term.unify()

            return engine.fail();
        }
        //END inline expansion
        a5 = new ListTerm(new VariableTerm(engine), new VariableTerm(engine));
        //START inline expansion of $unify(a(1),a(5))
        if (! a1.unify(a5, engine.trail)) {
            return engine.fail();
        }
        //END inline expansion
        //START inline expansion of $cut(a(4))
        a4 = a4.dereference();
View Full Code Here

Examples of jp.ac.kobe_u.cs.prolog.lang.Term.unify()

        //END inline expansion
        a3 = new VariableTerm(engine);
        Term[] y1 = {a3, new VariableTerm(engine)};
        a4 = new StructureTerm(s1, y1);
        //START inline expansion of $unify(a(1),a(4))
        if (! a1.unify(a4, engine.trail)) {
            return engine.fail();
        }
        //END inline expansion
        a5 = new VariableTerm(engine);
        a6 = new VariableTerm(engine);
View Full Code Here

Examples of jp.ac.kobe_u.cs.prolog.lang.Term.unify()

  @Override
  public Predicate exec(Prolog engine) {
    // engine.setB0();
    Term a1;
    a1 = arg1;
    if (!a1.unify(new IntegerTerm(engine.B0), engine.trail)) {
      return engine.fail();
    }
    return cont;
  }
}
View Full Code Here

Examples of jp.ac.kobe_u.cs.prolog.lang.Term.unify()

    a1 = a1.dereference();
    if (a1.isVariable()) {
      ((VariableTerm) a1).bind(new JavaObjectTerm(engine
          .getCurrentInput()), engine.trail);
    } else if (a1.isJavaObject()) {
      if (!a1.unify(new JavaObjectTerm(engine.getCurrentInput()),
          engine.trail)) {
        return engine.fail();
      }
    } else {
      throw new IllegalDomainException(this, 1, "stream", a1);
View Full Code Here

Examples of jp.ac.kobe_u.cs.prolog.lang.Term.unify()

  public Predicate exec(Prolog engine) {
    engine.setB0();
    Term a1;
    a1 = arg1;

    if (!a1.unify(engine.getException(), engine.trail)) {
      return engine.fail();
    }
    return cont;
  }
}
View Full Code Here

Examples of jp.ac.kobe_u.cs.prolog.lang.Term.unify()

        a3 = a3.dereference();
        if (a3.isStructure()){
            if (! s2.equals(((StructureTerm)a3).functor()))
                return engine.fail();
            Term[] args = ((StructureTerm)a3).args();
            if (! a1.unify(args[0], engine.trail))
                return engine.fail();
            if (! a2.unify(args[1], engine.trail))
                return engine.fail();
        } else if (a3.isVariable()){
            Term[] args = {a1, a2};
View Full Code Here

Examples of jp.ac.kobe_u.cs.prolog.lang.Term.unify()

        cont = engine.cont;
    // member(A,[A|B]):-[]
        a2 = a2.dereference();
        if (a2.isList()){
            Term[] args = {((ListTerm)a2).car(), ((ListTerm)a2).cdr()};
            if (! a1.unify(args[0], engine.trail))
                return engine.fail();
        } else if (a2.isVariable()){
            ((VariableTerm) a2).bind(new ListTerm(a1, new VariableTerm(engine)), engine.trail);
        } else {
            return engine.fail();
View Full Code Here

Examples of jp.ac.kobe_u.cs.prolog.lang.Term.unify()

        cont = engine.cont;
    // '$dummy_8_builtins.pl'(A,B,C):-['$not_unifiable'(A,C:B)]
        Term[] y1 = {a3, a2};
        a4 = new StructureTerm(s1, y1);
        //START inline expansion of $not_unifiable(a(1),a(4))
        if (a1.unify(a4, engine.trail)) {
            return engine.fail();
        }
        //END inline expansion
        return cont;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.