public override Predicate exec(Prolog engine)
        {
            Term      a1, a2, a3, a4, a5, a6;
            Predicate p1, p2, p3, p4, p5;

            a1 = engine.aregs[1].Dereference();
            a2 = engine.aregs[2].Dereference();
            Predicate cont = engine.cont;

            a3 = engine.makeVariable();
            a4 = engine.makeVariable();
            a5 = engine.makeVariable();
            Term[] h2 = { a4 };
            a6 = new StructureTerm(f1, h2);
            p1 = new Predicates.dollar_cut_1(a3, cont);
            p2 = new Predicates.ObtenerArregloTrofeoAux_2(a5, a2, p1);
            p3 = new Predicates.Retract_1(a6, p2);
            p4 = new Predicates.Concatenar_Valor_3(a1, a4, a5, p3);
            p5 = new Predicates.Es_Trofeo_1(a4, p4);
            return(new Predicates.dollar_getLevel_1(a3, p5));
        }
Пример #2
0
        public override Predicate exec( Prolog engine )
        {
            Term a1, a2, a3, a4, a5;
            Predicate p1, p2, p3, p4;
            a1 = engine.aregs[1].Dereference();
            a2 = engine.aregs[2].Dereference();
            a3 = engine.aregs[3].Dereference();
            Predicate cont = engine.cont;

            a4 = engine.makeVariable();
            Term[] h2 = {a1, a2, a3};
            a5 = new StructureTerm(f1, h2);
            p1 = new Predicates.dollar_fail_0(cont);
            p2 = new Predicates.dollar_cut_1(a4, p1);
            p3 = new Predicates.Retract_1(a5, p2);
            p4 = new Predicates.Free_Close_Line_4(engine.makeVariable(), engine.makeVariable(), engine.makeVariable(), engine.makeVariable(), p3);
            return new Predicates.dollar_getLevel_1(a4, p4);
        }