Exemplo n.º 1
0
        public override Predicate exec(Prolog engine)
        {
            Term      a1, a2, a3, a4;
            Predicate p1, p2;

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

            a4 = engine.makeVariable();
            p1 = new Predicates.AgregarAdyacentes_3(a4, a2, a3, cont);
            p2 = new Predicates.dollar_minus_3(a1, s1, a4, p1);
            return(new Predicates.dollar_dummy__189511930__3_3(a1, a2, a3, p2));
        }
Exemplo n.º 2
0
        public override Predicate exec(Prolog engine)
        {
            engine.setB0();
            Term      a1, a2, a3, a4, a5;
            Predicate p1, p2, p3, p4;

            a1 = arg1.Dereference();
            a2 = arg2.Dereference();

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