Sophie

Sophie

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

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               - internal_types (library)</TITLE>
</HEAD>
<BODY> 
Go to the <A HREF="ciao_1.html">first</A>, <A HREF="ciao_217.html">previous</A>, <A HREF="ciao_219.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="SEC853" HREF="ciao_toc.html#TOC853">internal_types (library)</A></H1>
<P>
<A NAME="IDX9258"></A>


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


<P>
<STRONG>Version:</STRONG> 1.10#7 (2006/4/26, 19:22:13 CEST)


<P>
<STRONG>Version of last change:</STRONG> 1.9#177 (2003/12/4, 17:48:37 CET)


<P>
These are the internal data types used in the predicates. They are only used to simplify this documentation and make it more understandable. 
 
Implemented by G&ouml;ran Smedb&auml;ck 



<UL>
<LI><A HREF="ciao_218.html#SEC854">Usage and interface (internal_types)</A>
<LI><A HREF="ciao_218.html#SEC855">Documentation on exports (internal_types)</A>
</UL>



<H2><A NAME="SEC854" HREF="ciao_toc.html#TOC854">Usage and interface (<CODE>internal_types</CODE>)</A></H2>

<div class="cartouche">

<UL>

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

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

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


<UL>

<LI><EM>Regular Types:</EM>

<A NAME="IDX9259"></A>
<CODE>bound/1</CODE>, 
<A NAME="IDX9260"></A>
<CODE>bound_double/1</CODE>, 
<A NAME="IDX9261"></A>
<CODE>dictionary/1</CODE>, 
<A NAME="IDX9262"></A>
<CODE>environment/1</CODE>, 
<A NAME="IDX9263"></A>
<CODE>parse/1</CODE>, 
<A NAME="IDX9264"></A>
<CODE>tree/1</CODE>, 
<A NAME="IDX9265"></A>
<CODE>whitespace/1</CODE>.

</UL>

</UL>

</div class="cartouche">



<H2><A NAME="SEC855" HREF="ciao_toc.html#TOC855">Documentation on exports (<CODE>internal_types</CODE>)</A></H2>
<P>
<A NAME="IDX9266"></A>
<A NAME="IDX9267"></A>
<DL>
<DT><span class="define">REGTYPE:</span> <B>bound/1:</B>
<DD><A NAME="IDX9268"></A>


<P>
Min is a number or an atom that indicates the minimal value, Max indicates the maximal. 

<PRE>
bound(bound(Min,Max)) :-
        atm(Min),
        atm(Max).
</PRE>

<P>
<STRONG>Usage:</STRONG> <CODE>bound(Bound)</CODE>

<UL>
<LI><EM>Description:</EM> <CODE>Bound</CODE> is a variable interval.

</UL>

</DL>

<P>
<A NAME="IDX9269"></A>
<A NAME="IDX9270"></A>
<DL>
<DT><span class="define">REGTYPE:</span> <B>bound_double/1:</B>
<DD><A NAME="IDX9271"></A>


<P>
Min is a number or an atom that indicates the minimal value, Max indicates the maximal. The first two for some value and the second pair for some other. Typically used for types that are compound, e.g., rotationvalue. 

<PRE>
bound_double(bound(Min0,Max0,Min1,Max1)) :-
        atm(Min0),
        atm(Max0),
        atm(Min1),
        atm(Max1).
</PRE>

<P>
<STRONG>Usage:</STRONG> <CODE>bound_double(Bound)</CODE>

<UL>
<LI><EM>Description:</EM> <CODE>Bound</CODE> is a variable interval.

</UL>

</DL>

<P>
<A NAME="IDX9272"></A>
<A NAME="IDX9273"></A>
<DL>
<DT><span class="define">REGTYPE:</span> <B>dictionary/1:</B>
<DD><A NAME="IDX9274"></A>


<P>
Dic is a tree structure and is used as the internal representation of the dictionary. 

<PRE>
dictionary(dic(Dic)) :-
        tree(Dic).
</PRE>

<P>
<STRONG>Usage:</STRONG> <CODE>dictionary(Dictionary)</CODE>

<UL>
<LI><EM>Description:</EM> <CODE>Dictionary</CODE> is a dictionary.

</UL>

</DL>

<P>
<A NAME="IDX9275"></A>
<A NAME="IDX9276"></A>
<DL>
<DT><span class="define">REGTYPE:</span> <B>environment/1:</B>
<DD><A NAME="IDX9277"></A>


<P>
EnvironmentType one of 'DEF','PROTO','EXTERNPROTO' with the name Name. Whitespace is a structure with whitespace information. 

<PRE>
environment(env(Env,Name,WhiteSpace)) :-
        atm(Env),
        atm(Name),
        whitespace(WhiteSpace).
</PRE>

<P>
<STRONG>Usage:</STRONG> <CODE>environment(Environment)</CODE>

<UL>
<LI><EM>Description:</EM> <CODE>Environment</CODE> is an environment structure.

</UL>

</DL>

<P>
<A NAME="IDX9278"></A>
<A NAME="IDX9279"></A>
<DL>
<DT><span class="define">REGTYPE:</span> <B>parse/1:</B>
<DD><A NAME="IDX9280"></A>


<P>
In is the list of tokens to parse and Out is the resulting list after the parsing. Env is of type env and is the environment-structure.The dictinonary Dic contains created information and structures. 

<PRE>
parse(parse(In,Out,Env,Dic)) :-
        list(In),
        list(Out),
        environment(Env),
        dictionary(Dic).
</PRE>

<P>
<STRONG>Usage:</STRONG> <CODE>parse(Parse)</CODE>

<UL>
<LI><EM>Description:</EM> <CODE>Parse</CODE> is a parse structure.

</UL>

</DL>

<P>
<A NAME="IDX9281"></A>
<A NAME="IDX9282"></A>
<DL>
<DT><span class="define">REGTYPE:</span> <B>tree/1:</B>
<DD><A NAME="IDX9283"></A>


<P>
Key is the search-key, Leaf is the information, Left and Right are more dictionary posts, where Left have less Key-value. 

<PRE>
tree(tree(Key,Leaf,Left,Right)) :-
        atm(Key),
        leaf(Leaf),
        tree(Left),
        tree(Right).
</PRE>

<P>
<STRONG>Usage:</STRONG> <CODE>tree(Tree)</CODE>

<UL>
<LI><EM>Description:</EM> <CODE>Tree</CODE> is a tree structure.

</UL>

</DL>

<P>
<A NAME="IDX9284"></A>
<A NAME="IDX9285"></A>
<DL>
<DT><span class="define">REGTYPE:</span> <B>whitespace/1:</B>
<DD><A NAME="IDX9286"></A>


<P>
The Row and Indentation information. The row information used when parsing the VRML code to give accurate error position and the indentation is used when generating VRML code from terms. 

<PRE>
whitespace(w(Row,Indentation)) :-
        number(Row),
        number(Indentation).
</PRE>

<P>
<STRONG>Usage:</STRONG> <CODE>whitespace(Whitespace)</CODE>

<UL>
<LI><EM>Description:</EM> <CODE>Whitespace</CODE> is a whitespace structure.

</UL>

</DL>

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