| 66 | | :- dynamic('$lgt_current_protocol_'/3). % '$lgt_current_protocol_'(Ptc, Prefix, Type) |
| 67 | | :- dynamic('$lgt_current_category_'/6). % '$lgt_current_category_'(Ctg, Prefix, Dcl, Def, Type, Synchronized) |
| 68 | | :- dynamic('$lgt_current_object_'/8). % '$lgt_current_object_'(Obj, Prefix, Dcl, Def, Super, Type, Synchronized, Threaded) |
| | 66 | :- multifile('$lgt_current_protocol_'/3). % '$lgt_current_protocol_'(Ptc, Prefix, Type) |
| | 67 | :- dynamic('$lgt_current_protocol_'/3). |
| | 68 | |
| | 69 | :- multifile('$lgt_current_category_'/6). % '$lgt_current_category_'(Ctg, Prefix, Dcl, Def, Type, Synchronized) |
| | 70 | :- dynamic('$lgt_current_category_'/6). |
| | 71 | |
| | 72 | :- multifile('$lgt_current_object_'/8). % '$lgt_current_object_'(Obj, Prefix, Dcl, Def, Super, Type, Synchronized, Threaded) |
| | 73 | :- dynamic('$lgt_current_object_'/8). |
| | 74 | |
| 70 | | :- dynamic('$lgt_implements_protocol_'/3). % '$lgt_implements_protocol_'(ObjOrCtg, Ptc, Scope) |
| 71 | | :- dynamic('$lgt_imports_category_'/3). % '$lgt_imports_category_'(Obj, Ctg, Scope) |
| 72 | | :- dynamic('$lgt_instantiates_class_'/3). % '$lgt_instantiates_class_'(Instance, Class, Scope) |
| 73 | | :- dynamic('$lgt_specializes_class_'/3). % '$lgt_specializes_class_'(Class, Superclass, Scope) |
| 74 | | :- dynamic('$lgt_extends_category_'/3). % '$lgt_extends_category_'(Ctg1, Ctg2, Scope) |
| 75 | | :- dynamic('$lgt_extends_object_'/3). % '$lgt_extends_object_'(Prototype, Parent, Scope) |
| 76 | | :- dynamic('$lgt_extends_protocol_'/3). % '$lgt_extends_protocol_'(Ptc1, Ptc2, Scope) |
| | 76 | :- multifile('$lgt_implements_protocol_'/3). % '$lgt_implements_protocol_'(ObjOrCtg, Ptc, Scope) |
| | 77 | :- dynamic('$lgt_implements_protocol_'/3). |
| | 78 | |
| | 79 | :- multifile('$lgt_imports_category_'/3). % '$lgt_imports_category_'(Obj, Ctg, Scope) |
| | 80 | :- dynamic('$lgt_imports_category_'/3). |
| | 81 | |
| | 82 | :- multifile('$lgt_instantiates_class_'/3). % '$lgt_instantiates_class_'(Instance, Class, Scope) |
| | 83 | :- dynamic('$lgt_instantiates_class_'/3). |
| | 84 | |
| | 85 | :- multifile('$lgt_specializes_class_'/3). % '$lgt_specializes_class_'(Class, Superclass, Scope) |
| | 86 | :- dynamic('$lgt_specializes_class_'/3). |
| | 87 | |
| | 88 | :- multifile('$lgt_extends_category_'/3). % '$lgt_extends_category_'(Ctg1, Ctg2, Scope) |
| | 89 | :- dynamic('$lgt_extends_category_'/3). |
| | 90 | |
| | 91 | :- multifile('$lgt_extends_object_'/3). % '$lgt_extends_object_'(Prototype, Parent, Scope) |
| | 92 | :- dynamic('$lgt_extends_object_'/3). |
| | 93 | |
| | 94 | :- multifile('$lgt_extends_protocol_'/3). % '$lgt_extends_protocol_'(Ptc1, Ptc2, Scope) |
| | 95 | :- dynamic('$lgt_extends_protocol_'/3). |
| 8727 | | \+ '$lgt_pp_object_'(Obj, _, _, _, _, _, _, _, _, _, _), % not the object being compiled (self references) |
| | 8769 | \+ '$lgt_pp_object_'(Obj, _, _, _, _, _, _, _, _, _, _), % not the object being compiled (self reference) |
| 8753 | | \+ '$lgt_pp_protocol_'(Ptc, _, _, _, _), % not the protocol being compiled (self references) |
| 8754 | | \+ '$lgt_pp_entity_init_'(protocol, Ptc, _). % not a protocol defined in the source file being compiled |
| | 8796 | \+ '$lgt_pp_protocol_'(Ptc, _, _, _, _), % not the protocol being compiled (self reference) |
| | 8797 | \+ '$lgt_pp_entity_init_'(protocol, Ptc, _), % not a protocol defined in the source file being compiled |
| | 8798 | \+ '$lgt_pp_file_rclause_'('$lgt_current_protocol_'(Ptc, _, _)). |
| 8778 | | \+ '$lgt_pp_category_'(Ctg, _, _, _, _, _), % not the category being compiled (self references) |
| 8779 | | \+ '$lgt_pp_entity_init_'(category, Ctg, _). % not a category defined in the source file being compiled |
| | 8822 | \+ '$lgt_pp_category_'(Ctg, _, _, _, _, _), % not the category being compiled (self reference) |
| | 8823 | \+ '$lgt_pp_entity_init_'(category, Ctg, _), % not a category defined in the source file being compiled |
| | 8824 | \+ '$lgt_pp_file_rclause_'('$lgt_current_category_'(Ctg, _, _, _, _, _)). |
| | 10447 | % '$lgt_write_runtime_clauses'(@stream) |
| | 10448 | % |
| | 10449 | % writes the entity runtime multifile and dynamic directives and the entity |
| | 10450 | % runtime clauses for all defined entities for Prolog compilers supporting |
| | 10451 | % the multifile/1 predicate directive |
| | 10452 | |
| | 10453 | '$lgt_write_runtime_clauses'(Stream) :- |
| | 10454 | ( '$lgt_compiler_flag'(multifile_directive, supported) -> |
| | 10455 | '$lgt_write_runtime_clauses'(Stream, '$lgt_current_protocol_'/3), |
| | 10456 | '$lgt_write_runtime_clauses'(Stream, '$lgt_current_category_'/6), |
| | 10457 | '$lgt_write_runtime_clauses'(Stream, '$lgt_current_object_'/8), |
| | 10458 | '$lgt_write_runtime_clauses'(Stream, '$lgt_implements_protocol_'/3), |
| | 10459 | '$lgt_write_runtime_clauses'(Stream, '$lgt_imports_category_'/3), |
| | 10460 | '$lgt_write_runtime_clauses'(Stream, '$lgt_instantiates_class_'/3), |
| | 10461 | '$lgt_write_runtime_clauses'(Stream, '$lgt_specializes_class_'/3), |
| | 10462 | '$lgt_write_runtime_clauses'(Stream, '$lgt_extends_category_'/3), |
| | 10463 | '$lgt_write_runtime_clauses'(Stream, '$lgt_extends_object_'/3), |
| | 10464 | '$lgt_write_runtime_clauses'(Stream, '$lgt_extends_protocol_'/3), |
| | 10465 | '$lgt_write_runtime_clauses'(Stream, '$lgt_complemented_object_'/4), |
| | 10466 | '$lgt_write_runtime_clauses'(Stream, '$lgt_debugging_'/1) |
| | 10467 | ; true |
| | 10468 | ). |
| | 10469 | |
| | 10470 | |
| | 10471 | '$lgt_write_runtime_clauses'(Stream, Functor/Arity) :- |
| | 10472 | functor(Clause, Functor, Arity), |
| | 10473 | ( \+ \+ '$lgt_pp_file_rclause_'(Clause) -> |
| | 10474 | write_canonical(Stream, (:- multifile(Functor/Arity))), write(Stream, '.'), nl(Stream), |
| | 10475 | write_canonical(Stream, (:- dynamic(Functor/Arity))), write(Stream, '.'), nl(Stream), |
| | 10476 | ( '$lgt_pp_file_rclause_'(Clause), |
| | 10477 | write_canonical(Stream, Clause), write(Stream, '.'), nl(Stream), |
| | 10478 | fail |
| | 10479 | ; true |
| | 10480 | ) |
| | 10481 | ; true |
| | 10482 | ). |
| | 10483 | |
| | 10484 | |
| | 10485 | |
| 10451 | | findall(Clause, '$lgt_pp_rclause'(Clause), Clauses), |
| 10452 | | Goal1 = '$lgt_assert_runtime_clauses'(Entity, Clauses), |
| | 10536 | ( '$lgt_compiler_flag'(multifile_directive, supported) -> |
| | 10537 | Goal1 = true |
| | 10538 | ; findall(Clause, '$lgt_pp_rclause'(Clause), Clauses), |
| | 10539 | Goal1 = '$lgt_assert_runtime_clauses'(Entity, Clauses) |
| | 10540 | ), |