Exemplo n.º 1
0
        public override Predicate exec(Prolog engine)
        {
            Term      a1, a2, a3, a4, a5, a6, a7, a8, a9;
            Predicate p1, p2, p3, p4, p5, p6, p7, p8;

            a1 = engine.aregs[1].Dereference();
            a2 = engine.aregs[2].Dereference();
            a3 = engine.aregs[3].Dereference();
            a4 = engine.aregs[4].Dereference();
            a5 = engine.aregs[5].Dereference();
            a6 = engine.aregs[6].Dereference();
            a7 = engine.aregs[7].Dereference();
            Predicate cont = engine.cont;

            a8 = engine.makeVariable();
            Term[] h3 = { a6 };
            a9 = new StructureTerm(f2, h3);
            p1 = new Predicates.dollar_cut_1(a8, cont);
            p2 = new Predicates.CrearTrofeo_4(a1, a2, a7, a4, p1);
            p3 = new Predicates.dollar_plus_3(a3, s1, a7, p2);
            p4 = new Predicates.Assert_1(a9, p3);
            p5 = new Predicates.dollar_dummy__189511930__15_1(a6, p4);
            p6 = new Predicates.Contiene_2(a1, a6, p5);
            p7 = new Predicates.Random_3(s1, a5, a6, p6);
            p8 = new Predicates.dollar_plus_3(a2, s1, a5, p7);
            return(new Predicates.dollar_getLevel_1(a8, p8));
        }
Exemplo n.º 2
0
        public override Predicate exec(Prolog engine)
        {
            Term      a1, a2, a3, a4, a5, a6, a7, a8, a9, a10;
            Predicate p1, p2, p3, p4, p5, p6, p7, p8;

            a1 = engine.aregs[1].Dereference();
            a2 = engine.aregs[2].Dereference();
            a3 = engine.aregs[3].Dereference();
            a4 = engine.aregs[4].Dereference();
            a5 = engine.aregs[5].Dereference();
            a6 = engine.aregs[6].Dereference();
            a7 = engine.aregs[7].Dereference();
            a8 = engine.aregs[8].Dereference();
            a9 = engine.aregs[9].Dereference();
            Predicate cont = engine.cont;

            a10 = engine.makeVariable();
            p1  = new Predicates.dollar_cut_1(a10, cont);
            p2  = new Predicates.dollar_is_2(a4, a7, p1);
            p3  = new Predicates.dollar_is_2(a3, a6, p2);
            p4  = new Predicates.Esta_En_Bordes_3(a7, a1, a2, p3);
            p5  = new Predicates.Esta_En_Bordes_3(a6, a1, a2, p4);
            p6  = new Predicates.dollar_dummy__189511930__7_2(a6, a7, p5);
            p7  = new Predicates.Random_3(s1, a5, a7, p6);
            p8  = new Predicates.Random_3(s1, a5, a6, p7);
            return(new Predicates.dollar_getLevel_1(a10, p8));
        }