Changeset 4325
- Timestamp:
- 06/27/08 11:32:50 (2 months ago)
- Location:
- trunk
- Files:
-
- 4 modified
-
compiler/logtalk.pl (modified) (89 diffs)
-
configs/yap.config (modified) (2 diffs)
-
RELEASE_NOTES.txt (modified) (1 diff)
-
UPGRADING.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/compiler/logtalk.pl
r4324 r4325 64 64 % tables of loaded entities and respective relationships 65 65 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).66 :- multifile('$lgt_current_protocol_'/5). % '$lgt_current_protocol_'(Ptc, Prefix, Dcl, Rnm, Type) 67 :- dynamic('$lgt_current_protocol_'/5). 68 69 :- multifile('$lgt_current_category_'/7). % '$lgt_current_category_'(Ctg, Prefix, Dcl, Def, Rnm, Type, Synchronized) 70 :- dynamic('$lgt_current_category_'/7). 71 72 :- multifile('$lgt_current_object_'/13). % '$lgt_current_object_'(Obj, Prefix, Dcl, Def, Super, IDcl, IDef, DDcl, DDef, Rnm, Type, Synchronized, Threaded) 73 :- dynamic('$lgt_current_object_'/13). 74 74 75 75 … … 107 107 108 108 :- multifile('$lgt_debugging_'/1). % '$lgt_debugging_'(Entity) 109 :- dynamic('$lgt_debugging_'/1). % '$lgt_debugging_'(Entity)109 :- dynamic('$lgt_debugging_'/1). 110 110 111 111 :- dynamic('$lgt_dbg_debugging_'/0). % '$lgt_dbg_debugging_' … … 189 189 :- dynamic('$lgt_pp_non_terminal_'/3). % '$lgt_pp_non_terminal_'(Functor, Args, Arity) 190 190 191 :- dynamic('$lgt_pp_object_'/11). % '$lgt_pp_object_'(Obj, Prefix, Dcl, Def, Super, IDcl, IDef, DDcl, DDef, Rnm, Mode)192 :- dynamic('$lgt_pp_category_'/6). % '$lgt_pp_category_'(Ctg, Prefix, Dcl, Def, Rnm, Mode)193 :- dynamic('$lgt_pp_protocol_'/5). % '$lgt_pp_protocol_'(Ptc, Prefix, Dcl, Rnm, Mode)191 :- dynamic('$lgt_pp_object_'/11). % '$lgt_pp_object_'(Obj, Prefix, Dcl, Def, Super, IDcl, IDef, DDcl, DDef, Rnm, Type) 192 :- dynamic('$lgt_pp_category_'/6). % '$lgt_pp_category_'(Ctg, Prefix, Dcl, Def, Rnm, Type) 193 :- dynamic('$lgt_pp_protocol_'/5). % '$lgt_pp_protocol_'(Ptc, Prefix, Dcl, Rnm, Type) 194 194 195 195 :- dynamic('$lgt_pp_module_'/1). % '$lgt_pp_module_'(Module) … … 340 340 ; '$lgt_extends_object_'(_, Obj, _) 341 341 ), 342 \+ '$lgt_current_object_'(Obj, _, _, _, _, _, _, _ ),342 \+ '$lgt_current_object_'(Obj, _, _, _, _, _, _, _, _, _, _, _, _), 343 343 throw(error(existence_error(object, Obj), _, _)). 344 344 345 345 '$lgt_runtime_error_handler'(error(existence_error(procedure, TFunctor/7), _)) :- 346 346 atom_concat(CtgOrPtc, '_0__dcl', TFunctor), 347 ( '$lgt_implements_protocol_'(_, CtgOrPtc, _), \+ '$lgt_current_protocol_'(CtgOrPtc, _, _ ) ->347 ( '$lgt_implements_protocol_'(_, CtgOrPtc, _), \+ '$lgt_current_protocol_'(CtgOrPtc, _, _, _, _) -> 348 348 throw(error(existence_error(protocol, CtgOrPtc), _, _)) 349 ; '$lgt_extends_protocol_'(_, CtgOrPtc, _), \+ '$lgt_current_protocol_'(CtgOrPtc, _, _ ) ->349 ; '$lgt_extends_protocol_'(_, CtgOrPtc, _), \+ '$lgt_current_protocol_'(CtgOrPtc, _, _, _, _) -> 350 350 throw(error(existence_error(protocol, CtgOrPtc), _, _)) 351 ; '$lgt_imports_category_'(_, CtgOrPtc, _), \+ '$lgt_current_category_'(CtgOrPtc, _, _, _, _, _ ) ->351 ; '$lgt_imports_category_'(_, CtgOrPtc, _), \+ '$lgt_current_category_'(CtgOrPtc, _, _, _, _, _, _) -> 352 352 throw(error(existence_error(category, CtgOrPtc), _, _)) 353 ; '$lgt_extends_category_'(_, CtgOrPtc, _), \+ '$lgt_current_category_'(CtgOrPtc, _, _, _, _, _ ) ->353 ; '$lgt_extends_category_'(_, CtgOrPtc, _), \+ '$lgt_current_category_'(CtgOrPtc, _, _, _, _, _, _) -> 354 354 throw(error(existence_error(category, CtgOrPtc), _, _)) 355 355 ). … … 423 423 424 424 current_object(Obj) :- 425 '$lgt_current_object_'(Obj, _, _, _, _, _, _, _ ).425 '$lgt_current_object_'(Obj, _, _, _, _, _, _, _, _, _, _, _, _). 426 426 427 427 … … 435 435 436 436 current_protocol(Ptc) :- 437 '$lgt_current_protocol_'(Ptc, _, _ ).437 '$lgt_current_protocol_'(Ptc, _, _, _, _). 438 438 439 439 … … 447 447 448 448 current_category(Ctg) :- 449 '$lgt_current_category_'(Ctg, _, _, _, _, _ ).449 '$lgt_current_category_'(Ctg, _, _, _, _, _, _). 450 450 451 451 … … 468 468 469 469 object_property(Obj, Prop) :- 470 '$lgt_current_object_'(Obj, _, _, _, _, Prop, _, _). % static/dynamic property470 '$lgt_current_object_'(Obj, _, _, _, _, _, _, _, _, _, Prop, _, _). % static/dynamic property 471 471 472 472 object_property(Obj, synchronized) :- 473 '$lgt_current_object_'(Obj, _, _, _, _, _, yes, _).473 '$lgt_current_object_'(Obj, _, _, _, _, _, _, _, _, _, _, yes, _). 474 474 475 475 object_property(Obj, threaded) :- 476 '$lgt_current_object_'(Obj, _, _, _, _, _, _, yes).476 '$lgt_current_object_'(Obj, _, _, _, _, _, _, _, _, _, _, _, yes). 477 477 478 478 … … 491 491 492 492 category_property(Ctg, Prop) :- % static/dynamic property 493 '$lgt_current_category_'(Ctg, _, _, _, Prop, _).493 '$lgt_current_category_'(Ctg, _, _, _, _, Prop, _). 494 494 495 495 category_property(Ctg, synchronized) :- 496 '$lgt_current_category_'(Ctg, _, _, _, _, yes).496 '$lgt_current_category_'(Ctg, _, _, _, _, _, yes). 497 497 498 498 … … 511 511 512 512 protocol_property(Ptc, Prop) :- % static/dynamic property 513 '$lgt_current_protocol_'(Ptc, _, Prop).513 '$lgt_current_protocol_'(Ptc, _, _, _, Prop). 514 514 515 515 … … 526 526 527 527 create_object(Obj, Rels, Dirs, Clauses) :- 528 '$lgt_current_object_'(Obj, _, _, _, _, _, _, _ ),528 '$lgt_current_object_'(Obj, _, _, _, _, _, _, _, _, _, _, _, _), 529 529 throw(error(permission_error(modify, object, Obj), create_object(Obj, Rels, Dirs, Clauses))). 530 530 531 531 create_object(Obj, Rels, Dirs, Clauses) :- 532 '$lgt_current_category_'(Obj, _, _, _, _, _ ),532 '$lgt_current_category_'(Obj, _, _, _, _, _, _), 533 533 throw(error(permission_error(modify, category, Obj), create_object(Obj, Rels, Dirs, Clauses))). 534 534 535 535 create_object(Obj, Rels, Dirs, Clauses) :- 536 '$lgt_current_protocol_'(Obj, _, _ ),536 '$lgt_current_protocol_'(Obj, _, _, _, _), 537 537 throw(error(permission_error(modify, protocol, Obj), create_object(Obj, Rels, Dirs, Clauses))). 538 538 … … 576 576 577 577 create_category(Ctg, Rels, Dirs, Clauses) :- 578 '$lgt_current_category_'(Ctg, _, _, _, _, _ ),578 '$lgt_current_category_'(Ctg, _, _, _, _, _, _), 579 579 throw(error(permission_error(modify, category, Ctg), create_category(Ctg, Rels, Dirs, Clauses))). 580 580 581 581 create_category(Ctg, Rels, Dirs, Clauses) :- 582 '$lgt_current_object_'(Ctg, _, _, _, _, _, _, _ ),582 '$lgt_current_object_'(Ctg, _, _, _, _, _, _, _, _, _, _, _, _), 583 583 throw(error(permission_error(modify, object, Ctg), create_category(Ctg, Rels, Dirs, Clauses))). 584 584 585 585 create_category(Ctg, Rels, Dirs, Clauses) :- 586 '$lgt_current_protocol_'(Ctg, _, _ ),586 '$lgt_current_protocol_'(Ctg, _, _, _, _), 587 587 throw(error(permission_error(modify, protocol, Ctg), create_category(Ctg, Rels, Dirs, Clauses))). 588 588 … … 625 625 626 626 create_protocol(Ptc, Rels, Dirs) :- 627 '$lgt_current_protocol_'(Ptc, _, _ ),627 '$lgt_current_protocol_'(Ptc, _, _, _, _), 628 628 throw(error(permission_error(modify, protocol, Ptc), create_protocol(Ptc, Rels, Dirs))). 629 629 630 630 create_protocol(Ptc, Rels, Dirs) :- 631 '$lgt_current_object_'(Ptc, _, _, _, _, _, _, _ ),631 '$lgt_current_object_'(Ptc, _, _, _, _, _, _, _, _, _, _, _, _), 632 632 throw(error(permission_error(modify, object, Ptc), create_protocol(Ptc, Rels, Dirs))). 633 633 634 634 create_protocol(Ptc, Rels, Dirs) :- 635 '$lgt_current_category_'(Ptc, _, _, _, _, _ ),635 '$lgt_current_category_'(Ptc, _, _, _, _, _, _), 636 636 throw(error(permission_error(modify, category, Ptc), create_protocol(Ptc, Rels, Dirs))). 637 637 … … 667 667 668 668 abolish_object(Obj) :- 669 ( '$lgt_current_object_'(Obj, Prefix, _, _, _, Type, _, _) ->669 ( '$lgt_current_object_'(Obj, Prefix, Dcl, Def, Super, IDcl, IDef, DDcl, DDef, Rnm, Type, _, _) -> 670 670 ( Type == (dynamic) -> 671 call_with_args(Prefix, Dcl, Def, Super, IDcl, IDef, DDcl, DDef, Rnm),672 671 '$lgt_abolish_entity_predicates'(Def), 673 672 '$lgt_abolish_entity_predicates'(DDef), … … 683 682 abolish(Rnm/3), 684 683 abolish(Prefix/8), 685 retractall('$lgt_current_object_'(Obj, _, _, _, _, _, _, _ )),684 retractall('$lgt_current_object_'(Obj, _, _, _, _, _, _, _, _, _, _, _, _)), 686 685 retractall('$lgt_extends_object_'(Obj, _, _)), 687 686 retractall('$lgt_instantiates_class_'(Obj, _, _)), … … 709 708 710 709 abolish_category(Ctg) :- 711 ( '$lgt_current_category_'(Ctg, Prefix, _, _, Type, _) ->710 ( '$lgt_current_category_'(Ctg, Prefix, Dcl, Def, Rnm, Type, _) -> 712 711 ( Type == (dynamic) -> 713 call_with_args(Prefix, Dcl, Def, Rnm),714 712 '$lgt_abolish_entity_predicates'(Def), 715 713 abolish(Dcl/6), … … 718 716 abolish(Rnm/3), 719 717 abolish(Prefix/3), 720 retractall('$lgt_current_category_'(Ctg, _, _, _, _, _ )),718 retractall('$lgt_current_category_'(Ctg, _, _, _, _, _, _)), 721 719 retractall('$lgt_extends_category_'(Ctg, _, _)), 722 720 retractall('$lgt_implements_protocol_'(Ctg, _, _)), … … 740 738 741 739 abolish_protocol(Ptc) :- 742 ( '$lgt_current_protocol_'(Ptc, Prefix, Type) ->740 ( '$lgt_current_protocol_'(Ptc, Prefix, Dcl, Rnm, Type) -> 743 741 ( Type == (dynamic) -> 744 call_with_args(Prefix, Dcl, Rnm),745 742 abolish(Dcl/6), 746 743 abolish(Dcl/7), 747 744 abolish(Rnm/3), 748 745 abolish(Prefix/2), 749 retractall('$lgt_current_protocol_'(Ptc, _, _ )),746 retractall('$lgt_current_protocol_'(Ptc, _, _, _, _)), 750 747 retractall('$lgt_extends_protocol_'(Ptc, _, _)), 751 748 '$lgt_clean_lookup_caches' … … 1095 1092 1096 1093 define_events(Event, Obj, Msg, Sender, Monitor) :- 1097 \+ '$lgt_current_object_'(Monitor, _, _, _, _, _, _, _ ),1094 \+ '$lgt_current_object_'(Monitor, _, _, _, _, _, _, _, _, _, _, _, _), 1098 1095 throw(error(existence_error(object, Monitor), define_events(Event, Obj, Msg, Sender, Monitor))). 1099 1096 … … 1101 1098 var(Event), 1102 1099 !, 1103 '$lgt_current_object_'(Monitor, _, _, Def, _, _, _, _ ),1100 '$lgt_current_object_'(Monitor, _, _, Def, _, _, _, _, _, _, _, _, _), 1104 1101 ( call_with_args(Def, before(Obj, Msg, Sender), Monitor, Monitor, Monitor, BCall, _) -> 1105 1102 ( call_with_args(Def, after(Obj, Msg, Sender), Monitor, Monitor, Monitor, ACall, _) -> … … 1112 1109 1113 1110 define_events(before, Obj, Msg, Sender, Monitor) :- 1114 '$lgt_current_object_'(Monitor, _, _, Def, _, _, _, _ ),1111 '$lgt_current_object_'(Monitor, _, _, Def, _, _, _, _, _, _, _, _, _), 1115 1112 call_with_args(Def, before(Obj, Msg, Sender), Monitor, Monitor, Monitor, Call, _) -> 1116 1113 retractall('$lgt_before_'(Obj, Msg, Sender, Monitor, _)), … … 1118 1115 1119 1116 define_events(after, Obj, Msg, Sender, Monitor) :- 1120 '$lgt_current_object_'(Monitor, _, _, Def, _, _, _, _ ),1117 '$lgt_current_object_'(Monitor, _, _, Def, _, _, _, _, _, _, _, _, _), 1121 1118 call_with_args(Def, after(Obj, Msg, Sender), Monitor, Monitor, Monitor, Call, _) -> 1122 1119 retractall('$lgt_after_'(Obj, Msg, Sender, Monitor, _)), … … 1414 1411 1415 1412 threaded_wait(Message) :- 1416 '$lgt_current_object_'(user, Prefix, _, _, _, _, _, _ ),1413 '$lgt_current_object_'(user, Prefix, _, _, _, _, _, _, _, _, _, _, _), 1417 1414 '$lgt_thread_get_notifications'(Message, Prefix). 1418 1415 … … 1430 1427 1431 1428 threaded_notify(Message) :- 1432 '$lgt_current_object_'(user, Prefix, _, _, _, _, _, _ ),1429 '$lgt_current_object_'(user, Prefix, _, _, _, _, _, _, _, _, _, _, _), 1433 1430 '$lgt_thread_send_notifications'(Message, Prefix). 1434 1431 … … 1841 1838 1842 1839 '$lgt_obj_exists'(Obj, Pred, Sender) :- 1843 ( '$lgt_current_object_'(Obj, _, _, _, _, _, _, _ ) ->1840 ( '$lgt_current_object_'(Obj, _, _, _, _, _, _, _, _, _, _, _, _) -> 1844 1841 true 1845 1842 ; throw(error(existence_error(object, Obj), Obj::Pred, Sender)) … … 1866 1863 1867 1864 '$lgt_current_predicate'(Obj, Functor/Arity, Sender, _) :- 1868 \+ '$lgt_current_object_'(Obj, _, _, _, _, _, _, _ ),1865 \+ '$lgt_current_object_'(Obj, _, _, _, _, _, _, _, _, _, _, _, _), 1869 1866 throw(error(existence_error(object, Obj), Obj::current_predicate(Functor/Arity), Sender)). 1870 1867 … … 1890 1887 1891 1888 '$lgt_visible_predicate'(Obj, Pred, Sender, Scope) :- 1892 '$lgt_current_object_'(Obj, _, Dcl, _, _, _, _, _ ),1889 '$lgt_current_object_'(Obj, _, Dcl, _, _, _, _, _, _, _, _, _, _), 1893 1890 call_with_args(Dcl, Pred, PScope, _, _, _, _, SCtn, _), 1894 1891 once((\+ \+ PScope = Scope; Sender = SCtn)). … … 1912 1909 1913 1910 '$lgt_predicate_property'(Obj, Pred, Prop, Sender, _) :- 1914 \+ '$lgt_current_object_'(Obj, _, _, _, _, _, _, _ ),1911 \+ '$lgt_current_object_'(Obj, _, _, _, _, _, _, _, _, _, _, _, _), 1915 1912 throw(error(existence_error(object, Obj), Obj::predicate_property(Pred, Prop), Sender)). 1916 1913 1917 1914 '$lgt_predicate_property'(Obj, Pred, Prop, Sender, Scope) :- 1918 '$lgt_current_object_'(Obj, Prefix, Dcl, Def, _, _, _, _ ),1915 '$lgt_current_object_'(Obj, Prefix, Dcl, Def, _, _, _, _, _, _, _, _, _), 1919 1916 call_with_args(Dcl, Pred, PScope, Type, Meta, NonTerminal, Synchronized, SCtn, TCtn), 1920 1917 !, … … 1931 1928 ; Synchronized \== no, 1932 1929 Prop = synchronized 1933 ; '$lgt_current_object_'(TCtn, _, TCtnDcl, _, _, _, _, _ ),1930 ; '$lgt_current_object_'(TCtn, _, TCtnDcl, _, _, _, _, _, _, _, _, _, _), 1934 1931 \+ call_with_args(TCtnDcl, Pred, _, _, _, _, _), 1935 1932 '$lgt_alias_pred'(Obj, Prefix, Pred, Pred2), … … 1992 1989 '$lgt_alias_pred'(Obj, _, Alias, Pred, _) :- 1993 1990 '$lgt_implements_protocol_'(Obj, Ptc, _), 1994 '$lgt_current_protocol_'(Ptc, Prefix, _ ),1991 '$lgt_current_protocol_'(Ptc, Prefix, _, _, _), 1995 1992 '$lgt_alias_pred'(Ptc, Prefix, Alias, Pred, _). 1996 1993 1997 1994 '$lgt_alias_pred'(Ptc1, _, Alias, Pred, _) :- 1998 1995 '$lgt_extends_protocol_'(Ptc1, Ptc2, _), 1999 '$lgt_current_protocol_'(Ptc2, Prefix, _ ),1996 '$lgt_current_protocol_'(Ptc2, Prefix, _, _, _), 2000 1997 '$lgt_alias_pred'(Ptc2, Prefix, Alias, Pred, _). 2001 1998 2002 1999 '$lgt_alias_pred'(Ctg1, _, Alias, Pred, _) :- 2003 2000 '$lgt_extends_category_'(Ctg1, Ctg2, _), 2004 '$lgt_current_category_'(Ctg2, Prefix, _, _, _, _ ),2001 '$lgt_current_category_'(Ctg2, Prefix, _, _, _, _, _), 2005 2002 '$lgt_alias_pred'(Ctg2, Prefix, Alias, Pred, _). 2006 2003 2007 2004 '$lgt_alias_pred'(Obj, _, Alias, Pred, _) :- 2008 2005 '$lgt_imports_category_'(Obj, Ctg, _), 2009 '$lgt_current_category_'(Ctg, Prefix, _, _, _, _ ),2006 '$lgt_current_category_'(Ctg, Prefix, _, _, _, _, _), 2010 2007 '$lgt_alias_pred'(Ctg, Prefix, Alias, Pred, _). 2011 2008 2012 2009 '$lgt_alias_pred'(Obj, _, Alias, Pred, prototype) :- 2013 2010 '$lgt_extends_object_'(Obj, Parent, _), 2014 '$lgt_current_object_'(Parent, Prefix, _, _, _, _, _, _ ),2011 '$lgt_current_object_'(Parent, Prefix, _, _, _, _, _, _, _, _, _, _, _), 2015 2012 '$lgt_alias_pred'(Parent, Prefix, Alias, Pred, prototype). 2016 2013 2017 2014 '$lgt_alias_pred'(Instance, _, Alias, Pred, instance) :- 2018 2015 '$lgt_instantiates_class_'(Instance, Class, _), 2019 '$lgt_current_object_'(Class, Prefix, _, _, _, _, _, _ ),2016 '$lgt_current_object_'(Class, Prefix, _, _, _, _, _, _, _, _, _, _, _), 2020 2017 '$lgt_alias_pred'(Class, Prefix, Alias, Pred, superclass). 2021 2018 2022 2019 '$lgt_alias_pred'(Class, _, Alias, Pred, superclass) :- 2023 2020 '$lgt_specializes_class_'(Class, Superclass, _), 2024 '$lgt_current_object_'(Superclass, Prefix, _, _, _, _, _, _ ),2021 '$lgt_current_object_'(Superclass, Prefix, _, _, _, _, _, _, _, _, _, _, _), 2025 2022 '$lgt_alias_pred'(Superclass, Prefix, Alias, Pred, superclass). 2026 2023 … … 2059 2056 2060 2057 '$lgt_abolish_chk'(Obj, Functor/Arity, Sender, Scope) :- 2061 '$lgt_current_object_'(Obj, Prefix, Dcl, _, _, _, _, _),2058 '$lgt_current_object_'(Obj, _, Dcl, _, _, _, _, DDcl, DDef, _, _, _, _), 2062 2059 !, 2063 2060 ( functor(Pred, Functor, Arity), … … 2065 2062 ( (\+ \+ PScope = Scope; Sender = SCtn) -> 2066 2063 ( Compilation == (dynamic) -> 2067 call_with_args(Prefix, _, _, _, _, _, DDcl, DDef, _),2068 2064 ( call_with_args(DDcl, Pred, _) -> 2069 2065 Clause =.. [DDcl, Pred, _], … … 2141 2137 2142 2138 '$lgt_asserta_rule_chk'(Obj, (Head:-Body), Sender, TestScope, DclScope) :- 2143 '$lgt_current_object_'(Obj, Prefix, _, _, _, _, _, _), 2144 !, 2145 call_with_args(Prefix, Dcl, Def, _, _, _, DDcl, DDef, _), 2139 '$lgt_current_object_'(Obj, Prefix, Dcl, Def, _, _, _, DDcl, DDef, _, _, _, _), 2140 !, 2146 2141 '$lgt_assert_pred_dcl'(Dcl, DDcl, Head, Scope, Type, Meta, SCtn, DclScope), 2147 2142 ( Type == (dynamic) -> … … 2176 2171 2177 2172 '$lgt_asserta_fact_chk'(Obj, Head, Sender, TestScope, DclScope) :- 2178 '$lgt_current_object_'(Obj, Prefix, _, _, _, _, _, _), 2179 !, 2180 call_with_args(Prefix, Dcl, Def, _, _, _, DDcl, DDef, _), 2173 '$lgt_current_object_'(Obj, Prefix, Dcl, Def, _, _, _, DDcl, DDef, _, _, _, _), 2174 !, 2181 2175 '$lgt_assert_pred_dcl'(Dcl, DDcl, Head, Scope, Type, _, SCtn, DclScope), 2182 2176 ( Type == (dynamic) -> … … 2245 2239 2246 2240 '$lgt_assertz_rule_chk'(Obj, (Head:-Body), Sender, TestScope, DclScope) :- 2247 '$lgt_current_object_'(Obj, Prefix, _, _, _, _, _, _), 2248 !, 2249 call_with_args(Prefix, Dcl, Def, _, _, _, DDcl, DDef, _), 2241 '$lgt_current_object_'(Obj, Prefix, Dcl, Def, _, _, _, DDcl, DDef, _, _, _, _), 2242 !, 2250 2243 '$lgt_assert_pred_dcl'(Dcl, DDcl, Head, Scope, Type, Meta, SCtn, DclScope), 2251 2244 ( Type == (dynamic) -> … … 2280 2273 2281 2274 '$lgt_assertz_fact_chk'(Obj, Head, Sender, TestScope, DclScope) :- 2282 '$lgt_current_object_'(Obj, Prefix, _, _, _, _, _, _), 2283 !, 2284 call_with_args(Prefix, Dcl, Def, _, _, _, DDcl, DDef, _), 2275 '$lgt_current_object_'(Obj, Prefix, Dcl, Def, _, _, _, DDcl, DDef, _, _, _, _), 2276 !, 2285 2277 '$lgt_assert_pred_dcl'(Dcl, DDcl, Head, Scope, Type, _, SCtn, DclScope), 2286 2278 ( Type == (dynamic) -> … … 2379 2371 2380 2372 '$lgt_clause_chk'(Obj, Head, Body, Sender, Scope) :- 2381 '$lgt_current_object_'(Obj, Prefix, _, _, _, _, _, _), 2382 !, 2383 call_with_args(Prefix, Dcl, Def, _, _, _, _, DDef, _), 2373 '$lgt_current_object_'(Obj, _, Dcl, Def, _, _, _, _, DDef, _, _, _, _), 2374 !, 2384 2375 ( call_with_args(Dcl, Head, PScope, Type, _, _, _, SCtn, _) -> 2385 2376 ( Type == (dynamic) -> … … 2453 2444 2454 2445 '$lgt_retract_var_body_chk'(Obj, (Head:-Body), Sender, Scope) :- 2455 '$lgt_current_object_'(Obj, Prefix, _, _, _, _, _, _), 2456 !, 2457 call_with_args(Prefix, Dcl, Def, _, _, _, _, DDef, _), 2446 '$lgt_current_object_'(Obj, _, Dcl, Def, _, _, _, _, DDef, _, _, _, _), 2447 !, 2458 2448 ( call_with_args(Dcl, Head, PScope, Type, _, _, _, SCtn, _) -> 2459 2449 ( Type == (dynamic) -> … … 2505 2495 2506 2496 '$lgt_retract_rule_chk'(Obj, (Head:-Body), Sender, Scope) :- 2507 '$lgt_current_object_'(Obj, Prefix, _, _, _, _, _, _), 2508 !, 2509 call_with_args(Prefix, Dcl, Def, _, _, _, _, DDef, _), 2497 '$lgt_current_object_'(Obj, _, Dcl, Def, _, _, _, _, DDef, _, _, _, _), 2498 !, 2510 2499 ( call_with_args(Dcl, Head, PScope, Type, _, _, _, SCtn, _) -> 2511 2500 ( Type == (dynamic) -> … … 2545 2534 2546 2535 '$lgt_retract_fact_chk'(Obj, Head, Sender, Scope) :- 2547 '$lgt_current_object_'(Obj, Prefix, _, _, _, _, _, _), 2548 !, 2549 call_with_args(Prefix, Dcl, Def, _, _, _, _, DDef, _), 2536 '$lgt_current_object_'(Obj, _, Dcl, Def, _, _, _, _, DDef, _, _, _, _), 2537 !, 2550 2538 ( call_with_args(Dcl, Head, PScope, Type, _, _, _, SCtn, _) -> 2551 2539 ( Type == (dynamic) -> … … 2611 2599 2612 2600 '$lgt_retractall_chk'(Obj, Head, Sender, Scope) :- 2613 '$lgt_current_object_'(Obj, Prefix, _, _, _, _, _, _), 2614 !, 2615 call_with_args(Prefix, Dcl, Def, _, _, _, _, DDef, _), 2601 '$lgt_current_object_'(Obj, _, Dcl, Def, _, _, _, _, DDef, _, _, _, _), 2602 !, 2616 2603 ( call_with_args(Dcl, Head, PScope, Type, _, _, _, SCtn, _) -> 2617 2604 ( Type == (dynamic) -> … … 2784 2771 2785 2772 '$lgt_phrase'(Obj, NonTerminal, Input, Rest, Sender, Scope) :- 2786 ( '$lgt_current_object_'(Obj, Prefix, Dcl,Def, _, _, _, _) ->2773 ( '$lgt_current_object_'(Obj, _, Dcl, Def, _, _, _, _, DDef, _, _, _, _) -> 2787 2774 NonTerminal =.. [Functor| Args], 2788 2775 '$lgt_append'(Args, [Input, Rest], Args2), … … 2801 2788 Obj = Sender, 2802 2789 ( call_with_args(Def, Pred, Obj, Obj, Obj, Call) 2803 ; call_with_args( Prefix, _, _, _, _, _, _, DDef, _), call_with_args(DDef, Pred, Obj, Obj, Obj, Call)2790 ; call_with_args(DDef, Pred, Obj, Obj, Obj, Call) 2804 2791 ) -> 2805 2792 call(Call) … … 2840 2827 2841 2828 '$lgt_term_expansion'(Obj, Term, Expansion, Sender, Scope) :- 2842 '$lgt_current_object_'(Obj, Prefix, Dcl,Def, _, _, _, _),2829 '$lgt_current_object_'(Obj, _, Dcl, Def, _, _, _, _, DDef, _, _, _, _), 2843 2830 ( ( call_with_args(Dcl, term_expansion(_, _), PScope, _, _, _, _, SCtn, _) -> 2844 2831 ( (\+ \+ PScope = Scope; Sender = SCtn) -> … … 2849 2836 ( call_with_args(Def, term_expansion(Term, Expansion), Obj, Obj, Obj, Call) -> 2850 2837 true 2851 ; call_with_args(Prefix, _, _, _, _, _, _, DDef, _), 2852 call_with_args(DDef, term_expansion(Term, Expansion), Obj, Obj, Obj, Call) 2838 ; call_with_args(DDef, term_expansion(Term, Expansion), Obj, Obj, Obj, Call) 2853 2839 ) 2854 2840 ), … … 2886 2872 2887 2873 '$lgt_send_to_self_nv'(Obj, Pred, Sender) :- 2888 '$lgt_current_object_'(Obj, _, Dcl, Def, _, _, _, _ ),2874 '$lgt_current_object_'(Obj, _, Dcl, Def, _, _, _, _, _, _, _, _, _), 2889 2875 ( call_with_args(Dcl, Pred, Scope, _, _, _, _, SCtn, _) -> % lookup declaration 2890 2876 ( (Scope = p(_); Sender = SCtn) -> % check scope … … 2933 2919 2934 2920 '$lgt_send_to_object_nv'(Obj, Pred, Sender) :- 2935 '$lgt_current_object_'(Obj, _, Dcl, Def, _, _, _, _ ),2921 '$lgt_current_object_'(Obj, _, Dcl, Def, _, _, _, _, _, _, _, _, _), 2936 2922 !, 2937 2923 ( call_with_args(Dcl, Pred, Scope, _, _, _, _, _, _) -> % lookup declaration … … 2992 2978 2993 2979 '$lgt_send_to_object_ne_nv'(Obj, Pred, Sender) :- 2994 '$lgt_current_object_'(Obj, _, Dcl, Def, _, _, _, _ ),2980 '$lgt_current_object_'(Obj, _, Dcl, Def, _, _, _, _, _, _, _, _, _), 2995 2981 !, 2996 2982 ( call_with_args(Dcl, Pred, Scope, _, _, _, _, _, _) -> % lookup declaration … … 3044 3030 3045 3031 '$lgt_send_to_super_nv'(Self, Pred, This, Sender) :- 3046 '$lgt_current_object_'(Self, _, Dcl, _, _, _, _, _ ),3032 '$lgt_current_object_'(Self, _, Dcl, _, _, _, _, _, _, _, _, _, _), 3047 3033 call_with_args(Dcl, Pred, Scope, _, _, _, _, SCtn, _), 3048 3034 !, 3049 3035 ( (Scope = p(_); This = SCtn) -> % check scope 3050 '$lgt_current_object_'(This, _, _, _, Super, _, _, _ ),3036 '$lgt_current_object_'(This, _, _, _, Super, _, _, _, _, _, _, _, _), 3051 3037 functor(Pred, PFunctor, PArity), functor(GPred, PFunctor, PArity), % construct predicate template 3052 3038 functor(This, TFunctor, TArity), functor(GThis, TFunctor, TArity), % construct "this" template … … 3136 3122 '$lgt_metacall_in_object'(Pred, local, Sender, This, Self) :- 3137 3123 !, 3138 '$lgt_current_object_'(This, Prefix, _, _, _, _, _, _ ),3124 '$lgt_current_object_'(This, Prefix, _, _, _, _, _, _, _, _, _, _, _), 3139 3125 '$lgt_ctx_ctx'(Ctx, _, Sender, This, Self, Prefix, [], _), 3140 3126 '$lgt_tr_body'(Pred, Call, DCall, Ctx), … … 3146 3132 '$lgt_metacall_in_object'(Pred, MetaVars, Sender, This, Self) :- 3147 3133 ( \+ '$lgt_member'(Pred, MetaVars) -> 3148 '$lgt_current_object_'(This, Prefix, _, _, _, _, _, _ ),3134 '$lgt_current_object_'(This, Prefix, _, _, _, _, _, _, _, _, _, _, _), 3149 3135 '$lgt_ctx_ctx'(Ctx, _, Sender, This, Self, Prefix, [], _) 3150 ; '$lgt_current_object_'(Sender, Prefix, _, _, _, _, _, _ ),3136 ; '$lgt_current_object_'(Sender, Prefix, _, _, _, _, _, _, _, _, _, _, _), 3151 3137 '$lgt_ctx_ctx'(Ctx, _, Sender, Sender, Self, Prefix, [], _) 3152 3138 ), … … 3165 3151 '$lgt_call_built_in'(Pred, Ctx) :- 3166 3152 '$lgt_ctx_ctx'(Ctx, _, Sender, This, Self, _, _, _), 3167 '$lgt_current_object_'(This, _, _, Def, _, _, _, _ ),3153 '$lgt_current_object_'(This, _, _, Def, _, _, _, _, _, _, _, _, _), 3168 3154 ( call_with_args(Def, Pred, Sender, This, Self, Call) -> 3169 3155 call(Call) … … 3179 3165 '$lgt_call_within_context'(Obj, Goal, This) :- 3180 3166 ( '$lgt_compiler_flag'(context_switching_calls, allow) -> 3181 ( '$lgt_current_object_'(Obj, Prefix, _, _, _, _, _, _ ) ->3167 ( '$lgt_current_object_'(Obj, Prefix, _, _, _, _, _, _, _, _, _, _, _) -> 3182 3168 '$lgt_ctx_ctx'(Ctx, _, Obj, Obj, Obj, Prefix, [], _), 3183 3169 '$lgt_tr_body'(Goal, TGoal, DGoal, Ctx), … … 3200 3186 ( call_with_args(Dcl, Pred, _, _, _, _, _, _, _) -> 3201 3187 ( '$lgt_imports_category_'(This, Ctg, _), 3202 '$lgt_current_category_'(Ctg, _, _, Def, _, _ ),3188 '$lgt_current_category_'(Ctg, _, _, Def, _, _, _), 3203 3189 call_with_args(Def, Pred, Sender, This, Self, Call, _) -> 3204 3190 call(Call) …
