Changeset 4272 for trunk

Show
Ignore:
Timestamp:
05/24/08 03:24:58 (4 months ago)
Author:
pmoura
Message:

Minor documentation improvements.

Location:
trunk/manuals
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/manuals/refman/control/direct1.html

    r4271 r4272  
    2424<h4>Description</h4> 
    2525 
    26 <pre>:Goal</pre> 
     26<pre>:Predicate</pre> 
    2727<p> 
    2828Calls an <strong>imported</strong> predicate with the lookup for the predicate declaration beginning in <em>this</em> instead of <em>self</em> and with the lookup for the predicate definition restricted to the imported categories. As a consequence, any redeclaration or redefinition of the predicate in a descendant of the object containing the call will be ignored. The predicate is called with the same execution context (<em>sender</em>, <em>this</em>, and <em>self</em>) as the predicate whose body contains the call. When the predicate is defined in an imported category compiled using static binding, this control construct allows the predicate to be called with the same performance as a local object predicate. 
     
    3636 
    3737<dl> 
    38     <dt>Goal is a variable:</dt> 
     38    <dt>Predicate is a variable:</dt> 
    3939        <dd><code>instantiation_error</code></dd> 
    40     <dt>Goal is neither a variable nor a callable term:</dt> 
    41         <dd><code>type_error(callable, Goal)</code></dd> 
    42     <dt>The object containing the call does not import any category:</dt> 
    43         <dd><code>existence_error(procedure, Goal)</code></dd> 
     40    <dt>Predicate is neither a variable nor a callable term:</dt> 
     41        <dd><code>type_error(callable, Predicate)</code></dd> 
     42    <dt>Predicate is not declared:</dt> 
     43        <dd><code>existence_error(predicate_declaration, Predicate)</code></dd> 
    4444</dl> 
    4545 
  • trunk/manuals/userman/categories.html

    r4212 r4272  
    5858:- end_category.</pre> 
    5959<p> 
    60 This feature should only be used when extending a category without breaking its functional cohesion (for example, when a modified version of a category is needed for importing on several unrelated objects). The prefered way of composing several categories is by importing them into an object. 
     60This feature should only be used when extending a category without breaking its functional cohesion (for example, when a modified version of a category is needed for importing on several unrelated objects). The preferred way of composing several categories is by importing them into an object. When a category overrides a predicate defined in an extended category, the overridden definition can still be used by using the <a title="Consult reference manual" href="../refman/directives/alias3.html"><code>alias/3</code></a> predicate directive. 
    6161</p> 
    6262<p> 
     
    330330</p> 
    331331<p> 
    332 It is also possible to call category predicates such that the predicate declaration and definition lookups will start from <em>this</em> instead of <em>self</em> by using the <a title="Consult reference manual" href="../refman/control/direct1.html"><code>:/1</code></a> control construct. For example: 
     332It is also possible to perform direct calls to predicates from imported categories without using the message sending mechanisms with the <a title="Consult reference manual" href="../refman/control/direct1.html"><code>:/1</code></a> control construct. For example: 
    333333</p> 
    334334<pre>:- object(worker, 
  • trunk/manuals/userman/running.html

    r4213 r4272  
    182182    <dl> 
    183183        <dt><code>hook(Object)</code></dt> 
    184             <dd>Allows the definition of a compiler hooks that are called for each term read form a source file and for each compiled goal. This option specifies an object (which can be the pseudo-object <code>user</code>) implementing the <code>expanding</code> built-in protocol. The object is expected to define clauses for the <a title="Consult reference manual" href="../refman/methods/term_expansion2.html"><code>term_expansion/2</code></a> and <a title="Consult reference manual" href="../refman/methods/goal_expansion2.html"><code>goal_expansion/2</code></a> predicates. In the case of the <code>term_expansion/2</code> predicate, the first argument is the term read form the source file while the second argument returns a list of terms corresponding to the expansion of the first argument. In the case of the <code>goal_expansion/2</code> predicate, the second argument should be a goal resulting from the expansion of the goal in the first argument. The predicate <code>goal_expansion/2</code> is called on the expanded goals so care must be taken to avoid compilation loops.</dd> 
     184            <dd>Allows the definition of compiler hooks that are called for each term read form a source file and for each compiled goal. This option specifies an object (which can be the pseudo-object <code>user</code>) implementing the <code>expanding</code> built-in protocol. The object is expected to define clauses for the <a title="Consult reference manual" href="../refman/methods/term_expansion2.html"><code>term_expansion/2</code></a> and <a title="Consult reference manual" href="../refman/methods/goal_expansion2.html"><code>goal_expansion/2</code></a> predicates. In the case of the <code>term_expansion/2</code> predicate, the first argument is the term read form the source file while the second argument returns a list of terms corresponding to the expansion of the first argument. In the case of the <code>goal_expansion/2</code> predicate, the second argument should be a goal resulting from the expansion of the goal in the first argument. The predicate <code>goal_expansion/2</code> is called on the expanded goals so care must be taken to avoid compilation loops.</dd> 
    185185    </dl> 
    186186    <dl>