2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%  Logtalk - Object oriented extension to Prolog
							 | 
						
					
						
							
								
									
										
										
										
											2002-10-07 10:55:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%  Release 2.14.4
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							
								
									
										
										
										
											2002-01-07 22:57:06 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%  Copyright (c) 1998-2002 Paulo Moura.  All Rights Reserved.
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%  operators
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% message sending operators
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								:- op(600, xfy, ::).						% send to object
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								:- op(600,  fy, ::).						% send to self
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								:- op(600,  fx, ^^).						% super call
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% mode operators
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								:- op(200, fy, +).							% input argument (instantiated)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								:- op(200, fy, ?).							% input/output argument
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								:- op(200, fy, @).							% input argument (not modified by the call)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								:- op(200, fy, -).							% output argument (not instantiated)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%  runtime directives
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% tables of defined events and monitors
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								:- dynamic('$lgt_before_'/5).				% '$lgt_before_'(Obj, Msg, Sender, Monitor, Call)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								:- dynamic('$lgt_after_'/5).				% '$lgt_after_'(Obj, Msg, Sender, Monitor, Call)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% tables of loaded entities and respective relationships
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								:- dynamic('$lgt_current_protocol_'/2).			% '$lgt_current_protocol_'(Ptc, Prefix)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								:- dynamic('$lgt_current_category_'/2).			% '$lgt_current_category_'(Ctg, Prefix)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								:- dynamic('$lgt_current_object_'/5).			% '$lgt_current_object_'(Obj, Prefix, Dcl, Def, Super)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								:- dynamic('$lgt_implements_protocol_'/3).		% '$lgt_implements_protocol_'(ObjOrCtg, Ptc, Scope)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								:- dynamic('$lgt_imports_category_'/3).			% '$lgt_imports_category_'(Obj, Ctg, Scope)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								:- dynamic('$lgt_instantiates_class_'/3).		% '$lgt_instantiates_class_'(Instance, Class, Scope)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								:- dynamic('$lgt_specializes_class_'/3).		% '$lgt_specializes_class_'(Class, Superclass, Scope)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								:- dynamic('$lgt_extends_protocol_'/3).			% '$lgt_extends_protocol_'(Ptc1, Ptc2, Scope)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								:- dynamic('$lgt_extends_object_'/3).			% '$lgt_extends_object_'(Prototype, Parent, Scope)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%  pre-processor directives
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								:- dynamic('$lgt_dcl_'/1).						% '$lgt_dcl_'(Clause)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								:- dynamic('$lgt_ddcl_'/1).						% '$lgt_ddcl_'(Clause)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								:- dynamic('$lgt_def_'/1).						% '$lgt_def_'(Clause)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								:- dynamic('$lgt_ddef_'/1).						% '$lgt_ddef_'(Clause)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								:- dynamic('$lgt_super_'/1).					% '$lgt_super_'(Clause)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								:- dynamic('$lgt_dynamic_'/1).					% '$lgt_dynamic_'(Functor/Arity)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								:- dynamic('$lgt_discontiguous_'/1).			% '$lgt_discontiguous_'(Functor/Arity)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								:- dynamic('$lgt_mode_'/2).						% '$lgt_mode_'(Mode, Determinism)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								:- dynamic('$lgt_public_'/1).					% '$lgt_public_'(Functor/Arity)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								:- dynamic('$lgt_protected_'/1).				% '$lgt_protected_'(Functor/Arity)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								:- dynamic('$lgt_private_'/1).					% '$lgt_private_'(Functor/Arity)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								:- dynamic('$lgt_metapredicate_'/1).			% '$lgt_metapredicate_'(Pred)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								:- dynamic('$lgt_object_'/9).					% '$lgt_object_'(Obj, Prefix, Dcl, Def, Super, IDcl, IDef, DDcl, DDef)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								:- dynamic('$lgt_category_'/4).					% '$lgt_category_'(Ctg, Prefix, Dcl, Def)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								:- dynamic('$lgt_protocol_'/3).					% '$lgt_protocol_'(Ptc, Prefix, Dcl)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								:- dynamic('$lgt_uses_'/1).						% '$lgt_uses_'(Entity)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								:- dynamic('$lgt_calls_'/1).					% '$lgt_calls_'(Entity)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								:- dynamic('$lgt_info_'/1).						% '$lgt_info_'(List)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								:- dynamic('$lgt_info_'/2).						% '$lgt_info_'(Functor/Arity, List)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								:- dynamic('$lgt_implemented_protocol_'/4).		% '$lgt_implemented_protocol_'(Ptc, Prefix, Dcl, Scope)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								:- dynamic('$lgt_imported_category_'/5).		% '$lgt_imported_category_'(Ctg, Prefix, Dcl, Def, Scope)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								:- dynamic('$lgt_extended_object_'/10).			% '$lgt_extended_object_'(Parent, Prefix, Dcl, Def, Super, IDcl, IDef, DDcl, DDef, Scope)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								:- dynamic('$lgt_instantiated_class_'/10).		% '$lgt_instantiated_class_'(Class, Prefix, Dcl, Def, Super, IDcl, IDef, DDcl, DDef, Scope)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								:- dynamic('$lgt_specialized_class_'/10).		% '$lgt_specialized_class_'(Superclass, Prefix, Dcl, Def, Super, IDcl, IDef, DDcl, DDef, Scope)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								:- dynamic('$lgt_extended_protocol_'/4).		% '$lgt_extended_protocol_'(Ptc2, Prefix, Dcl, Scope)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								:- dynamic('$lgt_entity_'/4).					% '$lgt_entity_'(Type, Entity, Prefix, Dcl)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								:- dynamic('$lgt_entity_functors_'/1).			% '$lgt_entity_functors_'(Clause)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								:- dynamic('$lgt_entity_init_'/1).				% '$lgt_entity_init_'(Goal)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								:- dynamic('$lgt_fentity_init_'/1).				% '$lgt_fentity_init_'(Goal)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								:- dynamic('$lgt_entity_comp_mode_'/1).			% '$lgt_entity_comp_mode_'(Type)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								:- dynamic('$lgt_redefined_built_in_'/3).		% '$lgt_redefined_built_in_'(Head, Context, THead)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								:- dynamic('$lgt_directive_'/1).				% '$lgt_directive_'(Dir)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								:- dynamic('$lgt_rclause_'/1).					% '$lgt_rclause_'(Clause)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								:- dynamic('$lgt_eclause_'/1).					% '$lgt_eclause_'(Clause)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								:- dynamic('$lgt_feclause_'/1).					% '$lgt_feclause_'(Clause)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								:- dynamic('$lgt_defs_pred_'/1).				% '$lgt_defs_pred_'(Functor/Arity)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								:- dynamic('$lgt_calls_pred_'/1).				% '$lgt_calls_pred_'(Functor/Arity)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								:- dynamic('$lgt_current_compiler_option_'/2).	% '$lgt_current_compiler_option_'(Option, Value)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								:- dynamic('$lgt_flag_'/2).						% '$lgt_flag_'(Option, Value)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								:- dynamic('$lgt_referenced_object_'/1).		% '$lgt_referenced_object_'(Object)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								:- dynamic('$lgt_referenced_protocol_'/1).		% '$lgt_referenced_protocol_'(Protocol)
							 | 
						
					
						
							
								
									
										
										
										
											2002-08-26 16:45:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								:- dynamic('$lgt_referenced_category_'/1).		% '$lgt_referenced_category_'(Category)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%  top level runtime predicate for message sending: ::/2
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								Obj::Pred :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									var(Obj),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(instantiation_error, Obj::Pred, user)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								Obj::Pred :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									var(Pred),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(instantiation_error, Obj::Pred, user)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								Obj::Pred :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_sender'(Context, user),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_this'(Context, user),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_self'(Context, Obj),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_msg'(Obj, Pred, Call, Context),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									call(Call).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%  built-in predicates
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% current_object(?object_identifier)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								current_object(Obj) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Obj),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_valid_object_id'(Obj),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(object_identifier, Obj), current_object(Obj))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								current_object(Obj) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_current_object_'(Obj, _, _, _, _).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% current_protocol(?protocol_identifier)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								current_protocol(Ptc) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Ptc),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_valid_protocol_id'(Ptc),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(protocol_identifier, Ptc), current_protocol(Ptc))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								current_protocol(Ptc) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_current_protocol_'(Ptc, _).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% current_category(?category_identifier)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								current_category(Ctg) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Ctg),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_valid_category_id'(Ctg),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(category_identifier, Ctg), current_category(Ctg))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								current_category(Ctg) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_current_category_'(Ctg, _).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% object_property(?object_identifier, ?object_property)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								object_property(Obj, Prop) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Obj),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_valid_object_id'(Obj),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(object_identifier, Obj), object_property(Obj, Prop))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								object_property(Obj, Prop) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Prop),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_member'(Prop, [(dynamic), static, built_in]),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(domain_error(object_property, Prop), object_property(Obj, Prop))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								object_property(user, built_in).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								object_property(Obj, Prop) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_current_object_'(Obj, Prefix, _, _, _),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									functor(Pred, Prefix, 7),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									('$lgt_predicate_property'(Pred, (dynamic)) ->
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										Prop = (dynamic)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										Prop = static).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% category_property(?category_identifier, ?category_property)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								category_property(Ctg, Prop) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Ctg),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_valid_category_id'(Ctg),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(category_identifier, Ctg), category_property(Ctg, Prop))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								category_property(Ctg, Prop) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Prop),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_member'(Prop, [(dynamic), static, built_in]),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(domain_error(category_property, Prop), category_property(Ctg, Prop))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								category_property(Ctg, Prop) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_current_category_'(Ctg, Prefix),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									functor(Pred, Prefix, 2),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									('$lgt_predicate_property'(Pred, (dynamic)) ->
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										Prop = (dynamic)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										Prop = static).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% protocol_property(?protocol_identifier, ?protocol_property)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								protocol_property(Ptc, Prop) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Ptc),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_valid_protocol_id'(Ptc),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(protocol_identifier, Ptc), protocol_property(Ptc, Prop))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								protocol_property(Ptc, Prop) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Prop),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_member'(Prop, [(dynamic), static, built_in]),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(domain_error(protocol_property, Prop), protocol_property(Ptc, Prop))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								protocol_property(Ptc, Prop) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_current_protocol_'(Ptc, Prefix),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									functor(Pred, Prefix, 1),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									('$lgt_predicate_property'(Pred, (dynamic)) ->
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										Prop = (dynamic)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										Prop = static).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% create_object(+object_identifier, +list, +list, +list)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								create_object(Obj, Rels, Dirs, Clauses) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									var(Obj),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(instantiation_error, create_object(Obj, Rels, Dirs, Clauses))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								create_object(Obj, Rels, Dirs, Clauses) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_valid_object_id'(Obj),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(object_identifier, Obj), create_object(Obj, Rels, Dirs, Clauses))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								create_object(Obj, Rels, Dirs, Clauses) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_current_object_'(Obj, _, _, _, _),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(permission_error(replace, object, Obj), create_object(Obj, Rels, Dirs, Clauses))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								create_object(Obj, Rels, Dirs, Clauses) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_current_category_'(Obj, _),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(permission_error(replace, category, Obj), create_object(Obj, Rels, Dirs, Clauses))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								create_object(Obj, Rels, Dirs, Clauses) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_current_protocol_'(Obj, _),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(permission_error(replace, protocol, Obj), create_object(Obj, Rels, Dirs, Clauses))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								create_object(Obj, Rels, Dirs, Clauses) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									(var(Rels); \+ '$lgt_proper_list'(Rels)),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(list, Rels), create_object(Obj, Rels, Dirs, Clauses))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								create_object(Obj, Rels, Dirs, Clauses) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									(var(Dirs); \+ '$lgt_proper_list'(Dirs)),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(list, Dirs), create_object(Obj, Rels, Dirs, Clauses))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								create_object(Obj, Rels, Dirs, Clauses) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									(var(Clauses); \+ '$lgt_proper_list'(Clauses)),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(list, Clauses), create_object(Obj, Rels, Dirs, Clauses))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								create_object(Obj, Rels, Dirs, Clauses) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_clean_up',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_directive'(object, [Obj| Rels]),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_directives'([(dynamic)| Dirs]),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_clauses'(Clauses),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_fix_redef_built_ins',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_gen_object_clauses',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_gen_object_directives',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_assert_tr_entity',
							 | 
						
					
						
							
								
									
										
										
										
											2002-08-26 16:45:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_report_unknown_entities',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_clean_up'.
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% create_category(+category_identifier, +list, +list, +list)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								create_category(Ctg, Rels, Dirs, Clauses) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									var(Ctg),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(instantiation_error, create_category(Ctg, Rels, Dirs, Clauses))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								create_category(Ctg, Rels, Dirs, Clauses) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_valid_category_id'(Ctg),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(category_identifier, Ctg), create_category(Ctg, Rels, Dirs, Clauses))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								create_category(Ctg, Rels, Dirs, Clauses) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_current_category_'(Ctg, _),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(permission_error(replace, category, Ctg), create_category(Ctg, Rels, Dirs, Clauses))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								create_category(Ctg, Rels, Dirs, Clauses) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_current_object_'(Ctg, _, _, _, _),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(permission_error(replace, object, Ctg), create_category(Ctg, Rels, Dirs, Clauses))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								create_category(Ctg, Rels, Dirs, Clauses) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_current_protocol_'(Ctg, _),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(permission_error(replace, protocol, Ctg), create_category(Ctg, Rels, Dirs, Clauses))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								create_category(Ctg, Rels, Dirs, Clauses) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									(var(Rels); \+ '$lgt_proper_list'(Rels)),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(list, Rels), create_category(Ctg, Rels, Dirs, Clauses))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								create_category(Ctg, Rels, Dirs, Clauses) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									(var(Dirs); \+ '$lgt_proper_list'(Dirs)),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(list, Dirs), create_category(Ctg, Rels, Dirs, Clauses))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								create_category(Ctg, Rels, Dirs, Clauses) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									(var(Clauses); \+ '$lgt_proper_list'(Clauses)),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(list, Clauses), create_category(Ctg, Rels, Dirs, Clauses))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								create_category(Ctg, Rels, Dirs, Clauses) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_clean_up',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_directive'(category, [Ctg| Rels]),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_directives'([(dynamic)| Dirs]),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_clauses'(Clauses),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_fix_redef_built_ins',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_gen_category_clauses',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_gen_category_directives',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_assert_tr_entity',
							 | 
						
					
						
							
								
									
										
										
										
											2002-08-26 16:45:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_report_unknown_entities',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_clean_up'.
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% create_protocol(+protocol_identifier, +list, +list)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								create_protocol(Ptc, Rels, Dirs) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									var(Ptc),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(instantiation_error, create_protocol(Ptc, Rels, Dirs))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								create_protocol(Ptc, Rels, Dirs) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_valid_protocol_id'(Ptc),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(protocol_identifier, Ptc), create_protocol(Ptc, Rels, Dirs))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								create_protocol(Ptc, Rels, Dirs) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_current_protocol_'(Ptc, _),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(permission_error(replace, protocol, Ptc), create_protocol(Ptc, Rels, Dirs))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								create_protocol(Ptc, Rels, Dirs) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_current_object_'(Ptc, _, _, _, _),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(permission_error(replace, object, Ptc), create_protocol(Ptc, Rels, Dirs))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								create_protocol(Ptc, Rels, Dirs) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_current_category_'(Ptc, _),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(permission_error(replace, category, Ptc), create_protocol(Ptc, Rels, Dirs))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								create_protocol(Ptc, Rels, Dirs) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									(var(Rels); \+ '$lgt_proper_list'(Rels)),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(list, Rels), create_protocol(Ptc, Rels, Dirs))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								create_protocol(Ptc, Rels, Dirs) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									(var(Dirs); \+ '$lgt_proper_list'(Dirs)),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(list, Dirs), create_protocol(Ptc, Rels, Dirs))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								create_protocol(Ptc, Rels, Dirs) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_clean_up',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_directive'(protocol, [Ptc| Rels]),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_directives'([(dynamic)| Dirs]),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_gen_protocol_clauses',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_gen_protocol_directives',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_assert_tr_entity',
							 | 
						
					
						
							
								
									
										
										
										
											2002-08-26 16:45:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_report_unknown_entities',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_clean_up'.
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% abolish_object(@object_identifier)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								abolish_object(Obj) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									var(Obj),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(instantiation_error, abolish_object(Obj))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								abolish_object(Obj) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_valid_object_id'(Obj),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(object_identifier, Obj), abolish_object(Obj))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								abolish_object(Obj) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_current_object_'(Obj, Prefix, _, _, _) ->
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										(object_property(Obj, (dynamic)) ->
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											'$lgt_once'(Prefix, Dcl, Def, Super, IDcl, IDef, DDcl, DDef),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
											forall(
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												'$lgt_call'(Def, _, _, _, _, Pred),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
												(functor(Pred, Functor, Arity),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												 abolish(Functor/Arity))),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											forall(
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												'$lgt_call'(DDef, _, _, _, _, Pred),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
												(functor(Pred, Functor, Arity),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												 abolish(Functor/Arity))),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											abolish(Dcl/4),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											abolish(Dcl/6),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											abolish(Def/5),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											abolish(Def/6),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											abolish(Super/6),
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											abolish(IDcl/6),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											abolish(IDef/6),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
											abolish(DDcl/4),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											abolish(DDef/5),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											abolish(Prefix/7),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											retractall('$lgt_current_object_'(Obj, _, _, _, _)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											retractall('$lgt_extends_object_'(Obj, _, _)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											retractall('$lgt_instantiates_class_'(Obj, _, _)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											retractall('$lgt_specializes_class_'(Obj, _, _)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											retractall('$lgt_implements_protocol_'(Obj, _, _)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											retractall('$lgt_imports_category_'(Obj, _, _))			
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
											;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											throw(error(permission_error(modify, static_object, Obj), abolish_object(Obj))))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										throw(error(existence_error(object, Obj), abolish_object(Obj))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% abolish_category(@category_identifier)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								abolish_category(Ctg) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									var(Ctg),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(instantiation_error, abolish_category(Ctg))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								abolish_category(Ctg) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_valid_category_id'(Ctg),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(category_identifier, Ctg), abolish_category(Ctg))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								abolish_category(Ctg) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_current_category_'(Ctg, Prefix) ->
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										(category_property(Ctg, (dynamic)) ->
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											'$lgt_once'(Prefix, Dcl, Def),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
											forall(
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												'$lgt_call'(Def, _, _, _, _, Pred),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
												(functor(Pred, Functor, Arity),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												 abolish(Functor/Arity))),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											abolish(Dcl/4),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											abolish(Dcl/5),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											abolish(Def/5),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											abolish(Prefix/2),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											retractall('$lgt_current_category_'(Ctg, _)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											retractall('$lgt_implements_protocol_'(Ctg, _, _))
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
											;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											throw(error(permission_error(modify, static_category, Ctg), abolish_category(Ctg))))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										throw(error(existence_error(category, Ctg), abolish_category(Ctg))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% abolish_protocol(@protocol_identifier)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								abolish_protocol(Ptc) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									var(Ptc),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(instantiation_error, abolish_protocol(Ptc))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								abolish_protocol(Ptc) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_valid_protocol_id'(Ptc),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(protocol_identifier, Ptc), abolish_protocol(Ptc))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								abolish_protocol(Ptc) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_current_protocol_'(Ptc, Prefix) ->
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										(protocol_property(Ptc, (dynamic)) ->
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											'$lgt_once'(Prefix, Dcl),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
											abolish(Dcl/4),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											abolish(Dcl/5),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											abolish(Prefix/1),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											retractall('$lgt_current_protocol_'(Ptc, _)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											retractall('$lgt_extends_protocol_'(Ptc, _, _))
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
											;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											throw(error(permission_error(modify, static_protocol, Ptc), abolish_protocol(Ptc))))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										throw(error(existence_error(protocol, Ptc), abolish_protocol(Ptc))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% implements_protocol(?term, ?atom)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								implements_protocol(Entity, Ptc) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									catch(
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										implements_protocol(Entity, Ptc, _),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										error(Error, _),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										throw(error(Error, implements_protocol(Entity, Ptc)))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% implements_protocol(?term, ?atom, ?atom)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								implements_protocol(Entity, Ptc, Scope) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Entity),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_valid_object_id'(Entity),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(object_identifier, Entity), implements_protocol(Entity, Ptc, Scope))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								implements_protocol(Entity, Ptc, Scope) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Ptc),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_valid_protocol_id'(Ptc),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(protocol_identifier, Ptc), implements_protocol(Entity, Ptc, Scope))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								implements_protocol(Entity, Ptc, Scope) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Scope),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_member'(Scope, [(public), protected, private]),
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(scope, Scope), implements_protocol(Entity, Ptc, Scope))).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								implements_protocol(Entity, Ptc, Scope) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_implements_protocol_'(Entity, Ptc, Scope).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% imports_category(?term, ?term)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								imports_category(Obj, Ctg) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									catch(
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										imports_category(Obj, Ctg, _),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										error(Error, _),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										throw(error(Error, imports_category(Obj, Ctg)))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% imports_category(?term, ?term, ?atom)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								imports_category(Obj, Ctg, Scope) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Obj),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_valid_object_id'(Obj),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(object_identifier, Obj), imports_category(Obj, Ctg, Scope))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								imports_category(Obj, Ctg, Scope) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Ctg),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_valid_category_id'(Ctg),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(category_identifier, Ctg), imports_category(Obj, Ctg, Scope))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								imports_category(Obj, Ctg, Scope) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Scope),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_member'(Scope, [(public), protected, private]),
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(scope, Scope), imports_category(Obj, Ctg, Scope))).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								imports_category(Obj, Ctg, Scope) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_imports_category_'(Obj, Ctg, Scope).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% instantiates_class(?term, ?term)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								instantiates_class(Obj, Class) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									catch(
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										instantiates_class(Obj, Class, _),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										error(Error, _),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										throw(error(Error, instantiates_class(Obj, Class)))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% instantiates_class(?term, ?term, ?atom)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								instantiates_class(Obj, Class, Scope) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Obj),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_valid_object_id'(Obj),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(object_identifier, Obj), instantiates_class(Obj, Class, Scope))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								instantiates_class(Obj, Class, Scope) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Class),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_valid_object_id'(Class),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(object_identifier, Class), instantiates_class(Obj, Class, Scope))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								instantiates_class(Obj, Class, Scope) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Scope),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_member'(Scope, [(public), protected, private]),
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(scope, Scope), instantiates_class(Obj, Class, Scope))).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								instantiates_class(Obj, Class, Scope) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_instantiates_class_'(Obj, Class, Scope).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% specializes_class(?term, ?term)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								specializes_class(Class, Superclass) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									catch(
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										specializes_class(Class, Superclass, _),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										error(Error, _),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										throw(error(Error, specializes_class(Class, Superclass)))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% specializes_class(?term, ?term, ?atom)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								specializes_class(Class, Superclass, Scope) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Class),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_valid_object_id'(Class),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(object_identifier, Class), specializes_class(Class, Superclass, Scope))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								specializes_class(Class, Superclass, Scope) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Superclass),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_valid_object_id'(Superclass),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(object_identifier, Superclass), specializes_class(Class, Superclass, Scope))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								specializes_class(Class, Superclass, Scope) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Scope),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_member'(Scope, [(public), protected, private]),
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(scope, Scope), specializes_class(Class, Superclass, Scope))).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								specializes_class(Class, Superclass, Scope) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_specializes_class_'(Class, Superclass, Scope).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% extends_protocol(?atom, ?atom)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								extends_protocol(Ptc1, Ptc2) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									catch(
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										extends_protocol(Ptc1, Ptc2, _),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										error(Error, _),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										throw(error(Error, extends_protocol(Ptc1, Ptc2)))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% extends_protocol(?atom, ?atom, ?atom)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								extends_protocol(Ptc1, Ptc2, Scope) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Ptc1),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_valid_protocol_id'(Ptc1),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(protocol_identifier, Ptc1), extends_protocol(Ptc1, Ptc2, Scope))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								extends_protocol(Ptc1, Ptc2, Scope) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Ptc2),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_valid_protocol_id'(Ptc2),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(protocol_identifier, Ptc2), extends_protocol(Ptc1, Ptc2, Scope))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								extends_protocol(Ptc1, Ptc2, Scope) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Scope),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_member'(Scope, [(public), protected, private]),
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(scope, Scope), extends_protocol(Ptc1, Ptc2, Scope))).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								extends_protocol(Ptc1, Ptc2, Scope) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_extends_protocol_'(Ptc1, Ptc2, Scope).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% extends_object(?term, ?term)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								extends_object(Prototype, Parent) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									catch(
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										extends_object(Prototype, Parent, _),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										error(Error, _),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										throw(error(Error, extends_object(Prototype, Parent)))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% extends_object(?term, ?term, ?atom)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								extends_object(Prototype, Parent, Scope) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Prototype),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_valid_object_id'(Prototype),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(object_identifier, Prototype), extends_object(Prototype, Parent, Scope))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								extends_object(Prototype, Parent, Scope) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Parent),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_valid_object_id'(Parent),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(object_identifier, Parent), extends_object(Prototype, Parent, Scope))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								extends_object(Prototype, Parent, Scope) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Scope),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_member'(Scope, [(public), protected, private]),
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(scope, Scope), extends_object(Prototype, Parent, Scope))).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								extends_object(Prototype, Parent, Scope) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_extends_object_'(Prototype, Parent, Scope).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% current_event(?event, ?object_identifier, ?callable, ?object_identifier, ?object_identifier)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								current_event(Event, Obj, Msg, Sender, Monitor) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Event),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Event \= before,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Event \= after,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(event, Event), current_event(Event, Obj, Msg, Sender, Monitor))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								current_event(Event, Obj, Msg, Sender, Monitor) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Obj),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_valid_object_id'(Obj),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(object_identifier, Obj), current_event(Event, Obj, Msg, Sender, Monitor))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								current_event(Event, Obj, Msg, Sender, Monitor) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Msg),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_callable'(Msg),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(callable, Msg), current_event(Event, Obj, Msg, Sender, Monitor))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								current_event(Event, Obj, Msg, Sender, Monitor) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Sender),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_valid_object_id'(Sender),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(object_identifier, Sender), current_event(Event, Obj, Msg, Sender, Monitor))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								current_event(Event, Obj, Msg, Sender, Monitor) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Monitor),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_valid_object_id'(Monitor),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(object_identifier, Monitor), current_event(Event, Obj, Msg, Sender, Monitor))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								current_event(before, Obj, Msg, Sender, Monitor) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_before_'(Obj, Msg, Sender, Monitor, _).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								current_event(after, Obj, Msg, Sender, Monitor) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_after_'(Obj, Msg, Sender, Monitor, _).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%define_events(@event, @object_identifier, @callable, @object_identifier, +object_identifier)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								define_events(Event, Obj, Msg, Sender, Monitor) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Event),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Event \= before,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Event \= after,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(event, Event), define_events(Event, Obj, Msg, Sender, Monitor))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								define_events(Event, Obj, Msg, Sender, Monitor) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Obj),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_valid_object_id'(Obj),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(object_identifier, Obj), define_events(Event, Obj, Msg, Sender, Monitor))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								define_events(Event, Obj, Msg, Sender, Monitor) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Msg),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_callable'(Msg),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(callable, Msg), define_events(Event, Obj, Msg, Sender, Monitor))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								define_events(Event, Obj, Msg, Sender, Monitor) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Sender),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_valid_object_id'(Sender),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(object_identifier, Sender), define_events(Event, Obj, Msg, Sender, Monitor))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								define_events(Event, Obj, Msg, Sender, Monitor) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									var(Monitor),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(instantiation_error, define_events(Event, Obj, Msg, Sender, Monitor))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								define_events(Event, Obj, Msg, Sender, Monitor) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Monitor),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_valid_object_id'(Monitor),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(object_identifier, Monitor), define_events(Event, Obj, Msg, Sender, Monitor))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								define_events(Event, Obj, Msg, Sender, Monitor) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									var(Event),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_current_object_'(Monitor, _, _, Def, _),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_call'(Def, before(Obj, Msg, Sender), Monitor, Monitor, Monitor, BCall, _),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_call'(Def, after(Obj, Msg, Sender), Monitor, Monitor, Monitor, ACall, _),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									retractall('$lgt_before_'(Obj, Msg, Sender, Monitor, _)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_before_'(Obj, Msg, Sender, Monitor, BCall)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									retractall('$lgt_after_'(Obj, Msg, Sender, Monitor, _)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_after_'(Obj, Msg, Sender, Monitor, ACall)).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								define_events(before, Obj, Msg, Sender, Monitor) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_current_object_'(Monitor, _, _, Def, _),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_call'(Def, before(Obj, Msg, Sender), Monitor, Monitor, Monitor, Call, _),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									retractall('$lgt_before_'(Obj, Msg, Sender, Monitor, _)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_before_'(Obj, Msg, Sender, Monitor, Call)).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								define_events(after, Obj, Msg, Sender, Monitor) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_current_object_'(Monitor, _, _, Def, _),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_call'(Def, after(Obj, Msg, Sender), Monitor, Monitor, Monitor, Call, _),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									retractall('$lgt_after_'(Obj, Msg, Sender, Monitor, _)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_after_'(Obj, Msg, Sender, Monitor, Call)).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% abolish_events(@event, @object_identifier, @callable, @object_identifier, @object_identifier)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								abolish_events(Event, Obj, Msg, Sender, Monitor) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Event),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Event \= before,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Event \= after,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(event, Event), abolish_events(Event, Obj, Msg, Sender, Monitor))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								abolish_events(Event, Obj, Msg, Sender, Monitor) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Obj),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_valid_object_id'(Obj),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(object_identifier, Obj), abolish_events(Event, Obj, Msg, Sender, Monitor))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								abolish_events(Event, Obj, Msg, Sender, Monitor) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Msg),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_callable'(Msg),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(callable, Msg), abolish_events(Event, Obj, Msg, Sender, Monitor))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								abolish_events(Event, Obj, Msg, Sender, Monitor) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Sender),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_valid_object_id'(Sender),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(object_identifier, Sender), abolish_events(Event, Obj, Msg, Sender, Monitor))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								abolish_events(Event, Obj, Msg, Sender, Monitor) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Monitor),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_valid_object_id'(Monitor),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(object_identifier, Monitor), abolish_events(Event, Obj, Msg, Sender, Monitor))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								abolish_events(Event, Obj, Msg, Sender, Monitor) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									var(Event),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									retractall('$lgt_before_'(Obj, Msg, Sender, Monitor, _)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									retractall('$lgt_after_'(Obj, Msg, Sender, Monitor, _)).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								abolish_events(before, Obj, Msg, Sender, Monitor) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									retractall('$lgt_before_'(Obj, Msg, Sender, Monitor, _)).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								abolish_events(after, Obj, Msg, Sender, Monitor) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									retractall('$lgt_after_'(Obj, Msg, Sender, Monitor, _)).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% compiling and loading built-in predicates
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_compiler_option'(+atom, ?atom)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% gets/check the current value of a compiler option
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_compiler_option'(Option, Value) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_current_compiler_option_'(Option, Value2),
							 | 
						
					
						
							
								
									
										
										
										
											2002-02-08 19:57:23 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Value = Value2.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_compiler_option'(Option, Value) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_flag_'(Option, Value2),
							 | 
						
					
						
							
								
									
										
										
										
											2002-02-08 19:57:23 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Value = Value2.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_compiler_option'(Option, Value) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_default_flag'(Option, Value).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% logtalk_compile(+list)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% compiles to disk a list of entities using default options
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								logtalk_compile(Entities) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									catch(
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										logtalk_compile(Entities, []),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										error(Error, _),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										throw(error(Error, logtalk_compile(Entities)))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% logtalk_compile(+list, +list)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% compiles to disk a list of entities using a list of options
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								logtalk_compile(Entities, Options) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									catch(
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										('$lgt_check_compiler_entities'(Entities),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										 '$lgt_check_compiler_options'(Options),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										 '$lgt_set_compiler_options'(Options),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										 '$lgt_compile_entities'(Entities)),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										Error,
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										throw(error(Error, logtalk_compile(Entities, Options)))).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_check_compiler_entities'(+list)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% check if the entities names are valid and if the corresponding
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% files exist in the current working directory
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_check_compiler_entities'(Entities) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									var(Entities),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(instantiation_error).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_check_compiler_entities'(Entities) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_proper_list'(Entities),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(type_error(list, Entities)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_check_compiler_entities'(Entities) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_check_compiler_entity_list'(Entities).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_check_compiler_entity_list'([]).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_check_compiler_entity_list'([Entity| Entities]) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_check_compiler_entity'(Entity),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_check_compiler_entity_list'(Entities).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_check_compiler_entity'(Entity) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									\+ atom(Entity),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(type_error(atom, Entity)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_check_compiler_entity'(Entity) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_file_name'(logtalk, Entity, File),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_file_exists'(File),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(existence_error(entity, Entity)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_check_compiler_entity'(_).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_check_compiler_options'(+list)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% check if the compiler options are valid
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_check_compiler_options'(Options) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									var(Options),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(instantiation_error).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_check_compiler_options'(Options) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_proper_list'(Options),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(type_error(list, Options)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_check_compiler_options'(Options) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_check_compiler_option_list'(Options).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_check_compiler_option_list'([]).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_check_compiler_option_list'([Option| Options]) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_check_compiler_option'(Option),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_check_compiler_option_list'(Options).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_check_compiler_option'(Option) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_valid_compiler_option'(Option) ->
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										true
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										throw(type_error(compiler_option, Option)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_set_compiler_options'(+list)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% sets the compiler options
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_set_compiler_options'(Options) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									retractall('$lgt_current_compiler_option_'(_, _)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_assert_compiler_options'(Options).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_assert_compiler_options'([]).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_assert_compiler_options'([Option| Options]) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Option =.. [Key, Value],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									asserta('$lgt_current_compiler_option_'(Key, Value)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_assert_compiler_options'(Options).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% logtalk_load(+list)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% compiles to disk and then loads to memory a 
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% list of entities using default options
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								logtalk_load(Entities) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									catch(
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										logtalk_load(Entities, []),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										error(Error, _),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										throw(error(Error, logtalk_load(Entities)))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% logtalk_load(+list, +list)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% compiles to disk and then loads to memory a 
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% list of entities using a list of options
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								logtalk_load(Entities, Options) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									catch(
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										('$lgt_check_compiler_entities'(Entities),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										 '$lgt_check_compiler_options'(Options),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										 '$lgt_set_compiler_options'(Options),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										 '$lgt_load_entities'(Entities)),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										Error,
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										throw(error(Error, logtalk_load(Entities, Options)))).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% logtalk_version(?integer, ?integer, ?integer)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								logtalk_version(Major, Minor, Patch) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Major),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									\+ integer(Major),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(integer, Major), logtalk_version(Major, Minor, Patch))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								logtalk_version(Major, Minor, Patch) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Minor),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									\+ integer(Minor),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(integer, Minor), logtalk_version(Major, Minor, Patch))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								logtalk_version(Major, Minor, Patch) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Patch),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									\+ integer(Patch),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(integer, Patch), logtalk_version(Major, Minor, Patch))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-10-07 10:55:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								logtalk_version(2, 14, 4).
							 | 
						
					
						
							
								
									
										
										
										
											2002-02-08 19:57:23 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% set_logtalk_flag(+atom, +nonvar)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% sets a Logtalk flag
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								set_logtalk_flag(Flag, Value) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									var(Flag),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(instantiation_error, set_logtalk_flag(Flag, Value))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								set_logtalk_flag(Flag, Value) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									var(Value),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(instantiation_error, set_logtalk_flag(Flag, Value))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								set_logtalk_flag(Flag, Value) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Flag),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									\+ atom(Flag),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(atom, Flag), set_logtalk_flag(Flag, Value))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								set_logtalk_flag(Flag, Value) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									atom(Flag),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_valid_flag'(Flag),
							 | 
						
					
						
							
								
									
										
										
										
											2002-02-08 19:57:23 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									throw(error(domain_error(valid_flag, Flag), set_logtalk_flag(Flag, Value))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								set_logtalk_flag(Flag, Value) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_read_only_flag'(Flag),
							 | 
						
					
						
							
								
									
										
										
										
											2002-05-28 11:29:37 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									throw(error(permission_error(modify, read_only_flag, Flag), set_logtalk_flag(Flag, Value))).
							 | 
						
					
						
							
								
									
										
										
										
											2002-02-08 19:57:23 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								set_logtalk_flag(Flag, Value) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_valid_flag'(Flag, Value),
							 | 
						
					
						
							
								
									
										
										
										
											2002-05-28 11:29:37 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									throw(error(domain_error(valid_flag_value, Value), set_logtalk_flag(Flag, Value))).
							 | 
						
					
						
							
								
									
										
										
										
											2002-02-08 19:57:23 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								set_logtalk_flag(Flag, Value) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									retractall('$lgt_flag_'(Flag, _)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_flag_'(Flag, Value)).
							 | 
						
					
						
							
								
									
										
										
										
											2002-02-08 19:57:23 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% current_logtalk_flag(?atom, ?nonvar)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% tests/gets Logtalk flags
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								current_logtalk_flag(Flag, Value) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Flag),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									\+ atom(Flag),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(atom, Flag), current_logtalk_flag(Flag, Value))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								current_logtalk_flag(Flag, Value) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									atom(Flag),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_valid_flag'(Flag),
							 | 
						
					
						
							
								
									
										
										
										
											2002-02-08 19:57:23 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									throw(error(domain_error(valid_flag, Flag), current_logtalk_flag(Flag, Value))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								current_logtalk_flag(Flag, Value) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_flag_'(Flag, Value).
							 | 
						
					
						
							
								
									
										
										
										
											2002-02-08 19:57:23 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								current_logtalk_flag(Flag, Value) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_flag_'(Flag, _),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_default_flag'(Flag, Value).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-10-07 10:55:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								current_logtalk_flag(version, version(2, 14, 4)).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%  built-in methods
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% current_predicate/1 built-in method
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_current_predicate'(Obj, Pred, Sender, _) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Pred),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Pred \= _/_,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(predicate_indicator, Pred), Obj::current_predicate(Pred), Sender)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_current_predicate'(Obj, Functor/Arity, Sender, _) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Functor),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									\+ atom(Functor),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(predicate_indicator, Functor/Arity), Obj::current_predicate(Functor/Arity), Sender)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_current_predicate'(Obj, Functor/Arity, Sender, _) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Arity),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									\+ (integer(Arity), Arity >= 0),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(predicate_indicator, Functor/Arity), Obj::current_predicate(Functor/Arity), Sender)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_current_predicate'(Obj, Functor/Arity, Sender, _) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_current_object_'(Obj, _, _, _, _),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(existence_error(object, Obj), Obj::current_predicate(Functor/Arity), Sender)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_current_predicate'(Obj, Functor/Arity, Sender, Scope) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Functor),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Arity),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									functor(Pred, Functor, Arity),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_current_object_'(Obj, _, Dcl, _, _),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_once'(Dcl, Pred, PScope, _, _, SContainer, _),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									once((\+ \+ PScope = Scope; Sender = SContainer)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_current_predicate'(Obj, Functor/Arity, Sender, Scope) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_current_object_'(Obj, _, Dcl, _, _),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									findall(
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										Functor/Arity-(PScope, SContainer),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										('$lgt_call'(Dcl, Pred, PScope, _, _, SContainer, _),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										 functor(Pred, Functor, Arity)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										Preds),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_cp_filter'(Preds, Filtered),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_member'(Functor/Arity-(PScope, SContainer), Filtered),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									once((\+ \+ PScope = Scope; Sender = SContainer)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_cp_filter'(+list, -list)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% removes duplicated and redeclared predicates 
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_cp_filter'([], []).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_cp_filter'([Data| Rest], [Data| Rest2]) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_cp_remove_all'(Rest, Data, Aux),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_cp_filter'(Aux, Rest2).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_cp_remove_all'([], _, []).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_cp_remove_all'([F/A-_| Rest], F/A-D, List) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_cp_remove_all'(Rest, F/A-D, List).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_cp_remove_all'([Data| Rest], Filter, [Data| Rest2]) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_cp_remove_all'(Rest, Filter, Rest2).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% predicate_property/2 built-in method
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_predicate_property'(Obj, Pred, Prop, Sender, _) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									var(Pred),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(instantiation_error, Obj::predicate_property(Pred, Prop), Sender)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_predicate_property'(Obj, Pred, Prop, Sender, _) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Prop),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_member'(Prop, [(public), protected, private, static, (dynamic), declared_in(_), defined_in(_), metapredicate(_), built_in]),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(domain_error(predicate_property, Prop), Obj::predicate_property(Pred, Prop), Sender)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_predicate_property'(Obj, Pred, Prop, Sender, _) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_callable'(Pred),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(callable, Pred), Obj::predicate_property(Pred, Prop), Sender)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_predicate_property'(Obj, Pred, Prop, Sender, _) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_current_object_'(Obj, _, _, _, _),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(existence_error(object, Obj), Obj::predicate_property(Pred, Prop), Sender)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_predicate_property'(Obj, Pred, Prop, Sender, Scope) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_current_object_'(Obj, _, Dcl, Def, _),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_once'(Dcl, Pred, PScope, Type, Meta, SContainer, TContainer),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									once((\+ \+ PScope = Scope; Sender = SContainer)),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									('$lgt_scope'(Prop, PScope);
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									 Prop = Type;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									 Prop = declared_in(TContainer);
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									 '$lgt_once'(Def, Pred, _, _, _, _, DContainer),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									 Prop = defined_in(DContainer);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									 Meta \= no,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									 Prop = metapredicate(Meta)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_predicate_property'(_, Pred, Prop, _, Scope) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_built_in_method'(Pred, PScope),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									\+ \+ PScope = Scope,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									('$lgt_scope'(Prop, PScope);
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									 Prop = static;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									 Prop = built_in).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_predicate_property'(_, Pred, Prop, _, _) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_built_in'(Pred),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									functor(Pred, Functor, Arity),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									functor(Meta, Functor, Arity),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									(Prop = (public);
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									 ('$lgt_predicate_property'(Pred, (dynamic)) -> Prop = (dynamic); Prop = static);
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									 Prop = built_in;
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									 ('$lgt_pl_metapredicate'(Meta) -> Prop = metapredicate(Meta))).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_scope'(?atom, ?term).
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% converts between user and system scope terms
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_scope'(private, p).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_scope'(protected, p(p)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_scope'((public), p(p(p))).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% abolish/1 built-in method
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_abolish'(Obj, Pred, Sender, _) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									var(Pred),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(instantiation_error, Obj::abolish(Pred), Sender)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_abolish'(Obj, Pred, Sender, _) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Pred \= _/_,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(predicate_indicator, Pred), Obj::abolish(predicate), Sender)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_abolish'(Obj, Functor/Arity, Sender, _) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									(var(Functor); var(Arity)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(instantiation_error, Obj::abolish(Functor/Arity), Sender)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_abolish'(Obj, Functor/Arity, Sender, _) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									\+ atom(Functor),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(atom, Functor), Obj::abolish(Functor/Arity), Sender)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_abolish'(Obj, Functor/Arity, Sender, _) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									\+ integer(Arity),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(integer, Arity), Obj::abolish(Functor/Arity), Sender)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_abolish'(Obj, Functor/Arity, Sender, Scope) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_current_object_'(Obj, Prefix, Dcl, _, _) ->
							 | 
						
					
						
							
								
									
										
										
										
											2002-04-03 13:26:59 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										((functor(Pred, Functor, Arity),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										  '$lgt_once'(Dcl, Pred, PScope, Compilation, _, SContainer, _)) ->
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
											((\+ \+ PScope = Scope; Sender = SContainer) ->
							 | 
						
					
						
							
								
									
										
										
										
											2002-04-03 13:26:59 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												(Compilation = (dynamic) ->
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
													'$lgt_once'(Prefix, _, _, _, _, _, DDcl, DDef),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													('$lgt_once'(DDcl, Pred, _, _, _) ->
							 | 
						
					
						
							
								
									
										
										
										
											2002-04-03 13:26:59 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
														Clause =.. [DDcl, Pred, _, _, _],
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
														retractall(Clause),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
														('$lgt_once'(DDef, Pred, _, _, _, Call) ->
							 | 
						
					
						
							
								
									
										
										
										
											2002-04-03 13:26:59 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
															functor(Call, CFunctor, CArity),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
															abolish(CFunctor/CArity),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
															Clause2 =.. [DDef, Pred, _, _, _, Call],
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
															retractall(Clause2)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
															;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
															true)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
														;
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
														('$lgt_once'(Dcl, Pred, _, _, _) ->
							 | 
						
					
						
							
								
									
										
										
										
											2002-04-03 13:26:59 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
															throw(error(permission_error(modify, predicate_declaration, Pred), Obj::abolish(Functor/Arity), Sender))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
															;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
															throw(error(existence_error(predicate_declaration, Pred), Obj::abolish(Functor/Arity), Sender))))
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
													;
							 | 
						
					
						
							
								
									
										
										
										
											2002-04-03 13:26:59 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
													throw(error(permission_error(modify, static_predicate, Pred), Obj::abolish(Functor/Arity), Sender)))
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
												;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												(PScope = p ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													throw(error(permission_error(modify, private_predicate, Pred), Obj::abolish(Functor/Arity), Sender))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													throw(error(permission_error(modify, protected_predicate, Pred), Obj::abolish(Functor/Arity), Sender))))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											;
							 | 
						
					
						
							
								
									
										
										
										
											2002-04-03 13:26:59 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											throw(error(existence_error(predicate_declaration, Pred), Obj::abolish(Functor/Arity), Sender)))
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							
								
									
										
										
										
											2002-04-03 13:26:59 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										throw(error(existence_error(object, Obj), Obj::abolish(Functor/Arity), Sender)).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% asserta/1 built-in method
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_asserta'(Obj, Clause, Sender, _) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									var(Clause),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(instantiation_error, Obj::asserta(Clause), Sender)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_asserta'(Obj, (Head:-Body), Sender, _) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									var(Head),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(instantiation_error, Obj::asserta((Head:-Body)), Sender)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_asserta'(Obj, (Head:-Body), Sender, _) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_callable'(Head),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(callable, Head), Obj::asserta((Head:-Body)), Sender)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_asserta'(Obj, (Head:-Body), Sender, _) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_callable'(Body),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(callable, Body), Obj::asserta((Head:-Body)), Sender)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_asserta'(Obj, Clause, Sender, _) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_current_object_'(Obj, _, _, _, _),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(existence_error(object, Obj), Obj::asserta(Clause), Sender)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_asserta'(Obj, (Head:-Body), Sender, Scope) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_current_object_'(Obj, Prefix, _, _, _),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_once'(Prefix, Dcl, Def, _, _, _, DDcl, DDef),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									('$lgt_once'(Dcl, Head, PScope, Type, Meta, SContainer, _) ->
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									 	true
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									 	;
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									 	'$lgt_convert_test_scope'(Scope, Scope2),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									 	'$lgt_assert_ddcl_clause'(DDcl, Head, Scope2)),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									(Type = (dynamic) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										((\+ \+ PScope = Scope; Sender = SContainer)  ->
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											(('$lgt_once'(Def, Head, Sender2, This, Self, Call); '$lgt_once'(DDef, Head, Sender2, This, Self, Call)) ->
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
												true
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												functor(Head, Functor, Arity),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												'$lgt_assert_ddef_clause'(Functor, Arity, Prefix, DDef, _),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												'$lgt_once'(DDef, Head, Sender2, This, Self, Call)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'$lgt_self'(Context, Self),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'$lgt_this'(Context, This),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'$lgt_sender'(Context, Sender2),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'$lgt_prefix'(Context, Prefix),
							 | 
						
					
						
							
								
									
										
										
										
											2002-04-03 13:26:59 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											(nonvar(Meta) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												Head =.. [_| Args],
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												Meta =.. [_| MArgs],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												'$lgt_extract_metavars'(Args, MArgs, Metavars)
							 | 
						
					
						
							
								
									
										
										
										
											2002-04-03 13:26:59 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												Metavars = []),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											'$lgt_metavars'(Context, Metavars),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											asserta((Call:-'$lgt_tr_body'(Body, TBody, Context), call(TBody)))
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
											;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											(PScope = p ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												throw(error(permission_error(modify, private_predicate, Head), Obj::asserta((Head:-Body)), Sender))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												throw(error(permission_error(modify, protected_predicate, Head), Obj::asserta((Head:-Body)), Sender))))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										throw(error(permission_error(modify, static_predicate, Head), Obj::asserta((Head:-Body)), Sender))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_asserta'(Obj, Head, Sender, Scope) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_current_object_'(Obj, Prefix, _, _, _),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_once'(Prefix, Dcl, Def, _, _, _, DDcl, DDef),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									('$lgt_once'(Dcl, Head, PScope, Type, _, SContainer, _) ->
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									 	true
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									 	;
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									 	'$lgt_convert_test_scope'(Scope, Scope2),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									 	'$lgt_assert_ddcl_clause'(DDcl, Head, Scope2)),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									(Type = (dynamic) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										((\+ \+ PScope = Scope; Sender = SContainer)  ->
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											(('$lgt_once'(Def, Head, _, _, _, Call); '$lgt_once'(DDef, Head, _, _, _, Call)) ->
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
												true
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												functor(Head, Functor, Arity),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												'$lgt_assert_ddef_clause'(Functor, Arity, Prefix, DDef, _),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												'$lgt_once'(DDef, Head, _, _, _, Call)),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
											asserta(Call)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											(PScope = p ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												throw(error(permission_error(modify, private_predicate, Head), Obj::asserta(Head), Sender))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												throw(error(permission_error(modify, protected_predicate, Head), Obj::asserta(Head), Sender))))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										throw(error(permission_error(modify, static_predicate, Head), Obj::asserta(Head), Sender))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% assertz/1 built-in method
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_assertz'(Obj, Clause, Sender, _) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									var(Clause),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(instantiation_error, Obj::assertz(Clause), Sender)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_assertz'(Obj, (Head:-Body), Sender, _) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									var(Head),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(instantiation_error, Obj::assertz((Head:-Body)), Sender)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_assertz'(Obj, (Head:-Body), Sender, _) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_callable'(Head),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(callable, Head), Obj::assertz((Head:-Body)), Sender)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_assertz'(Obj, (Head:-Body), Sender, _) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_callable'(Body),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(callable, Body), Obj::assertz((Head:-Body)), Sender)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_assertz'(Obj, Clause, Sender, _) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_current_object_'(Obj, _, _, _, _),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(existence_error(object, Obj), Obj::assertz(Clause), Sender)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_assertz'(Obj, (Head:-Body), Sender, Scope) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_current_object_'(Obj, Prefix, _, _, _),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_once'(Prefix, Dcl, Def, _, _, _, DDcl, DDef),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									('$lgt_once'(Dcl, Head, PScope, Type, Meta, SContainer, _) ->
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									 	true
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									 	;
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									 	'$lgt_convert_test_scope'(Scope, Scope2),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									 	'$lgt_assert_ddcl_clause'(DDcl, Head, Scope2)),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									(Type = (dynamic) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										((\+ \+ PScope = Scope; Sender = SContainer)  ->
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											(('$lgt_once'(Def, Head, Sender2, This, Self, Call); '$lgt_once'(DDef, Head, Sender2, This, Self, Call)) ->
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
												true
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												functor(Head, Functor, Arity),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												'$lgt_assert_ddef_clause'(Functor, Arity, Prefix, DDef, _),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												'$lgt_once'(DDef, Head, Sender2, This, Self, Call)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'$lgt_self'(Context, Self),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'$lgt_this'(Context, This),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'$lgt_sender'(Context, Sender2),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'$lgt_prefix'(Context, Prefix),
							 | 
						
					
						
							
								
									
										
										
										
											2002-04-03 13:26:59 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											(nonvar(Meta) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												Head =.. [_| Args],
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												Meta =.. [_| MArgs],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												'$lgt_extract_metavars'(Args, MArgs, Metavars)
							 | 
						
					
						
							
								
									
										
										
										
											2002-04-03 13:26:59 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												Metavars = []),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											'$lgt_metavars'(Context, Metavars),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											assertz((Call:-'$lgt_tr_body'(Body, TBody, Context), call(TBody)))
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
											;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											(PScope = p ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												throw(error(permission_error(modify, private_predicate, Head), Obj::assertz((Head:-Body)), Sender))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												throw(error(permission_error(modify, protected_predicate, Head), Obj::assertz((Head:-Body)), Sender))))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										throw(error(permission_error(modify, static_predicate, Head), Obj::assertz((Head:-Body)), Sender))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_assertz'(Obj, Head, Sender, Scope) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_current_object_'(Obj, Prefix, _, _, _),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_once'(Prefix, Dcl, Def, _, _, _, DDcl, DDef),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									('$lgt_once'(Dcl, Head, PScope, Type, _, SContainer, _) ->
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									 	true
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									 	;
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									 	'$lgt_convert_test_scope'(Scope, Scope2),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									 	'$lgt_assert_ddcl_clause'(DDcl, Head, Scope2)),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									(Type = (dynamic) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										((\+ \+ PScope = Scope; Sender = SContainer)  ->
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											(('$lgt_once'(Def, Head, _, _, _, Call); '$lgt_once'(DDef, Head, _, _, _, Call)) ->
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
												true
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												functor(Head, Functor, Arity),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												'$lgt_assert_ddef_clause'(Functor, Arity, Prefix, DDef, _),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												'$lgt_once'(DDef, Head, _, _, _, Call)),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
											assertz(Call)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											(PScope = p ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												throw(error(permission_error(modify, private_predicate, Head), Obj::assertz(Head), Sender))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												throw(error(permission_error(modify, protected_predicate, Head), Obj::assertz(Head), Sender))))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										throw(error(permission_error(modify, static_predicate, Head), Obj::assertz(Head), Sender))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% clause/2 built-in method
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_clause'(Obj, Head, Body, Sender, _) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									var(Head),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(instantiation_error, Obj::clause(Head, Body), Sender)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_clause'(Obj, Head, Body, Sender, _) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_callable'(Head),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(callable, Head), Obj::clause(Head, Body), Sender)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_clause'(Obj, Head, Body, Sender, _) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Body),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_callable'(Body),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(callable, Body), Obj::clause(Head, Body), Sender)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_clause'(Obj, Head, Body, Sender, _) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_current_object_'(Obj, _, _, _, _),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(existence_error(object, Obj), Obj::clause(Head, Body), Sender)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_clause'(Obj, Head, Body, Sender, Scope) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_current_object_'(Obj, Prefix, _, _, _),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_once'(Prefix, Dcl, Def, _, _, _, _, DDef),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									('$lgt_once'(Dcl, Head, PScope, Type, _, SContainer, _) ->
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										(Type = (dynamic) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											((\+ \+ PScope = Scope; Sender = SContainer) ->
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												once(('$lgt_once'(Def, Head, _, _, _, Call); '$lgt_once'(DDef, Head, _, _, _, Call))),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
												clause(Call, TBody),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												(TBody = ('$lgt_tr_body'(Body, _, _), _) ->
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
													true
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													Body = TBody)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												(PScope = p ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													throw(error(permission_error(access, private_predicate, Head), Obj::clause(Head, Body), Sender))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													throw(error(permission_error(access, protected_predicate, Head), Obj::clause(Head, Body), Sender))))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											throw(error(permission_error(access, static_predicate, Head), Obj::clause(Head, Body), Sender)))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										throw(error(existence_error(predicate_declaration, Head), Obj::clause(Head, Body), Sender))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% retract/1 built-in method
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_retract'(Obj, Clause, Sender, _) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									var(Clause),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(instantiation_error, Obj::retract(Clause), Sender)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_retract'(Obj, (Head:-Body), Sender, _) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									var(Head),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(instantiation_error, Obj::retract((Head:-Body)), Sender)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_retract'(Obj, (Head:-Body), Sender, _) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_callable'(Head),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(callable, Head), Obj::retract((Head:-Body)), Sender)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_retract'(Obj, Clause, Sender, _) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_current_object_'(Obj, _, _, _, _),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(existence_error(object, Obj), Obj::retract(Clause), Sender)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_retract'(Obj, (Head:-Body), Sender, Scope) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_current_object_'(Obj, Prefix, _, _, _),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_once'(Prefix, Dcl, Def, _, _, _, _, DDef),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									('$lgt_once'(Dcl, Head, PScope, Type, _, SContainer, _) ->
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										(Type = (dynamic) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											((\+ \+ PScope = Scope; Sender = SContainer) ->
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												('$lgt_once'(Def, Head, _, _, _, Call) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													retract((Call:-('$lgt_tr_body'(Body, _, _), _)))
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
													;
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
													('$lgt_once'(DDef, Head, _, _, _, Call) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
														retract((Call:-('$lgt_tr_body'(Body, _, _), _))),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
														'$lgt_update_ddef_table'(DDef, Call)
							 | 
						
					
						
							
								
									
										
										
										
											2002-04-03 13:26:59 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
														;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
														fail))
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
												;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												(PScope = p ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													throw(error(permission_error(modify, private_predicate, Head), Obj::retract((Head:-Body)), Sender))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													throw(error(permission_error(modify, protected_predicate, Head), Obj::retract((Head:-Body)), Sender))))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											throw(error(permission_error(modify, static_predicate, Head), Obj::retract((Head:-Body)), Sender)))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										throw(error(existence_error(predicate_declaration, Head), Obj::retract((Head:-Body)), Sender))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_retract'(Obj, Head, Sender, Scope) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_current_object_'(Obj, Prefix, _, _, _),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_once'(Prefix, Dcl, Def, _, _, _, _, DDef),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									('$lgt_once'(Dcl, Head, PScope, Type, _, SContainer, _) ->
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										(Type = (dynamic) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											((\+ \+ PScope = Scope; Sender = SContainer) ->
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												('$lgt_once'(Def, Head, _, _, _, Call) ->
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
													retract(Call)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													;
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
													('$lgt_once'(DDef, Head, _, _, _, Call) ->
							 | 
						
					
						
							
								
									
										
										
										
											2002-04-03 13:26:59 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
														retract(Call),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
														'$lgt_update_ddef_table'(DDef, Call)
							 | 
						
					
						
							
								
									
										
										
										
											2002-04-03 13:26:59 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
														;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
														fail))
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
												;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												(PScope = p ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													throw(error(permission_error(modify, private_predicate, Head), Obj::retract(Head), Sender))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													throw(error(permission_error(modify, protected_predicate, Head), Obj::retract(Head), Sender))))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											throw(error(permission_error(modify, static_predicate, Head), Obj::retract(Head), Sender)))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										throw(error(existence_error(predicate_declaration, Head), Obj::retract(Head), Sender))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% retractall/1 built-in method
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_retractall'(Obj, Head, Sender, _) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									var(Head),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(instantiation_error, Obj::retractall(Head), Sender)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_retractall'(Obj, Head, Sender, _) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_callable'(Head),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(type_error(callable, Head), Obj::retractall(Head), Sender)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_retractall'(Obj, Head, Sender, _) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_current_object_'(Obj, _, _, _, _),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(error(existence_error(object, Obj), Obj::retractall(Head), Sender)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_retractall'(Obj, Head, Sender, Scope) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_current_object_'(Obj, Prefix, _, _, _),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_once'(Prefix, Dcl, Def, _, _, _, _, DDef),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									('$lgt_once'(Dcl, Head, PScope, Type, _, SContainer, _) ->
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										(Type = (dynamic) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											((\+ \+ PScope = Scope; Sender = SContainer) ->
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												('$lgt_once'(Def, Head, _, _, _, Call) ->
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
													retractall(Call)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													;
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
													('$lgt_once'(DDef, Head, _, _, _, Call) ->
							 | 
						
					
						
							
								
									
										
										
										
											2002-04-03 13:26:59 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
														retractall(Call),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
														'$lgt_update_ddef_table'(DDef, Call)
							 | 
						
					
						
							
								
									
										
										
										
											2002-04-03 13:26:59 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
														;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
														true))
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
												;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												(PScope = p ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													throw(error(permission_error(modify, private_predicate, Head), Obj::retractall(Head), Sender))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													throw(error(permission_error(modify, protected_predicate, Head), Obj::retractall(Head), Sender))))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											throw(error(permission_error(modify, static_predicate, Head), Obj::retractall(Head), Sender)))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										throw(error(existence_error(predicate_declaration, Head), Obj::retractall(Head), Sender))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%  message sending
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_send_to_self'(+object, ?term, +object)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_send_to_self'(Self, Pred, This) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Pred) ->
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										'$lgt_send_to_self_nv'(Self, Pred, This)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										throw(error(instantiation_error, Self::Pred, This)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_send_to_self_nv'(+object, +term, +object)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_send_to_self_nv'(Self, Pred, This) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_current_object_'(Self, _, Dcl, Def, _),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									('$lgt_call'(Dcl, Pred, Scope, _, _, SContainer, _) ->
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										((Scope = p(_); This = SContainer) ->
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											'$lgt_once'(Def, Pred, This, Self, Self, Call, _),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
											call(Call)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											throw(error(permission_error(access, private_predicate, Pred), Self::Pred, This)))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										('$lgt_built_in'(Pred) ->
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
											call(Pred)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											throw(error(existence_error(predicate_declaration, Pred), Self::Pred, This)))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_send_to_object'(@object, ?term, +object)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_send_to_object'(Obj, Pred, Sender) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Obj) ->
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										('$lgt_current_object_'(Obj, _, Dcl, Def, _) ->
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
											(nonvar(Pred) ->
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											 	('$lgt_call'(Dcl, Pred, Scope, _, _, _, _) ->
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
											 		(Scope = p(p(_)) ->
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
														'$lgt_once'(Def, Pred, Sender, Obj, Obj, Call, _),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
														\+ ('$lgt_before_'(Obj, Pred, Sender, _, BCall), \+ call(BCall)),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
														call(Call),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
														\+ ('$lgt_after_'(Obj, Pred, Sender, _, ACall), \+ call(ACall))
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
														;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
														(Scope = p ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
															throw(error(permission_error(access, private_predicate, Pred), Obj::Pred, Sender))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
															;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
															throw(error(permission_error(access, protected_predicate, Pred), Obj::Pred, Sender))))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													;
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
													('$lgt_built_in'(Pred) ->
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
														call(Pred)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
														;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
														throw(error(existence_error(predicate_declaration, Pred), Obj::Pred, Sender))))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												throw(error(instantiation_error, Obj::Pred, Sender)))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											throw(error(existence_error(object, Obj), Obj::Pred, Sender)))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										throw(error(instantiation_error, Obj::Pred, Sender)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_send_to_object_nv'(+object, +term, +object)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_send_to_object_nv'(Obj, Pred, Sender) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_current_object_'(Obj, _, Dcl, Def, _) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										('$lgt_call'(Dcl, Pred, Scope, _, _, _, _) ->
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
											(Scope = p(p(_)) ->
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												'$lgt_once'(Def, Pred, Sender, Obj, Obj, Call, _),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												\+ ('$lgt_before_'(Obj, Pred, Sender, _, BCall), \+ call(BCall)),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
												call(Call),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												\+ ('$lgt_after_'(Obj, Pred, Sender, _, ACall), \+ call(ACall))
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
												;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												(Scope = p ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													throw(error(permission_error(access, private_predicate, Pred), Obj::Pred, Sender))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													throw(error(permission_error(access, protected_predicate, Pred), Obj::Pred, Sender))))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											;
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											('$lgt_built_in'(Pred) ->
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
												call(Pred)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												throw(error(existence_error(predicate_declaration, Pred), Obj::Pred, Sender))))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										throw(error(existence_error(object, Obj), Obj::Pred, Sender)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_send_to_super'(+object, ?term, +object, +object)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_send_to_super'(Self, Pred, This, Sender) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Pred) ->
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										'$lgt_send_to_super_nv'(Self, Pred, This, Sender)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										throw(error(instantiation_error, ^^Pred, This)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_send_to_super_nv'(+object, +term, +object, +object)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_send_to_super_nv'(Self, Pred, This, Sender) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_current_object_'(Self, _, Dcl, _, _),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									('$lgt_call'(Dcl, Pred, Scope, _, _, SContainer, _) ->
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									 	((Scope = p(_); This = SContainer) ->
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											'$lgt_current_object_'(This, _, _, _, Super),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'$lgt_once'(Super, Pred, Sender, This, Self, Call, Container),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
											(Container \= This ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												call(Call)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												throw(error(endless_loop(Pred), ^^Pred, This)))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										throw(error(permission_error(access, private_predicate, Pred), ^^Pred, This)))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									;
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									('$lgt_built_in'(Pred) ->
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										call(Pred)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										throw(error(existence_error(predicate_declaration, Pred), ^^Pred, This)))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_metacall_in_object'(+object, ?term, +object)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% metacalls in predicate definitions
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_metacall_in_object'(Obj, Pred, Sender) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									var(Pred) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										throw(error(instantiation_error, Obj::call(Pred), Sender))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										(Obj = user ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											call(Pred)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											;
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											'$lgt_current_object_'(Obj, Prefix, _, _, _),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'$lgt_prefix'(Context, Prefix),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'$lgt_sender'(Context, Sender),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'$lgt_this'(Context, Obj),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'$lgt_self'(Context, Obj),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'$lgt_tr_body'(Pred, Call, Context),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
											call(Call)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_call_built_in'(+term, +term)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% needed for runtime translation of dynamic clauses
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_call_built_in'(Pred, Context) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_sender'(Context, Sender),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_this'(Context, This),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_self'(Context, Self),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_current_object_'(This, _, _, Def, _),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									('$lgt_call'(Def, Pred, Sender, This, Self, Call) ->
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										call(Call)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										call(Pred)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%  built-in pseudo-object user
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%  represents the Prolog database (excluding built-in predicates)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% the following clauses correspond to a virtual 
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% compilation of the pseudo-object user
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_current_object_'(user, user0_, user0__dcl, user0__def, _).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								user0_(user0__dcl, user0__def, _, _, _, _, _).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								user0__dcl(Pred, p(p(p)), no, Type) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Pred),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_built_in'(Pred),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									functor(Pred, Functor, Arity),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									current_predicate(Functor/Arity),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									('$lgt_predicate_property'(Pred, (dynamic)) ->
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										Type = (dynamic)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										Type = static).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								user0__dcl(Pred, p(p(p)), no, Type) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									var(Pred),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									current_predicate(Functor/Arity),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_hidden_functor'(Functor),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									functor(Pred, Functor, Arity),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_built_in'(Pred),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									('$lgt_predicate_property'(Pred, (dynamic)) ->
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										Type = (dynamic)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										Type = static).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								user0__dcl(Pred, p(p(p)), Type, Meta, user, user) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									user0__dcl(Pred, p(p(p)), Type, Meta).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								user0__def(Pred, _, _, _, Pred).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								user0__def(Pred, _, _, _, Pred, user).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_hidden_functor'(+atom)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% hidden functors include Logtalk pre-processor and runtime internal functors
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% and those used in the compiled code of objects, protocols, and categories
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_hidden_functor'(Functor) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									atom_concat('$lgt_', _, Functor).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_hidden_functor'(Functor) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_current_category_'(_, Prefix),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									atom_concat(Prefix, _, Functor).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_hidden_functor'(Functor) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_current_object_'(_, Prefix, _, _, _),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									atom_concat(Prefix, _, Functor).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_hidden_functor'(Functor) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_current_protocol_'(_, Prefix),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									atom_concat(Prefix, _, Functor).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%  pre-processor - compiles Logtalk source files to Prolog
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_load_entities'(+list)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% compiles to disk and then loads to memory a list of entities
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_load_entities'([]).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_load_entities'([Entity| Entities]) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_load_entity'(Entity),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_load_entities'(Entities).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_load_entity'(+atom)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% compiles to disk and then loads to memory an entity
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_load_entity'(Entity) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_compile_entity'(Entity),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									('$lgt_compiler_option'(report, on) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										'$lgt_report_redefined_entity'(Entity)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										true),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_file_name'(prolog, Entity, File),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_load_prolog_code'(File),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									('$lgt_compiler_option'(report, on) ->
							 | 
						
					
						
							
								
									
										
										
										
											2002-05-06 13:10:02 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										write('<<<  '), writeq(Entity), write(' loaded'), nl
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										true).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_report_redefined_entity'(+atom)
							 | 
						
					
						
							
								
									
										
										
										
											2002-05-06 13:10:02 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% prints a warning if an entity of the same name is already loaded
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_report_redefined_entity'(Entity) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_current_object_'(Entity, _, _, _, _),
							 | 
						
					
						
							
								
									
										
										
										
											2002-05-06 13:10:02 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-08-26 16:45:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									write('WARNING!  redefining object '), write(Entity), nl.
							 | 
						
					
						
							
								
									
										
										
										
											2002-05-06 13:10:02 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_report_redefined_entity'(Entity) :-		% parametric objects
							 | 
						
					
						
							
								
									
										
										
										
											2002-06-15 13:18:34 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									atom_codes(Entity, Codes),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_append'(Codes1, Codes2, Codes),
							 | 
						
					
						
							
								
									
										
										
										
											2002-06-15 13:18:34 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									catch(number_codes(Arity, Codes2), _, fail),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									atom_codes(Functor, Codes1),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									functor(Loaded, Functor, Arity),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_current_object_'(Loaded, _, _, _, _),
							 | 
						
					
						
							
								
									
										
										
										
											2002-06-15 13:18:34 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-08-26 16:45:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									write('WARNING!  redefining object '), write(Entity), nl.
							 | 
						
					
						
							
								
									
										
										
										
											2002-06-15 13:18:34 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_report_redefined_entity'(Entity) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_current_protocol_'(Entity, _),
							 | 
						
					
						
							
								
									
										
										
										
											2002-05-06 13:10:02 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-08-26 16:45:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									write('WARNING!  redefining protocol '), write(Entity), nl.
							 | 
						
					
						
							
								
									
										
										
										
											2002-05-06 13:10:02 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_report_redefined_entity'(Entity) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_current_category_'(Entity, _),
							 | 
						
					
						
							
								
									
										
										
										
											2002-05-06 13:10:02 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-08-26 16:45:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									write('WARNING!  redefining category '), write(Entity), nl.
							 | 
						
					
						
							
								
									
										
										
										
											2002-05-06 13:10:02 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_report_redefined_entity'(_).
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_compile_entities'(+list)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% compiles to disk a list of entities
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_compile_entities'([]).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_compile_entities'([Entity| Entities]) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_compile_entity'(Entity),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_compile_entities'(Entities).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_compile_entity'(+atom)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% compiles to disk an entity
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_compile_entity'(Entity) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_compiler_option'(smart_compilation, on),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_needs_recompilation'(Entity),
							 | 
						
					
						
							
								
									
										
										
										
											2002-05-06 13:10:02 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									('$lgt_compiler_option'(report, on) ->
							 | 
						
					
						
							
								
									
										
										
										
											2002-10-07 10:55:21 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										nl, write('>>>  compiling '), writeq(Entity),	
							 | 
						
					
						
							
								
									
										
										
										
											2002-05-06 13:10:02 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										nl, write('>>>  '), writeq(Entity), write(' is up-to-date'), nl
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										true).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_compile_entity'(Entity) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									('$lgt_compiler_option'(report, on) ->
							 | 
						
					
						
							
								
									
										
										
										
											2002-05-06 13:10:02 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										nl, write('>>>  compiling '), writeq(Entity), nl	
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										true),
							 | 
						
					
						
							
								
									
										
										
										
											2002-08-26 16:45:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_clean_up',
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_entity'(Entity),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_write_tr_entity'(Entity),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_write_entity_doc'(Entity),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_report_unknown_entities',
							 | 
						
					
						
							
								
									
										
										
										
											2002-08-26 16:45:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_clean_up',
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									('$lgt_compiler_option'(report, on) ->
							 | 
						
					
						
							
								
									
										
										
										
											2002-05-06 13:10:02 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										write('>>>  '), writeq(Entity), write(' compiled'), nl
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										true).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_needs_recompilation'(+atom)
							 | 
						
					
						
							
								
									
										
										
										
											2002-05-06 13:10:02 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% source file needs recompilation
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_needs_recompilation'(Entity) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_file_name'(prolog, Entity, File),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_file_exists'(File).
							 | 
						
					
						
							
								
									
										
										
										
											2002-05-06 13:10:02 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_needs_recompilation'(Entity) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_file_name'(xml, Entity, File),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_compiler_option'(xml, on),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_file_exists'(File).
							 | 
						
					
						
							
								
									
										
										
										
											2002-05-06 13:10:02 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_needs_recompilation'(Entity) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_file_name'(logtalk, Entity, Source),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_file_name'(prolog, Entity, Object),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									('$lgt_compare_file_mtimes'(Result, Source, Object) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										Result = (>)
							 | 
						
					
						
							
								
									
										
										
										
											2002-05-06 13:10:02 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										true).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_write_tr_entity'(+atom)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% writes to disk the entity compiled code
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_write_tr_entity'(Entity) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_file_name'(prolog, Entity, File),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									catch(
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										open(File, write, Stream),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										Error,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										'$lgt_compiler_error_handler'(Stream, Error)),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									catch(
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										('$lgt_write_directives'(Stream),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										 '$lgt_write_clauses'(Stream),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										 '$lgt_write_init_call'(Stream)),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										Error,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										'$lgt_compiler_error_handler'(Stream, Error)),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									close(Stream).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_write_entity_doc'(+atom)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% writes to disk the entity documentation in XML format
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_write_entity_doc'(Entity) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_compiler_option'(xml, on) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										'$lgt_file_name'(xml, Entity, File),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										catch(
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											open(File, write, Stream),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											Error,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											'$lgt_compiler_error_handler'(Stream, Error)),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										catch(
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											'$lgt_write_xml_file'(Stream),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
											Error,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											'$lgt_compiler_error_handler'(Stream, Error)),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										close(Stream)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										true.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_file_name'(+atom, +atom, -atom)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% constructs a filename given the type of file and the entity name
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_file_name'(Type, Entity, File) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_file_extension'(Type, Extension),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									atom_concat(Entity, Extension, File).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_tr_entity'(+atom)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% compiles an entity storing the resulting code in memory
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_entity'(Entity) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_file_name'(logtalk, Entity, File),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									catch(
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										open(File, read, Stream),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										Error,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										'$lgt_compiler_error_handler'(Stream, Error)),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									catch(
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										(read_term(Stream, Term, [singletons(Singletons1)]),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										 '$lgt_filter_named_anonymous_vars'(Singletons1, Singletons2),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										 '$lgt_report_singletons'(Singletons2, Term),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										 '$lgt_tr_file'(Stream, Term)),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										Error,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										'$lgt_compiler_error_handler'(Stream, Error)),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									close(Stream),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_fix_redef_built_ins',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_find_misspelt_calls',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_entity_'(Type, _, _, _),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_gen_clauses'(Type),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_gen_directives'(Type).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_tr_file'(+stream, +term)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_file'(_, end_of_file) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_file'(Stream, Term) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_term'(Term),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									read_term(Stream, Next, [singletons(Singletons1)]),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_filter_named_anonymous_vars'(Singletons1, Singletons2),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_report_singletons'(Singletons2, Next),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_file'(Stream, Next).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_filter_named_anonymous_vars'(+list, -list)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% filter named anonymous varaibles from a singletons list
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% if the corresponding compiler option is enabled
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_filter_named_anonymous_vars'(List, Result) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_compiler_option'(named_anonymous_vars, on) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										'$lgt_filter_named_anonymous_vars'(List, [], Result)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										List = Result.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_filter_named_anonymous_vars'([], Result, Result).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_filter_named_anonymous_vars'([Atom = Var| List], Sofar, Result) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									sub_atom(Atom, 0, 1, _, '_') ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										'$lgt_filter_named_anonymous_vars'(List, Sofar, Result)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										'$lgt_filter_named_anonymous_vars'(List, [Atom = Var| Sofar], Result).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% '$lgt_report_singletons'(+list, +term)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% report the singleton variables found while compiling an entity term
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_report_singletons'([], _).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_report_singletons'([Singleton| Singletons], Term) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									('$lgt_compiler_option'(singletons, warning),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									 '$lgt_compiler_option'(report, on)) ->
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										write('WARNING!'),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										\+ \+ ( '$lgt_report_singletons_aux'([Singleton| Singletons], Term, Names),
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												write('  singleton variables: '), write(Names), nl,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												(Term = (:- _) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
													write('          in directive: ')
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
													;
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
													write('          in clause: ')),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
												write(Term), nl)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										true.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_report_singletons_aux'([], _, []).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_report_singletons_aux'([Name = Var| Singletons], Term, [Name| Names]) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Name = Var,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_report_singletons_aux'(Singletons, Term, Names).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_compiler_error_handler'(@term, +term)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% close the stream opened for reading the entity 
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% file and report the compilation error found
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_compiler_error_handler'(Stream, Error) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									(nonvar(Stream) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										close(Stream)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										true),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_report_compiler_error'(Error),
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									throw(Error).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_report_compiler_error'(+term)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% reports a compilation error
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_report_compiler_error'(error(Error, directive(Directive))) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									write('ERROR!    '), writeq(Error), nl,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									write('          in directive: '), write((:- Directive)), nl.
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_report_compiler_error'(error(Error, clause(Clause))) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									write('ERROR!    '), writeq(Error), nl,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									write('          in clause: '), write(Clause), nl.
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_report_compiler_error'(error(Error, Term)) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									write('ERROR!    '), writeq(Error), nl,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									write('          in: '), write(Term), nl.
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_report_compiler_error'(Error) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									write('ERROR!    '), writeq(Error), nl.
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% clean up all dynamic predicates used during entity compilation
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_clean_up' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									retractall('$lgt_object_'(_, _, _, _, _, _, _, _, _)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									retractall('$lgt_protocol_'(_, _, _)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									retractall('$lgt_category_'(_, _, _, _)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									retractall('$lgt_implemented_protocol_'(_, _, _, _)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									retractall('$lgt_imported_category_'(_, _, _, _, _)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									retractall('$lgt_extended_object_'(_, _, _, _, _, _, _, _, _, _)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									retractall('$lgt_instantiated_class_'(_, _, _, _, _, _, _, _, _, _)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									retractall('$lgt_specialized_class_'(_, _, _, _, _, _, _, _, _, _)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									retractall('$lgt_extended_protocol_'(_, _, _, _)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									retractall('$lgt_uses_'(_)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									retractall('$lgt_calls_'(_)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									retractall('$lgt_info_'(_)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									retractall('$lgt_info_'(_, _)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									retractall('$lgt_directive_'(_)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									retractall('$lgt_public_'(_)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									retractall('$lgt_protected_'(_)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									retractall('$lgt_private_'(_)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									retractall('$lgt_dynamic_'(_)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									retractall('$lgt_discontiguous_'(_)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									retractall('$lgt_mode_'(_, _)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									retractall('$lgt_metapredicate_'(_)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									retractall('$lgt_entity_functors_'(_)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									retractall('$lgt_entity_'(_, _, _, _)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									retractall('$lgt_entity_init_'(_)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									retractall('$lgt_fentity_init_'(_)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									retractall('$lgt_entity_comp_mode_'(_)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									retractall('$lgt_dcl_'(_)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									retractall('$lgt_ddcl_'(_)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									retractall('$lgt_def_'(_)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									retractall('$lgt_ddef_'(_)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									retractall('$lgt_super_'(_)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									retractall('$lgt_rclause_'(_)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									retractall('$lgt_eclause_'(_)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									retractall('$lgt_feclause_'(_)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									retractall('$lgt_redefined_built_in_'(_, _, _)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									retractall('$lgt_defs_pred_'(_)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									retractall('$lgt_calls_pred_'(_)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									retractall('$lgt_referenced_object_'(_)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									retractall('$lgt_referenced_protocol_'(_)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									retractall('$lgt_referenced_category_'(_)).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% dump all dynamic predicates used during entity compilation
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% in the current ouput stream (just a debugging utility)
							 | 
						
					
						
							
								
									
										
										
										
											2002-04-03 13:26:59 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% only works on Prolog compilers implementing listing/1
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_dump_all' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									listing('$lgt_object_'/9),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									listing('$lgt_protocol_'/3),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									listing('$lgt_category_'/4),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									listing('$lgt_implemented_protocol_'/4),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									listing('$lgt_imported_category_'/5),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									listing('$lgt_extended_object_'/10),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									listing('$lgt_instantiated_class_'/10),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									listing('$lgt_specialized_class_'/10),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									listing('$lgt_extended_protocol_'/4),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									listing('$lgt_uses_'/1),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									listing('$lgt_calls_'/1),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									listing('$lgt_info_'/1),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									listing('$lgt_info_'/2),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									listing('$lgt_directive_'/1),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									listing('$lgt_public_'/1),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									listing('$lgt_protected_'/1),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									listing('$lgt_private_'/1),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									listing('$lgt_dynamic_'/1),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									listing('$lgt_discontiguous_'/1),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									listing('$lgt_mode_'/2),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									listing('$lgt_metapredicate_'/1),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									listing('$lgt_entity_functors_'/1),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									listing('$lgt_entity_'/4),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									listing('$lgt_entity_init_'/1),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									listing('$lgt_fentity_init_'/1),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									listing('$lgt_entity_comp_mode_'/1),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									listing('$lgt_dcl_'/1),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									listing('$lgt_ddcl_'/1),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									listing('$lgt_def_'/1),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									listing('$lgt_ddef_'/1),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									listing('$lgt_super_'/1),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									listing('$lgt_rclause_'/1),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									listing('$lgt_eclause_'/1),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									listing('$lgt_feclause_'/1),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									listing('$lgt_redefined_built_in_'/3),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									listing('$lgt_defs_pred_'/1),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									listing('$lgt_calls_pred_'/1),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									listing('$lgt_current_compiler_option_'/2),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									listing('$lgt_flag_'/2),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									listing('$lgt_referenced_object_'/1),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									listing('$lgt_referenced_protocol_'/1),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									listing('$lgt_referenced_category_'/1).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% '$lgt_tr_terms'(+list)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% translates a list of entity terms (clauses and/or directives)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_terms'([]).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_terms'([Term| Terms]) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_term'(Term),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_terms'(Terms).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_tr_term'(+term)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% translates an entity term (either a clause or a directive)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_term'((Head:-Body)) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_clause'((Head:-Body)).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_term'((:-Dir)) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_directive'(Dir).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_term'(Fact) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_clause'(Fact).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_tr_directives'(+list)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% translates a list of entity directives
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_directives'([]).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_directives'([Dir| Dirs]) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_directive'(Dir),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_directives'(Dirs).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_tr_directive'(+term)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% translates an entity directive
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_directive'(Dir) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									var(Dir),
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									throw(error(instantiantion_error, directive(Dir))).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_directive'(Dir) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_entity_'(_, _, _, _),		% directive occurs before opening entity directive
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									functor(Dir, Functor, Arity),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_lgt_closing_directive'(Functor/Arity),	% opening directive missing/missplet
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									throw(error(unmatched_directive, directive(Dir))).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_directive'(Dir) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_entity_'(_, _, _, _),		% directive occurs before opening entity directive
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									functor(Dir, Functor, Arity),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_lgt_opening_directive'(Functor/Arity),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_directive_'(Dir)).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_directive'(Dir) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									functor(Dir, Functor, Arity),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_lgt_directive'(Functor/Arity),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Dir =.. [Functor| Args],
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									catch(
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										'$lgt_tr_directive'(Functor, Args),
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										Error,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										throw(error(Error, directive(Dir)))),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_directive'(Dir) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									throw(error(domain_error(directive, Dir), directive(Dir))).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_tr_directive'(+atom, +list)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% translates a directive and its (possibly empty) list of arguments
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_directive'(object, [Obj| Rels]) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_valid_object_id'(Obj) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										'$lgt_tr_object_id'(Obj),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										'$lgt_tr_object_relations'(Rels, Obj)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										throw(type_error(object_identifier, Obj)).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_directive'(end_object, []) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_entity_'(object, _, _, _).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_directive'(protocol, [Ptc| Rels]) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_valid_protocol_id'(Ptc) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										'$lgt_tr_protocol_id'(Ptc),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										'$lgt_tr_protocol_relations'(Rels, Ptc)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										throw(type_error(protocol_identifier, Ptc)).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_directive'(end_protocol, []) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_entity_'(protocol, _, _, _).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_directive'(category, [Ctg| Rels]) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_valid_category_id'(Ctg) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										'$lgt_tr_category_id'(Ctg),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										'$lgt_tr_category_relations'(Rels, Ctg)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										throw(type_error(category_identifier, Ctg)).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_directive'(end_category, []) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_entity_'(category, _, _, _).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% dynamic entity directive
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_directive'((dynamic), []) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_entity_comp_mode_'((dynamic))).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_directive'(initialization, [Goal]) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_callable'(Goal) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										'$lgt_entity_'(_, Entity, Prefix, _),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										'$lgt_prefix'(Context, Prefix),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										'$lgt_metavars'(Context, []),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										'$lgt_sender'(Context, Entity),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										'$lgt_this'(Context, Entity),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										'$lgt_self'(Context, Entity),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										'$lgt_tr_body'(Goal, TGoal, Context),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										assertz('$lgt_entity_init_'(TGoal))
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										throw(type_error(callable, Goal)).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_directive'(op, [Priority, Specifier, Operators]) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_valid_op_priority'(Priority) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										('$lgt_valid_op_specifier'(Specifier) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											('$lgt_valid_op_names'(Operators) ->
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
												op(Priority, Specifier, Operators),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												assertz('$lgt_directive_'(op(Priority, Specifier, Operators)))
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
												;
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
												throw(type_error(operator_name, Operators)))
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
											;
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											throw(type_error(operator_specifier, Specifier)))
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										throw(type_error(operator_priority, Priority)).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_directive'(uses, Objs) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_convert_to_list'(Objs, Objs2),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									forall(
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										'$lgt_member'(Obj, Objs2),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										('$lgt_valid_object_id'(Obj) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'$lgt_add_referenced_object'(Obj),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											assertz('$lgt_uses_'(Obj))
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
											;
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											throw(type_error(object_identifier, Obj)))).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_directive'(calls, Ptcs) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_convert_to_list'(Ptcs, Ptcs2),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									forall(
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										'$lgt_member'(Ptc, Ptcs2),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										('$lgt_valid_protocol_id'(Ptc) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'$lgt_add_referenced_protocol'(Ptc),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											assertz('$lgt_calls_'(Ptc))
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
											;
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											throw(type_error(protocol_identifier, Ptc)))).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_directive'(info, [List]) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									('$lgt_valid_info_list'(List) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										assertz('$lgt_info_'(List))
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										throw(type_error(info_list, List))).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_directive'(info, [Pred, List]) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_valid_pred_ind'(Pred) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										('$lgt_valid_info_list'(List) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											assertz('$lgt_info_'(Pred, List))
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
											;
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											throw(type_error(info_list, List)))
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										throw(type_error(predicate_indicator, Pred)).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_directive'((public), Preds) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_convert_to_list'(Preds, Preds2),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									forall(
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										'$lgt_member'(Pred, Preds2),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										('$lgt_valid_pred_ind'(Pred) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											assertz('$lgt_public_'(Pred))
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
											;
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											throw(type_error(predicate_indicator, Pred)))).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_directive'(protected, Preds) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_convert_to_list'(Preds, Preds2),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									forall(
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										'$lgt_member'(Pred, Preds2),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										('$lgt_valid_pred_ind'(Pred) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											assertz('$lgt_protected_'(Pred))
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
											;
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											throw(type_error(predicate_indicator, Pred)))).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_directive'(private, Preds) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_convert_to_list'(Preds, Preds2),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									forall(
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										'$lgt_member'(Pred, Preds2),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										('$lgt_valid_pred_ind'(Pred) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											assertz('$lgt_private_'(Pred))
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
											;
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											throw(type_error(predicate_indicator, Pred)))).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_directive'((dynamic), Preds) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_convert_to_list'(Preds, Preds2),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									forall(
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										'$lgt_member'(Pred, Preds2),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										('$lgt_valid_pred_ind'(Pred) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											assertz('$lgt_dynamic_'(Pred))
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
											;
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											throw(type_error(predicate_indicator, Pred)))).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_directive'((discontiguous), Preds) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_convert_to_list'(Preds, Preds2),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									forall(
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										'$lgt_member'(Pred, Preds2),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										('$lgt_valid_pred_ind'(Pred) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											assertz('$lgt_discontiguous_'(Pred))
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
											;
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											throw(type_error(predicate_indicator, Pred)))).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_directive'(metapredicate, Preds) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_convert_to_list'(Preds, Preds2),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									forall(
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										'$lgt_member'(Pred, Preds2),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										('$lgt_valid_metapred_term'(Pred) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											assertz('$lgt_metapredicate_'(Pred))
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
											;
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											throw(type_error(metapredicate_term, Pred)))).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_directive'((mode), [Mode, Solutions]) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_valid_mode_term'(Mode) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										('$lgt_valid_number_of_solutions'(Solutions) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											assertz('$lgt_mode_'(Mode, Solutions))
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
											;
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											throw(type_error(number_of_solutions, Solutions)))
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										throw(type_error(mode_term, Mode)).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_tr_object_relations'(+list, +term)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% translates the relations of an object with other entities
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_object_relations'([], _).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_object_relations'([Clause| Clauses], Obj) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Clause =.. [Functor| Arguments],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									('$lgt_tr_object_relation'(Functor, Arguments, Obj) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										'$lgt_tr_object_relations'(Clauses, Obj)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										throw(type_error(relation_clause, Functor))).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_tr_object_relation'(+atom, +list, +term)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% translates a relation between an object (the last argument) with other entities
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_object_relation'(implements, Ptcs, Obj) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_convert_to_list'(Ptcs, List),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_implements_protocol'(List, Obj).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_object_relation'(imports, Ctgs, Obj) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_convert_to_list'(Ctgs, List),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_imports_category'(List, Obj).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_object_relation'(instantiates, Classes, Obj) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_convert_to_list'(Classes, List),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_instantiates_class'(List, Obj).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_object_relation'(specializes, Superclasses, Class) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_convert_to_list'(Superclasses, List),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_specializes_class'(List, Class).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_object_relation'(extends, Parents, Prototype) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_convert_to_list'(Parents, List),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_extends_object'(List, Prototype).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_tr_protocol_relations'(+list, +term)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% translates the relations of a protocol with other entities
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_protocol_relations'([], _).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_protocol_relations'([Clause| Clauses], Obj) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Clause =.. [Functor| Arguments],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_protocol_relation'(Functor, Arguments, Obj),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_protocol_relations'(Clauses, Obj).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_tr_protocol_relation'(+atom, +list, +term)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% translates a relation between a protocol (the last argument) with other entities
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_protocol_relation'(extends, Ptcs, Ptc) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_convert_to_list'(Ptcs, List),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_extends_protocol'(List, Ptc).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_protocol_relation'(Unknown, _, _) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(directive_error(relation_clause, Unknown)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_tr_category_relations'(+list, +term)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% translates the relations of a category with other entities
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_category_relations'([], _).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_category_relations'([Clause| Clauses], Obj) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Clause =.. [Functor| Arguments],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_category_relation'(Functor, Arguments, Obj),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_category_relations'(Clauses, Obj).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_tr_category_relation'(+atom, +list, +term)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% translates a relation between a category (the last argument) with other entities
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_category_relation'(implements, Ptcs, Ctg) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_convert_to_list'(Ptcs, List),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_implements_protocol'(List, Ctg).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_category_relation'(Unknown, _, _) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(directive_error(relation_clause, Unknown)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_tr_clauses'(+list)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_clauses'([]).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_clauses'([Clause| Clauses]) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_clause'(Clause),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_clauses'(Clauses).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_tr_clause'(+clause)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_clause'(Clause) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_entity_'(_, _, _, _),		% clause occurs before opening entity directive
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_feclause_'(Clause)).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_clause'(Clause) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-08-26 16:45:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_entity_'(Type, Entity, Prefix, _),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									((Type = object, \+ atom(Entity)) ->	% if the entity is a parametric object we need
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										'$lgt_this'(Context, Entity)		% "this" for inline compilation of parameter/2
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										true),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_prefix'(Context, Prefix),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									catch(
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										'$lgt_tr_clause'(Clause, TClause, Context),
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										Error,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										throw(error(Error, clause(Clause)))),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_eclause_'(TClause)),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_clause'(Clause) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									throw(error(unknown_error, clause(Clause))).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_tr_clause'(+clause, +clause, +term)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_clause'((Head:-_), _, _) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_callable'(Head),
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									throw(type_error(callable, Head)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-08-26 16:45:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_clause'((Head:-Body), TClause, Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_extract_metavars'(Head, Metavars),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_metavars'(Context, Metavars),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_head'(Head, THead, Context),
							 | 
						
					
						
							
								
									
										
										
										
											2002-08-26 16:45:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_body'(Body, TBody, Context),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_simplify_clause'((THead:-TBody), TClause).
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_clause'(Fact, _, _) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_callable'(Fact),
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									throw(type_error(callable, Fact)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_clause'(Fact, TFact, Context) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_head'(Fact, TFact, Context).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_tr_head'(+callable, -callable, +term)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% translates an entity clause head
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-04-03 13:26:59 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% definition of dynamic predicates inside categories
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_head'(Head, _, _) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_entity_'(category, _, _, _),
							 | 
						
					
						
							
								
									
										
										
										
											2002-04-03 13:26:59 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									functor(Head, Functor, Arity), 
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_dynamic_'(Functor/Arity),
							 | 
						
					
						
							
								
									
										
										
										
											2002-04-03 13:26:59 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									throw(permission_error(define, dynamic_predicate, Functor/Arity)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% redefinition of built-in methods
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_head'(Head, _, _) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_built_in_method'(Head, _),
							 | 
						
					
						
							
								
									
										
										
										
											2002-04-03 13:26:59 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									functor(Head, Functor, Arity), 
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									throw(permission_error(modify, built_in_method, Functor/Arity)).
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% redefinition of Logtalk built-in predicates
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_head'(Head, _, _) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_lgt_built_in'(Head),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_compiler_option'(lgtredef, warning),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_compiler_option'(report, on),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_redefined_built_in_'(Head, _, _),		% not already reported?
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									functor(Head, Functor, Arity),
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									write('WARNING!  redefining a Logtalk built-in predicate: '),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									writeq(Functor/Arity), nl,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									fail.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% redefinition of Prolog built-in predicates
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_head'(Head, _, _) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_pl_built_in'(Head),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_compiler_option'(plredef, warning),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_compiler_option'(report, on),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_redefined_built_in_'(Head, _, _),		% not already reported?
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									functor(Head, Functor, Arity),
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									write('WARNING!  redefining a Prolog built-in predicate: '),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									writeq(Functor/Arity), nl,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									fail.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% translate the head of a clause of a user defined predicate
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_head'(Head, THead, Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									functor(Head, Functor, Arity),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Head =.. [_| Args],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_prefix'(Context, EPrefix),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_construct_predicate_functor'(EPrefix, Functor, Arity, PPrefix),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									(('$lgt_dynamic_'(Functor/Arity),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									  \+ '$lgt_public_'(Functor/Arity),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									  \+ '$lgt_protected_'(Functor/Arity),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									  \+ '$lgt_private_'(Functor/Arity)) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										'$lgt_add_ddef_clause'(Functor, Arity, PPrefix, Context)
							 | 
						
					
						
							
								
									
										
										
										
											2002-04-03 13:26:59 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										'$lgt_add_def_clause'(Functor, Arity, PPrefix, Context)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_sender'(Context, Sender),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_this'(Context, This),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_self'(Context, Self),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_append'(Args, [Sender, This, Self], Args2),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									THead =.. [PPrefix| Args2].
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_tr_body'(+callable, -callable, +term)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% translates an entity clause body
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% meta-calls
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_body'(Pred, TPred, Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									var(Pred),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_metavars'(Context, Metavars),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									('$lgt_member_var'(Pred, Metavars) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										'$lgt_sender'(Context, Sender),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										TPred = '$lgt_metacall_in_object'(Sender, Pred, Sender)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										'$lgt_this'(Context, This),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										TPred = '$lgt_metacall_in_object'(This, Pred, This)).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% pre-processor bypass (call of external code)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_body'({Pred}, Pred, _) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% bagof/3 and setof/3 existential quantifiers
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_body'(Var^Pred, Var^TPred, Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_body'(Pred, TPred, Context).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% control constructs
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_body'((Pred1, Pred2), (TPred1, TPred2), Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_body'(Pred1, TPred1, Context),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_body'(Pred2, TPred2, Context).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_body'((Pred1; Pred2), (TPred1; TPred2), Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_body'(Pred1, TPred1, Context),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_body'(Pred2, TPred2, Context).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_body'((Pred1 -> Pred2), (TPred1 -> TPred2), Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_body'(Pred1, TPred1, Context),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_body'(Pred2, TPred2, Context).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_body'(\+ Pred, \+ TPred, Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_body'(Pred, TPred, Context).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_body'(!, !, _) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_body'(true, true, _) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_body'(fail, fail, _) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_body'(repeat, repeat, _) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_body'(call(Pred), TPred, Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_body'(Pred, TPred, Context).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_body'(once(Pred), once(TPred), Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_body'(Pred, TPred, Context).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_body'(catch(Goal, Catcher, Recovery), catch(TGoal, Catcher, TRecovery), Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_body'(Goal, TGoal, Context),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_body'(Recovery, TRecovery, Context).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_body'(throw(Error), throw(Error), _) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% built-in metapredicates
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_body'(bagof(Term, Pred, List), bagof(Term, TPred, List), Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_body'(Pred, TPred, Context).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_body'(findall(Term, Pred, List), findall(Term, TPred, List), Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_body'(Pred, TPred, Context).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_body'(forall(Generate, Test), forall(TGenerate, TTest), Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_body'(Generate, TGenerate, Context),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_body'(Test, TTest, Context).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_body'(setof(Term, Pred, List), setof(Term, TPred, List), Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_body'(Pred, TPred, Context).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% message sending
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_body'(Obj::Pred, TPred, Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_msg'(Obj, Pred, TPred, Context).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_body'(::Pred, TPred, Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_self_msg'(Pred, TPred, Context).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_body'(^^Pred, TPred, Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_super_sending'(Pred, TPred, Context).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% "reflection" built-in predicates
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_body'(current_predicate(Pred), '$lgt_current_predicate'(This, Pred, This, _), Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_this'(Context, This).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_body'(predicate_property(Pred, Property), '$lgt_predicate_property'(This, Pred, Property, This, _), Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_this'(Context, This).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% database handling built-in predicates
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_body'(abolish(Pred), '$lgt_abolish'(This, Pred, This, _), Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_this'(Context, This).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_body'(asserta(Pred), '$lgt_asserta'(This, Pred, This, _), Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_this'(Context, This).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_body'(assertz(Pred), '$lgt_assertz'(This, Pred, This, _), Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_this'(Context, This).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_body'(clause(Head, Body), '$lgt_clause'(This, Head, Body, This, _), Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_this'(Context, This).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_body'(retract(Pred), '$lgt_retract'(This, Pred, This, _), Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_this'(Context, This).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_body'(retractall(Pred), '$lgt_retractall'(This, Pred, This, _), Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_this'(Context, This).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% inline methods (translated to a single unification with the corresponding context argument)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_body'(sender(Sender), true, Context) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_sender'(Context, Sender),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_body'(this(This), true, Context) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_this'(Context, This),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_body'(self(Self), true, Context) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_self'(Context, Self),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-08-26 16:45:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_body'(parameter(Arg, Value), true, Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_this'(Context, This),
							 | 
						
					
						
							
								
									
										
										
										
											2002-08-26 16:45:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									arg(Arg, This, Value),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% Logtalk and Prolog built-in predicates
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_body'(Pred, _, _) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_built_in'(Pred),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_iso_def_pred'(Pred),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_compiler_option'(portability, warning),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_compiler_option'(report, on),
							 | 
						
					
						
							
								
									
										
										
										
											2002-01-07 22:57:06 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									functor(Pred, Functor, Arity),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									write('WARNING!  non-ISO defined built-in predicate call: '),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									writeq(Functor/Arity), nl,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									fail.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_body'(Pred, '$lgt_call_built_in'(Pred, Context), Context) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_built_in'(Pred),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% invalid goal
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_body'(Pred, _, _) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_callable'(Pred),
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									throw(type_error(callable, Pred)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% goal is a call to a user predicate
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_body'(Condition, TCondition, Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Condition =.. [Functor|Args],
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									functor(Condition, Functor, Arity),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_prefix'(Context, EPrefix),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_construct_predicate_functor'(EPrefix, Functor, Arity, PPrefix),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_sender'(Context, Sender),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_this'(Context, This),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_self'(Context, Self),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_append'(Args, [Sender, This, Self], Args2),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									TCondition =.. [PPrefix|Args2],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_calls_pred_'(Functor/Arity)).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_tr_msg'(@object, @term, -term, +term)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% translates the sending of a message to an object
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% message broadcasting
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_msg'(Obj, Pred, TPred, Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Obj),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									(Obj = (_, _); Obj = (_; _)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_msg_broadcasting'(Obj, Pred, TPred, Context).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% invalid object identifier
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_msg'(Obj, _, _, _) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Obj),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_valid_object_id'(Obj),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									throw(type_error(object_identifier, Obj)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% remember the object receiving the message to later check if it's known
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-08-26 16:45:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_msg'(Obj, _, _, Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									nonvar(Obj),
							 | 
						
					
						
							
								
									
										
										
										
											2002-08-26 16:45:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_sender'(Context, user),	% not runtime msg translation
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_this'(Context, user),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_add_referenced_object'(Obj),
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									fail.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% non-instantiated message: traslation performed at runtime
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_msg'(Obj, Pred, '$lgt_send_to_object'(Obj, Pred, This), Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									var(Pred),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_this'(Context, This).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% control constructs
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_msg'(Obj, (Pred1, Pred2), (TPred1, TPred2), Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_msg'(Obj, Pred1, TPred1, Context),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_msg'(Obj, Pred2, TPred2, Context).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_msg'(Obj, (Pred1; Pred2), (TPred1; TPred2), Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_msg'(Obj, Pred1, TPred1, Context),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_msg'(Obj, Pred2, TPred2, Context).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_msg'(Obj, (Pred1 -> Pred2), (TPred1 -> TPred2), Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_msg'(Obj, Pred1, TPred1, Context),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_msg'(Obj, Pred2, TPred2, Context).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_msg'(Obj, \+ Pred, \+ TPred, Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_msg'(Obj, Pred, TPred, Context).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_msg'(_, !, !, _) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_msg'(_, true, true, _) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_msg'(_, fail, fail, _) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_msg'(_, repeat, repeat, _) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_msg'(Obj, call(Pred), TPred, Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_msg'(Obj, Pred, TPred, Context).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_msg'(Obj, once(Pred), once(TPred), Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_msg'(Obj, Pred, TPred, Context).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_msg'(Obj, catch(Goal, Catcher, Recovery), catch(TGoal, Catcher, TRecovery), Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_msg'(Obj, Goal, TGoal, Context),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_msg'(Obj, Recovery, TRecovery, Context).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_msg'(_, throw(Error), throw(Error), _) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% built-in metapredicates
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_msg'(Obj, bagof(Term, Pred, List), bagof(Term, TPred, List), Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_msg'(Obj, Pred, TPred, Context).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_msg'(Obj, findall(Term, Pred, List), findall(Term, TPred, List), Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_msg'(Obj, Pred, TPred, Context).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_msg'(Obj, forall(Generate, Test), forall(TGenerate, TTest), Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_msg'(Obj, Generate, TGenerate, Context),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_msg'(Obj, Test, TTest, Context).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_msg'(Obj, setof(Term, Pred, List), setof(Term, TPred, List), Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_msg'(Obj, Pred, TPred, Context).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% "reflection" built-in predicates
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_msg'(Obj, current_predicate(Pred), '$lgt_current_predicate'(Obj, Pred, This, p(p(p))), Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_this'(Context, This).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_msg'(Obj, predicate_property(Pred, Property), '$lgt_predicate_property'(Obj, Pred, Property, This, p(p(p))), Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_this'(Context, This).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% database handling built-in predicates
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_msg'(Obj, abolish(Pred), '$lgt_abolish'(Obj, Pred, This, p(p(p))), Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_this'(Context, This).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_msg'(Obj, asserta(Pred), '$lgt_asserta'(Obj, Pred, This, p(p(p))), Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_this'(Context, This).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_msg'(Obj, assertz(Pred), '$lgt_assertz'(Obj, Pred, This, p(p(p))), Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_this'(Context, This).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_msg'(Obj, clause(Head, Body), '$lgt_clause'(Obj, Head, Body, This, p(p(p))), Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_this'(Context, This).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_msg'(Obj, retract(Pred), '$lgt_retract'(Obj, Pred, This, p(p(p))), Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_this'(Context, This).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_msg'(Obj, retractall(Pred), '$lgt_retractall'(Obj, Pred, This, p(p(p))), Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_this'(Context, This).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% invalid goal
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_msg'(_, Pred, _, _) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_callable'(Pred),
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									throw(type_error(callable, Pred)).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% message is not a built-in control construct or a call to a built-in 
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% (meta-)predicate: translation performed at runtime
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_msg'(Obj, Pred, '$lgt_send_to_object'(Obj, Pred, This), Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									var(Obj),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_this'(Context, This).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_msg'(Obj, Pred, '$lgt_send_to_object_nv'(Obj, Pred, This), Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_this'(Context, This).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_tr_self_msg'(@term, -term, +term)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% translates the sending of a message to self
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% non-instantiated message: traslation performed at runtime
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_self_msg'(Pred, '$lgt_send_to_self'(Self, Pred, This), Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									var(Pred),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_this'(Context, This),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_self'(Context, Self).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% control constructs
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_self_msg'((Pred1, Pred2), (TPred1, TPred2), Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_self_msg'(Pred1, TPred1, Context),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_self_msg'(Pred2, TPred2, Context).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_self_msg'(((Pred1; Pred2)), (TPred1; TPred2), Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_self_msg'(Pred1, TPred1, Context),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_self_msg'(Pred2, TPred2, Context).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_self_msg'((Pred1 -> Pred2), (TPred1 -> TPred2), Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_self_msg'(Pred1, TPred1, Context),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_self_msg'(Pred2, TPred2, Context).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_self_msg'(\+ Pred, \+ TPred, Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_self_msg'(Pred, TPred, Context).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_self_msg'(!, !, _) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_self_msg'(true, true, _) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_self_msg'(fail, fail, _) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_self_msg'(repeat, repeat, _) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_self_msg'(call(Pred), TPred, Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_self_msg'(Pred, TPred, Context).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_self_msg'(once(Pred), once(TPred), Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_self_msg'(Pred, TPred, Context).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_self_msg'(catch(Goal, Catcher, Recovery), catch(TGoal, Catcher, TRecovery), Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_self_msg'(Goal, TGoal, Context),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_self_msg'(Recovery, TRecovery, Context).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_self_msg'(throw(Error), throw(Error), _) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% built-in metapredicates
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_self_msg'(bagof(Term, Pred, List), bagof(Term, TPred, List), Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_self_msg'(Pred, TPred, Context).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_self_msg'(findall(Term, Pred, List), findall(Term, TPred, List), Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_self_msg'(Pred, TPred, Context).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_self_msg'(forall(Generate, Test), forall(TGenerate, TTest), Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_self_msg'(Generate, TGenerate, Context),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_self_msg'(Test, TTest, Context).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_self_msg'(setof(Term, Pred, List), setof(Term, TPred, List), Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_self_msg'(Pred, TPred, Context).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% "reflection" built-in predicates
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_self_msg'(current_predicate(Pred), '$lgt_current_predicate'(Self, Pred, This, p(_)), Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_self'(Context, Self),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_this'(Context, This).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_self_msg'(predicate_property(Pred, Property), '$lgt_predicate_property'(Self, Pred, Property, This, p(_)), Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_self'(Context, Self),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_this'(Context, This).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% database handling built-in predicates
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_self_msg'(abolish(Pred), '$lgt_abolish'(Self, Pred, This, p(_)), Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_self'(Context, Self),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_this'(Context, This).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_self_msg'(asserta(Pred), '$lgt_asserta'(Self, Pred, This, p(_)), Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_self'(Context, Self),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_this'(Context, This).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_self_msg'(assertz(Pred), '$lgt_assertz'(Self, Pred, This, p(_)), Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_self'(Context, Self),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_this'(Context, This).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_self_msg'(clause(Head, Body), '$lgt_clause'(Self, Head, Body, This, p(_)), Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_self'(Context, Self),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_this'(Context, This).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_self_msg'(retract(Pred), '$lgt_retract'(Self, Pred, This, p(_)), Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_self'(Context, Self),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_this'(Context, This).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_self_msg'(retractall(Pred), '$lgt_retractall'(Self, Pred, This, p(_)), Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_self'(Context, Self),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_this'(Context, This).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% invalid goal
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_self_msg'(Pred, _, _) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_callable'(Pred),
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									throw(type_error(callable, Pred)).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% message is not a built-in control construct or a call to a built-in 
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% (meta-)predicate: translation performed at runtime
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_self_msg'(Pred, '$lgt_send_to_self_nv'(Self, Pred, This), Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_self'(Context, Self),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_this'(Context, This).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% message broadcasting
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_msg_broadcasting'((Obj1, Obj2), Pred, (TP1, TP2), Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_msg'(Obj1, Pred, TP1, Context),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_msg'(Obj2, Pred, TP2, Context).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_msg_broadcasting'((Obj1; Obj2), Pred, (TP1; TP2), Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_msg'(Obj1, Pred, TP1, Context),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_tr_msg'(Obj2, Pred, TP2, Context).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_tr_super_sending'(@term, -term, +term)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% translates calling of redefined predicates (super calls)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% invalid goal
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_super_sending'(Pred, _, _) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Pred),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_callable'(Pred),
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									throw(type_error(callable, Pred)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% translation performed at runtime
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_super_sending'(Pred, '$lgt_send_to_super'(Self, Pred, This, Sender), Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									var(Pred),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_self'(Context, Self),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_this'(Context, This),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_sender'(Context, Sender).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_super_sending'(Pred, '$lgt_send_to_super_nv'(Self, Pred, This, Sender), Context) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_self'(Context, Self),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_this'(Context, This),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_sender'(Context, Sender).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_extract_metavars'(+callable, -list)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% constructs a list of all variables that occur
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% in a position corresponding to a meta-argument
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_extract_metavars'(Pred, Metavars) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									functor(Pred, Functor, Arity),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									functor(Meta, Functor, Arity),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									('$lgt_metapredicate_'(Meta) ->
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										Pred =.. [_| Args],
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										Meta =.. [_| MArgs],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										'$lgt_extract_metavars'(Args, MArgs, Metavars)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										Metavars = []).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_extract_metavars'(+list, +list, -list)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_extract_metavars'([], [], []).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_extract_metavars'([Var| Args], [MArg| MArgs], [Var| Metavars]) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									var(Var),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									MArg = (::),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_extract_metavars'(Args, MArgs, Metavars).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_extract_metavars'([_| Args], [_| MArgs], Metavars) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_extract_metavars'(Args, MArgs, Metavars).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-08-26 16:45:50 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_simplify_clause'(+clause, -clause)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% simplify translated clause by examining clause body
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_simplify_clause'((Head :- true), Head) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_simplify_clause'((Head :- Body), (Head :- SBody)) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_simplify_body'(Body, SBody).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_simplify_body'(+callable, -callable)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% remove redundant calls to true/0 from a translated clause body
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_simplify_body'((A;B), (SA;SB)) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_simplify_body'(A, SA),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_simplify_body'(B, SB).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_simplify_body'((A->B), (SA->SB)) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_simplify_body'(A, SA),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_simplify_body'(B, SB).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_simplify_body'((true, B), SB) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_simplify_body'(B, SB).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_simplify_body'((B, true), SB) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_simplify_body'(B, SB).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_simplify_body'((A, B), (SA, SB)) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_simplify_body'(A, SA),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_simplify_body'(B, SB).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_simplify_body'(B, B).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_tr_object_id'(+object_identifier)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% from the object identifier construct the set of 
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% functor prefixes used in the compiled code clauses
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_object_id'(Obj) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_add_referenced_object'(Obj),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_construct_object_functors'(Obj, Prefix, Dcl, Def, Super, IDcl, IDef, DDcl, DDef),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_object_'(Obj, Prefix, Dcl, Def, Super, IDcl, IDef, DDcl, DDef)),
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									Term =.. [Prefix, Dcl, Def, Super, IDcl, IDef, DDcl, DDef],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_entity_functors_'(Term)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_rclause_'('$lgt_current_object_'(Obj, Prefix, Dcl, Def, Super))),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_entity_'(object, Obj, Prefix, Dcl)).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_tr_category_id'(+category_identifier)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% from the category identifier construct the set of 
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%  functor prefixes used in the compiled code clauses
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_category_id'(Ctg) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_add_referenced_category'(Ctg),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_construct_category_functors'(Ctg, Prefix, Dcl, Def),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_category_'(Ctg, Prefix, Dcl, Def)),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Term =.. [Prefix, Dcl, Def],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_entity_functors_'(Term)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_rclause_'('$lgt_current_category_'(Ctg, Prefix))),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_entity_'(category, Ctg, Prefix, Dcl)).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_tr_protocol_id'(+protocol_identifier)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% from the protocol identifier construct the set of  
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% functor prefixes used in the compiled code clauses
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_protocol_id'(Ptc) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_add_referenced_protocol'(Ptc),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_construct_protocol_functors'(Ptc, Prefix, Dcl),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_protocol_'(Ptc, Prefix, Dcl)),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Term =.. [Prefix, Dcl],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_entity_functors_'(Term)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_rclause_'('$lgt_current_protocol_'(Ptc, Prefix))),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_entity_'(protocol, Ptc, Prefix, Dcl)).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_tr_implements_protocol'(+list, +object_identifier)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% '$lgt_tr_implements_protocol'(+list, +category_identifier)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% translates an "implementents" relation between 
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%  a category or an object and a list of protocols
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_implements_protocol'([], _).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_implements_protocol'([Ref| Refs], ObjOrCtg) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_valid_scope'(Ref) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										('$lgt_scope_id'(Ref, Scope, Ptc),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										 ('$lgt_valid_protocol_id'(Ptc) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										 	'$lgt_add_referenced_protocol'(Ptc),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											assertz('$lgt_rclause_'('$lgt_implements_protocol_'(ObjOrCtg, Ptc, Scope))),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'$lgt_construct_protocol_functors'(Ptc, Prefix, Dcl),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											assertz('$lgt_implemented_protocol_'(Ptc, Prefix, Dcl, Scope)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'$lgt_tr_implements_protocol'(Refs, ObjOrCtg)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
											;
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											throw(type_error(protocol_identifier, Ptc))))
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										throw(type_error(scope, Ref)).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_tr_imports_category'(+list, +object_identifier)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% translates an "imports" relation between 
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% an object and a list of categories 
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_imports_category'([], _).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_imports_category'([Ref| Refs], Obj) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_valid_scope'(Ref) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										('$lgt_scope_id'(Ref, Scope, Ctg),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										 ('$lgt_valid_category_id'(Ctg) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										 	'$lgt_add_referenced_category'(Ctg),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											assertz('$lgt_rclause_'('$lgt_imports_category_'(Obj, Ctg, Scope))),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'$lgt_construct_category_functors'(Ctg, Prefix, Dcl, Def),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											assertz('$lgt_imported_category_'(Ctg, Prefix, Dcl, Def, Scope)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'$lgt_tr_imports_category'(Refs, Obj)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
											;
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											throw(type_error(category_identifier, Ctg))))
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										throw(type_error(scope, Ref)).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_tr_instantiates_class'(+list, +object_identifier)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% translates an "instantiates" relation between 
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% an instance and a list of classes
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_instantiates_class'([], _).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_instantiates_class'([Ref| Refs], Obj) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_valid_scope'(Ref) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										('$lgt_scope_id'(Ref, Scope, Class),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										 ('$lgt_valid_object_id'(Class) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										 	'$lgt_add_referenced_object'(Class),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											assertz('$lgt_rclause_'('$lgt_instantiates_class_'(Obj, Class, Scope))),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'$lgt_construct_object_functors'(Class, Prefix, Dcl, Def, Super, IDcl, IDef, DDcl, DDef),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											assertz('$lgt_instantiated_class_'(Class, Prefix, Dcl, Def, Super, IDcl, IDef, DDcl, DDef, Scope)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'$lgt_tr_instantiates_class'(Refs, Obj)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
											;
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											throw(type_error(object_identifier, Class))))
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										throw(type_error(scope, Ref)).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_tr_specializes_class'(+list, +object_identifier)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% translates a "specializes" relation between 
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% a class and a list of superclasses
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_specializes_class'([], _).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_specializes_class'([Ref| Refs], Class) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_valid_scope'(Ref) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										('$lgt_scope_id'(Ref, Scope, Superclass),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										 ('$lgt_valid_object_id'(Superclass) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										 	'$lgt_add_referenced_object'(Superclass),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											assertz('$lgt_rclause_'('$lgt_specializes_class_'(Class, Superclass, Scope))),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'$lgt_construct_object_functors'(Superclass, Prefix, Dcl, Def, Super, IDcl, IDef, DDcl, DDef),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											assertz('$lgt_specialized_class_'(Superclass, Prefix, Dcl, Def, Super, IDcl, IDef, DDcl, DDef, Scope)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'$lgt_tr_specializes_class'(Refs, Class)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
											;
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											throw(type_error(object_identifier, Superclass))))
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										throw(type_error(scope, Ref)).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_tr_extends_object'(+list, +object_identifier)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% translates an "extends" relation between 
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% a prototype and a list of parents
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_extends_object'([], _).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_extends_object'([Ref| Refs], Obj) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_valid_scope'(Ref) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										('$lgt_scope_id'(Ref, Scope, Parent),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										 ('$lgt_valid_object_id'(Parent) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										 	'$lgt_add_referenced_object'(Parent),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											assertz('$lgt_rclause_'('$lgt_extends_object_'(Obj, Parent, Scope))),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'$lgt_construct_object_functors'(Parent, Prefix, Dcl, Def, Super, IDcl, IDef, DDcl, DDef),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											assertz('$lgt_extended_object_'(Parent, Prefix, Dcl, Def, Super, IDcl, IDef, DDcl, DDef, Scope)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'$lgt_tr_extends_object'(Refs, Obj)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
											;
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											throw(type_error(object_identifier, Parent))))
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										throw(type_error(scope, Ref)).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_tr_extends_protocol'(+list, +protocol_identifier)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% translates an "extends" relation between 
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% a protocol and a list of protocols
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_extends_protocol'([], _).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_tr_extends_protocol'([Ref| Refs], Ptc1) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_valid_scope'(Ref) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										('$lgt_scope_id'(Ref, Scope, Ptc2),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										 ('$lgt_valid_protocol_id'(Ptc2) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										 	'$lgt_add_referenced_protocol'(Ptc2),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											assertz('$lgt_rclause_'('$lgt_extends_protocol_'(Ptc1, Ptc2, Scope))),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'$lgt_construct_protocol_functors'(Ptc2, Prefix, Dcl),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											assertz('$lgt_extended_protocol_'(Ptc2, Prefix, Dcl, Scope)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'$lgt_tr_extends_protocol'(Refs, Ptc1)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
											;
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											throw(type_error(protocol_identifier, Ptc2))))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										throw(type_error(scope, Ref)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_add_referenced_object'(+object_identifier)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% assert the name of an object referenced by the entity that we are compiling
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_add_referenced_object'(Obj) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_referenced_object_'(Obj) ->
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										true
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										assertz('$lgt_referenced_object_'(Obj)).
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_add_referenced_protocol'(+protocol_identifier)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% assert the name of a protocol referenced by the entity that we are compiling
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_add_referenced_protocol'(Ptc) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_referenced_protocol_'(Ptc) ->
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										true
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										assertz('$lgt_referenced_protocol_'(Ptc)).
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_add_referenced_category'(+category_identifier)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% assert the name of a category referenced by the entity that we are compiling
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_add_referenced_category'(Ctg) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_referenced_category_'(Ctg) ->
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										true
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										assertz('$lgt_referenced_category_'(Ctg)).
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_report_unknown_entities'
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% report any unknown referenced entities found while compiling an entity
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% (if the corresponding compiler option is not set to "silent")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_report_unknown_entities' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									('$lgt_compiler_option'(unknown, warning),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									 '$lgt_compiler_option'(report, on)) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										'$lgt_report_unknown_objects',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										'$lgt_report_unknown_protocols',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										'$lgt_report_unknown_categories'
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										true.	
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_report_unknown_objects'
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% report any unknown referenced objects found while compiling an entity
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_report_unknown_objects' :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									findall(
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										Obj,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										('$lgt_referenced_object_'(Obj), \+ ('$lgt_current_object_'(Obj, _, _, _, _); '$lgt_entity_'(_, Obj, _, _))),
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										Objs),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									(Objs \= [] ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										write('WARNING!  references to unknown objects:    '), writeq(Objs), nl
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										true).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_report_unknown_protocols'
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% report any unknown referenced protocols found while compiling an entity
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_report_unknown_protocols' :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									findall(
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										Ptc,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										('$lgt_referenced_protocol_'(Ptc), \+ ('$lgt_current_protocol_'(Ptc, _); '$lgt_entity_'(_, Ptc, _, _))),
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										Ptcs),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									(Ptcs \= [] ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										write('WARNING!  references to unknown protocols:  '), writeq(Ptcs), nl
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										true).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_report_unknown_categories'
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% report any unknown referenced categories found while compiling an entity
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_report_unknown_categories' :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									findall(
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										Ctg,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										('$lgt_referenced_category_'(Ctg), \+ ('$lgt_current_category_'(Ctg, _); '$lgt_entity_'(_, Ctg, _, _))),
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										Ctgs),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									(Ctgs \= [] ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										write('WARNING!  references to unknown categories: '), writeq(Ctgs), nl
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										true).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_add_def_clause'(+atom, +integer, +atom, +term)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% adds a "def clause" (used to translate a predicate call)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_add_def_clause'(Functor, Arity, Prefix, Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									functor(Head, Functor, Arity),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Head =.. [_| Args],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_sender'(Context, Sender),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_this'(Context, This),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_self'(Context, Self),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_append'(Args, [Sender, This, Self], TArgs),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									THead =.. [Prefix|TArgs],
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									once(
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										('$lgt_object_'(_, _, _, Def, _, _, _, _, _);
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										 '$lgt_category_'(_, _, _, Def))),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Clause =.. [Def, Head, Sender, This, Self, THead],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									('$lgt_def_'(Clause) ->
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										true
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										assertz('$lgt_def_'(Clause))),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									('$lgt_built_in'(Head) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										assertz('$lgt_redefined_built_in_'(Head, Context, THead))
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										true),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									('$lgt_defs_pred_'(Functor/Arity) ->
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										true
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										assertz('$lgt_defs_pred_'(Functor/Arity))).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_add_ddef_clause'(+atom, +integer, +atom, +term)
							 | 
						
					
						
							
								
									
										
										
										
											2002-04-03 13:26:59 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% adds a "ddef clause" (used to translate a predicate call)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_add_ddef_clause'(Functor, Arity, Prefix, Context) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-04-03 13:26:59 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									functor(Head, Functor, Arity),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Head =.. [_| Args],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_sender'(Context, Sender),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_this'(Context, This),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_self'(Context, Self),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_append'(Args, [Sender, This, Self], TArgs),
							 | 
						
					
						
							
								
									
										
										
										
											2002-04-03 13:26:59 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									THead =.. [Prefix|TArgs],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_object_'(_, _, _, _, _, _, _, _, DDef),
							 | 
						
					
						
							
								
									
										
										
										
											2002-04-03 13:26:59 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									Clause =.. [DDef, Head, Sender, This, Self, THead],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									('$lgt_ddef_'(Clause) ->
							 | 
						
					
						
							
								
									
										
										
										
											2002-04-03 13:26:59 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										true
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										assertz('$lgt_ddef_'(Clause))),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									('$lgt_built_in'(Head) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										assertz('$lgt_redefined_built_in_'(Head, Context, THead))
							 | 
						
					
						
							
								
									
										
										
										
											2002-04-03 13:26:59 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										true),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									('$lgt_defs_pred_'(Functor/Arity) ->
							 | 
						
					
						
							
								
									
										
										
										
											2002-04-03 13:26:59 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										true
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										assertz('$lgt_defs_pred_'(Functor/Arity))).
							 | 
						
					
						
							
								
									
										
										
										
											2002-04-03 13:26:59 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_assert_ddef_clause'(+atom, +integer, +atom, +atom, -callable)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							
								
									
										
										
										
											2002-04-03 13:26:59 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% asserts a dynamic "ddef clause" (used to translate a predicate call)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_assert_ddef_clause'(Functor, Arity, OPrefix, DDef, Call) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_construct_predicate_functor'(OPrefix, Functor, Arity, PPrefix),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									functor(Pred, Functor, Arity),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Pred =.. [_| Args],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_append'(Args, [Sender, This, Self], TArgs),
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									Call =.. [PPrefix| TArgs],
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Clause =.. [DDef, Pred, Sender, This, Self, Call],
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									assertz(Clause).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_update_ddef_table'(+atom, +callable)
							 | 
						
					
						
							
								
									
										
										
										
											2002-04-03 13:26:59 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% retracts a dynamic "ddef clause" (used to translate a predicate call)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% if there are no more clauses for the predicate otherwise does nothing
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_update_ddef_table'(DDef, Call) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-04-03 13:26:59 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									functor(Call, Functor, Arity),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									functor(Call2, Functor, Arity),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									(clause(Call2, _) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										true
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										Clause =.. [DDef, _, _, _, _, Call2],
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										retractall(Clause)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_convert_test_scope'(@term, +term),
							 | 
						
					
						
							
								
									
										
										
										
											2002-04-03 13:26:59 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% convert asserta/z test scope to predicate declaration scope
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_convert_test_scope'(Scope, Scope2) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-04-03 13:26:59 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									var(Scope) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										Scope2 = p
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										((Scope = p(V), var(V)) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											Scope2 = p(p)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											Scope2 = p(p(p))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_assert_ddcl_clause'(+atom, +term, +term)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% asserts a dynamic predicate declaration
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_assert_ddcl_clause'(DDcl, Pred, Scope) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									functor(Pred, Functor, Arity),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									functor(DPred, Functor, Arity),
							 | 
						
					
						
							
								
									
										
										
										
											2002-04-03 13:26:59 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									Clause =.. [DDcl, DPred, Scope, (dynamic), no],
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									assertz(Clause).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_gen_directives'(+atom)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% generates entity directives
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_directives'(object) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_gen_object_directives'.
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_directives'(category) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_gen_category_directives'.
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_directives'(protocol) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_gen_protocol_directives'.
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_object_directives' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_gen_object_dynamic_directives',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_gen_object_discontiguous_directives'.
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_category_directives' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_gen_category_dynamic_directives',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_gen_category_discontiguous_directives'.
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_protocol_directives' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_entity_comp_mode_'((dynamic)) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										'$lgt_protocol_'(_, Prefix, Dcl),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										assertz('$lgt_directive_'(dynamic(Prefix/1))),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										assertz('$lgt_directive_'(dynamic(Dcl/4))),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										assertz('$lgt_directive_'(dynamic(Dcl/5)))
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										true.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_object_dynamic_directives' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_entity_comp_mode_'((dynamic)) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										'$lgt_gen_dynamic_object_dynamic_directives'
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										'$lgt_gen_static_object_dynamic_directives'.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_dynamic_object_dynamic_directives' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_object_'(_, Prefix, Dcl, Def, Super, IDcl, IDef, DDcl, DDef),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_directive_'(dynamic(Prefix/7))),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_directive_'(dynamic(Dcl/4))),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_directive_'(dynamic(Dcl/6))),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_directive_'(dynamic(Def/5))),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_directive_'(dynamic(Def/6))),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_directive_'(dynamic(Super/6))),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_directive_'(dynamic(IDcl/6))),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_directive_'(dynamic(IDef/6))),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_directive_'(dynamic(DDcl/4))),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_directive_'(dynamic(DDef/5))),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									forall(
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										('$lgt_def_'(Clause), Clause \= (_ :- _)),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										(arg(5, Clause, Call), functor(Call, Functor, Arity),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										 assertz('$lgt_directive_'(dynamic(Functor/Arity))))).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_static_object_dynamic_directives' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_object_'(_, _, _, Def, _, _, _, DDcl, DDef),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_directive_'(dynamic(DDcl/4))),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_directive_'(dynamic(DDef/5))),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_dynamic_'(Functor/Arity),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									functor(Pred, Functor, Arity),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Clause =.. [Def, Pred, _, _, _, TPred],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_def_'(Clause),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									functor(TPred, TFunctor, TArity),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_directive_'(dynamic(TFunctor/TArity))),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									fail.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_static_object_dynamic_directives'.
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_object_discontiguous_directives' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_object_'(_, _, _, Def, _, _, _, _, _),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_discontiguous_'(Functor/Arity),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									functor(Pred, Functor, Arity),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Clause =.. [Def, Pred, _, _, _, TPred],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_def_'(Clause),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									functor(TPred, TFunctor, TArity),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_directive_'(discontiguous(TFunctor/TArity))),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									fail.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_object_discontiguous_directives'.
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_category_dynamic_directives' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_entity_comp_mode_'((dynamic)) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										'$lgt_category_'(_, Prefix, Dcl, Def),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										assertz('$lgt_directive_'(dynamic(Prefix/2))),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										assertz('$lgt_directive_'(dynamic(Dcl/4))),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										assertz('$lgt_directive_'(dynamic(Dcl/5))),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										assertz('$lgt_directive_'(dynamic(Def/5))),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										forall(
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											('$lgt_def_'(Clause), Clause \= (_ :- _)),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
											(arg(5, Clause, Call), functor(Call, Functor, Arity),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										 	 assertz('$lgt_directive_'(dynamic(Functor/Arity)))))
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										 ;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										 true.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_category_discontiguous_directives' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_category_'(_, _, _, Def),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_discontiguous_'(Functor/Arity),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									functor(Pred, Functor, Arity),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Clause =.. [Def, Pred, _, _, _, TPred],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_def_'(Clause),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									functor(TPred, TFunctor, TArity),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_directive_'(discontiguous(TFunctor/TArity))),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									fail.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_category_discontiguous_directives'.
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_gen_clauses'(+atom)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_clauses'(object) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_gen_object_clauses'.
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_clauses'(protocol) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_gen_protocol_clauses'.
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_clauses'(category) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_gen_category_clauses'.
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_object_clauses' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									('$lgt_rclause_'('$lgt_instantiates_class_'(_, _, _));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									 '$lgt_rclause_'('$lgt_specializes_class_'(_, _, _))) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										'$lgt_gen_ic_clauses'
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										'$lgt_gen_prototype_clauses'.
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_gen_local_dcl_clauses'
							 | 
						
					
						
							
								
									
										
										
										
											2002-04-03 13:26:59 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% a (local) predicate declaration is only generated
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% if there is a scope declaration for the predicate
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_local_dcl_clauses' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_entity_'(_, _, _, Dcl),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									(('$lgt_public_'(Functor/Arity), Scope = p(p(p)));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									 ('$lgt_protected_'(Functor/Arity), Scope = p(p));
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									 ('$lgt_private_'(Functor/Arity), Scope = p)),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									functor(Meta, Functor, Arity),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									('$lgt_metapredicate_'(Meta) ->
							 | 
						
					
						
							
								
									
										
										
										
											2002-04-03 13:26:59 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										Meta2 = Meta
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										Meta2 = no),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									functor(Pred, Functor, Arity),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									('$lgt_dynamic_'(Functor/Arity)->
							 | 
						
					
						
							
								
									
										
										
										
											2002-04-03 13:26:59 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										Compilation = (dynamic)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										Compilation = static),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Fact =.. [Dcl, Pred, Scope, Compilation, Meta2],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_dcl_'(Fact)),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									fail.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_local_dcl_clauses'.
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_catchall_dcl_clause' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_dcl_'(_) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										'$lgt_entity_'(_, _, _, Dcl),
							 | 
						
					
						
							
								
									
										
										
										
											2002-04-03 13:26:59 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										Head =.. [Dcl, _, _, _, _],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										assertz('$lgt_dcl_'((Head:-fail)))
							 | 
						
					
						
							
								
									
										
										
										
											2002-04-03 13:26:59 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										true.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_gen_local_def_clauses'
							 | 
						
					
						
							
								
									
										
										
										
											2002-04-03 13:26:59 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% generates local def clauses for undefined but declared (via scope or
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% dynamic directives) predicates
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_local_def_clauses' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_entity_'(_, _, EPrefix, _),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_dynamic_'(Functor/Arity),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_defs_pred_'(Functor/Arity),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_construct_predicate_functor'(EPrefix, Functor, Arity, PPrefix),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_context'(Context),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									((\+ '$lgt_public_'(Functor/Arity),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									  \+ '$lgt_protected_'(Functor/Arity),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									  \+ '$lgt_private_'(Functor/Arity)) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										'$lgt_add_ddef_clause'(Functor, Arity, PPrefix, Context)
							 | 
						
					
						
							
								
									
										
										
										
											2002-04-03 13:26:59 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										'$lgt_add_def_clause'(Functor, Arity, PPrefix, Context)),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									fail.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_local_def_clauses'.
							 | 
						
					
						
							
								
									
										
										
										
											2002-04-03 13:26:59 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_obj_catchall_def_clause' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_def_'(_) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										'$lgt_object_'(_, _, _, Def, _, _, _, _, _),
							 | 
						
					
						
							
								
									
										
										
										
											2002-04-03 13:26:59 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										Head =.. [Def, _, _, _, _, _],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										assertz('$lgt_def_'((Head:-fail)))
							 | 
						
					
						
							
								
									
										
										
										
											2002-04-03 13:26:59 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										true.
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_protocol_clauses' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_gen_protocol_local_clauses',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_gen_protocol_linking_clauses',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_gen_protocol_extend_clauses'.
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_protocol_local_clauses' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_gen_local_dcl_clauses',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_gen_catchall_dcl_clause'.
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_protocol_linking_clauses' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_protocol_'(Ptc, _, PDcl),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Head =.. [PDcl, Pred, Scope, Compilation, Meta, Ptc],
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Body =.. [PDcl, Pred, Scope, Compilation, Meta],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_dcl_'((Head:-Body))).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_protocol_extend_clauses' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_protocol_'(_, _, PDcl1),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Head =.. [PDcl1, Pred, Scope, Compilation, Meta, Container],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_extended_protocol_'(_, _, PDcl2, EScope),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									(EScope = (public) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										Body =.. [PDcl2, Pred, Scope, Compilation, Meta, Container]
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										(EScope = protected ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											Call =.. [PDcl2, Pred, Scope2, Compilation, Meta, Container],
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											Body = (Call, (Scope2 = p -> Scope = p; Scope = p(p)))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											Scope = p,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											Body =.. [PDcl2, Pred, _, Compilation, Meta, Container])),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_dcl_'((Head:-Body))),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									fail.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_protocol_extend_clauses'.
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_category_clauses' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_gen_category_dcl_clauses',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_gen_category_def_clauses'.
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_category_dcl_clauses' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_gen_local_dcl_clauses',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_gen_catchall_dcl_clause',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_gen_category_linking_dcl_clauses',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_gen_category_implements_dcl_clauses'.
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_category_linking_dcl_clauses' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_category_'(Ctg, _, CDcl, _),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Head =.. [CDcl, Pred, Scope, Compilation, Meta, Ctg],
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Body =.. [CDcl, Pred, Scope, Compilation, Meta],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_dcl_'((Head:-Body))).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_category_implements_dcl_clauses' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_category_'(_, _, CDcl, _),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Head =.. [CDcl, Pred, Scope, Compilation, Meta, Container],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_implemented_protocol_'(_, _, PDcl, EScope),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									(EScope = (public) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										Body =.. [PDcl, Pred, Scope, Compilation, Meta, Container]
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										(EScope = protected ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											Call =.. [PDcl, Pred, Scope2, Compilation, Meta, Container],
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											Body = (Call, (Scope2 = p -> Scope = p; Scope = p(p)))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											Scope = p,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											Body =.. [PDcl, Pred, _, Compilation, Meta, Container])),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_dcl_'((Head:-Body))),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									fail.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_category_implements_dcl_clauses'.
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_category_def_clauses' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_gen_category_catchall_def_clause'.
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-04-03 13:26:59 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_category_catchall_def_clause' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_def_'(_) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										'$lgt_category_'(_, _, _, Def),
							 | 
						
					
						
							
								
									
										
										
										
											2002-04-03 13:26:59 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										Head =.. [Def, _, _, _, _, _],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										assertz('$lgt_def_'((Head:-fail)))
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										true.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_prototype_clauses' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_gen_prototype_dcl_clauses',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_gen_prototype_def_clauses',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_gen_prototype_super_clauses'.
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_prototype_dcl_clauses' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_gen_local_dcl_clauses',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_gen_catchall_dcl_clause',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_gen_prototype_linking_dcl_clauses',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_gen_prototype_implements_dcl_clauses',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_gen_prototype_imports_dcl_clauses',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_gen_prototype_extends_dcl_clauses'.
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_prototype_linking_dcl_clauses' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_object_'(Obj, _, Dcl, _, _, _, _, DDcl, _),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Head =.. [Dcl, Pred, Scope, Compilation, Meta, Obj, Obj],
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Body =.. [Dcl, Pred, Scope, Compilation, Meta],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_dcl_'((Head:-Body))),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Body2 =.. [DDcl, Pred, Scope, Compilation, Meta],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_dcl_'((Head:-Body2))).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_prototype_implements_dcl_clauses' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_object_'(Obj, _, ODcl, _, _, _, _, _, _),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Head =.. [ODcl, Pred, Scope, Compilation, Meta, Obj, Container],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_implemented_protocol_'(_, _, PDcl, EScope),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									(EScope = (public) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										Body =.. [PDcl, Pred, Scope, Compilation, Meta, Container]
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										(EScope = protected ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											Call =.. [PDcl, Pred, Scope2, Compilation, Meta, Container],
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											Body = (Call, (Scope2 = p -> Scope = p; Scope = p(p)))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											Scope = p,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											Body =.. [PDcl, Pred, _, Compilation, Meta, Container])),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_dcl_'((Head:-Body))),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									fail.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_prototype_implements_dcl_clauses'.
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_prototype_imports_dcl_clauses' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_object_'(Obj, _, ODcl, _, _, _, _, _, _),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Head =.. [ODcl, Pred, Scope, Compilation, Meta, Obj, Container],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_imported_category_'(_, _, CDcl, _, EScope),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									(EScope = (public) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										Body =.. [CDcl, Pred, Scope, Compilation, Meta, Container]
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										(EScope = protected ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											Call =.. [CDcl, Pred, Scope2, Compilation, Meta, Container],
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											Body = (Call, (Scope2 = p -> Scope = p; Scope = p(p)))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											Scope = p,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											Body =.. [CDcl, Pred, _, Compilation, Meta, Container])),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_dcl_'((Head:-Body))),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									fail.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_prototype_imports_dcl_clauses'.
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_prototype_extends_dcl_clauses' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_object_'(Obj, _, ODcl, _, _, _, _, _, _),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Head =.. [ODcl, Pred, Scope, Compilation, Meta, SContainer, TContainer],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_extended_object_'(_, _, PDcl, _, _, _, _, _, _, EScope),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									(EScope = (public) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										Body =.. [PDcl, Pred, Scope, Compilation, Meta, SContainer, TContainer]
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										(EScope = protected ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											Call =.. [PDcl, Pred, Scope2, Compilation, Meta, SContainer, TContainer],
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											Body = (Call, (Scope2 = p -> Scope = p; Scope = p(p)))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											Scope = p,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											Call =.. [PDcl, Pred, Scope2, Compilation, Meta, SContainer2, TContainer],
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											Body = (Call, (Scope2 = p -> SContainer = SContainer2; SContainer = Obj)))),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_dcl_'((Head:-Body))),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									fail.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_prototype_extends_dcl_clauses'.
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_prototype_def_clauses' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_gen_local_def_clauses',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_gen_obj_catchall_def_clause',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_gen_prototype_linking_def_clauses',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_gen_prototype_imports_def_clauses',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_gen_prototype_extends_def_clauses'.
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_prototype_linking_def_clauses' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_object_'(Obj, _, _, Def, _, _, _, _, DDef),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Head =.. [Def, Pred, Sender, This, Self, Call, Obj],
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Body =.. [Def, Pred, Sender, This, Self, Call],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_def_'((Head:-Body))),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Body2 =.. [DDef, Pred, Sender, This, Self, Call],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_def_'((Head:-Body2))).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_prototype_imports_def_clauses' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_object_'(Obj, _, _, ODef, _, _, _, _, _),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_rclause_'('$lgt_imports_category_'(Obj, Ctg, _)),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Head =.. [ODef, Pred, Sender, Obj, Self, Call, Ctg],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_imported_category_'(Ctg, _, _, CDef, _),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Body =.. [CDef, Pred, Sender, Obj, Self, Call],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_def_'((Head:-Body))),	
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									fail.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_prototype_imports_def_clauses'.
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_prototype_extends_def_clauses' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_object_'(Obj, _, _, ODef, _, _, _, _, _),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_rclause_'('$lgt_extends_object_'(Obj, Parent, _)),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Head =.. [ODef, Pred, Sender, Obj, Self, Call, Container],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_extended_object_'(Parent, _, _, PDef, _, _, _, _, _, _),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Body =.. [PDef, Pred, Sender, Parent, Self, Call, Container],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_def_'((Head:-Body))),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									fail.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_prototype_extends_def_clauses'.
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% we can have a root object where super have nowhere to go ...
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_prototype_super_clauses' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_object_'(Obj, _, _, _, OSuper, _, _, _, _),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_rclause_'('$lgt_extends_object_'(Obj, _, _)),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Head =.. [OSuper, _, _, _, _, _, _],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_def_'((Head:-fail))),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% ... or we may extends some objects
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_prototype_super_clauses' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_object_'(Obj, _, _, _, OSuper, _, _, _, _),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_rclause_'('$lgt_extends_object_'(Obj, Parent, _)),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Head =.. [OSuper, Pred, Sender, Obj, Self, Call, Container],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_extended_object_'(Parent, _, _, PDef, _, _, _, _, _, _),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Body =.. [PDef, Pred, Sender, Parent, Self, Call, Container],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_def_'((Head:-Body))),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									fail.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_prototype_super_clauses'.
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_ic_clauses' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_gen_ic_dcl_clauses',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_gen_ic_idcl_clauses',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_gen_ic_def_clauses',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_gen_ic_idef_clauses',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_gen_ic_super_clauses'.
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_ic_dcl_clauses' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_gen_local_dcl_clauses',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_gen_catchall_dcl_clause',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_gen_ic_hierarchy_dcl_clauses'.
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_ic_hierarchy_dcl_clauses' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_instantiated_class_'(_, _, _, _, _, _, _, _, _, _),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_object_'(_, _, ODcl, _, _, _, _, _, _),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Head =.. [ODcl, _, _, _, _, _, _],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_dcl_'((Head:-fail))).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_ic_hierarchy_dcl_clauses' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_object_'(Obj, _, ODcl, _, _, _, _, _, _),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Head =.. [ODcl, Pred, Scope, Compilation, Meta, SContainer, TContainer],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_instantiated_class_'(_, _, _, _, _, CIDcl, _, _, _, EScope),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									(EScope = (public) ->
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										Body =.. [CIDcl, Pred, Scope, Compilation, Meta, SContainer, TContainer]
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										(EScope = protected ->
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											Call =.. [CIDcl, Pred, Scope2, Compilation, Meta, SContainer, TContainer],
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
											Body = (Call, (Scope2 = p -> Scope = p; Scope = p(p)))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											Scope = p,
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											Call =.. [CIDcl, Pred, Scope2, Compilation, Meta, SContainer2, TContainer],
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
											Body = (Call, (Scope2 = p -> SContainer = SContainer2; SContainer = Obj)))),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_dcl_'((Head:-Body))),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									fail.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_ic_hierarchy_dcl_clauses'.
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% generates instance/class inherited declaration clauses
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_ic_idcl_clauses' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_gen_ic_linking_idcl_clauses',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_gen_ic_protocol_idcl_clauses',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_gen_ic_category_idcl_clauses',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_gen_ic_hierarchy_idcl_clauses'.
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_ic_linking_idcl_clauses' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_object_'(Obj, _, Dcl, _, _, IDcl, _, DDcl, _),
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									Head =.. [IDcl, Pred, Scope, Compilation, Meta, Obj, Obj],
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Body =.. [Dcl, Pred, Scope, Compilation, Meta],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_dcl_'((Head:-Body))),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Body2 =.. [DDcl, Pred, Scope, Compilation, Meta],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_dcl_'((Head:-Body2))).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_ic_protocol_idcl_clauses' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_object_'(Obj, _, _, _, _, OIDcl, _, _, _),
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									Head =.. [OIDcl, Pred, Scope, Compilation, Meta, Obj, Container],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_implemented_protocol_'(_, _, PDcl, EScope),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									(EScope = (public) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										Body =.. [PDcl, Pred, Scope, Compilation, Meta, Container]
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										(EScope = protected ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											Call =.. [PDcl, Pred, Scope2, Compilation, Meta, Container],
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											Body = (Call, (Scope2 = p -> Scope = p; Scope = p(p)))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											Scope = p,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											Body =.. [PDcl, Pred, _, Compilation, Meta, Container])),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_dcl_'((Head:-Body))),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									fail.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_ic_protocol_idcl_clauses'.
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_ic_category_idcl_clauses' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_object_'(Obj, _, _, _, _, OIDcl, _, _, _),
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									Head =.. [OIDcl, Pred, Scope, Compilation, Meta, Obj, Container],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_imported_category_'(_, _, CDcl, _, EScope),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									(EScope = (public) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										Body =.. [CDcl, Pred, Scope, Compilation, Meta, Container]
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										(EScope = protected ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											Call =.. [CDcl, Pred, Scope2, Compilation, Meta, Container],
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											Body = (Call, (Scope2 = p -> Scope = p; Scope = p(p)))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											Scope = p,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											Body =.. [CDcl, Pred, _, Compilation, Meta, Container])),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_dcl_'((Head:-Body))),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									fail.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_ic_category_idcl_clauses'.
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_ic_hierarchy_idcl_clauses' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_object_'(Obj, _, _, _, _, CIDcl, _, _, _),
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									Head =.. [CIDcl, Pred, Scope, Compilation, Meta, SContainer, TContainer],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_specialized_class_'(_, _, _, _, _, SIDcl, _, _, _, EScope),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									(EScope = (public) ->
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										Body =.. [SIDcl, Pred, Scope, Compilation, Meta, SContainer, TContainer]
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										(EScope = protected ->
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											Call =.. [SIDcl, Pred, Scope2, Compilation, Meta, SContainer, TContainer],
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
											Body = (Call, (Scope2 = p -> Scope = p; Scope = p(p)))
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											Scope = p,
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											Call =.. [SIDcl, Pred, Scope2, Compilation, Meta, SContainer2, TContainer],
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
											Body = (Call, (Scope2 = p -> SContainer = SContainer2; SContainer = Obj)))),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_dcl_'((Head:-Body))),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									fail.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_ic_hierarchy_idcl_clauses'.
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_ic_def_clauses' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_gen_local_def_clauses',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_gen_obj_catchall_def_clause',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_gen_ic_linking_def_clauses',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_gen_ic_imports_def_clauses',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_gen_ic_hierarchy_def_clauses'.
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_ic_linking_def_clauses' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_object_'(Obj, _, _, Def, _, _, _, _, DDef),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Head =.. [Def, Pred, Sender, This, Self, Call, Obj],
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Body =.. [Def, Pred, Sender, This, Self, Call],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_def_'((Head:-Body))),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Body2 =.. [DDef, Pred, Sender, This, Self, Call],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_def_'((Head:-Body2))).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_ic_imports_def_clauses' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_object_'(Obj, _, _, ODef, _, _, _, _, _),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_rclause_'('$lgt_imports_category_'(Obj, Ctg, _)),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Head =.. [ODef, Pred, Sender, Obj, Self, Call, Ctg],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_imported_category_'(Ctg, _, _, CDef, _),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Body =.. [CDef, Pred, Sender, Obj, Self, Call],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_def_'((Head:-Body))),	
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									fail.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_ic_imports_def_clauses'.
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_ic_hierarchy_def_clauses' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_object_'(Obj, _, _, ODef, _, _, _, _, _),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_rclause_'('$lgt_instantiates_class_'(Obj, Class, _)),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Head =.. [ODef, Pred, Sender, Obj, Self, Call, Container],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_instantiated_class_'(Class, _, _, _, _, _, CIDef, _, _, _),
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									Body =.. [CIDef, Pred, Sender, Class, Self, Call, Container],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_def_'((Head:-Body))),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									fail.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_ic_hierarchy_def_clauses'.
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_ic_idef_clauses' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_gen_ic_linking_idef_clauses',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_gen_ic_category_idef_clauses',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_gen_ic_hierarchy_idef_clauses'.
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_ic_linking_idef_clauses' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_object_'(Obj, _, _, Def, _, _, IDef, _, DDef),
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									Head =.. [IDef, Pred, Sender, This, Self, Call, Obj],
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Body =.. [Def, Pred, Sender, This, Self, Call],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_def_'((Head:-Body))),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Body2 =.. [DDef, Pred, Sender, This, Self, Call],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_def_'((Head:-Body2))).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_ic_category_idef_clauses' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_object_'(Obj, _, _, _, _, _, OIDef, _, _),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_rclause_'('$lgt_imports_category_'(Obj, Ctg, _)),
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									Head =.. [OIDef, Pred, Sender, Obj, Self, Call, Ctg],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_imported_category_'(Ctg, _, _, CDef, _),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Body =.. [CDef, Pred, Sender, Obj, Self, Call],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_def_'((Head:-Body))),	
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									fail.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_ic_category_idef_clauses'.
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_ic_hierarchy_idef_clauses' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_object_'(Class, _, _, _, _, _, CIDef, _, _),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_rclause_'('$lgt_specializes_class_'(Class, Super, _)),
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									Head =.. [CIDef, Pred, Sender, Class, Self, Call, Container],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_specialized_class_'(Super, _, _, _, _, _, SIDef, _, _, _),
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									Body =.. [SIDef, Pred, Sender, Super, Self, Call, Container],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_def_'((Head:-Body))),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									fail.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_ic_hierarchy_idef_clauses'.
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% we can have a root object where super have nowhere to go ...
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_ic_super_clauses' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_object_'(_, _, _, _, OSuper, _, _, _, _),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_rclause_'('$lgt_instantiates_class_'(_, _, _)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									\+ '$lgt_rclause_'('$lgt_specializes_class_'(_, _, _)),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Head =.. [OSuper, _, _, _, _, _, _],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_def_'((Head:-fail))),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% ... or predicates can be redefined in instances...
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_ic_super_clauses' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_object_'(Obj, _, _, _, OSuper, _, _, _, _),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_rclause_'('$lgt_instantiates_class_'(Obj, Class, _)),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Head =.. [OSuper, Pred, Sender, Obj, Obj, Call, Container],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_instantiated_class_'(Class, _, _, _, _, _, CIDef, _, _, _),
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									Body =.. [CIDef, Pred, Sender, Class, Obj, Call, Container],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_def_'((Head:-Body))),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									fail.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% ... or/and in subclasses...
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_ic_super_clauses' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_object_'(Class, _, _, _, CSuper, _, _, _, _),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_rclause_'('$lgt_specializes_class_'(Class, Super, _)),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Head =.. [CSuper, Pred, Sender, Class, Self, Call, Container],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_specialized_class_'(Super, _, _, _, _, _, SIDef, _, _, _),
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									Body =.. [SIDef, Pred, Sender, Super, Self, Call, Container],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_def_'((Head:-Body))),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									fail.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_gen_ic_super_clauses'.
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_fix_redef_built_ins'
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% fix the calls of any redefined built-in predicate in all entity clauses 
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% and initialization goals
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_fix_redef_built_ins' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									retract('$lgt_eclause_'(Clause)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_fix_redef_built_ins'(Clause, Fixed),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_feclause_'(Fixed)),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									fail.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_fix_redef_built_ins' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									retract('$lgt_entity_init_'(Call)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_fix_redef_built_ins'(Call, Fixed),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									assertz('$lgt_fentity_init_'(Fixed)),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									fail.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_fix_redef_built_ins'.
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_fix_redef_built_ins'(+clause, -clause)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_fix_redef_built_ins'((Head:-Body), (Head:-Fixed)) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_fix_redef_built_ins'(Body, Fixed).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_fix_redef_built_ins'((Pred1, Pred2), (TPred1, TPred2)) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_fix_redef_built_ins'(Pred1, TPred1),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_fix_redef_built_ins'(Pred2, TPred2).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_fix_redef_built_ins'((Pred1; Pred2), (TPred1; TPred2)) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_fix_redef_built_ins'(Pred1, TPred1),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_fix_redef_built_ins'(Pred2, TPred2).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_fix_redef_built_ins'((Pred1 -> Pred2), (TPred1 -> TPred2)) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_fix_redef_built_ins'(Pred1, TPred1),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_fix_redef_built_ins'(Pred2, TPred2).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_fix_redef_built_ins'(\+ Pred, \+ TPred) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_fix_redef_built_ins'(Pred, TPred).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_fix_redef_built_ins'(call(Pred), call(TPred)) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_fix_redef_built_ins'(Pred, TPred).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_fix_redef_built_ins'(once(Pred), once(TPred)) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_fix_redef_built_ins'(Pred, TPred).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_fix_redef_built_ins'(catch(Goal, Catcher, Recovery), catch(TGoal, Catcher, TRecovery)) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_fix_redef_built_ins'(Goal, TGoal),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_fix_redef_built_ins'(Recovery, TRecovery).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_fix_redef_built_ins'(bagof(Term, Pred, List), bagof(Term, TPred, List)) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_fix_redef_built_ins'(Pred, TPred).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_fix_redef_built_ins'(findall(Term, Pred, List), findall(Term, TPred, List)) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_fix_redef_built_ins'(Pred, TPred).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_fix_redef_built_ins'(forall(Generate, Test), forall(TGenerate, TTest)) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_fix_redef_built_ins'(Generate, TGenerate),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_fix_redef_built_ins'(Test, TTest).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_fix_redef_built_ins'(setof(Term, Pred, List), setof(Term, TPred, List)) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_fix_redef_built_ins'(Pred, TPred).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_fix_redef_built_ins'('$lgt_call_built_in'(Pred, Context), TPred) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									('$lgt_redefined_built_in_'(Pred, Context, TPred) ->
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										true
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										'$lgt_fix_redef_built_ins'(Pred, TPred)).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_fix_redef_built_ins'(Pred, Pred).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% find and report misspelt predicate calls
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% in the body of objects/cartegories predicates
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_find_misspelt_calls' :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									setof(Pred,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										('$lgt_calls_pred_'(Pred), \+ '$lgt_defs_pred_'(Pred), \+ '$lgt_dynamic_'(Pred)),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										Preds) ->
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										'$lgt_report_misspelt_calls'(Preds)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										true.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_report_misspelt_calls'(+list)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_report_misspelt_calls'([]).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_report_misspelt_calls'([Pred| Preds]) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									('$lgt_compiler_option'(misspelt, warning),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									 '$lgt_compiler_option'(report, on)) ->
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										write('WARNING!  these static predicates are called but never defined: '),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										writeq([Pred| Preds]), nl
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										true.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_write_directives'(+stream)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							
								
									
										
										
										
											2002-06-15 13:18:34 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% writes the directives
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_write_directives'(Stream) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_directive_'(Dir),
							 | 
						
					
						
							
								
									
										
										
										
											2002-06-15 13:18:34 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									write_canonical(Stream, (:- Dir)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									write(Stream, '.'),
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									nl(Stream),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									fail.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_write_directives'(_).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_write_clauses'(Stream) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_write_functors_clause'(Stream),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_write_dcl_clauses'(Stream),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_write_def_clauses'(Stream),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_write_ddef_clauses'(Stream),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_write_super_clauses'(Stream),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_write_entity_clauses'(Stream).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_write_functors_clause'(Stream) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_entity_functors_'(Clause),
							 | 
						
					
						
							
								
									
										
										
										
											2002-06-15 13:18:34 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									write_canonical(Stream, Clause),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									write(Stream, '.'),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nl(Stream).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_write_def_clauses'(Stream) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_def_'(Clause),
							 | 
						
					
						
							
								
									
										
										
										
											2002-06-15 13:18:34 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									write_canonical(Stream, Clause),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									write(Stream, '.'), nl(Stream),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									fail.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_write_def_clauses'(_).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_write_ddef_clauses'(Stream) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_ddef_'(Clause),
							 | 
						
					
						
							
								
									
										
										
										
											2002-06-15 13:18:34 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									write_canonical(Stream, Clause),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									write(Stream, '.'), nl(Stream),
							 | 
						
					
						
							
								
									
										
										
										
											2002-04-03 13:26:59 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									fail.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_write_ddef_clauses'(_).
							 | 
						
					
						
							
								
									
										
										
										
											2002-04-03 13:26:59 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_write_dcl_clauses'(Stream) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_dcl_'(Clause),
							 | 
						
					
						
							
								
									
										
										
										
											2002-06-15 13:18:34 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									write_canonical(Stream, Clause),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									write(Stream, '.'),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nl(Stream),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									fail.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_write_dcl_clauses'(_).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_write_super_clauses'(Stream) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_super_'(Clause),
							 | 
						
					
						
							
								
									
										
										
										
											2002-06-15 13:18:34 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									write_canonical(Stream, Clause),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									write(Stream, '.'),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nl(Stream),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									fail.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_write_super_clauses'(_).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_write_entity_clauses'(Stream) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_feclause_'(Clause),
							 | 
						
					
						
							
								
									
										
										
										
											2002-06-15 13:18:34 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									write_canonical(Stream, Clause),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									write(Stream, '.'),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nl(Stream),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									fail.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_write_entity_clauses'(_).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_write_init_call'(+stream)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% writes the initialization call for the compiled entity that will assert 
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% the relation clauses and call any declared initialization goal when the
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% entity is loaded
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_write_init_call'(Stream) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_compiler_option'(iso_initialization_dir, true),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									findall(Clause, '$lgt_rclause_'(Clause), Clauses),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									('$lgt_fentity_init_'(Call) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										write_canonical(Stream, (:- initialization(('$lgt_assert_relation_clauses'(Clauses), Call))))
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										write_canonical(Stream, (:- initialization('$lgt_assert_relation_clauses'(Clauses))))),
							 | 
						
					
						
							
								
									
										
										
										
											2002-06-15 13:18:34 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									write(Stream, '.'), nl(Stream).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_write_init_call'(Stream) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									findall(Clause, '$lgt_rclause_'(Clause), Clauses),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									write_canonical(Stream, (:- initialization('$lgt_assert_relation_clauses'(Clauses)))),
							 | 
						
					
						
							
								
									
										
										
										
											2002-06-15 13:18:34 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									write(Stream, '.'), nl(Stream),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									('$lgt_fentity_init_'(Call) ->
							 | 
						
					
						
							
								
									
										
										
										
											2002-06-15 13:18:34 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										write_canonical(Stream, (:- Call)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										write(Stream, '.'),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										nl(Stream)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										true).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_assert_tr_entity'
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% adds a dynamically created entity to memory
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_assert_tr_entity' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_assert_directives',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_assert_functors_clause',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_assert_dcl_clauses',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_assert_def_clauses',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_assert_ddef_clauses',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_assert_super_clauses',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_assert_entity_clauses',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_assert_relation_clauses',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_assert_init'.
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_assert_directives' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_directive_'((dynamic(Functor/Arity))),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									functor(Pred, Functor, Arity),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									asserta(Pred),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									retractall(Pred),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									fail.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_assert_directives' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_directive_'((op(Priority, Specifier, Operators))),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									op(Priority, Specifier, Operators),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									fail.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_assert_directives'.
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_assert_functors_clause' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_entity_functors_'(Clause),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									assertz(Clause).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_assert_dcl_clauses' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_dcl_'(Clause),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									assertz(Clause),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									fail.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_assert_dcl_clauses'.
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_assert_def_clauses' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_def_'(Clause),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									assertz(Clause),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									fail.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_assert_def_clauses'.
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_assert_ddef_clauses' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_ddef_'(Clause),
							 | 
						
					
						
							
								
									
										
										
										
											2002-04-03 13:26:59 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									assertz(Clause),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									fail.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_assert_ddef_clauses'.
							 | 
						
					
						
							
								
									
										
										
										
											2002-04-03 13:26:59 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_assert_super_clauses' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_super_'(Clause),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									assertz(Clause),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									fail.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_assert_super_clauses'.
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_assert_entity_clauses' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_feclause_'(Clause),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									assertz(Clause),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									fail.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_assert_entity_clauses'.
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_assert_relation_clauses' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_rclause_'(Clause),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									assertz(Clause),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									fail.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_assert_relation_clauses'.
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_assert_init'
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% call any defined initialization goal for a dynamically created entity
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_assert_init' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_fentity_init_'(Goal) ->
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										once(Goal)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										true.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_assert_relation_clauses'(+list)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							
								
									
										
										
										
											2002-01-07 22:57:06 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% called when loading a compiled Logtalk entity to update Logtalk 
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% internal tables
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% we may be reloading the entity so we must first retract any old
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% relation clauses before asserting the new ones
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_assert_relation_clauses'([Clause| Clauses]) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-01-07 22:57:06 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									arg(1, Clause, Entity),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_retract_old_relation_clauses'(Entity),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_assert_new_relation_clauses'([Clause| Clauses]).
							 | 
						
					
						
							
								
									
										
										
										
											2002-04-03 13:26:59 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_retract_old_relation_clauses'(Entity) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									retractall('$lgt_current_object_'(Entity, _, _, _, _)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									retractall('$lgt_current_protocol_'(Entity, _)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									retractall('$lgt_current_category_'(Entity, _)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									retractall('$lgt_implements_protocol_'(Entity, _, _)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									retractall('$lgt_imports_category_'(Entity, _, _)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									retractall('$lgt_instantiates_class_'(Entity, _, _)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									retractall('$lgt_specializes_class_'(Entity, _, _)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									retractall('$lgt_extends_protocol_'(Entity, _, _)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									retractall('$lgt_extends_object_'(Entity, _, _)).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_assert_new_relation_clauses'([]).
							 | 
						
					
						
							
								
									
										
										
										
											2002-01-07 22:57:06 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_assert_new_relation_clauses'([Clause| Clauses]) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-01-07 22:57:06 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									assertz(Clause),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_assert_new_relation_clauses'(Clauses).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_construct_object_functors'(+compound, -atom, -atom, -atom, -atom, -atom, -atom, -atom, -atom)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% constructs all the functors used in the compiled code of an object
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_construct_object_functors'(Obj, Prefix, Dcl, Def, Super, IDcl, IDef, DDcl, DDef) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_compiler_option'(code_prefix, Code),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									functor(Obj, Functor, Arity),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									number_codes(Arity, Codes),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									atom_codes(Atom, Codes),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									atom_concat(Functor, Atom, Aux),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									atom_concat(Code, Aux, Aux2),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									atom_concat(Aux2, '_', Prefix),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									atom_concat(Prefix, '_dcl', Dcl),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									atom_concat(Prefix, '_def', Def),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									atom_concat(Prefix, '_super', Super),
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									atom_concat(Prefix, '_idcl', IDcl),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									atom_concat(Prefix, '_idef', IDef),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									atom_concat(Prefix, '_ddcl', DDcl),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									atom_concat(Prefix, '_ddef', DDef).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_construct_protocol_functors'(+compound, -atom, -atom)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% constructs all the functors used in the compiled code of a protocol
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_construct_protocol_functors'(Ptc, Prefix, Dcl) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_compiler_option'(code_prefix, Code),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									functor(Ptc, Functor, Arity),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									number_codes(Arity, Codes),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									atom_codes(Atom, Codes),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									atom_concat(Functor, Atom, Aux),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									atom_concat(Code, Aux, Aux2),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									atom_concat(Aux2, '_', Prefix),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									atom_concat(Prefix, '_dcl', Dcl).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_construct_category_functors'(+compound, -atom, -atom, -atom)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% constructs all the functors used in the compiled code of a category
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_construct_category_functors'(Ctg, Prefix, Dcl, Def) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_compiler_option'(code_prefix, Code),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									functor(Ctg, Functor, Arity),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									number_codes(Arity, Codes),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									atom_codes(Atom, Codes),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									atom_concat(Functor, Atom, Aux),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									atom_concat(Code, Aux, Aux2),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									atom_concat(Aux2, '_', Prefix),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									atom_concat(Prefix, '_dcl', Dcl),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									atom_concat(Prefix, '_def', Def).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_construct_predicate_functor'(+atom, +atom, +integer, -atom)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% constructs the functor used for a compiled predicate
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_construct_predicate_functor'(EPrefix, Functor, Arity, PPrefix) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									atom_concat(EPrefix, Functor, Aux),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									number_codes(Arity, Codes),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									atom_codes(Atom, Codes),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									atom_concat(Aux, Atom, PPrefix).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_built_in'(+callable)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% checks if the argument is either a Prolog or Logtalk built-in predicate
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_built_in'(Pred) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_pl_built_in'(Pred).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_built_in'(Pred) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_lgt_built_in'(Pred).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_pl_built_in'(+callable)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% either host Prolog native built-ins or missing ISO built-ins
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% that we have defined in the correspondent config file
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_pl_built_in'(Pred) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_predicate_property'(Pred, built_in).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_pl_built_in'(Pred) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_iso_predicate'(Pred).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% logtalk built-in methods
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_built_in_method'(?callable, ?scope)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_built_in_method'(parameter(_, _), p).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_built_in_method'(self(_), p).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_built_in_method'(sender(_), p).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_built_in_method'(this(_), p).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_built_in_method'(current_predicate(_), p(p(p))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_built_in_method'(predicate_property(_, _), p(p(p))).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_built_in_method'(abolish(_), p(p(p))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_built_in_method'(asserta(_), p(p(p))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_built_in_method'(assertz(_), p(p(p))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_built_in_method'(clause(_, _), p(p(p))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_built_in_method'(retract(_), p(p(p))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_built_in_method'(retractall(_), p(p(p))).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_built_in_method'(bagof(_, _, _), p(p(p))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_built_in_method'(findall(_, _, _), p(p(p))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_built_in_method'(forall(_, _), p(p(p))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_built_in_method'(setof(_, _, _), p(p(p))).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% Logtalk directives
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_lgt_directive'(+atom/+integer)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_lgt_directive'(Directive) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_lgt_opening_directive'(Directive).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_lgt_directive'(Directive) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_lgt_closing_directive'(Directive).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_lgt_directive'(Directive) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_lgt_entity_directive'(Directive).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_lgt_directive'(Directive) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_lgt_predicate_directive'(Directive).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_lgt_opening_directive'(object/1).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_lgt_opening_directive'(object/2).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_lgt_opening_directive'(object/3).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_lgt_opening_directive'(object/4).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_lgt_opening_directive'(category/1).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_lgt_opening_directive'(category/2).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_lgt_opening_directive'(protocol/1).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_lgt_opening_directive'(protocol/2).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_lgt_closing_directive'(end_object/0).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_lgt_closing_directive'(end_category/0).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_lgt_closing_directive'(end_protocol/0).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_lgt_entity_directive'(calls/N) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									N >= 1.
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_lgt_entity_directive'(uses/N) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									N >= 1.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_lgt_entity_directive'((initialization)/1).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_lgt_entity_directive'((dynamic)/N) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									N =:= 0.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_lgt_entity_directive'(op/3).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_lgt_entity_directive'(info/1).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_lgt_predicate_directive'((dynamic)/N) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									N >= 1.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_lgt_predicate_directive'(metapredicate/N) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									N >= 1.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_lgt_predicate_directive'((discontiguous)/N) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									N >= 1.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_lgt_predicate_directive'((public)/N) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									N >= 1.
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_lgt_predicate_directive'(protected/N) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									N >= 1.
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_lgt_predicate_directive'(private/N) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									N >= 1.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_lgt_predicate_directive'((mode)/2).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_lgt_predicate_directive'(info/2).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% built-in Prolog metapredicates
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_pl_metapredicate'(catch(::, *, ::)).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_pl_metapredicate'(bagof(*, ::, *)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_pl_metapredicate'(setof(*, ::, *)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_pl_metapredicate'(findall(*, ::, *)).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_pl_metapredicate'(forall(::, ::)).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_pl_metapredicate'(call(::)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_pl_metapredicate'(once(::)).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_pl_metapredicate'(\+ (::)).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% utility predicates used during compilation of Logtalk 
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% entities to store and access context information
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_context'(context(_, _, _, _, _)).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_sender'(context(Sender, _, _, _, _), Sender).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_this'(context(_, This, _, _, _), This).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_self'(context(_, _, Self, _, _), Self).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_prefix'(context(_, _, _, Prefix, _), Prefix).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_metavars'(context(_, _, _, _, Metavars), Metavars).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_convert_to_list'(+pi_or_pi_list, -pi_list)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_convert_to_list'([[A|B]], [A|B]) :-	% predicate indicator list
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_convert_to_list'([A|B], [A|B]) :-	% predicate indicator sequence
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_convert_to_list'(A, [A]).			% single predicate indicator
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_valid_pred_ind(@term)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_valid_pred_ind'(Term) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Term),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Term = Functor/Arity,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									atom(Functor),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									integer(Arity),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Arity >= 0.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_valid_object_id'(@term)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_valid_object_id'(Term) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									once((atom(Term); compound(Term))).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_valid_category_id'(@term)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_valid_category_id'(Term) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									atom(Term).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_valid_protocol_id'(@term)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_valid_protocol_id'(Term) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									atom(Term).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_valid_scope'(@term)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_valid_scope'(Term) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Term),	
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									(Term = (Scope::_) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										nonvar(Scope),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										once('$lgt_member'(Scope, [(public), protected, private]))
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										true).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_scope_id'(+term, -atom, -term)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_scope_id'(Scope::Entity, Scope, Entity) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_scope_id'(Entity, (public), Entity).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_callable'(@term)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_callable'(Term) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Term),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									functor(Term, Functor, _),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									atom(Functor).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_valid_op_priority'(@term)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_valid_op_priority'(Priority) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									integer(Priority),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Priority >= 0,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Priority =< 1200.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_valid_op_specifier'(@term)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_valid_op_specifier'(Specifier) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Specifier),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									once('$lgt_member'(Specifier, [fx, fy, xfx, xfy, yfx, xf, yf])).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_valid_op_names'(@term)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_valid_op_names'(Operators) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Operators),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_convert_to_list'(Operators, List),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									forall('$lgt_member'(Operator, List), atom(Operator)).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_valid_metapred_term'(@term)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_valid_metapred_term'(Pred) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Pred),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Pred =.. [_| Args],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									forall('$lgt_member'(Arg, Args), (nonvar(Arg), (Arg = (::); Arg = (*)))).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_valid_mode_term'(@term)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_valid_mode_term'(Pred) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Pred),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Pred =.. [_| Args],
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									forall(
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										'$lgt_member'(Arg, Args),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										(nonvar(Arg), functor(Arg, Functor, Arity), Arity =< 1, '$lgt_member'(Functor, [?, +, -, @]))).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_valid_number_of_solutions'(@term)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_valid_number_of_solutions'(Solutions) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Solutions),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									once('$lgt_member'(Solutions, [zero, one, zero_or_one, zero_or_more, one_or_more, error])).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_valid_info_list'(@list)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% true if the argument is a list of key-value pairs
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_valid_info_list'([]).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_valid_info_list'([Head| Tail]) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Head),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Head = (Key is Value),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Key),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Value),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_valid_info_list'(Tail).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_valid_compiler_options'(@list)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% true if all compiler options are valid
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_valid_compiler_options'([]).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_valid_compiler_options'([Option| Options]) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nonvar(Option),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_valid_compiler_option'(Option),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_valid_compiler_options'(Options).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_valid_compiler_option'(@nonvar)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_valid_compiler_option'(iso_initialization_dir(Option)) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									once((Option == true; Option == false)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_valid_compiler_option'(xml(Option)) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									once((Option == on; Option == off)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_valid_compiler_option'(xsl(File)) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									atom(File).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_valid_compiler_option'(unknown(Option)) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									once((Option == silent; Option == warning)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_valid_compiler_option'(singletons(Option)) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									once((Option == silent; Option == warning)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_valid_compiler_option'(misspelt(Option)) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									once((Option == silent; Option == warning)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_valid_compiler_option'(lgtredef(Option)) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									once((Option == silent; Option == warning)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_valid_compiler_option'(plredef(Option)) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									once((Option == silent; Option == warning)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_valid_compiler_option'(portability(Option)) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-01-07 22:57:06 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									once((Option == silent; Option == warning)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_valid_compiler_option'(report(Option)) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									once((Option == on; Option == off)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_valid_compiler_option'(smart_compilation(Option)) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-05-06 13:10:02 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									once((Option == on; Option == off)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_valid_compiler_option'(named_anonymous_vars(Option)) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									once((Option == on; Option == off)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_valid_compiler_option'(code_prefix(Prefix)) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									atom(Prefix).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-09-14 18:14:17 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_valid_compiler_option'(doctype(Option)) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									once((Option == standalone; Option == local; Option == web)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_valid_flag'(@nonvar)
							 | 
						
					
						
							
								
									
										
										
										
											2002-02-08 19:57:23 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% true if the argument is a valid Logtalk flag
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_valid_flag'(iso_initialization_dir).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_valid_flag'(xml).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_valid_flag'(xsl).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_valid_flag'(unknown).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_valid_flag'(singletons).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_valid_flag'(misspelt).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_valid_flag'(lgtredef).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_valid_flag'(plredef).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_valid_flag'(portability).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_valid_flag'(report).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_valid_flag'(smart_compilation).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_valid_flag'(startup_message).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_valid_flag'(version).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_valid_flag'(named_anonymous_vars).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_valid_flag'(code_prefix).
							 | 
						
					
						
							
								
									
										
										
										
											2002-09-14 18:14:17 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_valid_flag'(doctype).
							 | 
						
					
						
							
								
									
										
										
										
											2002-02-08 19:57:23 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_valid_flag'(@term, @term)
							 | 
						
					
						
							
								
									
										
										
										
											2002-02-08 19:57:23 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% true if the argument is a valid Logtalk flag-value pair
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_valid_flag'(Flag, Value) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-02-08 19:57:23 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									atom(Flag),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Option =.. [Flag, Value],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_valid_compiler_option'(Option).
							 | 
						
					
						
							
								
									
										
										
										
											2002-02-08 19:57:23 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_read_only_flag'(@nonvar)
							 | 
						
					
						
							
								
									
										
										
										
											2002-02-08 19:57:23 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% true if the argument is a read only Logtalk flag
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_read_only_flag'(startup_message).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_read_only_flag'(version).
							 | 
						
					
						
							
								
									
										
										
										
											2002-02-08 19:57:23 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% Logtalk built-in predicates
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_lgt_built_in'(?callable)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_lgt_built_in'(::(_, _)).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_lgt_built_in'(forall(_, _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_lgt_built_in'(retractall(_)).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_lgt_built_in'(logtalk_compile(_)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_lgt_built_in'(logtalk_compile(_, _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_lgt_built_in'(logtalk_load(_)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_lgt_built_in'(logtalk_load(_, _)).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_lgt_built_in'(logtalk_version(_, _, _)).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_lgt_built_in'(protocol_property(_, _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_lgt_built_in'(category_property(_, _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_lgt_built_in'(object_property(_, _)).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_lgt_built_in'(current_protocol(_)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_lgt_built_in'(current_category(_)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_lgt_built_in'(current_object(_)).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_lgt_built_in'(create_object(_, _, _, _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_lgt_built_in'(create_category(_, _, _, _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_lgt_built_in'(create_protocol(_, _, _)).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_lgt_built_in'(abolish_object(_)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_lgt_built_in'(abolish_category(_)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_lgt_built_in'(abolish_protocol(_)).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_lgt_built_in'(implements_protocol(_, _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_lgt_built_in'(implements_protocol(_, _, _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_lgt_built_in'(imports_category(_, _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_lgt_built_in'(imports_category(_, _, _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_lgt_built_in'(instantiates_class(_, _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_lgt_built_in'(instantiates_class(_, _, _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_lgt_built_in'(specializes_class(_, _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_lgt_built_in'(specializes_class(_, _, _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_lgt_built_in'(extends_protocol(_, _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_lgt_built_in'(extends_protocol(_, _, _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_lgt_built_in'(extends_object(_, _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_lgt_built_in'(extends_object(_, _, _)).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_lgt_built_in'(abolish_events(_, _, _, _, _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_lgt_built_in'(define_events(_, _, _, _, _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_lgt_built_in'(current_event(_, _, _, _, _)).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_lgt_built_in'(current_logtalk_flag(_, _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_lgt_built_in'(set_logtalk_flag(_, _)).
							 | 
						
					
						
							
								
									
										
										
										
											2002-04-03 13:26:59 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%  xml
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_write_xml_file'(+stream)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% writes a XML file containing the documentation of a compiled entity
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_write_xml_file'(Stream) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_write_xml_header'(Stream),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_write_xml_entity'(Stream),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_write_xml_relations'(Stream),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_write_xml_predicates'(Stream),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_write_xml_footer'(Stream).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_write_xml_header'(Stream) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-09-14 18:14:17 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_compiler_option'(doctype, Doctype),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_write_xml_header'(Doctype, Stream).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_write_xml_header'(local, Stream) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_write_xml_open_tag'(Stream, '?xml version="1.0"?', []),
							 | 
						
					
						
							
								
									
										
										
										
											2002-06-15 13:18:34 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									write(Stream, '<!DOCTYPE logtalk SYSTEM "logtalk.dtd">'), nl(Stream),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_compiler_option'(xsl, XSL),
							 | 
						
					
						
							
								
									
										
										
										
											2002-06-15 13:18:34 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									write(Stream, '<?xml-stylesheet type="text/xsl" href="'),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									write(Stream, XSL),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									write(Stream, '"?>'), nl(Stream),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_write_xml_open_tag'(Stream, logtalk, []).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-09-14 18:14:17 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_write_xml_header'(web, Stream) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_write_xml_open_tag'(Stream, '?xml version="1.0"?', []),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									write(Stream, '<!DOCTYPE logtalk SYSTEM "http://www.logtalk.org/xml/1.0/logtalk.dtd">'), nl(Stream),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_compiler_option'(xsl, XSL),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									write(Stream, '<?xml-stylesheet type="text/xsl" href="'),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									write(Stream, XSL),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									write(Stream, '"?>'), nl(Stream),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_write_xml_open_tag'(Stream, logtalk, []).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_write_xml_header'(standalone, Stream) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_write_xml_open_tag'(Stream, '?xml version="1.0" standalone="yes"?', []),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_compiler_option'(xsl, XSL),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									write(Stream, '<?xml-stylesheet type="text/xsl" href="'),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									write(Stream, XSL),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									write(Stream, '"?>'), nl(Stream),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_write_xml_open_tag'(Stream, logtalk, []).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_write_xml_footer'(Stream) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_write_xml_close_tag'(Stream, logtalk).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_write_xml_entity'(Stream) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_entity_'(Type, Entity, _, _),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									('$lgt_entity_comp_mode_'((dynamic)) -> Compilation = (dynamic); Compilation = static),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_write_xml_open_tag'(Stream, entity, []),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_entity_to_xml_name'(Entity, Name),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_write_xml_cdata_element'(Stream, name, [], Name),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_write_xml_element'(Stream, (type), [], Type),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_write_xml_element'(Stream, compilation, [], Compilation),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									('$lgt_info_'(List) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										('$lgt_member'(comment is Comment, List) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'$lgt_write_xml_cdata_element'(Stream, comment, [], Comment)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
											;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											true), 
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										('$lgt_member'(authors is Authors, List) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'$lgt_write_xml_cdata_element'(Stream, authors, [], Authors)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
											;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											true), 
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										('$lgt_member'(version is Version, List) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'$lgt_write_xml_element'(Stream, version, [], Version)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
											;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											true), 
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										('$lgt_member'(date is Date, List) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											'$lgt_write_xml_element'(Stream, date, [], Date)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
											;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											true),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										forall(
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
											('$lgt_member'(Key is Value, List),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											 \+ '$lgt_member'(Key, [comment, authors, version, date, parnames])),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											('$lgt_write_xml_open_tag'(Stream, info, []),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											 '$lgt_write_xml_element'(Stream, key, [], Key),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											 '$lgt_write_xml_cdata_element'(Stream, value, [], Value),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
											 '$lgt_write_xml_close_tag'(Stream, info)))
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										true),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_write_xml_close_tag'(Stream, entity).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_entity_to_xml_name'(+entity, -nonvar)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% instantiates the parameters in a parametric object to
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% user defined names or to the atom '_'
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_entity_to_xml_name'(Entity, Name) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_info_'(List),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_member'(parnames is Names, List),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Entity =.. [Functor| Names],
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Name =.. [Functor| Names].
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_entity_to_xml_name'(Entity, Name) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Entity =.. [Functor| Args],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_vars_to_underscore'(Args, Names),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Name =.. [Functor| Names].
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_relation_to_xml_name'(+entity, +entity, -atom)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% instantiates the parameters in a related entity taking
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% in account the parameter sharing with the original entity
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_relation_to_xml_name'(Entity, Relation, Name) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_entity_to_xml_name'(Entity, _),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Relation =.. [Functor| Args],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_vars_to_underscore'(Args, Names),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Name =.. [Functor| Names].
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_vars_to_underscore'(+list, -list)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% instantiates the variables in the input list to the atom '_'
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_vars_to_underscore'([], []).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_vars_to_underscore'([Arg| Args], [Name| Names]) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									(var(Arg) -> Name = '_'; Name = Arg),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_vars_to_underscore'(Args, Names).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_relation_to_xml_filename'(+entity, -atom)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% needed to build filenames in links to parametric objects
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_relation_to_xml_filename'(Relation, File) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									atom(Relation) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										File = Relation
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										functor(Relation, Functor, Arity),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										number_codes(Arity, Codes),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										atom_codes(Atom, Codes),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										atom_concat(Functor, Atom, File).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_write_xml_predicates'(+stream)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% writes the predicate documentation
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_write_xml_predicates'(Stream) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_write_xml_open_tag'(Stream, predicates, []),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_write_xml_public_predicates'(Stream),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_write_xml_protected_predicates'(Stream),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_write_xml_private_predicates'(Stream),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_write_xml_close_tag'(Stream, predicates).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_write_xml_public_predicates'(+stream)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% writes the documentation of public predicates
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_write_xml_public_predicates'(Stream) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_write_xml_open_tag'(Stream, (public), []),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_public_'(Functor/Arity),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_write_xml_predicate'(Stream, Functor/Arity, (public)),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									fail.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_write_xml_public_predicates'(Stream) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_write_xml_close_tag'(Stream, (public)).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_write_xml_protected_predicates'(+stream)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% writes the documentation protected predicates
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_write_xml_protected_predicates'(Stream) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_write_xml_open_tag'(Stream, protected, []),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_protected_'(Functor/Arity),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_write_xml_predicate'(Stream, Functor/Arity, protected),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									fail.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_write_xml_protected_predicates'(Stream) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_write_xml_close_tag'(Stream, protected).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_write_xml_private_predicates'(+stream)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% writes the documentation of private predicates
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_write_xml_private_predicates'(Stream) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_write_xml_open_tag'(Stream, private, []),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_private_'(Functor/Arity),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_write_xml_predicate'(Stream, Functor/Arity, private),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									fail.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_write_xml_private_predicates'(Stream) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_write_xml_close_tag'(Stream, private).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_write_xml_predicate'(+stream, +atom/+integer, +term)
							 | 
						
					
						
							
								
									
										
										
										
											2001-12-05 23:57:48 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% writes the documentation of a predicate
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_write_xml_predicate'(Stream, Functor/Arity, Scope) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									(('$lgt_entity_comp_mode_'((dynamic)); '$lgt_dynamic_'(Functor/Arity)) ->
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										Compilation = (dynamic)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										Compilation = static),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_write_xml_open_tag'(Stream, predicate, []),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_write_xml_cdata_element'(Stream, name, [], Functor/Arity),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_write_xml_element'(Stream, scope, [], Scope),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_write_xml_element'(Stream, compilation, [], Compilation),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									functor(Meta, Functor, Arity),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									('$lgt_metapredicate_'(Meta) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										'$lgt_write_xml_cdata_element'(Stream, meta, [], Meta)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										true),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									functor(Template, Functor, Arity),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									forall(
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										'$lgt_mode_'(Template, Solutions),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										('$lgt_write_xml_open_tag'(Stream, (mode), []),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										 '$lgt_write_xml_cdata_element'(Stream, template, [], Template),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										 '$lgt_write_xml_element'(Stream, solutions, [], Solutions),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										 '$lgt_write_xml_close_tag'(Stream, (mode)))),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									(('$lgt_info_'(Functor/Arity, List), '$lgt_member'(comment is Comment, List)) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										'$lgt_write_xml_cdata_element'(Stream, comment, [], Comment)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										true),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									(('$lgt_info_'(Functor/Arity, List), '$lgt_member'(argnames is Names, List)) ->
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										Template =.. [Functor| Names],
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										'$lgt_write_xml_cdata_element'(Stream, template, [], Template)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										true),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									forall(
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										('$lgt_info_'(Functor/Arity, List),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										 '$lgt_member'(Key is Value, List),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										 \+ '$lgt_member'(Key, [comment, argnames])),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										('$lgt_write_xml_open_tag'(Stream, info, []),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										 '$lgt_write_xml_element'(Stream, key, [], Key),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										 '$lgt_write_xml_cdata_element'(Stream, value, [], Value),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										 '$lgt_write_xml_close_tag'(Stream, info))),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_write_xml_close_tag'(Stream, predicate).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_write_xml_relations'(Stream) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_write_xml_open_tag'(Stream, relations, []),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									fail.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_write_xml_relations'(Stream) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_rclause_'('$lgt_implements_protocol_'(Entity, Ptc, Scope)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_write_xml_relation'(Stream, Entity, Ptc, implements, Scope),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									fail.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_write_xml_relations'(Stream) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_rclause_'('$lgt_imports_category_'(Entity, Ctg, Scope)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_write_xml_relation'(Stream, Entity, Ctg, imports, Scope),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									fail.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_write_xml_relations'(Stream) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_rclause_'('$lgt_extends_object_'(Entity, Parent, Scope)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_write_xml_relation'(Stream, Entity, Parent, extends, Scope),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									fail.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_write_xml_relations'(Stream) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_rclause_'('$lgt_instantiates_class_'(Entity, Class, Scope)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_write_xml_relation'(Stream, Entity, Class, instantiates, Scope),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									fail.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_write_xml_relations'(Stream) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_rclause_'('$lgt_specializes_class_'(Entity, Superclass, Scope)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_write_xml_relation'(Stream, Entity, Superclass, specializes, Scope),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									fail.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_write_xml_relations'(Stream) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_rclause_'('$lgt_extends_protocol_'(Entity, Ptc, Scope)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_write_xml_relation'(Stream, Entity, Ptc, extends, Scope),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									fail.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_write_xml_relations'(Stream) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_entity_'(_, Entity, _, _),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_uses_'(Obj),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_write_xml_relation'(Stream, Entity, Obj, uses),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									fail.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_write_xml_relations'(Stream) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_entity_'(_, Entity, _, _),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_calls_'(Ptc),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_write_xml_relation'(Stream, Entity, Ptc, calls),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									fail.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_write_xml_relations'(Stream) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_write_xml_close_tag'(Stream, relations).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_write_xml_relation'(Stream, Entity, Relation, Tag, Scope) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_relation_to_xml_name'(Entity, Relation, Name),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_relation_to_xml_filename'(Relation, File),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_write_xml_open_tag'(Stream, Tag, []),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_write_xml_cdata_element'(Stream, name, [], Name),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_write_xml_element'(Stream, scope, [], Scope),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_write_xml_cdata_element'(Stream, file, [], File),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_write_xml_close_tag'(Stream, Tag).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_write_xml_relation'(Stream, Entity, Relation, Tag) :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_relation_to_xml_name'(Entity, Relation, Name),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_relation_to_xml_filename'(Relation, File),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_write_xml_open_tag'(Stream, Tag, []),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_write_xml_cdata_element'(Stream, name, [], Name),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_write_xml_cdata_element'(Stream, file, [], File),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_write_xml_close_tag'(Stream, Tag).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_write_xml_open_tag'(@stream, @atom, @list)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% writes <Tag Att1="V1" Att2="V2" ...>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_write_xml_open_tag'(Stream, Tag, Atts) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-06-15 13:18:34 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									write(Stream, '<'),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									write(Stream, Tag),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_write_xml_tag_attributes'(Stream, Atts),
							 | 
						
					
						
							
								
									
										
										
										
											2002-06-15 13:18:34 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									write(Stream, '>'), nl(Stream).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_write_xml_element'(@stream, @atom, @list, @term)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% writes <Tag Att1="V1" Att2="V2" ...>Text</Tag>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_write_xml_element'(Stream, Tag, Atts, Text) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-06-15 13:18:34 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									write(Stream, '<'),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									write(Stream, Tag),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_write_xml_tag_attributes'(Stream, Atts),
							 | 
						
					
						
							
								
									
										
										
										
											2002-06-15 13:18:34 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									write(Stream, '>'),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									write(Stream, Text),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									write(Stream, '</'),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									write(Stream, Tag),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									write(Stream, '>'), nl(Stream).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_write_xml_cdata_element'(@stream, @atom, @list, @term)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% writes <Tag Att1="V1" Att2="V2" ...><![CDATA[Text]]></Tag>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_write_xml_cdata_element'(Stream, Tag, Atts, Text) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-06-15 13:18:34 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									write(Stream, '<'),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									write(Stream, Tag),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_write_xml_tag_attributes'(Stream, Atts),
							 | 
						
					
						
							
								
									
										
										
										
											2002-06-15 13:18:34 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									write(Stream, '><![CDATA['),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									write(Stream, Text),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									write(Stream, ']]></'),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									write(Stream, Tag),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									write(Stream, '>'), nl(Stream).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_write_xml_tag_attributes'(@stream, @list)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_write_xml_tag_attributes'(_, []) :-
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									!.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_write_xml_tag_attributes'(Stream, [Attribute-Value| Rest]) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-06-15 13:18:34 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									write(Stream, ' '),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									write(Stream, Attribute),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									write(Stream, '="'),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									write(Stream, Value),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									write(Stream, '"'),
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_write_xml_tag_attributes'(Stream, Rest).
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								% '$lgt_write_xml_close_tag'(@stream, @atom)
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								% writes </Tag>
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_write_xml_close_tag'(Stream, Tag) :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-06-15 13:18:34 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									write(Stream, '</'),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									write(Stream, Tag),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									write(Stream, '>'),
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nl(Stream).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-01-07 22:57:06 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%  table of ISO defined predicates
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							
								
									
										
										
										
											2002-02-08 19:57:23 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%  used in portability checking
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							
								
									
										
										
										
											2002-01-07 22:57:06 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(true).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(fail).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(call(_)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(!).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'((_; _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'((_, _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'((_ -> _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'((_ -> _; _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(catch(_, _, _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(throw(_)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'((_ = _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'((_ \= _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(unify_with_occurs_check(_, _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(var(_)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(nonvar(_)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(atom(_)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(atomic(_)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(number(_)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(integer(_)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(float(_)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(compound(_)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'((_ @=< _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'((_ @< _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'((_ @>= _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'((_ @> _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'((_ == _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'((_ \== _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(functor(_, _, _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(arg(_, _, _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(_ =.. _).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(copy_term(_, _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(_ is _).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'((_ =< _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'((_ < _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'((_ >= _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'((_ > _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'((_ =:= _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'((_ =\= _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(clause(_, _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(current_predicate(_)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(asserta(_)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(assertz(_)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(retract(_)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(abolish(_)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(findall(_, _, _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(bagof(_, _, _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(setof(_, _, _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(current_input(_)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(current_output(_)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(set_input(_)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(set_output(_)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(open(_, _, _, _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(open(_, _, _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(close(_, _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(close(_)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(flush_output(_)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(flush_output).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(stream_property(_, _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(at_end_of_stream).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(at_end_of_stream(_)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(set_stream_position(_, _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(get_char(_, _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(get_char(_)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(get_code(_, _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(get_code(_)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(peek_char(_, _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(peek_char(_)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(peek_code(_, _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(peek_code(_)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(put_char(_, _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(put_char(_)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(put_code(_, _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(put_code(_)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(nl).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(nl(_)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(get_byte(_, _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(get_byte(_)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(peek_byte(_, _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(peek_byte(_)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(put_byte(_, _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(put_byte(_)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(read_term(_, _, _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(read_term(_, _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(read(_)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(read(_, _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(write_term(_, _, _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(write_term(_, _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(write(_)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(write(_, _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(writeq(_)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(writeq(_, _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(write_canonical(_)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(write_canonical(_, _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(op(_, _, _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(current_op(_, _, _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(char_conversion(_, _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(current_char_conversion(_, _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(\+ _).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(once(_)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(repeat).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(atom_length(_, _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(atom_concat(_, _, _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(sub_atom(_, _, _, _, _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(atom_chars(_, _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(atom_codes(_, _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(char_code(_, _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(number_chars(_, _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(number_codes(_, _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(set_prolog_flag(_, _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(current_prolog_flag(_, _)).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(halt).
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								'$lgt_iso_def_pred'(halt(_)).
							 | 
						
					
						
							
								
									
										
										
										
											2002-01-07 22:57:06 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%  Logtalk banner
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_startup_message' :-
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_default_flag'(startup_message, on) ->
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										'$lgt_banner',
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										'$lgt_default_flags'
							 | 
						
					
						
							
								
									
										
										
										
											2002-05-06 13:10:02 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
										;
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
										true.
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-06-15 13:18:34 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_banner' :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-06-15 13:18:34 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									current_logtalk_flag(version, version(Major, Minor, Patch)),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									nl, write('Logtalk '), write(Major), write('.'), write(Minor), write('.'), write(Patch), nl,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									write('Copyright (c) 1998-2002 Paulo Moura'), nl, nl.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								'$lgt_default_flags' :-
							 | 
						
					
						
							
								
									
										
										
										
											2002-06-15 13:18:34 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									write('Default compilation flags:'), nl,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_default_flag'(iso_initialization_dir, ISO),
							 | 
						
					
						
							
								
									
										
										
										
											2002-06-15 13:18:34 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									write('  ISO initialization/1 directive: '), write(ISO), nl,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_default_flag'(xml, XML),
							 | 
						
					
						
							
								
									
										
										
										
											2002-06-15 13:18:34 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									write('  XML documenting files:          '), write(XML), nl,
							 | 
						
					
						
							
								
									
										
										
										
											2002-09-14 18:14:17 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_default_flag'(doctype, Doctype),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									write('  XML doctype reference:          '), write(Doctype), nl,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_default_flag'(xsl, XSL),
							 | 
						
					
						
							
								
									
										
										
										
											2002-06-15 13:18:34 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									write('  XSL stylesheet:                 '), write(XSL), nl,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_default_flag'(unknown, Unknown),
							 | 
						
					
						
							
								
									
										
										
										
											2002-06-15 13:18:34 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									write('  Unknown entities:               '), write(Unknown), nl,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_default_flag'(misspelt, Misspelt),
							 | 
						
					
						
							
								
									
										
										
										
											2002-06-15 13:18:34 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									write('  Misspelt predicates:            '), write(Misspelt), nl,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_default_flag'(singletons, Singletons),
							 | 
						
					
						
							
								
									
										
										
										
											2002-06-15 13:18:34 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									write('  Singletons variables:           '), write(Singletons), nl,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_default_flag'(lgtredef, Lgtredef),
							 | 
						
					
						
							
								
									
										
										
										
											2002-06-15 13:18:34 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									write('  Logtalk built-ins redefinition: '), write(Lgtredef), nl,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_default_flag'(plredef, Plredef),
							 | 
						
					
						
							
								
									
										
										
										
											2002-06-15 13:18:34 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									write('  Prolog built-ins redefinition:  '), write(Plredef), nl,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_default_flag'(portability, Portability),
							 | 
						
					
						
							
								
									
										
										
										
											2002-06-15 13:18:34 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									write('  Non portable calls:             '), write(Portability), nl,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_default_flag'(report, Report),
							 | 
						
					
						
							
								
									
										
										
										
											2002-06-15 13:18:34 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									write('  Compilation report:             '), write(Report), nl,
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									'$lgt_default_flag'(named_anonymous_vars, Named),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									write('  Named anonymous variables:      '), write(Named), nl,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_default_flag'(code_prefix, Code),
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									write('  Compiled code functors prefix:  '), writeq(Code), nl,
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									'$lgt_default_flag'(smart_compilation, Smart),
							 | 
						
					
						
							
								
									
										
										
										
											2002-06-15 13:18:34 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									write('  Smart compilation:              '), write(Smart), nl, nl.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2002-07-31 23:34:42 +00:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								:- initialization('$lgt_startup_message').
							 | 
						
					
						
							
								
									
										
										
										
											2001-06-06 19:40:57 +00:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%  end!
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
							 |