Package jp.ac.kobe_u.cs.prolog.lang

Examples of jp.ac.kobe_u.cs.prolog.lang.Term


    }

    public Predicate exec(Prolog engine) {
    // get_char(A):-current_input(B),get_char(B,A)
        engine.setB0();
        Term a1, a2;
        Predicate p1;
        a1 = arg1;
    // get_char(A):-[current_input(B),get_char(B,A)]
        a2 = new VariableTerm(engine);
        p1 = new PRED_get_char_2(a2, a1, cont);
View Full Code Here


}

class PRED_system_predicate_1_137 extends PRED_system_predicate_1 {
    public Predicate exec(Prolog engine) {
    // system_predicate(peek_code(A)):-true
        Term a1;
        Predicate cont;
        a1 = engine.aregs[1];
        cont = engine.cont;
    // system_predicate(peek_code(A)):-[]
        a1 = a1.dereference();
        if (a1.isStructure()){
            if (! s137.equals(((StructureTerm)a1).functor()))
                return engine.fail();
            Term[] args = ((StructureTerm)a1).args();
        } else if (a1.isVariable()){
            Term[] args = {new VariableTerm(engine)};
            ((VariableTerm) a1).bind(new StructureTerm(s137, args), engine.trail);
        } else {
            return engine.fail();
        }
View Full Code Here

}

class PRED_system_predicate_1_138 extends PRED_system_predicate_1 {
    public Predicate exec(Prolog engine) {
    // system_predicate(peek_code(A,B)):-true
        Term a1;
        Predicate cont;
        a1 = engine.aregs[1];
        cont = engine.cont;
    // system_predicate(peek_code(A,B)):-[]
        a1 = a1.dereference();
        if (a1.isStructure()){
            if (! s138.equals(((StructureTerm)a1).functor()))
                return engine.fail();
            Term[] args = ((StructureTerm)a1).args();
        } else if (a1.isVariable()){
            Term[] args = {new VariableTerm(engine), new VariableTerm(engine)};
            ((VariableTerm) a1).bind(new StructureTerm(s138, args), engine.trail);
        } else {
            return engine.fail();
        }
View Full Code Here

}

class PRED_system_predicate_1_139 extends PRED_system_predicate_1 {
    public Predicate exec(Prolog engine) {
    // system_predicate(put_char(A)):-true
        Term a1;
        Predicate cont;
        a1 = engine.aregs[1];
        cont = engine.cont;
    // system_predicate(put_char(A)):-[]
        a1 = a1.dereference();
        if (a1.isStructure()){
            if (! s139.equals(((StructureTerm)a1).functor()))
                return engine.fail();
            Term[] args = ((StructureTerm)a1).args();
        } else if (a1.isVariable()){
            Term[] args = {new VariableTerm(engine)};
            ((VariableTerm) a1).bind(new StructureTerm(s139, args), engine.trail);
        } else {
            return engine.fail();
        }
View Full Code Here

}

class PRED_system_predicate_1_140 extends PRED_system_predicate_1 {
    public Predicate exec(Prolog engine) {
    // system_predicate(put_char(A,B)):-true
        Term a1;
        Predicate cont;
        a1 = engine.aregs[1];
        cont = engine.cont;
    // system_predicate(put_char(A,B)):-[]
        a1 = a1.dereference();
        if (a1.isStructure()){
            if (! s140.equals(((StructureTerm)a1).functor()))
                return engine.fail();
            Term[] args = ((StructureTerm)a1).args();
        } else if (a1.isVariable()){
            Term[] args = {new VariableTerm(engine), new VariableTerm(engine)};
            ((VariableTerm) a1).bind(new StructureTerm(s140, args), engine.trail);
        } else {
            return engine.fail();
        }
View Full Code Here

}

class PRED_system_predicate_1_141 extends PRED_system_predicate_1 {
    public Predicate exec(Prolog engine) {
    // system_predicate(put_code(A)):-true
        Term a1;
        Predicate cont;
        a1 = engine.aregs[1];
        cont = engine.cont;
    // system_predicate(put_code(A)):-[]
        a1 = a1.dereference();
        if (a1.isStructure()){
            if (! s141.equals(((StructureTerm)a1).functor()))
                return engine.fail();
            Term[] args = ((StructureTerm)a1).args();
        } else if (a1.isVariable()){
            Term[] args = {new VariableTerm(engine)};
            ((VariableTerm) a1).bind(new StructureTerm(s141, args), engine.trail);
        } else {
            return engine.fail();
        }
View Full Code Here

}

class PRED_system_predicate_1_142 extends PRED_system_predicate_1 {
    public Predicate exec(Prolog engine) {
    // system_predicate(put_code(A,B)):-true
        Term a1;
        Predicate cont;
        a1 = engine.aregs[1];
        cont = engine.cont;
    // system_predicate(put_code(A,B)):-[]
        a1 = a1.dereference();
        if (a1.isStructure()){
            if (! s142.equals(((StructureTerm)a1).functor()))
                return engine.fail();
            Term[] args = ((StructureTerm)a1).args();
        } else if (a1.isVariable()){
            Term[] args = {new VariableTerm(engine), new VariableTerm(engine)};
            ((VariableTerm) a1).bind(new StructureTerm(s142, args), engine.trail);
        } else {
            return engine.fail();
        }
View Full Code Here

}

class PRED_system_predicate_1_143 extends PRED_system_predicate_1 {
    public Predicate exec(Prolog engine) {
    // system_predicate(nl):-true
        Term a1;
        Predicate cont;
        a1 = engine.aregs[1];
        cont = engine.cont;
    // system_predicate(nl):-[]
        a1 = a1.dereference();
        if (a1.isSymbol()){
            if (! a1.equals(s143))
                return engine.fail();
        } else if (a1.isVariable()){
            ((VariableTerm) a1).bind(s143, engine.trail);
        } else {
            return engine.fail();
        }
        return cont;
View Full Code Here

}

class PRED_system_predicate_1_144 extends PRED_system_predicate_1 {
    public Predicate exec(Prolog engine) {
    // system_predicate(nl(A)):-true
        Term a1;
        Predicate cont;
        a1 = engine.aregs[1];
        cont = engine.cont;
    // system_predicate(nl(A)):-[]
        a1 = a1.dereference();
        if (a1.isStructure()){
            if (! s144.equals(((StructureTerm)a1).functor()))
                return engine.fail();
            Term[] args = ((StructureTerm)a1).args();
        } else if (a1.isVariable()){
            Term[] args = {new VariableTerm(engine)};
            ((VariableTerm) a1).bind(new StructureTerm(s144, args), engine.trail);
        } else {
            return engine.fail();
        }
View Full Code Here

}

class PRED_system_predicate_1_118 extends PRED_system_predicate_1 {
    public Predicate exec(Prolog engine) {
    // system_predicate(bagof(A,B,C)):-true
        Term a1;
        Predicate cont;
        a1 = engine.aregs[1];
        cont = engine.cont;
    // system_predicate(bagof(A,B,C)):-[]
        a1 = a1.dereference();
        if (a1.isStructure()){
            if (! s118.equals(((StructureTerm)a1).functor()))
                return engine.fail();
            Term[] args = ((StructureTerm)a1).args();
        } else if (a1.isVariable()){
            Term[] args = {new VariableTerm(engine), new VariableTerm(engine), new VariableTerm(engine)};
            ((VariableTerm) a1).bind(new StructureTerm(s118, args), engine.trail);
        } else {
            return engine.fail();
        }
View Full Code Here

TOP

Related Classes of jp.ac.kobe_u.cs.prolog.lang.Term

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.