Changeset 4125
- Timestamp:
- 03/04/08 16:19:45 (9 months ago)
- Location:
- trunk
- Files:
-
- 10 modified
-
compiler/logtalk.pl (modified) (6 diffs)
-
manuals/index.html (modified) (1 diff)
-
manuals/refman/directives/dynamic1.html (modified) (2 diffs)
-
manuals/refman/directives/synchronized1.html (modified) (2 diffs)
-
manuals/refman/index.html (modified) (1 diff)
-
manuals/refman/refman.header (modified) (1 diff)
-
manuals/userman/index.html (modified) (1 diff)
-
manuals/userman/threads.html (modified) (2 diffs)
-
manuals/userman/userman.header (modified) (1 diff)
-
RELEASE_NOTES.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/compiler/logtalk.pl
r4122 r4125 5537 5537 '$lgt_valid_pred_ind'(Pred, Functor, Arity), 5538 5538 !, 5539 functor(Head, Functor, Arity), 5540 ( '$lgt_pp_calls_pred_'(Functor, Arity, _, _) -> 5539 ( '$lgt_pp_dynamic_'(Functor, Arity) -> 5541 5540 throw(permission_error(modify, predicate_interpretation, Pred)) 5542 ; assertz('$lgt_pp_synchronized_'(Head, Mutex)), 5541 ; '$lgt_pp_calls_pred_'(Functor, Arity, _, _) -> 5542 throw(permission_error(modify, predicate_interpretation, Pred)) 5543 ; functor(Head, Functor, Arity), 5544 assertz('$lgt_pp_synchronized_'(Head, Mutex)), 5543 5545 '$lgt_tr_synchronized_directive'(Preds, Mutex) 5544 5546 ). … … 5547 5549 '$lgt_valid_gr_ind'(Pred, Functor, Arity, Arity2), 5548 5550 !, 5549 functor(Head, Functor, Arity2), 5550 ( '$lgt_pp_calls_nt_'(Functor, Arity) -> 5551 ( '$lgt_pp_dynamic_'(Functor, Arity2) -> 5552 throw(permission_error(modify, predicate_interpretation, Pred)) 5553 ; '$lgt_pp_calls_nt_'(Functor, Arity) -> 5551 5554 throw(permission_error(modify, non_terminal_interpretation, Pred)) 5552 ; assertz('$lgt_pp_synchronized_'(Head, Mutex)), 5555 ; functor(Head, Functor, Arity2), 5556 assertz('$lgt_pp_synchronized_'(Head, Mutex)), 5553 5557 '$lgt_tr_synchronized_directive'(Preds, Mutex) 5554 5558 ). … … 5667 5671 throw(instantiation_error). 5668 5672 5669 '$lgt_tr_dynamic_directive'([Pred| _]) :-5670 functor(Pred, Functor, Arity),5671 '$lgt_pp_calls_pred_'(Functor, Arity, _, _),5672 throw(permission_error(modify, predicate_interpretation, Pred)).5673 5674 5673 '$lgt_tr_dynamic_directive'([Pred| Preds]) :- 5675 5674 '$lgt_valid_pred_ind'(Pred, Functor, Arity), 5676 5675 !, 5677 assertz('$lgt_pp_dynamic_'(Functor, Arity)), 5678 '$lgt_tr_dynamic_directive'(Preds). 5676 ( functor(Head, Functor, Arity), 5677 '$lgt_pp_synchronized_'(Head, _) -> 5678 throw(permission_error(modify, predicate_interpretation, Pred)) 5679 ; '$lgt_pp_calls_pred_'(Functor, Arity, _, _) -> 5680 throw(permission_error(modify, predicate_interpretation, Pred)) 5681 ; assertz('$lgt_pp_dynamic_'(Functor, Arity)), 5682 '$lgt_tr_dynamic_directive'(Preds) 5683 ). 5679 5684 5680 5685 '$lgt_tr_dynamic_directive'([Pred| Preds]) :- 5681 '$lgt_valid_gr_ind'(Pred, Functor, _, Arity2), 5682 !, 5683 assertz('$lgt_pp_dynamic_'(Functor, Arity2)), 5684 '$lgt_tr_dynamic_directive'(Preds). 5686 '$lgt_valid_gr_ind'(Pred, Functor, Arity, Arity2), 5687 !, 5688 ( functor(Head, Functor, Arity2), 5689 '$lgt_pp_synchronized_'(Head, _) -> 5690 throw(permission_error(modify, predicate_interpretation, Pred)) 5691 ; '$lgt_pp_calls_nt_'(Functor, Arity) -> 5692 throw(permission_error(modify, predicate_interpretation, Pred)) 5693 ; assertz('$lgt_pp_dynamic_'(Functor, Arity2)), 5694 '$lgt_tr_dynamic_directive'(Preds) 5695 ). 5685 5696 5686 5697 '$lgt_tr_dynamic_directive'([Pred| _]) :- … … 12934 12945 12935 12946 12936 % '$lgt_mt_check_threads'(@list, @list) 12937 % 12938 % checks sucesseful creation of working "or" threads 12947 % '$lgt_mt_check_threads'(@list, +message_queue_identifier) 12948 % 12949 % checks sucesseful creation of working threads; failure to create a thread 12950 % usually results from exhaustion of virtual memory address space or exceeding 12951 % the maximum number of threads allowed by the back-end Prolog compiler 12939 12952 12940 12953 '$lgt_mt_check_threads'([], _). … … 12951 12964 % '$lgt_mt_threaded_and_exit'(+callable, +message_queue_identifier, +list) 12952 12965 % 12953 % retrieves the result of proving a conjunction of goals using a threaded/1 predicate call 12966 % retrieves the result of proving a conjunction of goals using a threaded/1 predicate 12967 % call by collecting the individual thread results posted to the call message queue 12954 12968 12955 12969 '$lgt_mt_threaded_and_exit'(TGoals, Queue, Results) :- … … 13046 13060 % '$lgt_mt_threaded_or_exit'(+callable, +message_queue_identifier, +list) 13047 13061 % 13048 % retrieves the result of proving a disjunction of goals using a threaded/1 predicate call 13062 % retrieves the result of proving a disjunction of goals using a threaded/1 predicate 13063 % call by collecting the individual thread results posted to the call message queue 13049 13064 13050 13065 '$lgt_mt_threaded_or_exit'(TGoals, Queue, Results) :- -
trunk/manuals/index.html
r4102 r4125 32 32 <div class="copyright"> 33 33 <span>Copyright © <a href="mailto:pmoura@logtalk.org">Paulo Moura</a> — <a href="http://logtalk.org">Logtalk.org</a></span><br/> 34 <span>Last updated on: February 11, 2008</span>34 <span>Last updated on: March 5, 2008</span> 35 35 </div> 36 36 <div class="navbottom"> -
trunk/manuals/refman/directives/dynamic1.html
r3560 r4125 32 32 dynamic([Functor1//Arity1, Functor2//Arity2, ...])</pre> 33 33 <p> 34 Declares dynamic predicates and dynamic grammar rule non-terminals. Note that an object can be static and have both static and dynamic predicates/non-terminals. 34 Declares dynamic predicates and dynamic grammar rule non-terminals. Note that an object can be static and have both static and dynamic predicates/non-terminals. Dynamic predicates cannot be declared as synchronized. 35 35 </p> 36 36 … … 52 52 <div class="copyright"> 53 53 <span>Copyright © <a href="mailto:pmoura@logtalk.org">Paulo Moura</a> — <a href="http://logtalk.org">Logtalk.org</a></span><br/> 54 <span>Last updated on: October 26, 2006</span>54 <span>Last updated on: March 5, 2008</span> 55 55 </div> 56 56 <div class="navbottom"> -
trunk/manuals/refman/directives/synchronized1.html
r3779 r4125 35 35 </p> 36 36 <p> 37 Synchronized predicates are silently compiled as normal predicates when using back-end Prolog compilers that don't support multi-threading programming. 37 Synchronized predicates are silently compiled as normal predicates when using back-end Prolog compilers that don't support multi-threading programming. Note that synchronized predicates cannot be declared dynamic. 38 38 </p> 39 39 … … 55 55 <div class="copyright"> 56 56 <span>Copyright © <a href="mailto:pmoura@logtalk.org">Paulo Moura</a> — <a href="http://logtalk.org">Logtalk.org</a></span><br/> 57 <span>Last updated on: January 2, 2007</span>57 <span>Last updated on: March 5, 2008</span> 58 58 </div> 59 59 <div class="navbottom"> -
trunk/manuals/refman/index.html
r4038 r4125 319 319 <div class="copyright"> 320 320 <span>Copyright © <a href="mailto:pmoura@logtalk.org">Paulo Moura</a> — <a href="http://logtalk.org">Logtalk.org</a></span><br/> 321 <span>Last updated on: January 21, 2008</span>321 <span>Last updated on: March 5, 2008</span> 322 322 </div> 323 323 <div class="navbottom"> -
trunk/manuals/refman/refman.header
r4102 r4125 36 36 <span>http://logtalk.org/</span> 37 37 </p> 38 <p class="date">Last updated on January 21, 2008</p>38 <p class="date">Last updated on March 5, 2008</p> 39 39 </div> 40 40 -
trunk/manuals/userman/index.html
r4075 r4125 301 301 <div class="copyright"> 302 302 <span>Copyright © <a href="mailto:pmoura@logtalk.org">Paulo Moura</a> — <a href="http://logtalk.org">Logtalk.org</a></span><br/> 303 <span>Last updated on: February 11, 2008</span>303 <span>Last updated on: March 5, 2008</span> 304 304 </div> 305 305 <div class="navbottom"> -
trunk/manuals/userman/threads.html
r3852 r4125 211 211 212 212 <p> 213 The <code>synchronized/1</code> directive must precede any local calls to the synchronized predicate (or synchronized non-terminal) in order to ensure proper compilation. In addition, as each Logtalk entity is independently compiled, this directive must be included in every object or category that contains a definition for the described predicate, even if the predicate declaration is inherited from another entity, in order to ensure proper compilation. 213 The <code>synchronized/1</code> directive must precede any local calls to the synchronized predicate (or synchronized non-terminal) in order to ensure proper compilation. In addition, as each Logtalk entity is independently compiled, this directive must be included in every object or category that contains a definition for the described predicate, even if the predicate declaration is inherited from another entity, in order to ensure proper compilation. Note that a synchronized predicate cannot be declared dynamic. To ensure atomic updates of a dynamic predicate, declare as synchronized the predicate performing the update. 214 214 </p> 215 215 <p> … … 248 248 <div class="copyright"> 249 249 <span>Copyright © <a href="mailto:pmoura@logtalk.org">Paulo Moura</a> — <a href="http://logtalk.org">Logtalk.org</a></span><br/> 250 <span>Last updated on: September 15, 2007</span>250 <span>Last updated on: March 5, 2008</span> 251 251 </div> 252 252 <div class="navbottom"> -
trunk/manuals/userman/userman.header
r4102 r4125 36 36 <span>http://logtalk.org/</span> 37 37 </p> 38 <p class="date">Last updated on February 11, 2008</p>38 <p class="date">Last updated on March 5, 2008</p> 39 39 </div> 40 40 -
trunk/RELEASE_NOTES.txt
r4121 r4125 26 26 Updated the Logtalk runtime to unlock all mutexes hold by a thread when 27 27 upon thread cancellation. 28 29 Corrected a Logtalk compiler bug that allowed a predicate to be declared 30 both dynamic and synchronized. 28 31 29 32 Updated the XSB config file to use the new optimized call/N predicates
