Sophie

Sophie

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

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               - ProVRML - a Prolog interface for VRML</TITLE>
</HEAD>
<BODY> 
Go to the <A HREF="ciao_1.html">first</A>, <A HREF="ciao_207.html">previous</A>, <A HREF="ciao_209.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="SEC822" HREF="ciao_toc.html#TOC822">ProVRML - a Prolog interface for VRML</A></H1>
<P>
<A NAME="IDX8967"></A>


<P>
<STRONG>Author(s):</STRONG> G&ouml;ran Smedb&auml;ck, (Some changes by MCL), <CODE>clip@dia.fi.upm.es</CODE>, <CODE>http://www.clip.dia.fi.upm.es/</CODE>, The CLIP Group, Facultad de Inform&aacute;tica, Universidad Polit&eacute;cnica de Madrid.


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


<P>
<STRONG>Version of last change:</STRONG> 0.1#1 (1998/12/10, 16:19:45 MET)


<P>
<A NAME="IDX8968"></A>
<CODE>ProVRML</CODE> is Prolog library to handle VRML code. The library consists of modules to handle the tokenising, that is breaking the VRML code into smaller parts that can be analysed further. The further analysis will be the parsing. This is a complex part of the library and consists of several modules to handle errors and value check. When the parsing is done we have the Prolog terms of the VRML code. The terms are quite similar to the origin VRML code and can easily be read if you recognise that syntax. 


<P>
This Prolog terms of the VRML code is then possible to use for analysis, reconstruction, reverse enginering, building blocks for automatic generation of VRML code. There are several possibilities and these are only some of them. 


<P>
When you are done with the Prolog terms for the code, you would probably want to reverse the action and return to VRML code. This is done with the code generation modules. These are built up in more or less the same manner as the parser modules. 



<UL>
<LI><A HREF="ciao_208.html#SEC823">Usage and interface (provrml)</A>
<LI><A HREF="ciao_208.html#SEC824">Documentation on exports (provrml)</A>
<LI><A HREF="ciao_208.html#SEC825">Documentation on internals (provrml)</A>
</UL>



<H2><A NAME="SEC823" HREF="ciao_toc.html#TOC823">Usage and interface (<CODE>provrml</CODE>)</A></H2>

<div class="cartouche">

<UL>

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

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

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


<UL>

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

<A NAME="IDX8969"></A>
<CODE>vrml_web_to_terms/2</CODE>, 
<A NAME="IDX8970"></A>
<CODE>vrml_file_to_terms/2</CODE>, 
<A NAME="IDX8971"></A>
<CODE>vrml_web_to_terms_file/2</CODE>, 
<A NAME="IDX8972"></A>
<CODE>vrml_file_to_terms_file/2</CODE>, 
<A NAME="IDX8973"></A>
<CODE>terms_file_to_vrml/2</CODE>, 
<A NAME="IDX8974"></A>
<CODE>terms_file_to_vrml_file/2</CODE>, 
<A NAME="IDX8975"></A>
<CODE>terms_to_vrml_file/2</CODE>, 
<A NAME="IDX8976"></A>
<CODE>terms_to_vrml/2</CODE>, 
<A NAME="IDX8977"></A>
<CODE>vrml_to_terms/2</CODE>, 
<A NAME="IDX8978"></A>
<CODE>vrml_in_out/2</CODE>, 
<A NAME="IDX8979"></A>
<CODE>vrml_http_access/2</CODE>.

</UL>

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


<UL>

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

<A NAME="IDX8980"></A>
<CODE>pillow/http</CODE>, 
<A NAME="IDX8981"></A>
<CODE>pillow/html</CODE>, 
<A NAME="IDX8982"></A>
<CODE>provrml/io</CODE>, 
<A NAME="IDX8983"></A>
<CODE>provrml/parser</CODE>, 
<A NAME="IDX8984"></A>
<CODE>provrml/generator</CODE>, 
<A NAME="IDX8985"></A>
<CODE>lists</CODE>.

</UL>

</UL>

</div class="cartouche">



<H2><A NAME="SEC824" HREF="ciao_toc.html#TOC824">Documentation on exports (<CODE>provrml</CODE>)</A></H2>
<P>
<A NAME="IDX8986"></A>
<A NAME="IDX8987"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>vrml_web_to_terms/2:</B>
<DD><A NAME="IDX8988"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>vrml_web_to_terms(+WEBAddress, -Terms)</CODE>

<UL>
<LI><EM>Description:</EM> Given a address to a VRML-document on the Internet, the predicate will return the prolog-terms.

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

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

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

</DL>

<P>
<A NAME="IDX8989"></A>
<A NAME="IDX8990"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>vrml_file_to_terms/2:</B>
<DD><A NAME="IDX8991"></A>


<P>
<STRONG>Usage 1:</STRONG> <CODE>vrml_file_to_terms(+FileName, -Term)</CODE>

<UL>
<LI><EM>Description:</EM> Given a filename containing a VRML-file the predicate returns the prolog terms corresponding.

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

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

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

<P>
<STRONG>Usage 2:</STRONG> <CODE>vrml_file_to_terms(+FileName, +Terms)</CODE>

<UL>
<LI><EM>Description:</EM> Given a filename containing a VRML-file and a filename, the predicate write the prolog terms corresponding to the filename.

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

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

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

</DL>

<P>
<A NAME="IDX8992"></A>
<A NAME="IDX8993"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>vrml_web_to_terms_file/2:</B>
<DD><A NAME="IDX8994"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>vrml_web_to_terms_file(+WEBAddress, +FileName)</CODE>

<UL>
<LI><EM>Description:</EM> Given a address to a VRML-document on the Internet and a filename, the predicate will write the prolog_terms to the file.

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

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

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

</DL>

<P>
<A NAME="IDX8995"></A>
<A NAME="IDX8996"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>vrml_file_to_terms_file/2:</B>
<DD><A NAME="IDX8997"></A>


<P>
No further documentation available for this predicate.


</DL>

<P>
<A NAME="IDX8998"></A>
<A NAME="IDX8999"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>terms_file_to_vrml/2:</B>
<DD><A NAME="IDX9000"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>terms_file_to_vrml(+FileName, -List)</CODE>

<UL>
<LI><EM>Description:</EM> From a given filename with prologterms on the special format, the predicate returns the corresponding VRML-code.

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

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

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

</DL>

<P>
<A NAME="IDX9001"></A>
<A NAME="IDX9002"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>terms_file_to_vrml_file/2:</B>
<DD><A NAME="IDX9003"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>terms_file_to_vrml_file(+Atom, +Atom)</CODE>

<UL>
<LI><EM>Description:</EM> From a given filename with prologterms on the special format, the predicate writes the corresponding VRML-code to second filename.

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

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

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

</DL>

<P>
<A NAME="IDX9004"></A>
<A NAME="IDX9005"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>terms_to_vrml_file/2:</B>
<DD><A NAME="IDX9006"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>terms_to_vrml_file(+Term, +FileName)</CODE>

<UL>
<LI><EM>Description:</EM> Given prolog-terms the predicate writes the corresponding VRML-code to the given file.

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

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

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

</DL>

<P>
<A NAME="IDX9007"></A>
<A NAME="IDX9008"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>terms_to_vrml/2:</B>
<DD><A NAME="IDX9009"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>terms_to_vrml(+Term, -VRMLCode)</CODE>

<UL>
<LI><EM>Description:</EM> Given prolog-terms the predicate returns a list with the corresponding VRML-code.

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

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

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

</DL>

<P>
<A NAME="IDX9010"></A>
<A NAME="IDX9011"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>vrml_to_terms/2:</B>
<DD><A NAME="IDX9012"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>vrml_to_terms(+VRMLCode, -Terms)</CODE>

<UL>
<LI><EM>Description:</EM> Given a list with VRML-code the predicate will return the corresponding prolog-terms.

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

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

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

</DL>

<P>
<A NAME="IDX9013"></A>
<A NAME="IDX9014"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>vrml_in_out/2:</B>
<DD><A NAME="IDX9015"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>vrml_in_out(+FileName, +FileName)</CODE>

<UL>
<LI><EM>Description:</EM> This is a controll-predicate that given a filename to a VRML-file and a filename, the predicate will read the VRML-code. Transform it to prolog-terms and then transform it back to VRRML-code and write it to the latter file.

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

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

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

</DL>

<P>
<A NAME="IDX9016"></A>
<A NAME="IDX9017"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>vrml_http_access/2:</B>
<DD><A NAME="IDX9018"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>vrml_http_access(+ReadFilename, +BaseFilename)</CODE>

<UL>
<LI><EM>Description:</EM> Given a web-address to a VRML-file the predicate will load the code, write it first to the second argument with extension '_first.wrl'. Then it transform the code to prolog terms and write it with the extension '.term'. Transform it back to VRML-code and write it to the filename with '.wrl. A good test-predicate.

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

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

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

</DL>



<H2><A NAME="SEC825" HREF="ciao_toc.html#TOC825">Documentation on internals (<CODE>provrml</CODE>)</A></H2>
<P>
<A NAME="IDX9019"></A>
<A NAME="IDX9020"></A>
<DL>
<DT><span class="define">PREDICATE:</span> <B>read_page/2:</B>
<DD><A NAME="IDX9021"></A>


<P>
<STRONG>Usage:</STRONG> <CODE>read_page(+WEBAddress, -Data)</CODE>

<UL>
<LI><EM>Description:</EM> This routine reads a page on the web using pillow routines.

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

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

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

</DL>

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