<section id="r_aux">
<title/Auxiliary Interface Functions/
<p>

<List proglang=cc>

<Entry class="function"><<OZ_gCollectTerm>>
<Index class=proglang><<OZ_gCollectTerm>></Index>
<Synopsis> <<void OZ_gCollectTerm(OZ_Term &amp;t);>>

<Item> During garbage collection this function updates the reference
<<t>> to a term on the heap. This is typically required when the
member function <<gCollect()>> of a propagator is invoked.

<Entry class="function"><<OZ_gCollectBlock>>
<Index class=proglang><<OZ_gCollectBlock>></Index>
<Synopsis> <<void OZ_gCollectBlock(OZ_Term * frm, OZ_Term * to, const int n);>>

<Item> During garbage collection this function updates the <<n>>
elememts in <<frm>> and stores them in <<to>>.

<Entry class="function"><<OZ_gCollectAllocBlock>>
<Index class=proglang><<OZ_gCollectAllocBlock>></Index>
<Synopsis> <<OZ_Term * OZ_gCollectAllocBlock(int n, OZ_Term * frm);>>

<Item> During garbage collection this function updates the <<n>>
elements in <<frm>> and returns a pointer to the updates. The updates
are stored in freshly allocated heap memory.

<Entry class="function"><<OZ_sCloneTerm>>
<Index class=proglang><<OZ_sCloneTerm>></Index>
<Synopsis> <<void OZ_sCloneTerm(OZ_Term &amp;t);>>

<Item> During cloning this function updates the reference
<<t>> to a term on the heap. This is typically required when the
member function <<sClone()>> of a propagator is invoked.

<Entry class="function"><<OZ_sCloneBlock>>
<Index class=proglang><<OZ_sCloneBlock>></Index>
<Synopsis> <<void OZ_sCloneBlock(OZ_Term * frm, OZ_Term * to, const int n);>>

<Item> During cloning this function updates the <<n>>
elememts in <<frm>> and stores them in <<to>>.

<Entry class="function"><<OZ_sCloneAllocBlock>>
<Index class=proglang><<OZ_sCloneAllocBlock>></Index>
<Synopsis> <<OZ_Term * OZ_sCloneAllocBlock(int n, OZ_Term * frm);>>

<Item> During cloning this function updates the <<n>>
elements in <<frm>> and returns a pointer to the updates. The updates
are stored in freshly allocated heap memory.

<Entry class="function"><<OZ_isPosSmallInt>>
<Index class=proglang><<OZ_isPosSmallInt>></Index>
<Synopsis> <<OZ_Boolean OZ_isPosSmallInt(OZ_Term val);>>

<Item> This function returns <<OZ_TRUE>> if <<val>> denotes an integer
contained in the finite set <math>\{0, \ldots, \mbox{\tt OZ\_getFDSup()}\}</math>.  Otherwise it returns <<OZ_FALSE>>.


<Entry class="function"><<OZ_hallocOzTerms>>
<Index class=proglang><<OZ_hallocOzTerms>></Index>
<Synopsis> <<OZ_Term * OZ_hallocOzTerms(int n);>>

<Item> This function allocates a block of heap memory for <<n>> items
of type <<OZ_Term>> and returns a pointer to the block.


<Entry class="function"><<OZ_hallocChars>>
<Index class=proglang><<OZ_hallocChars>></Index>
<Synopsis> <<char * OZ_hallocChars(int n);>>

<Item>
This function allocates a block of heap memory for <<n>> items of type
<<char>> and returns a pointer to the block.

<Entry class="function"><<OZ_hallocCInts>>
<Index class=proglang><<OZ_hallocCInts>></Index>
<Synopsis> <<int * OZ_hallocCInts(int n);>>

<Item>
This function allocates a block of heap memory for <<n>> items of type
<<int>> and returns a pointer to the block.

<Entry class="function"><<OZ_hfreeOzTerms>>
<Index class=proglang><<OZ_hfreeOzTerms>></Index>
<Synopsis> <<void OZ_hfreeOzTerms(OZ_Term * ts, int n);>>

<Item> The function frees the heap memory allocated by
<<OZ_hallocOzTerms()>>. The first argument <<ts>> points to a memory
block and the value of <<n>> must denote the correct size of the
block.

<Entry class="function"><<OZ_hfreeCInts>>
<Index class=proglang><<OZ_hfreeCInts>></Index>
<Synopsis><<void OZ_hfreeCInts(int * is, int n);>>

<Item> The function frees the heap memory allocated by
<<OZ_hallocCInts>>. The first argument <<is>> points to a memory block
and the value of <<n>> must denote the correct size of the block.


<Entry class="function"><<OZ_hfreeChars>>
<Index class=proglang><<OZ_hfreeChars>></Index>
<Synopsis> <<void OZ_hfreeChars(char * is, int n);>>

<Item> The function frees the heap memory allocated by
<<OZ_hallocChars()>>. The first argument <<is>> points to a memory
block and the value of <<n>> must denote the correct size of the
block.

  
<Entry class="function"><<OZ_copyCInts>>
<Index class=proglang><<OZ_copyCInts>></Index>
<Synopsis> <<int * OZ_copyCInts(int n, int * is);>>

<Item> Copies <<n>> <<int>>s from <<is>> and returns the location of the
copy. If <<n>> is equal to <math/0/ it returns <<(int *) NULL>>.

<Entry class="function"><<OZ_copyChars>>
<Index class=proglang><<OZ_copyChars>></Index>
<Synopsis> <<char * OZ_copyChars(int n, char * cs);>>

<Item> Copies <<n>> <<char>>s from <<cs>> and returns the location of the
copy. If <<n>> is equal to <math/0/ it returns <<(char *) NULL>>.


<Entry class="function"><<OZ_findEqualVars>>
<Index class=proglang><<OZ_findEqualVars>></Index>
<Synopsis> <<int * OZ_findEqualVars(int sz, OZ_Term * ts);>>

<Item> The function expects <<ts>> to be a pointer to an <<OZ_Term>> array
of size <<sz>>. It returns an array of <<int>>s indicating
variables which are equal. Suppose that the <math/i/th field of the
returned array holds one of the following values.
<p>
<table>
<tr> <th/value/ <th/explanation/
<tr> <td/<math/-1// <td/The term stored at that position is not a variable./
<tr> <td/<math/i// <td/This is the first occurrence of a variable
  stored in the array at position <math/i/./
<tr> <td/<math/j \neq i// <td/This is a repeated occurrence of a
  variable stored at position <math/j/ in the array./
<tr> <td/<P.silent>/ <td/The first occurrence can
  be found at position <math/j/. / 
</table>
<p>
The returned <<int>> array is statically allocated, &ie it is
overridden on every invocation. For details see
<Ptr.Extern to="ozdoc:cpitut" key="u_advanced.detect">.


<Entry class="function"><<OZ_isEqualVars>>
<Index class=proglang><<OZ_isEqualVars>></Index>
<Synopsis> <<OZ_Boolean OZ_isEqualVars(OZ_Term v1, OZ_Term v2);>>

<Item> This function returns <<OZ_TRUE>> if <<v1>> and <<v2>> refer to
the same variable. Otherwise it returns <<OZ_FALSE>>.


<Entry class="function"><<OZ_findSingletons>>
<Index class=proglang><<OZ_findSingletons>></Index>
<Synopsis> <<int * OZ_findSingletons(int sz, OZ_Term * ts);>>

<Item> The function expects <<ts>> to be a pointer to an <<OZ_Term>>
array of size <<sz>> which expects its elements to refer to finite
domain variables. It returns an array of <<int>>s indicating variables
which are singletons. Suppose that the <math/i/th field of the
returned array holds one of the following values.
<p>
<table>
<tr> <th/value/ <th/explanation/
<tr> <td/<math/\geq 0// <td/The term stored at that position is a singleton./
<tr> <td/otherwise/  <td/The term stored at that position is still
  a finite domain variable./
</table>
<p>
The returned <<int>> array is statically allocated, &ie it is
overridden on every invocation. 


<Entry class="function"><<OZ_typeErrorCPI>>
<Index class=proglang><<OZ_typeErrorCPI>></Index>
<Synopsis> 
<<<
OZ_Return OZ_typeErrorCPI(char * __typeString,
                          int pos, 
                          char * comment);
>>>

<Item>
The return value of this function indicates the runtime system that an
exception has to be raised. The message printed is composed using the
<<pos>>th substring of <<__typeString>> and <<comment>>.


<Entry class="function"><<OZ_getFDInf>>
<Index class=proglang><<OZ_getFDInf>></Index>
<Synopsis> <<int OZ_getFDInf(void);>>

<Item> This function returns the value of the smallest element a finite
domain which is represented by an instance of the class
<<OZ_FiniteDomain>> can take. The value returned is <math/0/.


<Entry class="function"><<OZ_getFDSup>>
<Index class=proglang><<OZ_getFDSup>></Index>
<Synopsis> <<int OZ_getFDSup(void);>>

<Item> This function returns the value of the largest element a finite
domain which is represented by an instance of the class
<<OZ_FiniteDomain>> can take. The value returned is
<math/134\;217\;726/.


<Entry class="function"><<OZ_getFSetInf>>
<Index class=proglang><<OZ_getFSetInf>></Index>
<Synopsis> <<int OZ_getFSetInf(void);>>

<Item> This function returns the value of the smallest element a finite
set value which is represented by an instance of the class
<<OZ_FSetValue>> can take. The value returned is <math/0/.


<Entry class="function"><<OZ_getFSetSup>>
<Index class=proglang><<OZ_getFSetSup>></Index>
<Synopsis> <<int OZ_getFSetSup(void);>>

<Item> This function returns the value of the largest element a finite
set value which is represented by an instance of the class
<<OZ_FSetValue>> can take. The value returned is <math/134\;217\;726/.


<Entry class="function"><<OZ_fsetValue>>
<Index class=proglang><<OZ_fsetValue>></Index>
<Synopsis> <<OZ_Term OZ_fsetValue(OZ_FSetValue * fsv);>>

<Item> This function converts the finite set value <<fsv>> to the
corresponding <<OZ_Term>>.

<Entry class="function"><<OZ_fsetValueToC>>
<Index class=proglang><<OZ_fsetValueToC>></Index>
<Synopsis> <<OZ_FSetValue * OZ_fsetValueToC(OZ_Term fsv);>>

<Item> This function converts <<fsv>>, referring to a finite set
value, to a pointer to the finite set value.

<Entry class="function"><<OZ_vectorSize>>
<Index class=proglang><<OZ_vectorSize>></Index>
<Synopsis> <<int OZ_vectorSize(OZ_Term t);>>

<Item> This function returns the size of a vector. In case <<t>> is no
vector it returns <math/-1/.
<p>
<table>
<tr> <th/type/ <th/returned value/
<tr> <td/Literal/ <td/The value returned is <math/0/./
<tr> <td/List/ <td/he value returned is the length of the list./
<tr> <td/Tuple/ <td/The value returned is the arity of the tuple./
<tr> <td/Record/ <td/The value returned is the number of features of
  the record./
</table>


<Entry class="function"><<OZ_getOzTermVector>>
<Index class=proglang><<OZ_getOzTermVector>></Index>
<Synopsis> <<OZ_Term * OZ_getOzTermVector(OZ_Term t, OZ_Term * v);>>

<Item> This function expects <<t>> to be a vector and <<v>> to be an
array with minimal <<OZ_vectorSize(t)>> elements. It converts <<t>> to
an <<OZ_Term>> array and returns a pointer to the next free position
in the array <<v>> after converting <<t>>. In case <<t>> is no vector
the function returns <<NULL>>.


<Entry class="function"><<OZ_getCIntVector>>
<Index class=proglang><<OZ_getCIntVector>></Index>
<Synopsis> <<int * OZ_getCIntVector(OZ_Term t, int * v);>>

<Item> This function expects <<t>> to be a vector of small integers
and <<v>> to be an array with minimal <<OZ_vectorSize(t)>>
elements. It converts <<t>> to an <<int>> array and returns a pointer
to the next free position in the array <<v>> after converting
<<t>>. In case <<t>> is no vector the function returns <<NULL>>.

</List>

</section>
