// begin of perception.pl code file. // begin of unit perception code. final class perception_perception_2 extends Code { public boolean exec (DLP m) { switch (m.PSreg) { // head: perception(_G417, _G418) case 0: //m.success = m.get_x_varia (10,1); /* Name */ m.get_x_varia (11,2); /* BeliefBase */ m.end_head (); break; case 1: // goal: localisation(_G417, _G418) m.put_x_value (10,1); /* 'Name' */ m.put_x_value (11,2); /* 'BeliefBase' */ m.exec (1); /* localisation_2 */ break; case 2: m.end_rule (); break; } // switch return m.success; } // perception:perception/2 exec() // perception:perception/2 decls. // end of perception:perception/2 decls. public boolean init (DLP m) { return true; } // perception:perception/2 init() } // perception:perception/2 final class perception_localisation_2 extends Code { public boolean exec (DLP m) { switch (m.PSreg) { // head: localisation(_G417, _G418) case 0: m.allocate (10); //m.success = m.get_y_value (5,1); /* Name */ m.get_y_value (0,2); /* BeliefBase */ m.end_head (); break; case 1: // goal: getRotation(_G417, _G427, _G428, _G429, _G430) m.put_y_value (5,1); /* 'Name' */ m.put_v_varia (2); /* 'Unknown' */ m.put_v_varia (3); /* 'Unknown' */ m.put_v_varia (4); /* 'Unknown' */ m.put_y_value (6,5); /* 'R1' */ m.call (5) /*2*/; /* getRotation_5 */ break; case 2: // goal: getSFVec3f(_G417, translation, _G437, _G438, _G439) m.put_y_value (5,1); /* 'Name' */ m.put_atom (translation__0,2); m.put_y_value (9,3); /* 'X1' */ m.put_y_value (8,4); /* 'Y1' */ m.put_y_value (7,5); /* 'Z1' */ m.call (6) /*2*/; /* getSFVec3f_5 */ break; case 3: // goal: <-(this, _G418, add_attr(belief, position(_G437, _G438, _G439))) m.put_struct (position__3,13); m.set_y_value (9); /* 'X1' */ m.set_y_value (8); /* 'Y1' */ m.set_y_value (7); /* 'Z1' */ m.put_this (1); m.put_y_value (0,2); /* 'BeliefBase' */ m.put_struct (add_attr__2,3); m.set_atom (belief__0); m.set_x_value (13); /* 'Xtmp' */ m.call (dlplib.op_call_3); /*6*/ break; case 4: // goal: <-(this, _G418, add_attr(belief, rotation(_G430))) m.put_struct (rotation__1,14); m.set_y_value (6); /* 'R1' */ m.put_this (1); m.put_y_value (0,2); /* 'BeliefBase' */ m.put_struct (add_attr__2,3); m.set_atom (belief__0); m.set_x_value (14); /* 'Xtmp' */ m.call (dlplib.op_call_3); /*6*/ break; case 5: // goal: assign_nlv_term(this, nreg, 0, _G437) m.put_this (1); m.put_nreg (2); m.put_int (0,3); m.put_y_value (9,4); /* 'X1' */ m.call (dlplib.assign_nlv_term_4); /*6*/ break; case 6: // goal: assign_nlv_term(this, nreg, 1, _G438) m.put_this (1); m.put_nreg (2); m.put_int (1,3); m.put_y_value (8,4); /* 'Y1' */ m.call (dlplib.assign_nlv_term_4); /*6*/ break; case 7: // goal: assign_nlv_term(this, nreg, 2, _G439) m.put_this (1); m.put_nreg (2); m.put_int (2,3); m.put_y_value (7,4); /* 'Z1' */ m.call (dlplib.assign_nlv_term_4); /*6*/ break; case 8: // goal: assign_nlv_term(this, nreg, 3, _G430) m.put_this (1); m.put_nreg (2); m.put_int (3,3); m.put_y_value (6,4); /* 'R1' */ m.call (dlplib.assign_nlv_term_4); /*6*/ break; case 9: // goal: repeat m.call (dlplib.repeat_0); /*6*/ break; case 10: // goal: getRotation(_G417, _G496, _G497, _G498, _G499) m.put_y_value (5,1); /* 'Name' */ m.put_v_varia (2); /* 'Unknown' */ m.put_v_varia (3); /* 'Unknown' */ m.put_v_varia (4); /* 'Unknown' */ m.put_y_value (1,5); /* 'R' */ m.call (5) /*2*/; /* getRotation_5 */ break; case 11: // goal: getSFVec3f(_G417, translation, _G506, _G507, _G508) m.put_y_value (5,1); /* 'Name' */ m.put_atom (translation__0,2); m.put_y_value (4,3); /* 'X' */ m.put_y_value (3,4); /* 'Y' */ m.put_y_value (2,5); /* 'Z' */ m.call (6) /*2*/; /* getSFVec3f_5 */ break; case 12: // goal: position_changed([_G506, _G507, _G508], _G418) m.put_list (18); m.set_y_value (2); /* 'Z' */ m.set_nil (); m.put_list (19); m.set_y_value (3); /* 'Y' */ m.set_x_value (18); /* 'Xtmp' */ m.put_list (1); m.set_y_value (4); /* 'X' */ m.set_x_value (19); /* 'Xtmp' */ m.put_y_value (0,2); /* 'BeliefBase' */ m.call (2) /*2*/; /* position_changed_2 */ break; case 13: // goal: rotation_changed(_G499, _G418) m.put_y_value (1,1); /* 'R' */ m.put_y_value (0,2); /* 'BeliefBase' */ m.call (3) /*2*/; /* rotation_changed_2 */ break; case 14: // goal: sleep(100) m.put_int (100,1); m.call (dlplib.sleep_1); /*6*/ break; case 15: // goal: fail m.deallocate (); m.exec (dlplib.fail_0); break; case 16: m.end_rule (); break; } // switch return m.success; } // perception:localisation/2 exec() // perception:localisation/2 decls. public SymbolDescriptor translation__0; public SymbolDescriptor this__0; public SymbolDescriptor add_attr__2; public SymbolDescriptor belief__0; public SymbolDescriptor position__3; public SymbolDescriptor rotation__1; public SymbolDescriptor op__dot__2; public SymbolDescriptor sl_sr__0; // end of perception:localisation/2 decls. public boolean init (DLP m) { translation__0 = m.define_symbol ("translation".intern(), 0); this__0 = m.define_symbol ("this".intern(), 0); add_attr__2 = m.define_symbol ("add_attr".intern(), 2); belief__0 = m.define_symbol ("belief".intern(), 0); position__3 = m.define_symbol ("position".intern(), 3); rotation__1 = m.define_symbol ("rotation".intern(), 1); op__dot__2 = m.define_symbol (".".intern(), 2); sl_sr__0 = m.define_symbol ("[]".intern(), 0); return true; } // perception:localisation/2 init() } // perception:localisation/2 final class perception_position_changed_2 extends Code { public boolean exec (DLP m) { switch (m.PSreg) { // head: position_changed([x, y, z], _G418) case 0: m.try_me_else (2); //m.success = m.get_list (1); m.uni_z_value (0); /* x */ m.uni_x_varia (10); /* Xtmp */ m.get_v_varia (2); /* Unknown */ m.get_list (10); m.uni_z_value (1); /* y */ m.uni_x_varia (12); /* Xtmp */ m.get_list (12); m.uni_z_value (2); /* z */ m.uni_nil (); m.end_head (); break; case 1: m.end_fact (); break; // head: position_changed([_G2017, _G2020, _G2023], _G2012) case 2: m.trust_or_fail (); m.allocate (5); //m.success = m.get_list (1); m.uni_y_value (2); /* X */ m.uni_x_varia (10); /* Xtmp */ m.get_y_value (3,2); /* BeliefBase */ m.get_list (10); m.uni_y_value (1); /* Y */ m.uni_x_varia (11); /* Xtmp */ m.get_list (11); m.uni_y_value (0); /* Z */ m.uni_nil (); m.cut_level (4); m.end_head (); break; case 3: // goal: changed([_G2017, _G2020, _G2023], [x, y, z]) m.put_list (12); m.set_y_value (0); /* 'Z' */ m.set_nil (); m.put_list (13); m.set_z_value (2); /* z */ m.set_nil (); m.put_list (14); m.set_y_value (1); /* 'Y' */ m.set_x_value (12); /* 'Xtmp' */ m.put_list (15); m.set_z_value (1); /* y */ m.set_x_value (13); /* 'Xtmp' */ m.put_list (1); m.set_y_value (2); /* 'X' */ m.set_x_value (14); /* 'Xtmp' */ m.put_list (2); m.set_z_value (0); /* x */ m.set_x_value (15); /* 'Xtmp' */ m.call (4) /*2*/; /* changed_2 */ break; case 4: // goal: ! m.cut_body (4); break; case 5: // goal: <-(this, _G2012, delete_attr(belief, position(_G2062, _G2063, _G2064))) m.put_struct (position__3,16); m.set_v_varia (); /* 'Unknown' */ m.set_v_varia (); /* 'Unknown' */ m.set_v_varia (); /* 'Unknown' */ m.put_this (1); m.put_y_value (3,2); /* 'BeliefBase' */ m.put_struct (delete_attr__2,3); m.set_atom (belief__0); m.set_x_value (16); /* 'Xtmp' */ m.call (dlplib.op_call_3); /*6*/ break; case 6: // goal: <-(this, _G2012, add_attr(belief, position(_G2017, _G2020, _G2023))) m.put_struct (position__3,20); m.set_y_value (2); /* 'X' */ m.set_y_value (1); /* 'Y' */ m.set_y_value (0); /* 'Z' */ m.put_this (1); m.put_y_value (3,2); /* 'BeliefBase' */ m.put_struct (add_attr__2,3); m.set_atom (belief__0); m.set_x_value (20); /* 'Xtmp' */ m.call (dlplib.op_call_3); /*6*/ break; case 7: // goal: assign_nlv_term(this, nreg, 0, _G2017) m.put_this (1); m.put_nreg (2); m.put_int (0,3); m.put_y_value (2,4); /* 'X' */ m.call (dlplib.assign_nlv_term_4); /*6*/ break; case 8: // goal: assign_nlv_term(this, nreg, 1, _G2020) m.put_this (1); m.put_nreg (2); m.put_int (1,3); m.put_y_value (1,4); /* 'Y' */ m.call (dlplib.assign_nlv_term_4); /*6*/ break; case 9: // goal: assign_nlv_term(this, nreg, 2, _G2023) m.put_this (1); m.put_nreg (2); m.put_int (2,3); m.put_y_value (0,4); /* 'Z' */ m.deallocate (); m.exec (dlplib.assign_nlv_term_4); break; case 10: m.end_rule (); break; } // switch return m.success; } // perception:position_changed/2 exec() // perception:position_changed/2 decls. public SymbolDescriptor op__dot__2; public SymbolDescriptor sl_sr__0; public SymbolDescriptor this__0; public SymbolDescriptor delete_attr__2; public SymbolDescriptor belief__0; public SymbolDescriptor position__3; public SymbolDescriptor add_attr__2; // end of perception:position_changed/2 decls. public boolean init (DLP m) { op__dot__2 = m.define_symbol (".".intern(), 2); sl_sr__0 = m.define_symbol ("[]".intern(), 0); this__0 = m.define_symbol ("this".intern(), 0); delete_attr__2 = m.define_symbol ("delete_attr".intern(), 2); belief__0 = m.define_symbol ("belief".intern(), 0); position__3 = m.define_symbol ("position".intern(), 3); add_attr__2 = m.define_symbol ("add_attr".intern(), 2); return true; } // perception:position_changed/2 init() } // perception:position_changed/2 final class perception_rotation_changed_2 extends Code { public boolean exec (DLP m) { switch (m.PSreg) { // head: rotation_changed(r, _G418) case 0: m.try_me_else (2); //m.success = m.get_z_value (3,1); /* r */ m.get_v_varia (2); /* Unknown */ m.end_head (); break; case 1: m.end_fact (); break; // head: rotation_changed(_G1434, _G1435) case 2: m.trust_or_fail (); m.allocate (3); //m.success = m.get_y_value (0,1); /* R */ m.get_y_value (1,2); /* BeliefBase */ m.cut_level (2); m.end_head (); break; case 3: // goal: _G1434\==r m.put_y_value (0,1); /* 'R' */ m.put_z_value (3,2); /* r */ m.call (dlplib.op_at_cmp_ne_2); /*6*/ break; case 4: // goal: ! m.cut_body (2); break; case 5: // goal: <-(this, _G1435, delete_attr(belief, rotation(_G1458))) m.put_struct (rotation__1,10); m.set_v_varia (); /* 'Unknown' */ m.put_this (1); m.put_y_value (1,2); /* 'BeliefBase' */ m.put_struct (delete_attr__2,3); m.set_atom (belief__0); m.set_x_value (10); /* 'Xtmp' */ m.call (dlplib.op_call_3); /*6*/ break; case 6: // goal: <-(this, _G1435, add_attr(belief, rotation(_G1434))) m.put_struct (rotation__1,12); m.set_y_value (0); /* 'R' */ m.put_this (1); m.put_y_value (1,2); /* 'BeliefBase' */ m.put_struct (add_attr__2,3); m.set_atom (belief__0); m.set_x_value (12); /* 'Xtmp' */ m.call (dlplib.op_call_3); /*6*/ break; case 7: // goal: assign_nlv_term(this, nreg, 3, _G1434) m.put_this (1); m.put_nreg (2); m.put_int (3,3); m.put_y_value (0,4); /* 'R' */ m.deallocate (); m.exec (dlplib.assign_nlv_term_4); break; case 8: m.end_rule (); break; } // switch return m.success; } // perception:rotation_changed/2 exec() // perception:rotation_changed/2 decls. public SymbolDescriptor this__0; public SymbolDescriptor delete_attr__2; public SymbolDescriptor belief__0; public SymbolDescriptor rotation__1; public SymbolDescriptor add_attr__2; // end of perception:rotation_changed/2 decls. public boolean init (DLP m) { this__0 = m.define_symbol ("this".intern(), 0); delete_attr__2 = m.define_symbol ("delete_attr".intern(), 2); belief__0 = m.define_symbol ("belief".intern(), 0); rotation__1 = m.define_symbol ("rotation".intern(), 1); add_attr__2 = m.define_symbol ("add_attr".intern(), 2); return true; } // perception:rotation_changed/2 init() } // perception:rotation_changed/2 final class perception_changed_2 extends Code { public boolean exec (DLP m) { switch (m.PSreg) { // head: changed([_G423|_G424], [_G426|_G427]) case 0: m.try_me_else (3); //m.success = m.get_list (1); m.uni_x_varia (10); /* H */ m.uni_v_varia (); /* Unknown */ m.get_list (2); m.uni_x_varia (12); /* H1 */ m.uni_v_varia (); /* Unknown */ m.end_head (); break; case 1: // goal: _G423\==_G426 m.put_x_value (10,1); /* 'H' */ m.put_x_value (12,2); /* 'H1' */ m.exec (dlplib.op_at_cmp_ne_2); break; case 2: m.end_rule (); break; // head: changed([_G2327|_G2328], [_G2330|_G2331]) case 3: m.trust_or_fail (); //m.success = m.get_list (1); m.uni_v_varia (); /* Unknown */ m.uni_x_varia (11); /* T */ m.get_list (2); m.uni_v_varia (); /* Unknown */ m.uni_x_varia (13); /* T1 */ m.end_head (); break; case 4: // goal: changed(_G2328, _G2331) m.put_x_value (11,1); /* 'T' */ m.put_x_value (13,2); /* 'T1' */ m.exec (4); /* changed_2 */ break; case 5: m.end_rule (); break; } // switch return m.success; } // perception:changed/2 exec() // perception:changed/2 decls. public SymbolDescriptor op__dot__2; // end of perception:changed/2 decls. public boolean init (DLP m) { op__dot__2 = m.define_symbol (".".intern(), 2); return true; } // perception:changed/2 init() } // perception:changed/2 final class perception_init_vars_0 extends Code { public boolean exec (DLP m) { switch (m.PSreg) { // head: init_vars case 0: m.allocate (0); //m.success = m.end_head (); break; case 1: // goal: assign_nlv_term(this, nreg, 0, no_init) m.put_this (1); m.put_nreg (2); m.put_int (0,3); m.put_atom (no_init__0,4); m.call (dlplib.assign_nlv_term_4); /*6*/ break; case 2: // goal: assign_nlv_term(this, nreg, 1, no_init) m.put_this (1); m.put_nreg (2); m.put_int (1,3); m.put_atom (no_init__0,4); m.call (dlplib.assign_nlv_term_4); /*6*/ break; case 3: // goal: assign_nlv_term(this, nreg, 2, no_init) m.put_this (1); m.put_nreg (2); m.put_int (2,3); m.put_atom (no_init__0,4); m.call (dlplib.assign_nlv_term_4); /*6*/ break; case 4: // goal: assign_nlv_term(this, nreg, 3, no_init) m.put_this (1); m.put_nreg (2); m.put_int (3,3); m.put_atom (no_init__0,4); m.deallocate (); m.exec (dlplib.assign_nlv_term_4); break; case 5: m.end_rule (); break; } // switch return m.success; } // perception:init_vars/0 exec() // perception:init_vars/0 decls. public SymbolDescriptor no_init__0; // end of perception:init_vars/0 decls. public boolean init (DLP m) { no_init__0 = m.define_symbol ("no_init".intern(), 0); return true; } // perception:init_vars/0 init() } // perception:init_vars/0 class perception extends Code { public static ObjectDescriptor object; public static ObjectDescriptor _bcilib; public static MethodDescriptor perception_2; public static MethodDescriptor localisation_2; public static MethodDescriptor position_changed_2; public static MethodDescriptor rotation_changed_2; public static MethodDescriptor changed_2; public static MethodDescriptor getRotation_5; public static MethodDescriptor getSFVec3f_5; public boolean init (DLP m) { object = m.define_object ("perception".intern(), 1, 7, 4); _bcilib = m.header_object (object, "bcilib".intern(), 0); perception_2 = m.define_method (object, 0, "perception".intern(), 2); localisation_2 = m.define_method (object, 1, "localisation".intern(), 2); position_changed_2 = m.define_method (object, 2, "position_changed".intern(), 2); rotation_changed_2 = m.define_method (object, 3, "rotation_changed".intern(), 2); changed_2 = m.define_method (object, 4, "changed".intern(), 2); getRotation_5 = m.extern_method (object, 5, "getRotation".intern(), 5); getSFVec3f_5 = m.extern_method (object, 6, "getSFVec3f".intern(), 5); m.define_nonlog (object, "x".intern(), 0); m.define_nonlog (object, "y".intern(), 1); m.define_nonlog (object, "z".intern(), 2); m.define_nonlog (object, "r".intern(), 3); return true; } // perception init() } // class perception // end of unit perception code. // end of perception.pl code file.