public override Predicate exec(Prolog engine)
        {
            engine.setB0();
            Term      a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13;
            Predicate p1, p2, p3;

            a1 = arg1.Dereference();
            a2 = arg2.Dereference();
            a3 = arg3.Dereference();
            a4 = arg4.Dereference();
            a5 = arg5.Dereference();

            Term[] h2 = { engine.makeVariable() };
            a6  = new StructureTerm(f1, h2);
            a7  = engine.makeVariable();
            a8  = engine.makeVariable();
            a13 = new ListTerm(a5, s3);
            a12 = new ListTerm(a4, a13);
            a11 = new ListTerm(a3, a12);
            a10 = new ListTerm(a2, a11);
            a9  = new ListTerm(a10, s3);
            p1  = new Predicates.Concatenar_Arreglos_3(a9, a8, a1, cont);
            p2  = new Predicates.Concatenar_Valor_3(a7, a2, a8, p1);
            p3  = new Predicates.GenerarCamino_4(a3, a2, s3, a7, p2);
            return(new Predicates.Retractall_1(a6, p3));
        }
Beispiel #2
0
        public override Predicate exec(Prolog engine)
        {
            Term      a1, a2, a3, a4, a5, a6;
            Predicate p1, p2, p3, p4, p5, p6;

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

            a5 = engine.makeVariable();
            a6 = engine.makeVariable();
            p1 = new Predicates.GenerarCamino_4(a5, a2, a6, a4, cont);
            p2 = new Predicates.Concatenar_Valor_3(a3, a1, a6, p1);
            p3 = new Predicates.dollar_dummy__189511930__12_2(a1, a5, p2);
            p4 = new Predicates.dollar_dummy__189511930__11_1(a1, p3);
            p5 = new Predicates.dollar_dummy__189511930__10_1(a1, p4);
            p6 = new Predicates.dollar_dummy__189511930__9_2(a1, a3, p5);
            return(new Predicates.Adyacente_2(a1, a5, p6));
        }
        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));
        }