Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > by-pkgid > 2fc07611b08d4a735fd34d5eb60d8e16 > files > 2175

ciao-1.10p8-3mdv2010.0.i586.rpm

<HTML>
<HEAD>
<!-- Created by texi2html 1.56k + clip patches and <A href="http://www.clip.dia.fi.upm.es/Software">lpdoc</A> from ciao.texi on 28 January 2007 -->

<LINK rel="stylesheet" href="ciao.css" type="text/css">
<TITLE>The Ciao Prolog System               - lookup (library)</TITLE>
</HEAD>
<BODY> 
Go to the <A HREF="ciao_1.html">first</A>, <A HREF="ciao_219.html">previous</A>, <A HREF="ciao_221.html">next</A>, <A HREF="ciao_241.html">last</A> section, <A HREF="ciao_toc.html">table of contents</A>.
<P><HR><P>


<H1><A NAME="SEC859" HREF="ciao_toc.html#TOC859">lookup (library)</A></H1>
<P>
<A NAME="IDX9326"></A>


<P>
<STRONG>Author(s):</STRONG> G&ouml;ran Smedb&auml;ck.


<P>
<STRONG>Version:</STRONG> 0.1 (1999/1/14, 13:30:46 MET)



<UL>
<LI><A HREF="ciao_220.html#SEC860">Usage and interface (lookup)</A>
<LI><A HREF="ciao_220.html#SEC861">Documentation on exports (lookup)</A>
</UL>



<H2><A NAME="SEC860" HREF="ciao_toc.html#TOC860">Usage and interface (<CODE>lookup</CODE>)</A></H2>

<div class="cartouche">

<UL>

<LI><STRONG>Library usage:</STRONG>

<CODE>:- use_module(library(lookup)).</CODE>

<LI><STRONG>Exports:</STRONG>


<UL>

<LI><EM>Predicates:</EM>

<A NAME="IDX9327"></A>
<CODE>create_proto_element/3</CODE>, 
<A NAME="IDX9328"></A>
<CODE>get_prototype_interface/2</CODE>, 
<A NAME="IDX9329"></A>
<CODE>get_prototype_definition/2</CODE>, 
<A NAME="IDX9330"></A>
<CODE>lookup_check_node/4</CODE>, 
<A NAME="IDX9331"></A>
<CODE>lookup_check_field/6</CODE>, 
<A NAME="IDX9332"></A>
<CODE>lookup_check_interface_fieldValue/8</CODE>, 
<A NAME="IDX9333"></A>
<CODE>lookup_field/4</CODE>, 
<A NAME="IDX9334"></A>
<CODE>lookup_route/5</CODE>, 
<A NAME="IDX9335"></A>
<CODE>lookup_fieldTypeId/1</CODE>, 
<A NAME="IDX9336"></A>
<CODE>lookup_get_fieldType/4</CODE>, 
<A NAME="IDX9337"></A>
<CODE>lookup_field_access/4</CODE>, 
<A NAME="IDX9338"></A>
<CODE>lookup_set_def/3</CODE>, 
<A NAME="IDX9339"></A>
<CODE>lookup_set_prototype/4</CODE>, 
<A NAME="IDX9340"></A>
<CODE>lookup_set_extern_prototype/4</CODE>.

</UL>

<LI><STRONG>Other modules used:</STRONG>


<UL>

<LI><EM>System library modules:</EM>

<A NAME="IDX9341"></A>
<CODE>aggregates</CODE>, 
<A NAME="IDX9342"></A>
<CODE>dynamic</CODE>, 
<A NAME="IDX9343"></A>
<CODE>iso_misc</CODE>, 
<A NAME="IDX9344"></A>
<CODE>iso_byte_char</CODE>, 
<A NAME="IDX9345"></A>
<CODE>iso_incomplete</CODE>, 
<A NAME="IDX9346"></A>
<CODE>operators</CODE>, 
<A NAME="IDX9347"></A>
<CODE>read</CODE>, 
<A NAME="IDX9348"></A>
<CODE>write</CODE>, 
<A NAME="IDX9349"></A>
<CODE>lists</CODE>, 
<A NAME="IDX9350"></A>
<CODE>provrml/error</CODE>, 
<A NAME="IDX9351"></A>
<CODE>provrml/internal_types</CODE>, 
<A NAME="IDX9352"></A>
<CODE>provrml/io</CODE>, 
<A NAME="IDX9353"></A>
<CODE>provrml/parser_util</CODE>, 
<A NAME="IDX9354"></A>
<CODE>provrml/parser</CODE>, 
<A NAME="IDX9355"></A>
<CODE>provrml/dictionary</CODE>, 
<A NAME="IDX9356"></A>
<CODE>provrml/dictionary_tree</CODE>, 
<A NAME="IDX9357"></A>
<CODE>provrml/field_value_check</CODE>, 
<A NAME="IDX9358"></A>
<CODE>provrml/boundary</CODE>, 
<A NAME="IDX9359"></A>
<CODE>provrml/generator_util</CODE>, 
<A NAME="IDX9360"></A>
<CODE>provrml/field_type</CODE>, 
<A NAME="IDX9361"></A>
<CODE>provrml/field_value</CODE>.

</UL>

</UL>

</div class="cartouche">



<H2><A NAME="SEC861" HREF="ciao_toc.html#TOC861">Documentation on exports (<CODE>lookup</CODE>)</A></H2>
<P>
<A NAME="IDX9362"></A>
<A NAME="IDX9363"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>create_proto_element/3:</B>
<DD><A NAME="IDX9364"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>create_proto_element(+Interface, +Definition, -Proto)</CODE>

<UL>
<LI><EM>Description:</EM> The predicate will construct a proto structure containing the interface and the definition.

<LI><EM>Call and exit should be <EM>compatible</EM> with:</EM>

<CODE>+Interface</CODE> is any term.
 (<CODE>basic_props:term/1</CODE>)

<CODE>+Definition</CODE> is any term.
 (<CODE>basic_props:term/1</CODE>)

<CODE>-Proto</CODE> is any term.
 (<CODE>basic_props:term/1</CODE>)
</UL>

</DL>

<P>
<A NAME="IDX9365"></A>
<A NAME="IDX9366"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>get_prototype_interface/2:</B>
<DD><A NAME="IDX9367"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>get_prototype_interface(+Proto, -Interface)</CODE>

<UL>
<LI><EM>Description:</EM> The predicate will return the interface from a proto structure.

<LI><EM>Call and exit should be <EM>compatible</EM> with:</EM>

<CODE>+Proto</CODE> is any term.
 (<CODE>basic_props:term/1</CODE>)

<CODE>-Interface</CODE> is any term.
 (<CODE>basic_props:term/1</CODE>)
</UL>

</DL>

<P>
<A NAME="IDX9368"></A>
<A NAME="IDX9369"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>get_prototype_definition/2:</B>
<DD><A NAME="IDX9370"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>get_prototype_definition(+Proto, -Definition)</CODE>

<UL>
<LI><EM>Description:</EM> The predicate will return the definition from a proto structure.

<LI><EM>Call and exit should be <EM>compatible</EM> with:</EM>

<CODE>+Proto</CODE> is any term.
 (<CODE>basic_props:term/1</CODE>)

<CODE>-Definition</CODE> is any term.
 (<CODE>basic_props:term/1</CODE>)
</UL>

</DL>

<P>
<A NAME="IDX9371"></A>
<A NAME="IDX9372"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>lookup_check_node/4:</B>
<DD><A NAME="IDX9373"></A>


<P>
No further documentation available for this predicate.


</DL>

<P>
<A NAME="IDX9374"></A>
<A NAME="IDX9375"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>lookup_check_field/6:</B>
<DD><A NAME="IDX9376"></A>


<P>
No further documentation available for this predicate.


</DL>

<P>
<A NAME="IDX9377"></A>
<A NAME="IDX9378"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>lookup_check_interface_fieldValue/8:</B>
<DD><A NAME="IDX9379"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>lookup_check_interface_fieldValue(+ParseIn, -ParseOut, +AccessType, +FieldType, +Id, +FieldValue, DCGIn, DCGOut)</CODE>

<UL>
<LI><EM>Description:</EM> The predicate formats the output for the interface part of the prototype. It also checks the values for the fields.

<LI><EM>Call and exit should be <EM>compatible</EM> with:</EM>

<CODE>field_value:parse(+ParseIn)</CODE>
 (<CODE>field_value:parse/1</CODE>)

<CODE>field_value:parse(-ParseOut)</CODE>
 (<CODE>field_value:parse/1</CODE>)

<CODE>+AccessType</CODE> is an atom.
 (<CODE>basic_props:atm/1</CODE>)

<CODE>+FieldType</CODE> is any term.
 (<CODE>basic_props:term/1</CODE>)

<CODE>+Id</CODE> is an atom.
 (<CODE>basic_props:atm/1</CODE>)

<CODE>+FieldValue</CODE> is any term.
 (<CODE>basic_props:term/1</CODE>)

<CODE>DCGIn</CODE> is a string (a list of character codes).
 (<CODE>basic_props:string/1</CODE>)

<CODE>DCGOut</CODE> is a string (a list of character codes).
 (<CODE>basic_props:string/1</CODE>)
</UL>

</DL>

<P>
<A NAME="IDX9380"></A>
<A NAME="IDX9381"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>lookup_field/4:</B>
<DD><A NAME="IDX9382"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>lookup_field(+Parse, +FieldTypeId, +FieldId0, +FieldId1)</CODE>

<UL>
<LI><EM>Description:</EM> The predicate will control that the two connected Fields are of the same type, e.g., SFColor - SFColor, MFVec3f - MFVec3f.

<LI><EM>Call and exit should be <EM>compatible</EM> with:</EM>

<CODE>field_value:parse(+Parse)</CODE>
 (<CODE>field_value:parse/1</CODE>)

<CODE>+FieldTypeId</CODE> is an atom.
 (<CODE>basic_props:atm/1</CODE>)

<CODE>+FieldId0</CODE> is an atom.
 (<CODE>basic_props:atm/1</CODE>)

<CODE>+FieldId1</CODE> is an atom.
 (<CODE>basic_props:atm/1</CODE>)
</UL>

</DL>

<P>
<A NAME="IDX9383"></A>
<A NAME="IDX9384"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>lookup_route/5:</B>
<DD><A NAME="IDX9385"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>lookup_route(+Parse, +NodeTypeId0, +FieldId0, +NodeTypeId1, +FieldId1)</CODE>

<UL>
<LI><EM>Description:</EM> The predicate will check the routing behaviour for two given fields. They will be checked according to the binding rules, like name changes access proporties. The node types for the field must of course be given for the identification.

<LI><EM>Call and exit should be <EM>compatible</EM> with:</EM>

<CODE>field_value:parse(+Parse)</CODE>
 (<CODE>field_value:parse/1</CODE>)

<CODE>+NodeTypeId0</CODE> is an atom.
 (<CODE>basic_props:atm/1</CODE>)

<CODE>+FieldId0</CODE> is an atom.
 (<CODE>basic_props:atm/1</CODE>)

<CODE>+NodeTypeId1</CODE> is an atom.
 (<CODE>basic_props:atm/1</CODE>)

<CODE>+FieldId1</CODE> is an atom.
 (<CODE>basic_props:atm/1</CODE>)
</UL>

</DL>

<P>
<A NAME="IDX9386"></A>
<A NAME="IDX9387"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>lookup_fieldTypeId/1:</B>
<DD><A NAME="IDX9388"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>lookup_fieldTypeId(+FieldTypeId)</CODE>

<UL>
<LI><EM>Description:</EM> The predicate just make a check to see if the given FieldType id is among the allowed. You can not construct own ones and the check is mearly a spellcheck.

<LI><EM>Call and exit should be <EM>compatible</EM> with:</EM>

<CODE>+FieldTypeId</CODE> is an atom.
 (<CODE>basic_props:atm/1</CODE>)
</UL>

</DL>

<P>
<A NAME="IDX9389"></A>
<A NAME="IDX9390"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>lookup_get_fieldType/4:</B>
<DD><A NAME="IDX9391"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>lookup_get_fieldType(+Parse, +NodeTypeId, +field_Id, -FieldType)</CODE>

<UL>
<LI><EM>Description:</EM> The predicate will return the given field's type. It will start the search in the ordinar dictionary and then to the personal dictionary sarting off with 'PROTO'. After it will go for 'DEF' and 'EXTERNPROTO'.

<LI><EM>Call and exit should be <EM>compatible</EM> with:</EM>

<CODE>field_value:parse(+Parse)</CODE>
 (<CODE>field_value:parse/1</CODE>)

<CODE>+NodeTypeId</CODE> is an atom.
 (<CODE>basic_props:atm/1</CODE>)

<CODE>+field_Id</CODE> is an atom.
 (<CODE>basic_props:atm/1</CODE>)

<CODE>-FieldType</CODE> is an atom.
 (<CODE>basic_props:atm/1</CODE>)
</UL>

</DL>

<P>
<A NAME="IDX9392"></A>
<A NAME="IDX9393"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>lookup_field_access/4:</B>
<DD><A NAME="IDX9394"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>lookup_field_access(+Parse, +NodenameId, +FieldId, +FieldId)</CODE>

<UL>
<LI><EM>Description:</EM> The predicate will control that the access proporties are correct according to the certain rules that we have. It makes a check to see if the fields are of the same access type or if one of them is an exposedField. It is not doing a route check up to control that behaviour entirely.

<LI><EM>Call and exit should be <EM>compatible</EM> with:</EM>

<CODE>field_value:parse(+Parse)</CODE>
 (<CODE>field_value:parse/1</CODE>)

<CODE>+NodenameId</CODE> is an atom.
 (<CODE>basic_props:atm/1</CODE>)

<CODE>+FieldId</CODE> is an atom.
 (<CODE>basic_props:atm/1</CODE>)

<CODE>+FieldId</CODE> is an atom.
 (<CODE>basic_props:atm/1</CODE>)
</UL>

</DL>

<P>
<A NAME="IDX9395"></A>
<A NAME="IDX9396"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>lookup_set_def/3:</B>
<DD><A NAME="IDX9397"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>lookup_set_def(+Parse, +Name, +Node)</CODE>

<UL>
<LI><EM>Description:</EM> The predicate will enter a new post in the personal dictionary for the node definition.

<LI><EM>Call and exit should be <EM>compatible</EM> with:</EM>

<CODE>field_value:parse(+Parse)</CODE>
 (<CODE>field_value:parse/1</CODE>)

<CODE>+Name</CODE> is an atom.
 (<CODE>basic_props:atm/1</CODE>)

<CODE>+Node</CODE> is any term.
 (<CODE>basic_props:term/1</CODE>)
</UL>

</DL>

<P>
<A NAME="IDX9398"></A>
<A NAME="IDX9399"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>lookup_set_prototype/4:</B>
<DD><A NAME="IDX9400"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>lookup_set_prototype(+Parse, +Name, +Interface, +Definition)</CODE>

<UL>
<LI><EM>Description:</EM> The predicate will insert the prototype definition in the personal dictionary and will give a warning if there is a multiple name given.

<LI><EM>Call and exit should be <EM>compatible</EM> with:</EM>

<CODE>field_value:parse(+Parse)</CODE>
 (<CODE>field_value:parse/1</CODE>)

<CODE>+Name</CODE> is an atom.
 (<CODE>basic_props:atm/1</CODE>)

<CODE>+Interface</CODE> is any term.
 (<CODE>basic_props:term/1</CODE>)

<CODE>+Definition</CODE> is any term.
 (<CODE>basic_props:term/1</CODE>)
</UL>

</DL>

<P>
<A NAME="IDX9401"></A>
<A NAME="IDX9402"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>lookup_set_extern_prototype/4:</B>
<DD><A NAME="IDX9403"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>lookup_set_extern_prototype(+Parse, +Name, +Interface, +Strings)</CODE>

<UL>
<LI><EM>Description:</EM> The predicate will insert the external prototype definition in the personal dictionary and will give a warning if there is a multiple name given.

<LI><EM>Call and exit should be <EM>compatible</EM> with:</EM>

<CODE>field_value:parse(+Parse)</CODE>
 (<CODE>field_value:parse/1</CODE>)

<CODE>+Name</CODE> is an atom.
 (<CODE>basic_props:atm/1</CODE>)

<CODE>+Interface</CODE> is any term.
 (<CODE>basic_props:term/1</CODE>)

<CODE>+Strings</CODE> is any term.
 (<CODE>basic_props:term/1</CODE>)
</UL>

</DL>

<P><HR><P>
Go to the <A HREF="ciao_1.html">first</A>, <A HREF="ciao_219.html">previous</A>, <A HREF="ciao_221.html">next</A>, <A HREF="ciao_241.html">last</A> section, <A HREF="ciao_toc.html">table of contents</A>.
</BODY>
</HTML>