/usr/share/mozart/doc/cpiref/node14.html is in mozart-doc 1.4.0-8ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>2.5 The class OZ_CtVar </TITLE><LINK href="ozdoc.css" rel="stylesheet" type="text/css"></HEAD><BODY><TABLE align="center" border="0" cellpadding="6" cellspacing="6" class="nav"><TR bgcolor="#DDDDDD"><TD><A href="node13.html#ct.reference.constraint"><< Prev</A></TD><TD><A href="ct.html">- Up -</A></TD></TR></TABLE><DIV id="ct.reference.ctvar"><H2><A name="ct.reference.ctvar">2.5 The class <CODE>OZ_CtVar</CODE> </A></H2><P>The constraint system dependent part of a class derived from <CODE>OZ_CtVar</CODE> stores typically </P><UL><LI><P>a constraint <CODE>C</CODE>, i. e., an instance of the class representing a constraint, </P></LI><LI><P>a constraint <CODE>EC</CODE>, i. e., an instance of the class representing a constraint, </P></LI><LI><P>a reference to a constraint <CODE>CR</CODE>, and </P></LI><LI><P>a constraint profile <CODE>CP</CODE>. </P></LI></UL><P> The constraint <CODE>C</CODE> is used to handle constraints of global variables. The constraint <CODE>EC</CODE> is used to handle encapsulate propagation typically occurring in reified constraints. The reference to a constraint <CODE>CR</CODE> is used to access the actual constraint and thus to be able to modify it. It either points to <CODE>C</CODE>, <CODE>EC</CODE>, or directly to the constraint associated with a constrained variable. </P><DIV id="ct.reference.ctvar.protected"><H3><A name="ct.reference.ctvar.protected">2.5.1 Members to be Defined</A></H3><P></P><DL><DT class="protected"><CODE>ctSetValue</CODE> <A name="label283"></A><SPAN class="entrycategory"><SPAN class="entrycategorybracket"> [</SPAN><I>member function pure virtual</I><SPAN class="entrycategorybracket">]</SPAN></SPAN></DT><DD><BLOCKQUOTE class="synopsis"><P><CODE><SPAN class="keyword">virtual</SPAN> <SPAN class="type">void</SPAN> <SPAN class="functionname">ctSetValue</SPAN>(<SPAN class="type">OZ_Term</SPAN> <SPAN class="variablename">t</SPAN>) = 0;</CODE> </P></BLOCKQUOTE></DD><DD><P>Initializes <CODE>C</CODE> to the value denoted by <CODE>t</CODE> and makes <CODE>CR</CODE> pointing to <CODE>C</CODE>. </P></DD><DT class="protected"><CODE>ctRefConstraint</CODE> <A name="label284"></A><SPAN class="entrycategory"><SPAN class="entrycategorybracket"> [</SPAN><I>member function pure virtual</I><SPAN class="entrycategorybracket">]</SPAN></SPAN></DT><DD><BLOCKQUOTE class="synopsis"><P><CODE><SPAN class="keyword">virtual</SPAN> <SPAN class="type">OZ_Ct</SPAN> * <SPAN class="functionname">ctRefConstraint</SPAN>(<SPAN class="type">OZ_Ct</SPAN> * <SPAN class="variablename">c</SPAN>) = 0;</CODE> </P></BLOCKQUOTE></DD><DD><P>Sets <CODE>CR</CODE> to <CODE>c</CODE> and returns <CODE>CR</CODE>. </P></DD><DT class="protected"><CODE>ctSaveConstraint</CODE> <A name="label285"></A><SPAN class="entrycategory"><SPAN class="entrycategorybracket"> [</SPAN><I>member function pure virtual</I><SPAN class="entrycategorybracket">]</SPAN></SPAN></DT><DD><BLOCKQUOTE class="synopsis"><P><CODE><SPAN class="keyword">virtual</SPAN> <SPAN class="type">OZ_Ct</SPAN> * <SPAN class="functionname">ctSaveConstraint</SPAN>(<SPAN class="type">OZ_Ct</SPAN> * <SPAN class="variablename">c</SPAN>) = 0;</CODE> </P></BLOCKQUOTE></DD><DD><P>Stores <CODE>c</CODE> in <CODE>C</CODE> and returns a reference to <CODE>C</CODE>. </P></DD><DT class="protected"><CODE>ctSaveEncapConstraint</CODE> <A name="label286"></A><SPAN class="entrycategory"><SPAN class="entrycategorybracket"> [</SPAN><I>member function pure virtual</I><SPAN class="entrycategorybracket">]</SPAN></SPAN></DT><DD><BLOCKQUOTE class="synopsis"><P><CODE><SPAN class="keyword">virtual</SPAN> <SPAN class="type">OZ_Ct</SPAN> * <SPAN class="functionname">ctSaveEncapConstraint</SPAN>(<SPAN class="type">OZ_Ct</SPAN> * <SPAN class="variablename">c</SPAN>) = 0;</CODE> </P></BLOCKQUOTE></DD><DD><P>Stores <CODE>c</CODE> in <CODE>EC</CODE> and returns a reference to <CODE>EC</CODE>. </P></DD><DT class="protected"><CODE>ctRestoreConstraint</CODE> <A name="label287"></A><SPAN class="entrycategory"><SPAN class="entrycategorybracket"> [</SPAN><I>member function pure virtual</I><SPAN class="entrycategorybracket">]</SPAN></SPAN></DT><DD><BLOCKQUOTE class="synopsis"><P><CODE><SPAN class="keyword">virtual</SPAN> <SPAN class="type">void</SPAN> <SPAN class="functionname">ctRestoreConstraint</SPAN>(<SPAN class="type">void</SPAN>) = 0;</CODE> </P></BLOCKQUOTE></DD><DD><P>Stores <CODE>C</CODE> at <CODE>*CR</CODE>. </P></DD><DT class="protected"><CODE>ctSetConstraintProfile</CODE> <A name="label288"></A><SPAN class="entrycategory"><SPAN class="entrycategorybracket"> [</SPAN><I>member function pure virtual</I><SPAN class="entrycategorybracket">]</SPAN></SPAN></DT><DD><BLOCKQUOTE class="synopsis"><P><CODE><SPAN class="keyword">virtual</SPAN> <SPAN class="type">void</SPAN> <SPAN class="functionname">ctSetConstraintProfile</SPAN>(<SPAN class="type">void</SPAN>) = 0;</CODE> </P></BLOCKQUOTE></DD><DD><P>Initializes <CODE>CP</CODE> with the profile of <CODE>CR</CODE>. </P></DD><DT class="protected"><CODE>ctGetConstraintProfile</CODE> <A name="label289"></A><SPAN class="entrycategory"><SPAN class="entrycategorybracket"> [</SPAN><I>member function pure virtual</I><SPAN class="entrycategorybracket">]</SPAN></SPAN></DT><DD><BLOCKQUOTE class="synopsis"><P><CODE><SPAN class="keyword">virtual</SPAN> <SPAN class="type">OZ_CtProfile</SPAN> * <SPAN class="functionname">ctGetConstraintProfile</SPAN>(<SPAN class="type">void</SPAN>) = 0;</CODE> </P></BLOCKQUOTE></DD><DD><P>Returns <CODE>CP</CODE>. </P></DD><DT class="protected"><CODE>ctGetConstraint</CODE> <A name="label290"></A><SPAN class="entrycategory"><SPAN class="entrycategorybracket"> [</SPAN><I>member function pure virtual</I><SPAN class="entrycategorybracket">]</SPAN></SPAN></DT><DD><BLOCKQUOTE class="synopsis"><P><CODE><SPAN class="keyword">virtual</SPAN> <SPAN class="type">OZ_Ct</SPAN> * <SPAN class="functionname">ctGetConstraint</SPAN>(<SPAN class="type">void</SPAN>) = 0;</CODE></P></BLOCKQUOTE></DD><DD><P>Returns <CODE>CR</CODE>. </P></DD><DT class="public"><CODE>isTouched</CODE> <A name="label291"></A><SPAN class="entrycategory"><SPAN class="entrycategorybracket"> [</SPAN><I>member function pure virtual</I><SPAN class="entrycategorybracket">]</SPAN></SPAN></DT><DD><BLOCKQUOTE class="synopsis"><P><CODE><SPAN class="keyword">virtual</SPAN> <SPAN class="type">OZ_Boolean</SPAN> <SPAN class="functionname">isTouched</SPAN>(<SPAN class="type">void</SPAN>) <SPAN class="keyword">const</SPAN> = 0;</CODE> </P></BLOCKQUOTE></DD><DD><P>Returns <CODE>OZ_True</CODE> if current constraint is not implied anymore by the constraint that was present upon calling <CODE>read()</CODE> or <CODE>readEncap()</CODE>. </P></DD></DL><P> </P></DIV><DIV id="ct.reference.ctvar.public"><H3><A name="ct.reference.ctvar.public">2.5.2 Provided Members</A></H3><P></P><DL><DT class="constructor"><CODE>OZ_CtVar</CODE> <A name="label292"></A><SPAN class="entrycategory"><SPAN class="entrycategorybracket"> [</SPAN><I>constructor</I><SPAN class="entrycategorybracket">]</SPAN></SPAN></DT><DD><BLOCKQUOTE class="synopsis"><P><CODE>OZ_CtVar(<SPAN class="type">void</SPAN>);</CODE> </P></BLOCKQUOTE></DD><DD><P>Initializes an instance of this class. </P></DD><DT class="static"><CODE><SPAN class="keyword">operator</SPAN> <SPAN class="keyword">new</SPAN></CODE> <A name="label293"></A><SPAN class="entrycategory"><SPAN class="entrycategorybracket"> [</SPAN><I>static operator member function</I><SPAN class="entrycategorybracket">]</SPAN></SPAN></DT><DD><BLOCKQUOTE class="synopsis"><P><CODE><SPAN class="keyword">static</SPAN> <SPAN class="type">void</SPAN> * <SPAN class="keyword">operator</SPAN> <SPAN class="keyword">new</SPAN>(<SPAN class="type">size_t</SPAN>);</CODE> </P></BLOCKQUOTE></DD><DD><P>Allocates memory for an instance of a class derived from <CODE>OZ_CtVar</CODE> on the propagator heap of the Oz runtime system. </P></DD><DT class="static"><CODE><SPAN class="keyword">operator</SPAN> <SPAN class="keyword">delete</SPAN></CODE> <A name="label294"></A><SPAN class="entrycategory"><SPAN class="entrycategorybracket"> [</SPAN><I>static operator member function</I><SPAN class="entrycategorybracket">]</SPAN></SPAN></DT><DD><BLOCKQUOTE class="synopsis"><P><CODE><SPAN class="keyword">static</SPAN> <SPAN class="type">void</SPAN> <SPAN class="keyword">operator</SPAN> <SPAN class="keyword">delete</SPAN>(<SPAN class="type">void</SPAN> *, size_t);</CODE> </P></BLOCKQUOTE></DD><DD><P>Deallocates memory of an instance of a class derived from <CODE>OZ_CtVar</CODE> from the propagator heap of the Oz runtime system. </P></DD><DT class="static"><CODE><SPAN class="keyword">operator</SPAN> <SPAN class="keyword">new</SPAN>[]</CODE> <A name="label295"></A><SPAN class="entrycategory"><SPAN class="entrycategorybracket"> [</SPAN><I>static operator member function</I><SPAN class="entrycategorybracket">]</SPAN></SPAN></DT><DD><BLOCKQUOTE class="synopsis"><P><CODE><SPAN class="keyword">static</SPAN> <SPAN class="type">void</SPAN> * <SPAN class="keyword">operator</SPAN> <SPAN class="keyword">new</SPAN>[](size_t);</CODE> </P></BLOCKQUOTE></DD><DD><P>Allocates memory for an array of instances of a class derived from <CODE>OZ_CtVar</CODE> on the propagator heap of the Oz runtime system. </P></DD><DT class="static"><CODE><SPAN class="keyword">operator</SPAN> <SPAN class="keyword">delete</SPAN>[]</CODE> <A name="label296"></A><SPAN class="entrycategory"><SPAN class="entrycategorybracket"> [</SPAN><I>static operator member function</I><SPAN class="entrycategorybracket">]</SPAN></SPAN></DT><DD><BLOCKQUOTE class="synopsis"><P><CODE><SPAN class="keyword">static</SPAN> <SPAN class="type">void</SPAN> <SPAN class="keyword">operator</SPAN> <SPAN class="keyword">delete</SPAN>[](<SPAN class="type">void</SPAN> *, size_t);</CODE> </P></BLOCKQUOTE></DD><DD><P>Deallocates memory of an array of instances of a class derived from <CODE>OZ_CtVar</CODE> from the propagator heap of the Oz runtime system. </P></DD><DT class="member"><CODE>ask</CODE> <A name="label297"></A><SPAN class="entrycategory"><SPAN class="entrycategorybracket"> [</SPAN><I>member function</I><SPAN class="entrycategorybracket">]</SPAN></SPAN></DT><DD><BLOCKQUOTE class="synopsis"><P><CODE><SPAN class="type">void</SPAN> <SPAN class="functionname">ask</SPAN>(OZ_Term);</CODE> </P></BLOCKQUOTE></DD><DD><P>Initializes an instance of a derived class of <CODE>OZ_CtVar</CODE> for reading the constraint of the corresponding variable. The members <CODE>leave()</CODE> and <CODE>fail()</CODE> <EM>must not</EM> be called. </P></DD><DT class="member"><CODE>read</CODE> <A name="label298"></A><SPAN class="entrycategory"><SPAN class="entrycategorybracket"> [</SPAN><I>member function</I><SPAN class="entrycategorybracket">]</SPAN></SPAN></DT><DD><BLOCKQUOTE class="synopsis"><P><CODE><SPAN class="type">void</SPAN> <SPAN class="functionname">read</SPAN>(OZ_Term);</CODE> </P></BLOCKQUOTE></DD><DD><P>Initializes an instance of a derived class of <CODE>OZ_CtVar</CODE> for accessing the corresponding variable in the constraint store for constraint propagation. Modifying the constraint is visible in the store. The members <CODE>leave()</CODE> and <CODE>fail()</CODE> <EM>must be</EM> called. </P></DD><DT class="member"><CODE>readEncap</CODE> <A name="label299"></A><SPAN class="entrycategory"><SPAN class="entrycategorybracket"> [</SPAN><I>member function</I><SPAN class="entrycategorybracket">]</SPAN></SPAN></DT><DD><BLOCKQUOTE class="synopsis"><P><CODE><SPAN class="type">void</SPAN> <SPAN class="functionname">readEncap</SPAN>(OZ_Term);</CODE> </P></BLOCKQUOTE></DD><DD><P>Initializes an instance of a derived class of <CODE>OZ_CtVar</CODE> for accessing the corresponding variable in the constraint store for encapsulated constraint propagation (typically used for reified constraints). Modifying the constraint is <EM>not</EM> visible in the store. The members <CODE>leave()</CODE> and <CODE>fail()</CODE> <EM>must be</EM> called. </P></DD><DT class="member"><CODE>leave</CODE> <A name="label300"></A><SPAN class="entrycategory"><SPAN class="entrycategorybracket"> [</SPAN><I>member function</I><SPAN class="entrycategorybracket">]</SPAN></SPAN></DT><DD><BLOCKQUOTE class="synopsis"><P><CODE><SPAN class="type">OZ_Boolean</SPAN> <SPAN class="functionname">leave</SPAN>(<SPAN class="type">void</SPAN>);</CODE> </P></BLOCKQUOTE></DD><DD><P>This member function has to be called if the instance of a derived class of <CODE>OZ_CtVar</CODE> has been initialized by <CODE>read()</CODE> resp. <CODE>readEncap()</CODE> and the constraint represented by the propagator is <EM>consistent</EM> with the constraint store. It returns <CODE>OZ_False</CODE> if the corresponding variable denotes a value. Otherwise it returns <CODE>OZ_True</CODE>. Further, this member function causes suspending computation to be woken up. </P></DD><DT class="member"><CODE>fail</CODE> <A name="label301"></A><SPAN class="entrycategory"><SPAN class="entrycategorybracket"> [</SPAN><I>member function</I><SPAN class="entrycategorybracket">]</SPAN></SPAN></DT><DD><BLOCKQUOTE class="synopsis"><P><CODE><SPAN class="type">void</SPAN> <SPAN class="functionname">fail</SPAN>(<SPAN class="type">void</SPAN>);</CODE> </P></BLOCKQUOTE></DD><DD><P>This member function has to be called if the instance of a derived class of <CODE>OZ_CtVar</CODE> has been initialized by <CODE>read()</CODE>resp. <CODE>readEncap()</CODE> and the constraint represented by the propagator is <EM>inconsistent</EM> with the constraint store. </P></DD><DT class="member"><CODE>dropParameter</CODE> <A name="label302"></A><SPAN class="entrycategory"><SPAN class="entrycategorybracket"> [</SPAN><I>member function</I><SPAN class="entrycategorybracket">]</SPAN></SPAN></DT><DD><BLOCKQUOTE class="synopsis"><P><CODE><SPAN class="type">void</SPAN> <SPAN class="functionname">dropParameter</SPAN>(<SPAN class="type">void</SPAN>);</CODE> </P></BLOCKQUOTE></DD><DD><P>This member function removes the parameter associated with <CODE>*<SPAN class="keyword">this</SPAN></CODE> from the parameter set of the current propagator. This function takes care of multiple occurrences of a single variable as parameter, i.e., a parameter is removed if there is only one occurrence of the corresponding variable in the set of parameter left. </P></DD></DL><P> </P></DIV></DIV><TABLE align="center" border="0" cellpadding="6" cellspacing="6" class="nav"><TR bgcolor="#DDDDDD"><TD><A href="node13.html#ct.reference.constraint"><< Prev</A></TD><TD><A href="ct.html">- Up -</A></TD></TR></TABLE><HR><ADDRESS><A href="http://www.ps.uni-sb.de/~tmueller/">Tobias Müller</A><BR><SPAN class="version">Version 1.4.0 (20110908185330)</SPAN></ADDRESS></BODY></HTML>
|