2010-04-03 05:58:14 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								/************************************************************************
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								**                                                                     **
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								**                   The YapTab/YapOr/OPTYap systems                   **
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								**                                                                     **
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								** YapTab extends the Yap Prolog engine to support sequential tabling  **
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								** YapOr extends the Yap Prolog engine to support or-parallelism       **
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								** OPTYap extends the Yap Prolog engine to support or-parallel tabling **
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								**                                                                     **
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								**                                                                     **
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								**      Yap Prolog was developed at University of Porto, Portugal      **
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								**                                                                     **
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								************************************************************************/
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								/************************************************************************
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								**           Trie instructions: auxiliary stack organization           **
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								*************************************************************************
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-23 04:22:10 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								               -------------------
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								               | ha = heap_arity | 
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								               -------------------  --
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								               |   heap ptr 1    |    |
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								               -------------------    |
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								               |       ...       |    -- heap_arity (0 if in global trie)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								               -------------------    |
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								               |   heap ptr ha   |    |
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								               -------------------  --
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								               | va = vars_arity |
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								               -------------------  --
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								               |    var ptr va   |    |
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								               -------------------    |
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								               |       ...       |    -- vars_arity
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								               -------------------    |
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								               |    var ptr 1    |    |
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								               -------------------  -- 
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								               | sa = subs_arity |
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								               -------------------  --
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								               |   subs ptr sa   |    |
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								               -------------------    |
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								               |       ...       |    -- subs_arity 
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								               -------------------    |
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								               |   subs ptr 1    |    |
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								               -------------------  --
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-03 05:58:14 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								************************************************************************/
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								/************************************************************************
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								**                      Trie instructions: macros                      **
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-03 05:58:14 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								************************************************************************/
							 | 
						
					
						
							
								
									
										
										
										
											2001-04-09 19:54:03 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#define TOP_STACK          YENV
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-17 17:14:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#define HEAP_ARITY_ENTRY   (0)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#define VARS_ARITY_ENTRY   (1 + heap_arity)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#define SUBS_ARITY_ENTRY   (1 + heap_arity + 1 + vars_arity)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								/* macros 'HEAP_ENTRY', 'VARS_ENTRY' and 'SUBS_ENTRY' **
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								** assume that INDEX starts at 1 (and not at 0 !!!)   */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#define HEAP_ENTRY(INDEX)  (HEAP_ARITY_ENTRY + (INDEX))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#define VARS_ENTRY(INDEX)  (VARS_ARITY_ENTRY + 1 + vars_arity - (INDEX))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#define SUBS_ENTRY(INDEX)  (SUBS_ARITY_ENTRY + 1 + subs_arity - (INDEX))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#define next_trie_instruction(NODE)                                     \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        PREG = (yamop *) TrNode_child(NODE);                            \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        PREFETCH_OP(PREG);                                              \
							 | 
						
					
						
							
								
									
										
										
										
											2001-04-09 19:54:03 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        GONext()
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#define next_instruction(CONDITION, NODE)                               \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        if (CONDITION) {                                                \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          PREG = (yamop *) TrNode_child(NODE);                          \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        } else {  /* procceed */                                        \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									  PREG = (yamop *) CPREG;                                       \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									  TOP_STACK = ENV;                                              \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }                                                               \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        PREFETCH_OP(PREG);                                              \
							 | 
						
					
						
							
								
									
										
										
										
											2001-04-09 19:54:03 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        GONext()
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#define copy_aux_stack()                                                \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        { int size = 3 + heap_arity + subs_arity + vars_arity;          \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          TOP_STACK -= size;                                            \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          memcpy(TOP_STACK, aux_stack, size * sizeof(CELL *));          \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          aux_stack = TOP_STACK;                                        \
							 | 
						
					
						
							
								
									
										
										
										
											2015-02-06 18:11:52 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									}/* macros 'store_trie_node', 'restore_trie_node' and 'pop_trie_node'   **
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								** do not include 'set_cut' because trie instructions are cut safe     */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#define store_trie_node(AP)                                             \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        { register choiceptr cp;                                        \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          TOP_STACK = (CELL *) (NORM_CP(TOP_STACK) - 1);                \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          cp = NORM_CP(TOP_STACK);                                      \
							 | 
						
					
						
							
								
									
										
										
										
											2014-01-19 21:15:05 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								          HBREG = HR;                                                    \
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								          store_yaam_reg_cpdepth(cp);                                   \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          cp->cp_tr = TR;                                               \
							 | 
						
					
						
							
								
									
										
										
										
											2014-01-19 21:15:05 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								          cp->cp_h  = HR;						\
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								          cp->cp_b  = B;                                                \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          cp->cp_cp = CPREG;                                            \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          cp->cp_ap = (yamop *) AP;                                     \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          cp->cp_env= ENV;                                              \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          B = cp;                                                       \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          YAPOR_SET_LOAD(B);                                            \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          SET_BB(B);                                                    \
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-18 04:59:11 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								          TABLING_ERROR_CHECKING_STACK;                                 \
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									}                                                               \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        copy_aux_stack()
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#define restore_trie_node(AP)                                           \
							 | 
						
					
						
							
								
									
										
										
										
											2014-01-19 21:15:05 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        HR = HBREG = PROTECT_FROZEN_H(B);                                \
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        restore_yaam_reg_cpdepth(B);                                    \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        CPREG = B->cp_cp;                                               \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        ENV = B->cp_env;                                                \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        YAPOR_update_alternative(PREG, (yamop *) AP)                    \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        B->cp_ap = (yamop *) AP;                                        \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        TOP_STACK = (CELL *) PROTECT_FROZEN_B(B);                       \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        SET_BB(NORM_CP(TOP_STACK));                                     \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        copy_aux_stack()
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#define really_pop_trie_node()                                          \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        TOP_STACK = (CELL *) PROTECT_FROZEN_B((B + 1));                 \
							 | 
						
					
						
							
								
									
										
										
										
											2014-01-19 21:15:05 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        HR = PROTECT_FROZEN_H(B);                                        \
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        pop_yaam_reg_cpdepth(B);                                        \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									CPREG = B->cp_cp;                                               \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        TABLING_close_alt(B);                                           \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        ENV = B->cp_env;                                                \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									B = B->cp_b;                                                    \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        HBREG = PROTECT_FROZEN_H(B);                                    \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        SET_BB(PROTECT_FROZEN_B(B));                                    \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        if ((choiceptr) TOP_STACK == B_FZ) {                            \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          copy_aux_stack();                                             \
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-17 17:14:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							
								
									
										
										
										
											2001-04-09 19:54:03 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#ifdef YAPOR
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#define pop_trie_node()                                                 \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        if (SCH_top_shared_cp(B)) {                                     \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          restore_trie_node(NULL);                                      \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        } else {                                                        \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          really_pop_trie_node();                                       \
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#else
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#define pop_trie_node()                                                 \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        really_pop_trie_node()
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#endif /* YAPOR */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2001-04-09 19:54:03 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-03 05:58:14 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								/************************************************************************
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								**                         aux_stack_null_instr                        **
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-03 05:58:14 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								************************************************************************/
							 | 
						
					
						
							
								
									
										
										
										
											2005-06-03 08:19:18 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#define aux_stack_null_instr()                                          \
							 | 
						
					
						
							
								
									
										
										
										
											2005-06-03 08:19:18 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        next_trie_instruction(node)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-03 05:58:14 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								/************************************************************************
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								**                      aux_stack_extension_instr                      **
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-03 05:58:14 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								************************************************************************/
							 | 
						
					
						
							
								
									
										
										
										
											2005-06-03 08:19:18 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#define aux_stack_extension_instr()                                     \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        TOP_STACK = &aux_stack[-2];                                     \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        TOP_STACK[HEAP_ARITY_ENTRY] = heap_arity + 2;                   \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        TOP_STACK[HEAP_ENTRY(1)] = TrNode_entry(node);                  \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        TOP_STACK[HEAP_ENTRY(2)] = 0;             /* extension mark */  \
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        next_trie_instruction(node)
							 | 
						
					
						
							
								
									
										
										
										
											2001-04-09 19:54:03 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2005-06-03 08:19:18 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-03 05:58:14 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								/************************************************************************
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								**                    aux_stack_term_(in_pair_)instr                   **
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-03 05:58:14 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								************************************************************************/
							 | 
						
					
						
							
								
									
										
										
										
											2005-06-03 08:19:18 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#define aux_stack_term_instr()                                          \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        if (heap_arity) {                                               \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          Bind_Global((CELL *) aux_stack[HEAP_ENTRY(1)], t);            \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          TOP_STACK = &aux_stack[1];                                    \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          TOP_STACK[HEAP_ARITY_ENTRY] = heap_arity - 1;                 \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          next_instruction(heap_arity - 1 || subs_arity, node);         \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        } else {                                                        \
							 | 
						
					
						
							
								
									
										
										
										
											2014-05-29 11:32:28 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								          YapBind((CELL *) aux_stack[SUBS_ENTRY(1)], t);                   \
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								          aux_stack[SUBS_ARITY_ENTRY] = subs_arity - 1;                 \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          next_instruction(subs_arity - 1, node);                       \
							 | 
						
					
						
							
								
									
										
										
										
											2001-04-09 19:54:03 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#define aux_stack_term_in_pair_instr()                                  \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        if (heap_arity) {                                               \
							 | 
						
					
						
							
								
									
										
										
										
											2014-01-19 21:15:05 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								          Bind_Global((CELL *) aux_stack[HEAP_ENTRY(1)], AbsPair(HR));   \
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        } else {                                                        \
							 | 
						
					
						
							
								
									
										
										
										
											2014-05-29 11:32:28 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								          YapBind((CELL *) aux_stack[SUBS_ENTRY(1)], AbsPair(HR));          \
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								          aux_stack[SUBS_ARITY_ENTRY] = subs_arity - 1;                 \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          TOP_STACK = &aux_stack[-1];                                   \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          TOP_STACK[HEAP_ARITY_ENTRY] = 1;                              \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }                                                               \
							 | 
						
					
						
							
								
									
										
										
										
											2014-01-19 21:15:05 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        Bind_Global(HR, TrNode_entry(node));                             \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        TOP_STACK[HEAP_ENTRY(1)] = (CELL) (HR + 1);                      \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        HR += 2;                                                         \
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-05 05:14:08 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        next_trie_instruction(node)
							 | 
						
					
						
							
								
									
										
										
										
											2001-04-09 19:54:03 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-03 05:58:14 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								/************************************************************************
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								**                      aux_stack_(new_)pair_instr                     **
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-03 05:58:14 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								************************************************************************/
							 | 
						
					
						
							
								
									
										
										
										
											2005-06-03 08:19:18 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#define aux_stack_new_pair_instr()    /* for term 'CompactPairInit' */  \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        if (heap_arity) {                                               \
							 | 
						
					
						
							
								
									
										
										
										
											2014-01-19 21:15:05 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								          Bind_Global((CELL *) aux_stack[HEAP_ENTRY(1)], AbsPair(HR));   \
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								          TOP_STACK = &aux_stack[-1];                                   \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          TOP_STACK[HEAP_ARITY_ENTRY] = heap_arity + 1;                 \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        } else {                                                        \
							 | 
						
					
						
							
								
									
										
										
										
											2014-05-29 11:32:28 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								          YapBind((CELL *) aux_stack[SUBS_ENTRY(1)], AbsPair(HR));          \
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								          aux_stack[SUBS_ARITY_ENTRY] = subs_arity - 1;                 \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          TOP_STACK = &aux_stack[-2];                                   \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          TOP_STACK[HEAP_ARITY_ENTRY] = 2;                              \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									}                                                               \
							 | 
						
					
						
							
								
									
										
										
										
											2014-01-19 21:15:05 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TOP_STACK[HEAP_ENTRY(1)] = (CELL) HR;                            \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        TOP_STACK[HEAP_ENTRY(2)] = (CELL) (HR + 1);                      \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        HR += 2;                                                         \
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        next_trie_instruction(node)
							 | 
						
					
						
							
								
									
										
										
										
											2005-06-03 08:19:18 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-05 05:14:08 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#ifdef TRIE_COMPACT_PAIRS
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#define aux_stack_pair_instr()	   /* for term 'CompactPairEndList' */  \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        if (heap_arity) {                                               \
							 | 
						
					
						
							
								
									
										
										
										
											2014-01-19 21:15:05 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								          Bind_Global((CELL *) aux_stack[HEAP_ENTRY(1)], AbsPair(HR));   \
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									} else {                                                        \
							 | 
						
					
						
							
								
									
										
										
										
											2014-05-29 11:32:28 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								          YapBind((CELL *) aux_stack[SUBS_ENTRY(1)], AbsPair(HR));          \
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								          aux_stack[SUBS_ARITY_ENTRY] = subs_arity - 1;                 \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          TOP_STACK = &aux_stack[-1];                                   \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          TOP_STACK[HEAP_ARITY_ENTRY] = 1;                              \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									}                                                               \
							 | 
						
					
						
							
								
									
										
										
										
											2014-01-19 21:15:05 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TOP_STACK[HEAP_ENTRY(1)] = (CELL) HR;                            \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        Bind_Global(HR + 1, TermNil);                                    \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        HR += 2;                                                         \
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        next_trie_instruction(node)
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-05 05:14:08 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#else
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#define aux_stack_pair_instr()                                          \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        aux_stack_new_pair_instr()
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-05 05:14:08 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#endif /* TRIE_COMPACT_PAIRS */
							 | 
						
					
						
							
								
									
										
										
										
											2001-04-09 19:54:03 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-03 05:58:14 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								/************************************************************************
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								**                    aux_stack_appl_(in_pair_)instr                   **
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-03 05:58:14 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								************************************************************************/
							 | 
						
					
						
							
								
									
										
										
										
											2005-06-03 08:19:18 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#define aux_stack_appl_instr()                                          \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        if (heap_arity) {                                               \
							 | 
						
					
						
							
								
									
										
										
										
											2014-01-19 21:15:05 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								          Bind_Global((CELL *) aux_stack[HEAP_ENTRY(1)], AbsAppl(HR));   \
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								          TOP_STACK = &aux_stack[-func_arity + 1];                      \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          TOP_STACK[HEAP_ARITY_ENTRY] = heap_arity + func_arity - 1;    \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        } else {                                                        \
							 | 
						
					
						
							
								
									
										
										
										
											2014-05-29 11:32:28 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								          YapBind((CELL *) aux_stack[SUBS_ENTRY(1)], AbsAppl(HR));          \
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								          aux_stack[SUBS_ARITY_ENTRY] = subs_arity - 1;                 \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          TOP_STACK = &aux_stack[-func_arity];                          \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          TOP_STACK[HEAP_ARITY_ENTRY] = func_arity;                     \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									}                                                               \
							 | 
						
					
						
							
								
									
										
										
										
											2014-01-19 21:15:05 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        *HR = (CELL) func;                                               \
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        { int i;                                                        \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          for (i = 1; i <= func_arity; i++)	       	                \
							 | 
						
					
						
							
								
									
										
										
										
											2014-01-19 21:15:05 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            TOP_STACK[HEAP_ENTRY(i)] = (CELL) (HR + i);                  \
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									}                                                               \
							 | 
						
					
						
							
								
									
										
										
										
											2014-01-19 21:15:05 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        HR += 1 + func_arity;                                            \
							 | 
						
					
						
							
								
									
										
										
										
											2005-06-03 08:19:18 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        next_trie_instruction(node)
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#define aux_stack_appl_in_pair_instr()	                                \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        if (heap_arity) {                                               \
							 | 
						
					
						
							
								
									
										
										
										
											2014-01-19 21:15:05 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								          Bind_Global((CELL *) aux_stack[HEAP_ENTRY(1)], AbsPair(HR));   \
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								          TOP_STACK = &aux_stack[-func_arity];                          \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          TOP_STACK[HEAP_ARITY_ENTRY] = heap_arity + func_arity;        \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        } else {                                                        \
							 | 
						
					
						
							
								
									
										
										
										
											2014-05-29 11:32:28 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								          YapBind((CELL *) aux_stack[SUBS_ENTRY(1)], AbsPair(HR));          \
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								          aux_stack[SUBS_ARITY_ENTRY] = subs_arity - 1;                 \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          TOP_STACK = &aux_stack[-func_arity - 1];                      \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          TOP_STACK[HEAP_ARITY_ENTRY] = func_arity + 1;                 \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }                                                               \
							 | 
						
					
						
							
								
									
										
										
										
											2014-01-19 21:15:05 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TOP_STACK[HEAP_ENTRY(func_arity + 1)] = (CELL) (HR + 1);         \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        Bind_Global(HR, AbsAppl(HR + 2));                                 \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        HR += 2;                                                         \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        *HR = (CELL) func;                                               \
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        { int i;                                                        \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          for (i = 1; i <= func_arity; i++)		                \
							 | 
						
					
						
							
								
									
										
										
										
											2014-01-19 21:15:05 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            TOP_STACK[HEAP_ENTRY(i)] = (CELL) (HR + i);                  \
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									}                                                               \
							 | 
						
					
						
							
								
									
										
										
										
											2014-01-19 21:15:05 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        HR += 1 + func_arity;                                            \
							 | 
						
					
						
							
								
									
										
										
										
											2001-04-09 19:54:03 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        next_trie_instruction(node)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-03 05:58:14 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								/************************************************************************
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								**                    aux_stack_var_(in_pair_)instr                    **
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-03 05:58:14 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								************************************************************************/
							 | 
						
					
						
							
								
									
										
										
										
											2005-07-06 19:34:12 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#define aux_stack_var_instr()					        \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        if (heap_arity) {                                               \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          int i;                                                        \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          CELL var = aux_stack[HEAP_ENTRY(1)];                          \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          RESET_VARIABLE(var);                                          \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          TOP_STACK[HEAP_ARITY_ENTRY] = heap_arity - 1;                 \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          for (i = 2; i <= heap_arity; i++)                             \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            TOP_STACK[HEAP_ENTRY(i - 1)] = aux_stack[HEAP_ENTRY(i)];    \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          aux_stack[VARS_ARITY_ENTRY - 1] = vars_arity + 1;             \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									  aux_stack[VARS_ENTRY(vars_arity + 1)] = var;                  \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          next_instruction(heap_arity - 1 || subs_arity, node);         \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        } else {				                        \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									  CELL var = aux_stack[SUBS_ENTRY(1)];                          \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          aux_stack[SUBS_ARITY_ENTRY] = subs_arity - 1;                 \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          TOP_STACK = &aux_stack[-1];                                   \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          TOP_STACK[HEAP_ARITY_ENTRY] = 0;                              \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          aux_stack[VARS_ARITY_ENTRY - 1] = vars_arity + 1;             \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          aux_stack[VARS_ENTRY(vars_arity + 1)] = var;                  \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          next_instruction(subs_arity - 1, node);	                \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }							 
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#define aux_stack_var_in_pair_instr()                                   \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        if (heap_arity) {                                               \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									  int i;                                                        \
							 | 
						
					
						
							
								
									
										
										
										
											2014-01-19 21:15:05 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								          Bind_Global((CELL *) aux_stack[HEAP_ENTRY(1)], AbsPair(HR));   \
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								          TOP_STACK = &aux_stack[-1];                                   \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          TOP_STACK[HEAP_ARITY_ENTRY] = heap_arity;                     \
							 | 
						
					
						
							
								
									
										
										
										
											2014-01-19 21:15:05 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								          TOP_STACK[HEAP_ENTRY(1)] = (CELL) (HR + 1);                    \
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								          for (i = 2; i <= heap_arity; i++)                             \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            TOP_STACK[HEAP_ENTRY(i)] = aux_stack[HEAP_ENTRY(i)];        \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        } else {                                                        \
							 | 
						
					
						
							
								
									
										
										
										
											2014-05-29 11:32:28 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								          YapBind((CELL *) aux_stack[SUBS_ENTRY(1)], AbsPair(HR));		\
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								          aux_stack[SUBS_ARITY_ENTRY] = subs_arity - 1;                 \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          TOP_STACK = &aux_stack[-2];                                   \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          TOP_STACK[HEAP_ARITY_ENTRY] = 1;                              \
							 | 
						
					
						
							
								
									
										
										
										
											2014-01-19 21:15:05 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								          TOP_STACK[HEAP_ENTRY(1)] = (CELL) (HR + 1);                    \
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        }                                                               \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        aux_stack[VARS_ARITY_ENTRY - 1] = vars_arity + 1;               \
							 | 
						
					
						
							
								
									
										
										
										
											2014-01-19 21:15:05 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        aux_stack[VARS_ENTRY(vars_arity + 1)] = (CELL) HR;		\
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        RESET_VARIABLE((CELL) HR);                                       \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        HR += 2;                                                         \
							 | 
						
					
						
							
								
									
										
										
										
											2005-07-06 19:34:12 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        next_trie_instruction(node)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2005-06-03 08:19:18 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2005-07-06 19:34:12 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-03 05:58:14 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								/************************************************************************
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								**                    aux_stack_val_(in_pair_)instr                    **
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-03 05:58:14 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								************************************************************************/
							 | 
						
					
						
							
								
									
										
										
										
											2005-07-06 19:34:12 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#define aux_stack_val_instr()                                           \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        if (heap_arity) {                                               \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          CELL aux_sub, aux_var;				        \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          aux_sub = aux_stack[HEAP_ENTRY(1)];                           \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          aux_var = aux_stack[VARS_ENTRY(var_index + 1)];               \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          if (aux_sub > aux_var) {                                      \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            Bind_Global((CELL *) aux_sub, aux_var);                     \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          } else {                                                      \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            RESET_VARIABLE(aux_sub);                                    \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									    Bind_Local((CELL *) aux_var, aux_sub);                      \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            aux_stack[VARS_ENTRY(var_index + 1)] = aux_sub;             \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          }                                                             \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          TOP_STACK = &aux_stack[1];                                    \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          TOP_STACK[HEAP_ARITY_ENTRY] = heap_arity - 1;                 \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          next_instruction(heap_arity - 1 || subs_arity, node);         \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        } else {                                                        \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          CELL aux_sub, aux_var;                                        \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          aux_sub = aux_stack[SUBS_ENTRY(1)];                           \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          aux_stack[SUBS_ARITY_ENTRY] = subs_arity - 1;                 \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          aux_var = aux_stack[VARS_ENTRY(var_index + 1)];		\
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          if (aux_sub > aux_var) {                                      \
							 | 
						
					
						
							
								
									
										
										
										
											2014-01-19 21:15:05 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									    if ((CELL *) aux_sub <= HR) {                                \
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								              Bind_Global((CELL *) aux_sub, aux_var);                   \
							 | 
						
					
						
							
								
									
										
										
										
											2014-01-19 21:15:05 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            } else if ((CELL *) aux_var <= HR) {                         \
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								              Bind_Local((CELL *) aux_sub, aux_var);                    \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            } else {                                                    \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								              Bind_Local((CELL *) aux_var, aux_sub);                    \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								              aux_stack[VARS_ENTRY(var_index + 1)] = aux_sub;           \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }                                                           \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          } else {                                                      \
							 | 
						
					
						
							
								
									
										
										
										
											2014-01-19 21:15:05 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									    if ((CELL *) aux_var <= HR) {                                \
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								              Bind_Global((CELL *) aux_var, aux_sub);                   \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								              aux_stack[VARS_ENTRY(var_index + 1)] = aux_sub;           \
							 | 
						
					
						
							
								
									
										
										
										
											2014-01-19 21:15:05 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								            } else if ((CELL *) aux_sub <= HR) {                         \
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								              Bind_Local((CELL *) aux_var, aux_sub);                    \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								              aux_stack[VARS_ENTRY(var_index + 1)] = aux_sub;           \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            } else {                                                    \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								              Bind_Local((CELL *) aux_sub, aux_var);                    \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            }                                                           \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          }                                                             \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          next_instruction(subs_arity - 1, node);                       \
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        }
							 | 
						
					
						
							
								
									
										
										
										
											2005-06-03 08:19:18 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#define aux_stack_val_in_pair_instr()                                   \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        if (heap_arity) {                                               \
							 | 
						
					
						
							
								
									
										
										
										
											2014-01-19 21:15:05 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								          Bind_Global((CELL *) aux_stack[HEAP_ENTRY(1)], AbsPair(HR));   \
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        } else {                                                        \
							 | 
						
					
						
							
								
									
										
										
										
											2014-05-29 11:32:28 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								          YapBind((CELL *) aux_stack[SUBS_ENTRY(1)], AbsPair(HR));		\
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								          aux_stack[SUBS_ARITY_ENTRY] = subs_arity - 1;                 \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          TOP_STACK = &aux_stack[-1];                                   \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          TOP_STACK[HEAP_ARITY_ENTRY] = 1;                              \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									}                                                               \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        { CELL aux_sub, aux_var;                                        \
							 | 
						
					
						
							
								
									
										
										
										
											2014-01-19 21:15:05 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								          aux_sub = (CELL) HR;                                          \
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								          aux_var = aux_stack[VARS_ENTRY(var_index + 1)];               \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          if (aux_sub > aux_var) {                                      \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            Bind_Global((CELL *) aux_sub, aux_var);                     \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          } else {                                                      \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            RESET_VARIABLE(aux_sub);                                    \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									    Bind_Local((CELL *) aux_var, aux_sub);                      \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            aux_stack[VARS_ENTRY(var_index + 1)] = aux_sub;             \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								          }                                                             \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        }                                                               \
							 | 
						
					
						
							
								
									
										
										
										
											2014-01-19 21:15:05 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        TOP_STACK[HEAP_ENTRY(1)] = (CELL) (HR + 1);                      \
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        HR += 2;                                                         \
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								        next_trie_instruction(node)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2005-06-03 08:19:18 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-03 05:58:14 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								/************************************************************************
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								**                          Trie instructions                          **
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								************************************************************************/
							 | 
						
					
						
							
								
									
										
										
										
											2001-04-09 19:54:03 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  PBOp(trie_do_var, e)
							 | 
						
					
						
							
								
									
										
										
										
											2005-06-03 08:19:18 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register ans_node_ptr node = (ans_node_ptr) PREG;
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register CELL *aux_stack = TOP_STACK;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int heap_arity = aux_stack[HEAP_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int vars_arity = aux_stack[VARS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int subs_arity = aux_stack[SUBS_ARITY_ENTRY];
							 | 
						
					
						
							
								
									
										
										
										
											2005-06-03 08:19:18 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    aux_stack_var_instr();
							 | 
						
					
						
							
								
									
										
										
										
											2005-06-03 08:19:18 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  ENDPBOp();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  PBOp(trie_trust_var, e)
							 | 
						
					
						
							
								
									
										
										
										
											2005-06-03 08:19:18 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register ans_node_ptr node = (ans_node_ptr) PREG;
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register CELL *aux_stack = (CELL *) (B + 1);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int heap_arity = aux_stack[HEAP_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int vars_arity = aux_stack[VARS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int subs_arity = aux_stack[SUBS_ARITY_ENTRY];
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    pop_trie_node();
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    aux_stack_var_instr();
							 | 
						
					
						
							
								
									
										
										
										
											2005-06-03 08:19:18 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  ENDPBOp();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  PBOp(trie_try_var, e)
							 | 
						
					
						
							
								
									
										
										
										
											2001-04-09 19:54:03 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    register ans_node_ptr node = (ans_node_ptr) PREG;
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register CELL *aux_stack = TOP_STACK;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int heap_arity = aux_stack[HEAP_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int vars_arity = aux_stack[VARS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int subs_arity = aux_stack[SUBS_ARITY_ENTRY];
							 | 
						
					
						
							
								
									
										
										
										
											2001-04-09 19:54:03 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2008-09-05 18:34:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    store_trie_node(TrNode_next(node));
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    aux_stack_var_instr();
							 | 
						
					
						
							
								
									
										
										
										
											2001-04-09 19:54:03 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  ENDPBOp();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  PBOp(trie_retry_var, e)
							 | 
						
					
						
							
								
									
										
										
										
											2001-04-09 19:54:03 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    register ans_node_ptr node = (ans_node_ptr) PREG;
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register CELL *aux_stack = (CELL *) (B + 1);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int heap_arity = aux_stack[HEAP_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int vars_arity = aux_stack[VARS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int subs_arity = aux_stack[SUBS_ARITY_ENTRY];
							 | 
						
					
						
							
								
									
										
										
										
											2001-04-09 19:54:03 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2008-09-05 18:34:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    restore_trie_node(TrNode_next(node));
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    aux_stack_var_instr();
							 | 
						
					
						
							
								
									
										
										
										
											2001-04-09 19:54:03 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  ENDPBOp();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  PBOp(trie_do_var_in_pair, e)
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-23 04:22:10 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#ifdef TRIE_COMPACT_PAIRS
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register ans_node_ptr node = (ans_node_ptr) PREG;
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register CELL *aux_stack = TOP_STACK;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int heap_arity = aux_stack[HEAP_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int vars_arity = aux_stack[VARS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int subs_arity = aux_stack[SUBS_ARITY_ENTRY];
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    aux_stack_var_in_pair_instr();
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#else
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    Yap_Error(INTERNAL_ERROR, TermNil, "trie_do_var_in_pair: invalid instruction");
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-23 04:22:10 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#endif /* TRIE_COMPACT_PAIRS */
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  ENDPBOp();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  PBOp(trie_trust_var_in_pair, e)
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-23 04:22:10 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#ifdef TRIE_COMPACT_PAIRS
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register ans_node_ptr node = (ans_node_ptr) PREG;
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register CELL *aux_stack = (CELL *) (B + 1);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int heap_arity = aux_stack[HEAP_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int vars_arity = aux_stack[VARS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int subs_arity = aux_stack[SUBS_ARITY_ENTRY];
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    pop_trie_node();
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    aux_stack_var_in_pair_instr();
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#else
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    Yap_Error(INTERNAL_ERROR, TermNil, "trie_trust_var_in_pair: invalid instruction");
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-23 04:22:10 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#endif /* TRIE_COMPACT_PAIRS */
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  ENDPBOp();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  PBOp(trie_try_var_in_pair, e)
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-23 04:22:10 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#ifdef TRIE_COMPACT_PAIRS
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register ans_node_ptr node = (ans_node_ptr) PREG;
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register CELL *aux_stack = TOP_STACK;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int heap_arity = aux_stack[HEAP_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int vars_arity = aux_stack[VARS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int subs_arity = aux_stack[SUBS_ARITY_ENTRY];
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    store_trie_node(TrNode_next(node));
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    aux_stack_var_in_pair_instr();
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#else
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    Yap_Error(INTERNAL_ERROR, TermNil, "trie_try_var_in_pair: invalid instruction");
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-23 04:22:10 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#endif /* TRIE_COMPACT_PAIRS */
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  ENDPBOp();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  PBOp(trie_retry_var_in_pair, e)
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-23 04:22:10 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#ifdef TRIE_COMPACT_PAIRS
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register ans_node_ptr node = (ans_node_ptr) PREG;
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register CELL *aux_stack = (CELL *) (B + 1);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int heap_arity = aux_stack[HEAP_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int vars_arity = aux_stack[VARS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int subs_arity = aux_stack[SUBS_ARITY_ENTRY];
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    restore_trie_node(TrNode_next(node));
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    aux_stack_var_in_pair_instr();
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#else
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    Yap_Error(INTERNAL_ERROR, TermNil, "trie_retry_var_in_pair: invalid instruction");
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-23 04:22:10 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#endif /* TRIE_COMPACT_PAIRS */
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  ENDPBOp();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  PBOp(trie_do_val, e)
							 | 
						
					
						
							
								
									
										
										
										
											2001-04-09 19:54:03 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    register ans_node_ptr node = (ans_node_ptr) PREG;
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register CELL *aux_stack = TOP_STACK;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int heap_arity = aux_stack[HEAP_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int vars_arity = aux_stack[VARS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int subs_arity = aux_stack[SUBS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int var_index = VarIndexOfTableTerm(TrNode_entry(node));
							 | 
						
					
						
							
								
									
										
										
										
											2001-04-09 19:54:03 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    aux_stack_val_instr();
							 | 
						
					
						
							
								
									
										
										
										
											2001-04-09 19:54:03 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  ENDPBOp();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  PBOp(trie_trust_val, e)
							 | 
						
					
						
							
								
									
										
										
										
											2001-04-09 19:54:03 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    register ans_node_ptr node = (ans_node_ptr) PREG;
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register CELL *aux_stack = (CELL *) (B + 1);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int heap_arity = aux_stack[HEAP_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int vars_arity = aux_stack[VARS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int subs_arity = aux_stack[SUBS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int var_index = VarIndexOfTableTerm(TrNode_entry(node));
							 | 
						
					
						
							
								
									
										
										
										
											2001-04-09 19:54:03 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    pop_trie_node();
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    aux_stack_val_instr();
							 | 
						
					
						
							
								
									
										
										
										
											2001-04-09 19:54:03 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  ENDPBOp();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  PBOp(trie_try_val, e)
							 | 
						
					
						
							
								
									
										
										
										
											2001-04-09 19:54:03 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    register ans_node_ptr node = (ans_node_ptr) PREG;
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register CELL *aux_stack = TOP_STACK;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int heap_arity = aux_stack[HEAP_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int vars_arity = aux_stack[VARS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int subs_arity = aux_stack[SUBS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int var_index = VarIndexOfTableTerm(TrNode_entry(node));
							 | 
						
					
						
							
								
									
										
										
										
											2001-04-09 19:54:03 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2008-09-05 18:34:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    store_trie_node(TrNode_next(node));
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    aux_stack_val_instr();
							 | 
						
					
						
							
								
									
										
										
										
											2001-04-09 19:54:03 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  ENDPBOp();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  PBOp(trie_retry_val, e)
							 | 
						
					
						
							
								
									
										
										
										
											2001-04-09 19:54:03 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    register ans_node_ptr node = (ans_node_ptr) PREG;
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register CELL *aux_stack = (CELL *) (B + 1);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int heap_arity = aux_stack[HEAP_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int vars_arity = aux_stack[VARS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int subs_arity = aux_stack[SUBS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int var_index = VarIndexOfTableTerm(TrNode_entry(node));
							 | 
						
					
						
							
								
									
										
										
										
											2001-04-09 19:54:03 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2008-09-05 18:34:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    restore_trie_node(TrNode_next(node));
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    aux_stack_val_instr();
							 | 
						
					
						
							
								
									
										
										
										
											2001-04-09 19:54:03 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  ENDPBOp();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  PBOp(trie_do_val_in_pair, e)
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-23 04:22:10 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#ifdef TRIE_COMPACT_PAIRS
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register ans_node_ptr node = (ans_node_ptr) PREG;
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register CELL *aux_stack = TOP_STACK;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int heap_arity = aux_stack[HEAP_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int vars_arity = aux_stack[VARS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int subs_arity = aux_stack[SUBS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int var_index = VarIndexOfTableTerm(TrNode_entry(node));
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    aux_stack_val_in_pair_instr();
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#else
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    Yap_Error(INTERNAL_ERROR, TermNil, "trie_do_val_in_pair: invalid instruction");
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-23 04:22:10 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#endif /* TRIE_COMPACT_PAIRS */
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  ENDPBOp();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  PBOp(trie_trust_val_in_pair, e)
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-23 04:22:10 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#ifdef TRIE_COMPACT_PAIRS
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register ans_node_ptr node = (ans_node_ptr) PREG;
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register CELL *aux_stack = (CELL *) (B + 1);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int heap_arity = aux_stack[HEAP_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int vars_arity = aux_stack[VARS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int subs_arity = aux_stack[SUBS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int var_index = VarIndexOfTableTerm(TrNode_entry(node));
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    pop_trie_node();
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    aux_stack_val_in_pair_instr();
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#else
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    Yap_Error(INTERNAL_ERROR, TermNil, "trie_trust_val_in_pair: invalid instruction");
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-23 04:22:10 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#endif /* TRIE_COMPACT_PAIRS */
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  ENDPBOp();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  PBOp(trie_try_val_in_pair, e)
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-23 04:22:10 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#ifdef TRIE_COMPACT_PAIRS
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register ans_node_ptr node = (ans_node_ptr) PREG;
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register CELL *aux_stack = TOP_STACK;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int heap_arity = aux_stack[HEAP_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int vars_arity = aux_stack[VARS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int subs_arity = aux_stack[SUBS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int var_index = VarIndexOfTableTerm(TrNode_entry(node));
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    store_trie_node(TrNode_next(node));
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    aux_stack_val_in_pair_instr();
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#else
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    Yap_Error(INTERNAL_ERROR, TermNil, "trie_try_val_in_pair: invalid instruction");
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-23 04:22:10 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#endif /* TRIE_COMPACT_PAIRS */
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  ENDPBOp();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  PBOp(trie_retry_val_in_pair, e)
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-23 04:22:10 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#ifdef TRIE_COMPACT_PAIRS
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register ans_node_ptr node = (ans_node_ptr) PREG;
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register CELL *aux_stack = (CELL *) (B + 1);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int heap_arity = aux_stack[HEAP_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int vars_arity = aux_stack[VARS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int subs_arity = aux_stack[SUBS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int var_index = VarIndexOfTableTerm(TrNode_entry(node));
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    restore_trie_node(TrNode_next(node));
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    aux_stack_val_in_pair_instr();
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#else
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    Yap_Error(INTERNAL_ERROR, TermNil, "trie_retry_val_in_pair: invalid instruction");
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-23 04:22:10 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#endif /* TRIE_COMPACT_PAIRS */
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  ENDPBOp();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  PBOp(trie_do_atom, e)
							 | 
						
					
						
							
								
									
										
										
										
											2001-04-09 19:54:03 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    register ans_node_ptr node = (ans_node_ptr) PREG;
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register CELL *aux_stack = TOP_STACK;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int heap_arity = aux_stack[HEAP_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int vars_arity = aux_stack[VARS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int subs_arity = aux_stack[SUBS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    Term t = TrNode_entry(node);
							 | 
						
					
						
							
								
									
										
										
										
											2001-04-09 19:54:03 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    aux_stack_term_instr();
							 | 
						
					
						
							
								
									
										
										
										
											2001-04-09 19:54:03 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  ENDPBOp();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  PBOp(trie_trust_atom, e)
							 | 
						
					
						
							
								
									
										
										
										
											2001-04-09 19:54:03 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    register ans_node_ptr node = (ans_node_ptr) PREG;
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register CELL *aux_stack = (CELL *) (B + 1);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int heap_arity = aux_stack[HEAP_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int vars_arity = aux_stack[VARS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int subs_arity = aux_stack[SUBS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    Term t = TrNode_entry(node);
							 | 
						
					
						
							
								
									
										
										
										
											2001-04-09 19:54:03 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    pop_trie_node();
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    aux_stack_term_instr();
							 | 
						
					
						
							
								
									
										
										
										
											2001-04-09 19:54:03 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  ENDPBOp();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  PBOp(trie_try_atom, e)
							 | 
						
					
						
							
								
									
										
										
										
											2001-04-09 19:54:03 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    register ans_node_ptr node = (ans_node_ptr) PREG;
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register CELL *aux_stack = TOP_STACK;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int heap_arity = aux_stack[HEAP_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int vars_arity = aux_stack[VARS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int subs_arity = aux_stack[SUBS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    Term t = TrNode_entry(node);
							 | 
						
					
						
							
								
									
										
										
										
											2001-04-09 19:54:03 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2008-09-05 18:34:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    store_trie_node(TrNode_next(node));
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    aux_stack_term_instr();
							 | 
						
					
						
							
								
									
										
										
										
											2001-04-09 19:54:03 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  ENDPBOp();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  PBOp(trie_retry_atom, e)
							 | 
						
					
						
							
								
									
										
										
										
											2001-04-09 19:54:03 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    register ans_node_ptr node = (ans_node_ptr) PREG;
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register CELL *aux_stack = (CELL *) (B + 1);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int heap_arity = aux_stack[HEAP_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int vars_arity = aux_stack[VARS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int subs_arity = aux_stack[SUBS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    Term t = TrNode_entry(node);
							 | 
						
					
						
							
								
									
										
										
										
											2001-04-09 19:54:03 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2008-09-05 18:34:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    restore_trie_node(TrNode_next(node));
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    aux_stack_term_instr();
							 | 
						
					
						
							
								
									
										
										
										
											2001-04-09 19:54:03 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  ENDPBOp();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  PBOp(trie_do_atom_in_pair, e)
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-23 04:22:10 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#ifdef TRIE_COMPACT_PAIRS
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register ans_node_ptr node = (ans_node_ptr) PREG;
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register CELL *aux_stack = TOP_STACK;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int heap_arity = aux_stack[HEAP_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int vars_arity = aux_stack[VARS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int subs_arity = aux_stack[SUBS_ARITY_ENTRY];
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    aux_stack_term_in_pair_instr();
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#else
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    Yap_Error(INTERNAL_ERROR, TermNil, "trie_do_atom_in_pair: invalid instruction");
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-23 04:22:10 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#endif /* TRIE_COMPACT_PAIRS */
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  ENDPBOp();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  PBOp(trie_trust_atom_in_pair, e)
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-23 04:22:10 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#ifdef TRIE_COMPACT_PAIRS
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register ans_node_ptr node = (ans_node_ptr) PREG;
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register CELL *aux_stack = (CELL *) (B + 1);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int heap_arity = aux_stack[HEAP_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int vars_arity = aux_stack[VARS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int subs_arity = aux_stack[SUBS_ARITY_ENTRY];
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    pop_trie_node();
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    aux_stack_term_in_pair_instr();
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#else
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    Yap_Error(INTERNAL_ERROR, TermNil, "trie_trust_atom_in_pair: invalid instruction");
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-23 04:22:10 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#endif /* TRIE_COMPACT_PAIRS */
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  ENDPBOp();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  PBOp(trie_try_atom_in_pair, e)
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-23 04:22:10 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#ifdef TRIE_COMPACT_PAIRS
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register ans_node_ptr node = (ans_node_ptr) PREG;
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register CELL *aux_stack = TOP_STACK;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int heap_arity = aux_stack[HEAP_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int vars_arity = aux_stack[VARS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int subs_arity = aux_stack[SUBS_ARITY_ENTRY];
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    store_trie_node(TrNode_next(node));
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    aux_stack_term_in_pair_instr();
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#else
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    Yap_Error(INTERNAL_ERROR, TermNil, "trie_try_atom_in_pair: invalid instruction");
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-23 04:22:10 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#endif /* TRIE_COMPACT_PAIRS */
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  ENDPBOp();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  PBOp(trie_retry_atom_in_pair, e)
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-23 04:22:10 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#ifdef TRIE_COMPACT_PAIRS
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register ans_node_ptr node = (ans_node_ptr) PREG;
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register CELL *aux_stack = (CELL *) (B + 1);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int heap_arity = aux_stack[HEAP_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int vars_arity = aux_stack[VARS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int subs_arity = aux_stack[SUBS_ARITY_ENTRY];
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    restore_trie_node(TrNode_next(node));
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    aux_stack_term_in_pair_instr();
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#else
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    Yap_Error(INTERNAL_ERROR, TermNil, "trie_retry_atom_in_pair: invalid instruction");
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-23 04:22:10 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#endif /* TRIE_COMPACT_PAIRS */
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  ENDPBOp();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  PBOp(trie_do_null, e)
							 | 
						
					
						
							
								
									
										
										
										
											2001-04-09 19:54:03 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    register ans_node_ptr node = (ans_node_ptr) PREG;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    aux_stack_null_instr();
							 | 
						
					
						
							
								
									
										
										
										
											2001-04-09 19:54:03 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  ENDPBOp();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  PBOp(trie_trust_null, e)
							 | 
						
					
						
							
								
									
										
										
										
											2001-04-09 19:54:03 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    register ans_node_ptr node = (ans_node_ptr) PREG;
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register CELL *aux_stack = (CELL *) (B + 1);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int heap_arity = aux_stack[HEAP_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int vars_arity = aux_stack[VARS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int subs_arity = aux_stack[SUBS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    pop_trie_node();
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    aux_stack_null_instr();
							 | 
						
					
						
							
								
									
										
										
										
											2001-04-09 19:54:03 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  ENDPBOp();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  PBOp(trie_try_null, e)
							 | 
						
					
						
							
								
									
										
										
										
											2001-04-09 19:54:03 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    register ans_node_ptr node = (ans_node_ptr) PREG;
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register CELL *aux_stack = TOP_STACK;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int heap_arity = aux_stack[HEAP_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int vars_arity = aux_stack[VARS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int subs_arity = aux_stack[SUBS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2008-09-05 18:34:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    store_trie_node(TrNode_next(node));
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    aux_stack_null_instr();
							 | 
						
					
						
							
								
									
										
										
										
											2001-04-09 19:54:03 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  ENDPBOp();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  PBOp(trie_retry_null, e)
							 | 
						
					
						
							
								
									
										
										
										
											2001-04-09 19:54:03 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    register ans_node_ptr node = (ans_node_ptr) PREG;
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register CELL *aux_stack = (CELL *) (B + 1);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int heap_arity = aux_stack[HEAP_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int vars_arity = aux_stack[VARS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int subs_arity = aux_stack[SUBS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2008-09-05 18:34:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    restore_trie_node(TrNode_next(node));
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    aux_stack_null_instr();
							 | 
						
					
						
							
								
									
										
										
										
											2001-04-09 19:54:03 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  ENDPBOp();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  PBOp(trie_do_null_in_pair, e)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#ifdef TRIE_COMPACT_PAIRS
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register ans_node_ptr node = (ans_node_ptr) PREG;
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register CELL *aux_stack = TOP_STACK;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int heap_arity = aux_stack[HEAP_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int vars_arity = aux_stack[VARS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int subs_arity = aux_stack[SUBS_ARITY_ENTRY];
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    aux_stack_new_pair_instr();
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#else
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    Yap_Error(INTERNAL_ERROR, TermNil, "trie_do_null_in_pair: invalid instruction");
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-23 04:22:10 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#endif /* TRIE_COMPACT_PAIRS */
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  ENDPBOp();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  PBOp(trie_trust_null_in_pair, e)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#ifdef TRIE_COMPACT_PAIRS
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register ans_node_ptr node = (ans_node_ptr) PREG;
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register CELL *aux_stack = (CELL *) (B + 1);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int heap_arity = aux_stack[HEAP_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int vars_arity = aux_stack[VARS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int subs_arity = aux_stack[SUBS_ARITY_ENTRY];
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    pop_trie_node();
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    aux_stack_new_pair_instr();
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#else
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    Yap_Error(INTERNAL_ERROR, TermNil, "trie_trust_null_in_pair: invalid instruction");
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-23 04:22:10 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#endif /* TRIE_COMPACT_PAIRS */
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  ENDPBOp();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  PBOp(trie_try_null_in_pair, e)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#ifdef TRIE_COMPACT_PAIRS
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register ans_node_ptr node = (ans_node_ptr) PREG;
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register CELL *aux_stack = TOP_STACK;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int heap_arity = aux_stack[HEAP_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int vars_arity = aux_stack[VARS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int subs_arity = aux_stack[SUBS_ARITY_ENTRY];
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    store_trie_node(TrNode_next(node));
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    aux_stack_new_pair_instr();
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#else
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    Yap_Error(INTERNAL_ERROR, TermNil, "trie_try_null_in_pair: invalid instruction");
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-23 04:22:10 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#endif /* TRIE_COMPACT_PAIRS */
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  ENDPBOp();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  PBOp(trie_retry_null_in_pair, e)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#ifdef TRIE_COMPACT_PAIRS
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register ans_node_ptr node = (ans_node_ptr) PREG;
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register CELL *aux_stack = (CELL *) (B + 1);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int heap_arity = aux_stack[HEAP_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int vars_arity = aux_stack[VARS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int subs_arity = aux_stack[SUBS_ARITY_ENTRY];
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    restore_trie_node(TrNode_next(node));
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    aux_stack_new_pair_instr();
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#else
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    Yap_Error(INTERNAL_ERROR, TermNil, "trie_retry_null_in_pair: invalid instruction");
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-23 04:22:10 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#endif /* TRIE_COMPACT_PAIRS */
							 | 
						
					
						
							
								
									
										
										
										
											2001-04-09 19:54:03 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  ENDPBOp();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-05 05:14:08 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  PBOp(trie_do_pair, e)
							 | 
						
					
						
							
								
									
										
										
										
											2001-04-09 19:54:03 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    register ans_node_ptr node = (ans_node_ptr) PREG;
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register CELL *aux_stack = TOP_STACK;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int heap_arity = aux_stack[HEAP_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int vars_arity = aux_stack[VARS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int subs_arity = aux_stack[SUBS_ARITY_ENTRY];
							 | 
						
					
						
							
								
									
										
										
										
											2001-04-09 19:54:03 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    aux_stack_pair_instr();
							 | 
						
					
						
							
								
									
										
										
										
											2001-04-09 19:54:03 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  ENDPBOp();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-05 05:14:08 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  PBOp(trie_trust_pair, e)
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register ans_node_ptr node = (ans_node_ptr) PREG;
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register CELL *aux_stack = (CELL *) (B + 1);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int heap_arity = aux_stack[HEAP_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int vars_arity = aux_stack[VARS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int subs_arity = aux_stack[SUBS_ARITY_ENTRY];
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    pop_trie_node();
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    aux_stack_pair_instr();
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  ENDPBOp();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-05 05:14:08 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  PBOp(trie_try_pair, e)
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register ans_node_ptr node = (ans_node_ptr) PREG;
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register CELL *aux_stack = TOP_STACK;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int heap_arity = aux_stack[HEAP_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int vars_arity = aux_stack[VARS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int subs_arity = aux_stack[SUBS_ARITY_ENTRY];
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    store_trie_node(TrNode_next(node));
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    aux_stack_pair_instr();
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  ENDPBOp();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-05 05:14:08 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  PBOp(trie_retry_pair, e)
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register ans_node_ptr node = (ans_node_ptr) PREG;
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register CELL *aux_stack = (CELL *) (B + 1);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int heap_arity = aux_stack[HEAP_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int vars_arity = aux_stack[VARS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int subs_arity = aux_stack[SUBS_ARITY_ENTRY];
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    restore_trie_node(TrNode_next(node));
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    aux_stack_pair_instr();
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  ENDPBOp();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  PBOp(trie_do_appl, e)
							 | 
						
					
						
							
								
									
										
										
										
											2001-04-09 19:54:03 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    register ans_node_ptr node = (ans_node_ptr) PREG;
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register CELL *aux_stack = TOP_STACK;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int heap_arity = aux_stack[HEAP_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int vars_arity = aux_stack[VARS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int subs_arity = aux_stack[SUBS_ARITY_ENTRY];
							 | 
						
					
						
							
								
									
										
										
										
											2005-05-31 08:19:31 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    Functor func = (Functor) RepAppl(TrNode_entry(node));
							 | 
						
					
						
							
								
									
										
										
										
											2001-04-09 19:54:03 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int func_arity = ArityOfFunctor(func);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    aux_stack_appl_instr();
							 | 
						
					
						
							
								
									
										
										
										
											2001-04-09 19:54:03 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  ENDPBOp();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  PBOp(trie_trust_appl, e)
							 | 
						
					
						
							
								
									
										
										
										
											2001-04-09 19:54:03 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    register ans_node_ptr node = (ans_node_ptr) PREG;
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register CELL *aux_stack = (CELL *) (B + 1);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int heap_arity = aux_stack[HEAP_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int vars_arity = aux_stack[VARS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int subs_arity = aux_stack[SUBS_ARITY_ENTRY];
							 | 
						
					
						
							
								
									
										
										
										
											2005-05-31 08:19:31 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    Functor func = (Functor) RepAppl(TrNode_entry(node));
							 | 
						
					
						
							
								
									
										
										
										
											2001-04-09 19:54:03 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int func_arity = ArityOfFunctor(func);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    pop_trie_node();
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    aux_stack_appl_instr();
							 | 
						
					
						
							
								
									
										
										
										
											2001-04-09 19:54:03 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  ENDPBOp();
							 | 
						
					
						
							
								
									
										
										
										
											2005-06-03 08:19:18 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  PBOp(trie_try_appl, e)
							 | 
						
					
						
							
								
									
										
										
										
											2005-07-06 19:34:12 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register ans_node_ptr node = (ans_node_ptr) PREG;
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register CELL *aux_stack = TOP_STACK;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int heap_arity = aux_stack[HEAP_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int vars_arity = aux_stack[VARS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int subs_arity = aux_stack[SUBS_ARITY_ENTRY];
							 | 
						
					
						
							
								
									
										
										
										
											2008-09-05 18:34:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    Functor func = (Functor) RepAppl(TrNode_entry(node));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int func_arity = ArityOfFunctor(func);
							 | 
						
					
						
							
								
									
										
										
										
											2005-07-06 19:34:12 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2008-09-05 18:34:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    store_trie_node(TrNode_next(node));
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    aux_stack_appl_instr();
							 | 
						
					
						
							
								
									
										
										
										
											2005-07-06 19:34:12 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  ENDPBOp();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  PBOp(trie_retry_appl, e)
							 | 
						
					
						
							
								
									
										
										
										
											2005-07-06 19:34:12 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register ans_node_ptr node = (ans_node_ptr) PREG;
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register CELL *aux_stack = (CELL *) (B + 1);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int heap_arity = aux_stack[HEAP_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int vars_arity = aux_stack[VARS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int subs_arity = aux_stack[SUBS_ARITY_ENTRY];
							 | 
						
					
						
							
								
									
										
										
										
											2008-09-05 18:34:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    Functor func = (Functor) RepAppl(TrNode_entry(node));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int func_arity = ArityOfFunctor(func);
							 | 
						
					
						
							
								
									
										
										
										
											2005-07-06 19:34:12 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2008-09-05 18:34:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    restore_trie_node(TrNode_next(node));
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    aux_stack_appl_instr();
							 | 
						
					
						
							
								
									
										
										
										
											2005-07-06 19:34:12 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  ENDPBOp();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  PBOp(trie_do_appl_in_pair, e)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#ifdef TRIE_COMPACT_PAIRS
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register ans_node_ptr node = (ans_node_ptr) PREG;
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register CELL *aux_stack = TOP_STACK;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int heap_arity = aux_stack[HEAP_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int vars_arity = aux_stack[VARS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int subs_arity = aux_stack[SUBS_ARITY_ENTRY];
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    Functor func = (Functor) RepAppl(TrNode_entry(node));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int func_arity = ArityOfFunctor(func);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    aux_stack_appl_in_pair_instr();
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#else
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    Yap_Error(INTERNAL_ERROR, TermNil, "trie_do_appl_in_pair: invalid instruction");
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-23 04:22:10 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#endif /* TRIE_COMPACT_PAIRS */
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  ENDPBOp();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  PBOp(trie_trust_appl_in_pair, e)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#ifdef TRIE_COMPACT_PAIRS
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register ans_node_ptr node = (ans_node_ptr) PREG;
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register CELL *aux_stack = (CELL *) (B + 1);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int heap_arity = aux_stack[HEAP_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int vars_arity = aux_stack[VARS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int subs_arity = aux_stack[SUBS_ARITY_ENTRY];
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    Functor func = (Functor) RepAppl(TrNode_entry(node));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int func_arity = ArityOfFunctor(func);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    pop_trie_node();
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    aux_stack_appl_in_pair_instr();
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#else
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    Yap_Error(INTERNAL_ERROR, TermNil, "trie_trust_appl_in_pair: invalid instruction");
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-23 04:22:10 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#endif /* TRIE_COMPACT_PAIRS */
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  ENDPBOp();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  PBOp(trie_try_appl_in_pair, e)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#ifdef TRIE_COMPACT_PAIRS
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register ans_node_ptr node = (ans_node_ptr) PREG;
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register CELL *aux_stack = TOP_STACK;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int heap_arity = aux_stack[HEAP_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int vars_arity = aux_stack[VARS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int subs_arity = aux_stack[SUBS_ARITY_ENTRY];
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    Functor func = (Functor) RepAppl(TrNode_entry(node));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int func_arity = ArityOfFunctor(func);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    store_trie_node(TrNode_next(node));
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    aux_stack_appl_in_pair_instr();
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#else
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    Yap_Error(INTERNAL_ERROR, TermNil, "trie_try_appl_in_pair: invalid instruction");
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-23 04:22:10 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#endif /* TRIE_COMPACT_PAIRS */
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  ENDPBOp();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  PBOp(trie_retry_appl_in_pair, e)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								#ifdef TRIE_COMPACT_PAIRS
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register ans_node_ptr node = (ans_node_ptr) PREG;
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register CELL *aux_stack = (CELL *) (B + 1);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int heap_arity = aux_stack[HEAP_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int vars_arity = aux_stack[VARS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int subs_arity = aux_stack[SUBS_ARITY_ENTRY];
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    Functor func = (Functor) RepAppl(TrNode_entry(node));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int func_arity = ArityOfFunctor(func);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    restore_trie_node(TrNode_next(node));
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    aux_stack_appl_in_pair_instr();
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#else
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    Yap_Error(INTERNAL_ERROR, TermNil, "trie_retry_appl_in_pair: invalid instruction");
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-23 04:22:10 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#endif /* TRIE_COMPACT_PAIRS */
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  ENDPBOp();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2008-09-05 18:34:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  PBOp(trie_do_extension, e)
							 | 
						
					
						
							
								
									
										
										
										
											2005-07-06 19:34:12 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register ans_node_ptr node = (ans_node_ptr) PREG;
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register CELL *aux_stack = TOP_STACK;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int heap_arity = aux_stack[HEAP_ARITY_ENTRY];
							 | 
						
					
						
							
								
									
										
										
										
											2005-07-06 19:34:12 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    aux_stack_extension_instr();
							 | 
						
					
						
							
								
									
										
										
										
											2005-07-06 19:34:12 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  ENDPBOp();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  PBOp(trie_trust_extension, e)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    register ans_node_ptr node = (ans_node_ptr) PREG;
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register CELL *aux_stack = (CELL *) (B + 1);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int heap_arity = aux_stack[HEAP_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int vars_arity = aux_stack[VARS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int subs_arity = aux_stack[SUBS_ARITY_ENTRY];
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-24 20:04:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    pop_trie_node();
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    aux_stack_extension_instr();
							 | 
						
					
						
							
								
									
										
										
										
											2005-07-06 19:34:12 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  ENDPBOp();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2008-09-05 18:34:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  PBOp(trie_try_extension, e)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    register ans_node_ptr node = (ans_node_ptr) PREG;
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register CELL *aux_stack = TOP_STACK;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int heap_arity = aux_stack[HEAP_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int vars_arity = aux_stack[VARS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int subs_arity = aux_stack[SUBS_ARITY_ENTRY];
							 | 
						
					
						
							
								
									
										
										
										
											2008-09-05 18:34:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    store_trie_node(TrNode_next(node));
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    aux_stack_extension_instr();
							 | 
						
					
						
							
								
									
										
										
										
											2008-09-05 18:34:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  ENDPBOp();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  PBOp(trie_retry_extension, e)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    register ans_node_ptr node = (ans_node_ptr) PREG;
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register CELL *aux_stack = (CELL *) (B + 1);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int heap_arity = aux_stack[HEAP_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int vars_arity = aux_stack[VARS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int subs_arity = aux_stack[SUBS_ARITY_ENTRY];
							 | 
						
					
						
							
								
									
										
										
										
											2008-09-05 18:34:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    restore_trie_node(TrNode_next(node));
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    aux_stack_extension_instr();
							 | 
						
					
						
							
								
									
										
										
										
											2008-09-05 18:34:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  ENDPBOp();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  PBOp(trie_do_double, e)
							 | 
						
					
						
							
								
									
										
										
										
											2005-06-03 08:19:18 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register ans_node_ptr node = (ans_node_ptr) PREG;
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register CELL *aux_stack = TOP_STACK;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int heap_arity = aux_stack[HEAP_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int vars_arity = aux_stack[VARS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int subs_arity = aux_stack[SUBS_ARITY_ENTRY];
							 | 
						
					
						
							
								
									
										
										
										
											2011-02-15 18:40:34 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    volatile union {
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								      Float dbl;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								      Term ts[SIZEOF_DOUBLE/SIZEOF_INT_P];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    } td;
							 | 
						
					
						
							
								
									
										
										
										
											2009-07-05 05:14:08 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    Term t;
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-17 17:14:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2007-04-26 14:13:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#if SIZEOF_DOUBLE == 2 * SIZEOF_INT_P
							 | 
						
					
						
							
								
									
										
										
										
											2011-02-15 18:40:34 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    td.ts[0] = aux_stack[HEAP_ENTRY(1)];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    td.ts[1] = aux_stack[HEAP_ENTRY(3)];  /* jump the first extension mark */
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-07 04:34:48 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    heap_arity -= 4;
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    TOP_STACK = aux_stack = &aux_stack[4];  /* jump until the second extension mark */
							 | 
						
					
						
							
								
									
										
										
										
											2007-04-26 14:13:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#else /* SIZEOF_DOUBLE == SIZEOF_INT_P */
							 | 
						
					
						
							
								
									
										
										
										
											2011-02-15 18:40:34 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    td.ts[0] = aux_stack[HEAP_ENTRY(1)];
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-07 04:34:48 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    heap_arity -= 2;
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    TOP_STACK = aux_stack = &aux_stack[2];  /* jump until the extension mark */
							 | 
						
					
						
							
								
									
										
										
										
											2007-04-26 14:13:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								#endif /* SIZEOF_DOUBLE x SIZEOF_INT_P */
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    TOP_STACK[HEAP_ARITY_ENTRY] = heap_arity;
							 | 
						
					
						
							
								
									
										
										
										
											2011-02-15 18:40:34 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    t = MkFloatTerm(td.dbl);
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    aux_stack_term_instr();
							 | 
						
					
						
							
								
									
										
										
										
											2005-06-03 08:19:18 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  ENDPBOp();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  BOp(trie_trust_double, e)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    Yap_Error(INTERNAL_ERROR, TermNil, "trie_trust_double: invalid instruction");
							 | 
						
					
						
							
								
									
										
										
										
											2008-09-05 18:34:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  ENDBOp();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  BOp(trie_try_double, e)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    Yap_Error(INTERNAL_ERROR, TermNil, "trie_try_double: invalid instruction");
							 | 
						
					
						
							
								
									
										
										
										
											2006-01-17 14:10:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  ENDBOp();
							 | 
						
					
						
							
								
									
										
										
										
											2005-06-03 08:19:18 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  BOp(trie_retry_double, e)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    Yap_Error(INTERNAL_ERROR, TermNil, "trie_retry_double: invalid instruction");
							 | 
						
					
						
							
								
									
										
										
										
											2006-01-17 14:10:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  ENDBOp();
							 | 
						
					
						
							
								
									
										
										
										
											2005-06-03 08:19:18 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  PBOp(trie_do_longint, e)
							 | 
						
					
						
							
								
									
										
										
										
											2005-06-04 07:28:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register ans_node_ptr node = (ans_node_ptr) PREG;
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    register CELL *aux_stack = TOP_STACK;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int heap_arity = aux_stack[HEAP_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int vars_arity = aux_stack[VARS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int subs_arity = aux_stack[SUBS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    Term t = MkLongIntTerm(aux_stack[HEAP_ENTRY(1)]);
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-17 17:14:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-08-07 04:34:48 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    heap_arity -= 2;
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    TOP_STACK = aux_stack = &aux_stack[2];  /* jump until the extension mark */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    TOP_STACK[HEAP_ARITY_ENTRY] = heap_arity;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    aux_stack_term_instr();
							 | 
						
					
						
							
								
									
										
										
										
											2005-06-04 07:28:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  ENDPBOp();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-17 17:14:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  BOp(trie_trust_longint, e)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    Yap_Error(INTERNAL_ERROR, TermNil, "trie_trust_longint: invalid instruction");
							 | 
						
					
						
							
								
									
										
										
										
											2008-09-05 18:34:26 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  ENDBOp();
							 | 
						
					
						
							
								
									
										
										
										
											2005-06-04 07:28:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2009-06-17 17:14:16 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  BOp(trie_try_longint, e)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    Yap_Error(INTERNAL_ERROR, TermNil, "trie_try_longint: invalid instruction");
							 | 
						
					
						
							
								
									
										
										
										
											2006-01-17 14:10:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  ENDBOp();
							 | 
						
					
						
							
								
									
										
										
										
											2005-06-04 07:28:24 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  BOp(trie_retry_longint, e)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    Yap_Error(INTERNAL_ERROR, TermNil, "trie_retry_longint: invalid instruction");
							 | 
						
					
						
							
								
									
										
										
										
											2006-01-17 14:10:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  ENDBOp();
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2014-01-17 09:39:29 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  PBOp(trie_do_bigint, e)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    register ans_node_ptr node = (ans_node_ptr) PREG;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    register CELL *aux_stack = TOP_STACK;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int heap_arity = aux_stack[HEAP_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int vars_arity = aux_stack[VARS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int subs_arity = aux_stack[SUBS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    Term t = AbsAppl((CELL*)aux_stack[HEAP_ENTRY(1)]);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    heap_arity -= 2;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    TOP_STACK = aux_stack = &aux_stack[2];  /* jump until the extension mark */
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    TOP_STACK[HEAP_ARITY_ENTRY] = heap_arity;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    aux_stack_term_instr();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  ENDPBOp();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  BOp(trie_trust_bigint, e)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    Yap_Error(INTERNAL_ERROR, TermNil, "trie_trust_bigint: invalid instruction");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  ENDBOp();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  BOp(trie_try_bigint, e)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    Yap_Error(INTERNAL_ERROR, TermNil, "trie_try_bigint: invalid instruction");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  ENDBOp();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  BOp(trie_retry_bigint, e)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    Yap_Error(INTERNAL_ERROR, TermNil, "trie_retry_bigint: invalid instruction");
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  ENDBOp();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2010-04-15 01:09:59 +01:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								  PBOp(trie_do_gterm, e)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    register ans_node_ptr node = (ans_node_ptr) PREG;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    register CELL *aux_stack = TOP_STACK;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int heap_arity = 0;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int vars_arity = aux_stack[VARS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int subs_arity = aux_stack[SUBS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    TOP_STACK = exec_substitution((gt_node_ptr)TrNode_entry(node), aux_stack);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    next_instruction(subs_arity - 1 , node);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  ENDPBOp();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  PBOp(trie_trust_gterm, e)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    register ans_node_ptr node = (ans_node_ptr) PREG;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    register CELL *aux_stack = (CELL *) (B + 1);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int heap_arity = 0;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int vars_arity = aux_stack[VARS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int subs_arity = aux_stack[SUBS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    pop_trie_node();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    TOP_STACK = exec_substitution((gt_node_ptr)TrNode_entry(node), aux_stack);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    next_instruction(subs_arity - 1 , node);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  ENDPBOp();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  PBOp(trie_try_gterm, e)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    register ans_node_ptr node = (ans_node_ptr) PREG;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    register CELL *aux_stack = TOP_STACK;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int heap_arity = 0;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int vars_arity = aux_stack[VARS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int subs_arity = aux_stack[SUBS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    store_trie_node(TrNode_next(node));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    TOP_STACK = exec_substitution((gt_node_ptr)TrNode_entry(node), aux_stack);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    next_instruction(subs_arity - 1, node); 
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  ENDPBOp();
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  PBOp(trie_retry_gterm, e)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    register ans_node_ptr node = (ans_node_ptr) PREG;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    register CELL *aux_stack = (CELL *) (B + 1);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int heap_arity = 0;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int vars_arity = aux_stack[VARS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    int subs_arity = aux_stack[SUBS_ARITY_ENTRY];
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    restore_trie_node(TrNode_next(node));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    TOP_STACK = exec_substitution((gt_node_ptr)TrNode_entry(node), aux_stack);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    next_instruction(subs_arity - 1, node); 
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								  ENDPBOp();
							 |