public override Predicate exec(Prolog engine) { Term a1, a2, a3, a4, a5; Predicate p1, p2, p3; a1 = engine.aregs[1].Dereference(); a2 = engine.aregs[2].Dereference(); Predicate cont = engine.cont; if (a1.IsList()) { a3 = ((ListTerm)a1).cdr; } else if (a1.IsVariable()) { a3 = engine.makeVariable(); if (!a1.Unify(new ListTerm(engine.makeVariable(), a3), engine.trail)) { return(engine.fail()); } } else { return(engine.fail()); } a4 = engine.makeVariable(); a5 = engine.makeVariable(); p1 = new Predicates.dollar_cut_1(a4, cont); p2 = new Predicates.dollar_plus_3(a5, s1, a2, p1); p3 = new Predicates.Contar_2(a3, a5, p2); return(new Predicates.dollar_getLevel_1(a4, p3)); }
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)); }
public override Predicate exec(Prolog engine) { engine.setB0(); Term a1, a2, a3, a4; Predicate p1, p2, p3; a1 = arg1.Dereference(); a2 = arg2.Dereference(); a3 = engine.makeVariable(); a4 = engine.makeVariable(); p1 = new Predicates.dollar_cut_1(a3, cont); p2 = new Predicates.CrearMuro_3(a4, s2, a2, p1); p3 = new Predicates.dollar_plus_3(a1, s1, a4, p2); return(new Predicates.dollar_getLevel_1(a3, p3)); }
public override Predicate exec( Prolog engine ) { engine.setB0(); Term a1, a2, a3, a4, a5; Predicate p1, p2, p3; a1 = arg1.Dereference(); a2 = engine.makeVariable(); a3 = engine.makeVariable(); a4 = engine.makeVariable(); a5 = engine.makeVariable(); p1 = new Predicates.dollar_minus_3(a5, s1, a1, cont); p2 = new Predicates.dollar_plus_3(a3, a4, a5, p1); p3 = new Predicates.dollar_multi_3(s1, a2, a4, p2); return new Predicates.Square_2(a2, a3, p3); }
public override Predicate exec(Prolog engine) { engine.setB0(); Term a1, a2, a3, a4, a5, a6; Predicate p1, p2; a1 = arg1.Dereference(); a2 = arg2.Dereference(); a3 = arg3.Dereference(); a4 = arg4.Dereference(); a5 = engine.makeVariable(); a6 = engine.makeVariable(); p1 = new Predicates.dollar_dummy__189511930__6_9(a1, a2, a3, a4, a6, engine.makeVariable(), engine.makeVariable(), engine.makeVariable(), engine.makeVariable(), cont); p2 = new Predicates.dollar_plus_3(a5, s1, a6, p1); return(new Predicates.dollar_multi_3(a1, a2, a5, p2)); }
public override Predicate exec( Prolog engine ) { engine.setB0(); Term a1, a2, a3, a4; Predicate p1, p2, p3, p4, p5, p6; a1 = arg1.Dereference(); a2 = arg2.Dereference(); a3 = engine.makeVariable(); a4 = engine.makeVariable(); p1 = new Predicates.Line_3(a4, a1, s2, cont); p2 = new Predicates.dollar_plus_3(a2, s2, a4, p1); p3 = new Predicates.Line_3(a2, a1, s2, p2); p4 = new Predicates.Line_3(a3, a2, s1, p3); p5 = new Predicates.dollar_plus_3(a1, s2, a3, p4); p6 = new Predicates.Line_3(a1, a2, s1, p5); return new Predicates.Include_Ind_Pos_2(a1, a2, p6); }
public override Predicate exec(Prolog engine) { Term a1, a2, a3, a4, a5, a6, a7, a8, a9; Predicate p1, p2, p3, p4; 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(); a9 = engine.makeVariable(); p1 = new Predicates.dollar_cut_1(a8, cont); p2 = new Predicates.dollar_unify_2(a1, a6, p1); p3 = new Predicates.dollar_plus_3(a9, s1, a6, p2); p4 = new Predicates.dollar_multi_3(a2, a4, a9, p3); return(new Predicates.dollar_getLevel_1(a8, p4)); }
public override Predicate exec(Prolog engine) { engine.setB0(); Term a1, a2, a3, a4, a5, a6, a7; Predicate p1, p2, p3, p4, p5, p6, p7; a1 = arg1.Dereference(); a2 = arg2.Dereference(); a3 = arg3.Dereference(); a4 = engine.makeVariable(); a5 = engine.makeVariable(); a6 = engine.makeVariable(); a7 = engine.makeVariable(); p1 = new Predicates.dollar_plus_3(a1, a7, a3, cont); p2 = new Predicates.dollar_toInteger_2(a6, a7, p1); p3 = new Predicates.dollar_multi_3(s1, a5, a6, p2); p4 = new Predicates.dollar_minus_3(a2, a1, a5, p3); p5 = new Predicates.dollar_cut_1(a4, p4); p6 = new Predicates.dollar_integer_1(a2, p5); p7 = new Predicates.dollar_integer_1(a1, p6); return(new Predicates.dollar_getLevel_1(a4, p7)); }
public override Predicate exec(Prolog engine) { engine.setB0(); Term a1, a2, a3, a4, a5, a6, a7; Predicate p1, p2, p3, p4, p5, p6, p7; a1 = arg1.Dereference(); a2 = arg2.Dereference(); a3 = arg3.Dereference(); a4 = engine.makeVariable(); a5 = engine.makeVariable(); a6 = engine.makeVariable(); Term[] h4 = { a1, a4 }; a7 = new StructureTerm(f3, h4); p1 = new Predicates.dollar_fail_0(cont); p2 = new Predicates.Assert_1(a7, p1); p3 = new Predicates.dollar_dummy__189511930__5_2(a1, a4, p2); p4 = new Predicates.dollar_lessThan_2(a4, a6, p3); p5 = new Predicates.dollar_plus_3(a5, s2, a6, p4); p6 = new Predicates.dollar_multi_3(a3, a2, a5, p5); p7 = new Predicates.dollar_greaterThan_2(a4, s1, p6); return(new Predicates.dollar_dummy__189511930__4_3(a1, a2, a4, p7)); }
public override Predicate exec( Prolog engine ) { Term a1, a2, a3, a4, a5, a6; Predicate p1, p2, p3, p4; a1 = engine.aregs[1].Dereference(); a2 = engine.aregs[2].Dereference(); a3 = engine.aregs[3].Dereference(); a4 = engine.aregs[4].Dereference(); Predicate cont = engine.cont; if ( !s1.Unify(a3, engine.trail) ) return engine.fail(); if ( !s2.Unify(a4, engine.trail) ) return engine.fail(); a5 = engine.makeVariable(); a6 = engine.makeVariable(); p1 = new Predicates.Line_3(a6, a1, s3, cont); p2 = new Predicates.dollar_plus_3(a2, s3, a6, p1); p3 = new Predicates.Line_3(a2, a1, s3, p2); p4 = new Predicates.Line_3(a5, a2, s1, p3); return new Predicates.dollar_plus_3(a1, s3, a5, p4); }