Changeset 5054
- Timestamp:
- 06/30/09 15:10:45 (8 months ago)
- Location:
- trunk/manuals
- Files:
-
- 15 modified
-
glossary.html (modified) (2 diffs)
-
index.html (modified) (1 diff)
-
refman/builtins/threaded1.html (modified) (1 diff)
-
refman/directives/uses2.html (modified) (2 diffs)
-
refman/grammar.html (modified) (2 diffs)
-
refman/index.html (modified) (1 diff)
-
refman/methods/clause2.html (modified) (2 diffs)
-
refman/refman.header (modified) (1 diff)
-
userman/categories.html (modified) (3 diffs)
-
userman/index.html (modified) (2 diffs)
-
userman/messages.html (modified) (5 diffs)
-
userman/objects.html (modified) (3 diffs)
-
userman/predicates.html (modified) (6 diffs)
-
userman/protocols.html (modified) (3 diffs)
-
userman/userman.header (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/manuals/glossary.html
r5033 r5054 118 118 <dd>A request for a service, sent to an object. In more logical terms, a message can be seen as a request for proof construction using an object's predicates.</dd> 119 119 120 <dt id="meta interpreter" class="glossary"><strong>metainterpreter</strong></dt>120 <dt id="meta-interpreter" class="glossary"><strong>meta-interpreter</strong></dt> 121 121 <dd>A program capable of running other programs written in the same language.</dd> 122 122 … … 205 205 <div class="copyright"> 206 206 <span>Copyright © <a href="mailto:pmoura@logtalk.org">Paulo Moura</a> — <a href="http://logtalk.org">Logtalk.org</a></span><br/> 207 <span>Last updated on: June 12, 2009</span>207 <span>Last updated on: June 30, 2009</span> 208 208 </div> 209 209 <div class="navbottom"> -
trunk/manuals/index.html
r5038 r5054 31 31 <div class="copyright"> 32 32 <span>Copyright © <a href="mailto:pmoura@logtalk.org">Paulo Moura</a> — <a href="http://logtalk.org">Logtalk.org</a></span><br/> 33 <span>Last updated on: June 21, 2009</span>33 <span>Last updated on: June 30, 2009</span> 34 34 </div> 35 35 <div class="navbottom"> -
trunk/manuals/refman/builtins/threaded1.html
r4931 r5054 70 70 <div class="copyright"> 71 71 <span>Copyright © <a href="mailto:pmoura@logtalk.org">Paulo Moura</a> — <a href="http://logtalk.org">Logtalk.org</a></span><br/> 72 <span>Last updated on: May 8, 2009</span>72 <span>Last updated on: June 30, 2009</span> 73 73 </div> 74 74 <div class="navbottom"> 75 <span><a href="../index.html#builtins">previous</a> | <a href="../../glossary.html">glossary</a> | <a href="threaded_once1 .html">next</a></span><br/>75 <span><a href="../index.html#builtins">previous</a> | <a href="../../glossary.html">glossary</a> | <a href="threaded_once1_2.html">next</a></span><br/> 76 76 <span><a href="http://validator.w3.org/check/referer">XHTML</a> + <a href="http://jigsaw.w3.org/css-validator/check/referer">CSS</a></span> 77 77 </div> -
trunk/manuals/refman/directives/uses2.html
r4621 r5054 30 30 </p> 31 31 <p> 32 It is possible to specify a predicate alias using the notation <code>Functor/Arity::Alias/Arity</code>. Aliases may be used either for avoiding conflicts between predicates specifi ced in several <code>uses/2</code> directives or for giving more meanfingul names considering the using context of the predicates.32 It is possible to specify a predicate alias using the notation <code>Functor/Arity::Alias/Arity</code>. Aliases may be used either for avoiding conflicts between predicates specified in several <code>uses/2</code> directives or for giving more meaningful names considering the using context of the predicates. 33 33 </p> 34 34 … … 63 63 <div class="copyright"> 64 64 <span>Copyright © <a href="mailto:pmoura@logtalk.org">Paulo Moura</a> — <a href="http://logtalk.org">Logtalk.org</a></span><br/> 65 <span>Last updated on: June 4, 2007</span>65 <span>Last updated on: June 30, 2009</span> 66 66 </div> 67 67 <div class="navbottom"> -
trunk/manuals/refman/grammar.html
r5031 r5054 763 763 <dd>"<code>(</code>" message "<code>,</code>" messages "<code>)</code>" |</dd> 764 764 <dd>"<code>(</code>" message "<code>;</code>" messages "<code>)</code>" |</dd> 765 <dd>"<code>(</code>" message "<code>- ></code>" messages "<code>)</code>"</dd>765 <dd>"<code>(</code>" message "<code>-></code>" messages "<code>)</code>"</dd> 766 766 </dl> 767 767 <dl> … … 846 846 <div class="copyright"> 847 847 <span>Copyright © <a href="mailto:pmoura@logtalk.org">Paulo Moura</a> — <a href="http://logtalk.org">Logtalk.org</a></span><br/> 848 <span>Last updated on: June 12, 2009</span>848 <span>Last updated on: June 30, 2009</span> 849 849 </div> 850 850 <div class="navbottom"> -
trunk/manuals/refman/index.html
r5036 r5054 346 346 <div class="copyright"> 347 347 <span>Copyright © <a href="mailto:pmoura@logtalk.org">Paulo Moura</a> — <a href="http://logtalk.org">Logtalk.org</a></span><br/> 348 <span>Last updated on: June 18, 2009</span>348 <span>Last updated on: June 30, 2009</span> 349 349 </div> 350 350 <div class="navbottom"> -
trunk/manuals/refman/methods/clause2.html
r4889 r5054 29 29 </p> 30 30 <p> 31 This method may be used to enum arete clauses for predicates that are not declared dynamic for dynamic objects provided that the predicates are declared in <em>this</em>.31 This method may be used to enumerate clauses for predicates that are not declared dynamic for dynamic objects provided that the predicates are declared in <em>this</em>. 32 32 </p> 33 33 … … 69 69 <div class="copyright"> 70 70 <span>Copyright © <a href="mailto:pmoura@logtalk.org">Paulo Moura</a> — <a href="http://logtalk.org">Logtalk.org</a></span><br/> 71 <span>Last updated on: April 29, 2009</span>71 <span>Last updated on: June 30, 2009</span> 72 72 </div> 73 73 <div class="navbottom"> -
trunk/manuals/refman/refman.header
r5036 r5054 36 36 <span>http://logtalk.org/</span> 37 37 </p> 38 <p class="date">Last updated on June 18, 2009</p>38 <p class="date">Last updated on June 30, 2009</p> 39 39 </div> 40 40 -
trunk/manuals/userman/categories.html
r4908 r5054 109 109 110 110 <p> 111 We can find, by backtracking, all defined categories by using the <a title="Consult reference manual" href="../refman/builtins/current_category1.html"><code>current_category/1</code></a> Logtalk built-in predicate with a n uninstantiated variable:111 We can find, by backtracking, all defined categories by using the <a title="Consult reference manual" href="../refman/builtins/current_category1.html"><code>current_category/1</code></a> Logtalk built-in predicate with a non-instantiated variable: 112 112 </p> 113 113 <pre>| ?- current_category(Category).</pre> … … 230 230 <pre>| ?- implements_protocol(Category, Protocol, Scope).</pre> 231 231 <p> 232 Note that, if we use a n uninstantiated variable for the first argument, we will need to use the <a title="Consult reference manual" href="../refman/builtins/current_category1.html"><code>current_category/1</code></a> built-in predicate to ensure that the returned entity is a category and not an object.232 Note that, if we use a non-instantiated variable for the first argument, we will need to use the <a title="Consult reference manual" href="../refman/builtins/current_category1.html"><code>current_category/1</code></a> built-in predicate to ensure that the returned entity is a category and not an object. 233 233 </p> 234 234 <p> … … 355 355 <div class="copyright"> 356 356 <span>Copyright © <a href="mailto:pmoura@logtalk.org">Paulo Moura</a> — <a href="http://logtalk.org">Logtalk.org</a></span><br/> 357 <span>Last updated on: May 3, 2009</span>357 <span>Last updated on: June 30, 2009</span> 358 358 </div> 359 359 <div class="navbottom"> -
trunk/manuals/userman/index.html
r5038 r5054 282 282 <dd><a href="programming.html#programming_cc">Conditional compilation</a><span class="leader"></span><span class="page-ref"><span class="programming_cc"></span></span></dd> 283 283 <dd><a href="programming.html#programming_errors">Avoiding common errors</a><span class="leader"></span><span class="page-ref"><span class="programming_errors"></span></span></dd> 284 <dd><a href="programming.html#programming_style">Coding style guid lines</a><span class="leader"></span><span class="page-ref"><span class="programming_style"></span></span></dd>284 <dd><a href="programming.html#programming_style">Coding style guidelines</a><span class="leader"></span><span class="page-ref"><span class="programming_style"></span></span></dd> 285 285 <dt><a href="programming.html#programming_session">Running a Logtalk session</a><span class="leader"></span><span class="page-ref"><span class="programming_session"></span></span></dt> 286 286 <dd><a href="programming.html#programming_starting">Starting Logtalk</a><span class="leader"></span><span class="page-ref"><span class="programming_starting"></span></span></dd> 287 287 <dd><a href="programming.html#programming_compiling">Compiling and loading your programs</a><span class="leader"></span><span class="page-ref"><span class="programming_compiling"></span></span></dd> 288 288 <dd><a href="programming.html#programming_flags">Compiler flags</a><span class="leader"></span><span class="page-ref"><span class="programming_flags"></span></span></dd> 289 <dd><a href="programming.html#programming_smart">Re aloding and smart compilation of source files</a><span class="leader"></span><span class="page-ref"><span class="programming_smart"></span></span></dd>289 <dd><a href="programming.html#programming_smart">Reloading and smart compilation of source files</a><span class="leader"></span><span class="page-ref"><span class="programming_smart"></span></span></dd> 290 290 <dd><a href="programming.html#programming_batch">Using Logtalk for batch processing</a><span class="leader"></span><span class="page-ref"><span class="programming_batch"></span></span></dd> 291 291 <dt><a href="programming.html#programming_debugging">Debugging Logtalk programs</a><span class="leader"></span><span class="page-ref"><span class="programming_debugging"></span></span></dt> … … 318 318 <div class="copyright"> 319 319 <span>Copyright © <a href="mailto:pmoura@logtalk.org">Paulo Moura</a> — <a href="http://logtalk.org">Logtalk.org</a></span><br/> 320 <span>Last updated on: June 21, 2009</span>320 <span>Last updated on: June 30, 2009</span> 321 321 </div> 322 322 <div class="navbottom"> -
trunk/manuals/userman/messages.html
r4896 r5054 23 23 24 24 <p> 25 Messages allows us to call object predicates. Logtalk uses the same nomenclature found in other object-oriented programming languages such as Smalltalk. Therefore, the terms <em>predicate</em> and <em>method</em> are often used interchangeably when refer ing to predicates defined inside objects and categories. A message must always match a predicate within the scope of the sender object.25 Messages allows us to call object predicates. Logtalk uses the same nomenclature found in other object-oriented programming languages such as Smalltalk. Therefore, the terms <em>predicate</em> and <em>method</em> are often used interchangeably when referring to predicates defined inside objects and categories. A message must always match a predicate within the scope of the sender object. 26 26 </p> 27 27 <p> … … 65 65 66 66 <p> 67 In the Logtalk context, broadcasting is interpreted as the sending of several messages to the same object. This can be achieved by using the message sending method described above. However, for convenience, Logtalk implements an extended syntax for message sending that may improve program read ibility in some cases. This extended syntax uses the <code>(,)/2</code>, <code>(;)/2</code>, and <code>(->)/2</code> control constructs. For example, if we wish to send several messages to the same object, we can write:67 In the Logtalk context, broadcasting is interpreted as the sending of several messages to the same object. This can be achieved by using the message sending method described above. However, for convenience, Logtalk implements an extended syntax for message sending that may improve program readability in some cases. This extended syntax uses the <code>(,)/2</code>, <code>(;)/2</code>, and <code>(->)/2</code> control constructs. For example, if we wish to send several messages to the same object, we can write: 68 68 </p> 69 69 <pre>| ?- Object::(Message1, Message2, ...).</pre> … … 102 102 103 103 <p> 104 Every message sent using <a title="Consult reference manual" href="../refman/control/to_object2.html"><code>::/2</code></a> operator generates two events, allowe before and one after the message execution. Messages that are sent using the <a title="Consult reference manual" href="../refman/control/to_self1.html"><code>::/1</code></a> (message to <em>self</em>) operator or the <a title="Consult reference manual" href="../refman/control/super1.html"><code>^^/1</code></a> super mechanism described above do not generate any events. The rational behind this distinction is that messages to <em>self</em> and <em>super</em> calls are only used internally in the definition of methods or to execute additional messages with the same target object (represented by <em>self</em>). In other words, events are only generated when using an object's public interface; they cannot be used to break object encapsulation.104 Every message sent using the <a title="Consult reference manual" href="../refman/control/to_object2.html"><code>::/2</code></a> operator generates two events, one before and one after the message execution. Messages that are sent using the <a title="Consult reference manual" href="../refman/control/to_self1.html"><code>::/1</code></a> (message to <em>self</em>) operator or the <a title="Consult reference manual" href="../refman/control/super1.html"><code>^^/1</code></a> super mechanism described above do not generate any events. The rational behind this distinction is that messages to <em>self</em> and <em>super</em> calls are only used internally in the definition of methods or to execute additional messages with the same target object (represented by <em>self</em>). In other words, events are only generated when using an object's public interface; they cannot be used to break object encapsulation. 105 105 </p> 106 106 <p> … … 139 139 </p> 140 140 <p> 141 With event-sup ort turned on, a message sent from a compiled object to another object translates to three predicate calls:141 With event-support turned on, a message sent from a compiled object to another object translates to three predicate calls: 142 142 </p> 143 143 <dl> … … 210 210 <div class="copyright"> 211 211 <span>Copyright © <a href="mailto:pmoura@logtalk.org">Paulo Moura</a> — <a href="http://logtalk.org">Logtalk.org</a></span><br/> 212 <span>Last updated on: May 1, 2009</span>212 <span>Last updated on: June 30, 2009</span> 213 213 </div> 214 214 <div class="navbottom"> -
trunk/manuals/userman/objects.html
r4711 r5054 204 204 205 205 <p> 206 We can find, by backtracking, all defined objects by calling the <a title="Consult reference manual" href="../refman/builtins/current_object1.html"><code>current_object/1</code></a> built-in predicate with a n uninstantiated variable:206 We can find, by backtracking, all defined objects by calling the <a title="Consult reference manual" href="../refman/builtins/current_object1.html"><code>current_object/1</code></a> built-in predicate with a non-instantiated variable: 207 207 </p> 208 208 <pre>| ?- current_object(Object).</pre> … … 394 394 <pre>| ?- implements_protocol(Object, Protocol, Scope).</pre> 395 395 <p> 396 Note that, if we use a n uninstantiated variable for the first argument, we will need to use the <a title="Consult reference manual" href="../refman/builtins/current_object1.html"><code>current_object/1</code></a> built-in predicate to ensure that the entity returned is an object and not a category.396 Note that, if we use a non-instantiated variable for the first argument, we will need to use the <a title="Consult reference manual" href="../refman/builtins/current_object1.html"><code>current_object/1</code></a> built-in predicate to ensure that the entity returned is an object and not a category. 397 397 </p> 398 398 <p> … … 443 443 <div class="copyright"> 444 444 <span>Copyright © <a href="mailto:pmoura@logtalk.org">Paulo Moura</a> — <a href="http://logtalk.org">Logtalk.org</a></span><br/> 445 <span>Last updated on: February 24, 2009</span>445 <span>Last updated on: June 30, 2009</span> 446 446 </div> 447 447 <div class="navbottom"> -
trunk/manuals/userman/predicates.html
r5033 r5054 300 300 <p> 301 301 This allows clauses for a predicate to be defined in several objects or categories. This is a directive that should be used with great care. Support for this directive have been added to Logtalk primarily to support migration of Prolog module code. Spreading clauses for a predicate among several Logtalk entities can be handy in special cases but can also make your code difficult to understand and may pose a safety risk (e.g. by allowing an entity to peek inside other entity, breaking scope rules). Moreover, multifile predicates are only fully supported by some back-end Prolog compilers, raising portability concerns. 302 </p> 302 303 <p> 303 304 Consider the following simple example: … … 335 336 The Logtalk compiler will print a warning if the <code>multifile/1</code> directive is missing. Multifile predicates may also be declared dynamic using the same <code>Entity::Functor/Arity</code> notation (multifile predicates are static by default). 336 337 </p> 338 <p> 337 339 When a clause of a multifile predicate is a rule, its body is compiled within the context of the object or category containing the clause. This allows clauses for multifile predicates to call local object or category predicates. 338 340 </p> … … 397 399 </p> 398 400 <p> 399 Some meta-predicates have meta-arguments which are not goals but closures. Logtalk supports the definition of meta-predicates that are called with closures instead of goals as long as the definition uses the Logtalk built-in predicate <a title="Consult reference manual" href="../refman/methods/call1.html"><code>call/N</code></a> to call the closure with the add tional arguments. For example:401 Some meta-predicates have meta-arguments which are not goals but closures. Logtalk supports the definition of meta-predicates that are called with closures instead of goals as long as the definition uses the Logtalk built-in predicate <a title="Consult reference manual" href="../refman/methods/call1.html"><code>call/N</code></a> to call the closure with the additional arguments. For example: 400 402 </p> 401 403 <pre>:- public(all_true/2). … … 639 641 </p> 640 642 <p> 641 Term and goal expansion may be used either by calling the <code>expand_term/2</code> and <code>expand_goal/2</code> methods explicitly or by using <em><a class="glossary" title="Go to glossary definition" href="../ ../glossary.html#hook">hook objects</a></em>. Clauses for the <code>term_expansion/2</code> and <code>goal_expansion/2</code> predicates defined within an object or a category are never in the compilation of the object or the category itself.643 Term and goal expansion may be used either by calling the <code>expand_term/2</code> and <code>expand_goal/2</code> methods explicitly or by using <em><a class="glossary" title="Go to glossary definition" href="../glossary.html#hook">hook objects</a></em>. Clauses for the <code>term_expansion/2</code> and <code>goal_expansion/2</code> predicates defined within an object or a category are never in the compilation of the object or the category itself. 642 644 </p> 643 645 … … 723 725 Prolog built-in meta-predicates may only be called locally within objects or categories, i.e. they cannot be used as messages. Compiling calls to non-standard, Prolog built-in meta-predicates can be tricky for two reasons: first, there is no standard way of checking if a built-in predicate is also a meta-predicate and finding out which are its meta-arguments; second, in some cases, the meta-arguments of a meta-predicate are not goals but closures, used for constructing goals. The way the goals are constructed is specific to the meta-predicate and cannot be reliable inferred by the Logtalk compiler. For meta-predicates whose meta-arguments are directly called as goals, the solution is to explicitly declare them in the corresponding Prolog configuration file using the predicate <code>'$lgt_pl_meta-predicate'/2</code>. For example: 724 726 </p> 725 <pre>'$lgt_pl_meta_predicate'(*- >(::, ::), control_construct).727 <pre>'$lgt_pl_meta_predicate'(*->(::, ::), control_construct). 726 728 '$lgt_pl_meta_predicate'(call_with_depth_limit(::, *, *), predicate).</pre> 727 729 <p> … … 732 734 <div class="copyright"> 733 735 <span>Copyright © <a href="mailto:pmoura@logtalk.org">Paulo Moura</a> — <a href="http://logtalk.org">Logtalk.org</a></span><br/> 734 <span>Last updated on: June 12, 2009</span>736 <span>Last updated on: June 30, 2009</span> 735 737 </div> 736 738 <div class="navbottom"> -
trunk/manuals/userman/protocols.html
r4625 r5054 57 57 58 58 <p> 59 We can find, by backtracking, all defined protocols by using the <a title="Consult reference manual" href="../refman/builtins/current_protocol1.html"><code>current_protocol/1</code></a> built-in predicate with a n uninstantiated variable:59 We can find, by backtracking, all defined protocols by using the <a title="Consult reference manual" href="../refman/builtins/current_protocol1.html"><code>current_protocol/1</code></a> built-in predicate with a non-instantiated variable: 60 60 </p> 61 61 <pre>| ?- current_protocol(Protocol).</pre> … … 160 160 <pre>| ?- implements_protocol(ObjectOrCategory, Protocol, Scope).</pre> 161 161 <p> 162 Note that, if we use a n uninstantiated variable for the first argument, we will need to use the <a title="Consult reference manual" href="../refman/builtins/current_object1.html"><code>current_object/1</code></a> or <a title="Consult reference manual" href="../refman/builtins/current_category1.html"><code>current_category/1</code></a> built-in predicates to identify the kind of entity returned.162 Note that, if we use a non-instantiated variable for the first argument, we will need to use the <a title="Consult reference manual" href="../refman/builtins/current_object1.html"><code>current_object/1</code></a> or <a title="Consult reference manual" href="../refman/builtins/current_category1.html"><code>current_category/1</code></a> built-in predicates to identify the kind of entity returned. 163 163 </p> 164 164 … … 235 235 <div class="copyright"> 236 236 <span>Copyright © <a href="mailto:pmoura@logtalk.org">Paulo Moura</a> — <a href="http://logtalk.org">Logtalk.org</a></span><br/> 237 <span>Last updated on: December 1, 2008</span>237 <span>Last updated on: June 30, 2009</span> 238 238 </div> 239 239 <div class="navbottom"> -
trunk/manuals/userman/userman.header
r5038 r5054 36 36 <span>http://logtalk.org/</span> 37 37 </p> 38 <p class="date">Last updated on June 21, 2009</p>38 <p class="date">Last updated on June 30, 2009</p> 39 39 </div> 40 40
