<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 - Foreign Language Interface Builder</TITLE> </HEAD> <BODY> Go to the <A HREF="ciao_1.html">first</A>, <A HREF="ciao_122.html">previous</A>, <A HREF="ciao_124.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="SEC531" HREF="ciao_toc.html#TOC531">Foreign Language Interface Builder</A></H1> <P> <A NAME="IDX5902"></A> <P> <STRONG>Author(s):</STRONG> Jose Morales, Manuel Carro. <P> <STRONG>Version:</STRONG> 1.10#7 (2006/4/26, 19:22:13 CEST) <P> <STRONG>Version of last change:</STRONG> 1.9#252 (2003/12/30, 22:15:50 CET) <P> Low-level utilities for building foreign interfaces. End-users should not need to use them, as the Ciao Prolog Compiler reads the user assertions and calls appropriately the predicates in this module. <UL> <LI><A HREF="ciao_123.html#SEC532">Usage and interface (build_foreign_interface)</A> <LI><A HREF="ciao_123.html#SEC533">Documentation on exports (build_foreign_interface)</A> </UL> <H2><A NAME="SEC532" HREF="ciao_toc.html#TOC532">Usage and interface (<CODE>build_foreign_interface</CODE>)</A></H2> <div class="cartouche"> <UL> <LI><STRONG>Library usage:</STRONG> <CODE>:- use_module(library(build_foreign_interface)).</CODE> <LI><STRONG>Exports:</STRONG> <UL> <LI><EM>Predicates:</EM> <A NAME="IDX5903"></A> <CODE>build_foreign_interface/1</CODE>, <A NAME="IDX5904"></A> <CODE>rebuild_foreign_interface/1</CODE>, <A NAME="IDX5905"></A> <CODE>build_foreign_interface_explicit_decls/2</CODE>, <A NAME="IDX5906"></A> <CODE>rebuild_foreign_interface_explicit_decls/2</CODE>, <A NAME="IDX5907"></A> <CODE>build_foreign_interface_object/1</CODE>, <A NAME="IDX5908"></A> <CODE>rebuild_foreign_interface_object/1</CODE>, <A NAME="IDX5909"></A> <CODE>do_interface/1</CODE>. </UL> <LI><STRONG>Other modules used:</STRONG> <UL> <LI><EM>System library modules:</EM> <A NAME="IDX5910"></A> <CODE>write_c/write_c</CODE>, <A NAME="IDX5911"></A> <CODE>streams</CODE>, <A NAME="IDX5912"></A> <CODE>terms</CODE>, <A NAME="IDX5913"></A> <CODE>lists</CODE>, <A NAME="IDX5914"></A> <CODE>llists</CODE>, <A NAME="IDX5915"></A> <CODE>aggregates</CODE>, <A NAME="IDX5916"></A> <CODE>system</CODE>, <A NAME="IDX5917"></A> <CODE>format</CODE>, <A NAME="IDX5918"></A> <CODE>messages</CODE>, <A NAME="IDX5919"></A> <CODE>assertions/assrt_lib</CODE>, <A NAME="IDX5920"></A> <CODE>foreign_compilation</CODE>, <A NAME="IDX5921"></A> <CODE>compiler/c_itf</CODE>, <A NAME="IDX5922"></A> <CODE>ctrlcclean</CODE>, <A NAME="IDX5923"></A> <CODE>errhandle</CODE>. </UL> </UL> </div class="cartouche"> <H2><A NAME="SEC533" HREF="ciao_toc.html#TOC533">Documentation on exports (<CODE>build_foreign_interface</CODE>)</A></H2> <P> <A NAME="IDX5924"></A> <A NAME="IDX5925"></A> <DL> <DT><span class="define">PREDICATE:</span> <B>build_foreign_interface/1:</B> <DD><A NAME="IDX5926"></A> <P> <STRONG>Usage:</STRONG> <CODE>build_foreign_interface(in(File))</CODE> <UL> <LI><EM>Description:</EM> Reads assertions from <CODE>File</CODE>, generates the gluecode for the Ciao Prolog interface, compiles the foreign files and the gluecode file, and links everything in a shared object. Checks modification times to determine automatically which files must be generated/compiled/linked. <LI><EM>Call and exit should be <EM>compatible</EM> with:</EM> <CODE>in(File)</CODE> is a source name. (<CODE>streams_basic:sourcename/1</CODE>) </UL> </DL> <P> <A NAME="IDX5927"></A> <A NAME="IDX5928"></A> <DL> <DT><span class="define">PREDICATE:</span> <B>rebuild_foreign_interface/1:</B> <DD><A NAME="IDX5929"></A> <P> <STRONG>Usage:</STRONG> <CODE>rebuild_foreign_interface(in(File))</CODE> <UL> <LI><EM>Description:</EM> Like <A NAME="IDX5930"></A> <CODE>build_foreign_interface/1</CODE>, but it does not check the modification time of any file. <LI><EM>Call and exit should be <EM>compatible</EM> with:</EM> <CODE>in(File)</CODE> is a source name. (<CODE>streams_basic:sourcename/1</CODE>) </UL> </DL> <P> <A NAME="IDX5931"></A> <A NAME="IDX5932"></A> <DL> <DT><span class="define">PREDICATE:</span> <B>build_foreign_interface_explicit_decls/2:</B> <DD><A NAME="IDX5933"></A> <P> <STRONG>Usage:</STRONG> <CODE>build_foreign_interface_explicit_decls(in(File), in(Decls))</CODE> <UL> <LI><EM>Description:</EM> Like <A NAME="IDX5934"></A> <CODE>build_foreign_interface/1</CODE>, but use declarations in <CODE>Decls</CODE> instead of reading the declarations from <CODE>File</CODE>. <LI><EM>Call and exit should be <EM>compatible</EM> with:</EM> <CODE>in(File)</CODE> is a source name. (<CODE>streams_basic:sourcename/1</CODE>) <CODE>in(Decls)</CODE> is a list of <CODE>term</CODE>s. (<CODE>basic_props:list/2</CODE>) </UL> </DL> <P> <A NAME="IDX5935"></A> <A NAME="IDX5936"></A> <DL> <DT><span class="define">PREDICATE:</span> <B>rebuild_foreign_interface_explicit_decls/2:</B> <DD><A NAME="IDX5937"></A> <P> <STRONG>Usage:</STRONG> <CODE>rebuild_foreign_interface_explicit_decls(in(File), in(Decls))</CODE> <UL> <LI><EM>Description:</EM> Like <A NAME="IDX5938"></A> <CODE>build_foreign_interface_explicit_decls/1</CODE>, but it does not check the modification time of any file. <LI><EM>Call and exit should be <EM>compatible</EM> with:</EM> <CODE>in(File)</CODE> is a source name. (<CODE>streams_basic:sourcename/1</CODE>) <CODE>in(Decls)</CODE> is a list of <CODE>term</CODE>s. (<CODE>basic_props:list/2</CODE>) </UL> </DL> <P> <A NAME="IDX5939"></A> <A NAME="IDX5940"></A> <DL> <DT><span class="define">PREDICATE:</span> <B>build_foreign_interface_object/1:</B> <DD><A NAME="IDX5941"></A> <P> <STRONG>Usage:</STRONG> <CODE>build_foreign_interface_object(in(File))</CODE> <UL> <LI><EM>Description:</EM> Compiles the gluecode file with the foreign source files producing an unique object file. <LI><EM>Call and exit should be <EM>compatible</EM> with:</EM> <CODE>in(File)</CODE> is a source name. (<CODE>streams_basic:sourcename/1</CODE>) </UL> </DL> <P> <A NAME="IDX5942"></A> <A NAME="IDX5943"></A> <DL> <DT><span class="define">PREDICATE:</span> <B>rebuild_foreign_interface_object/1:</B> <DD><A NAME="IDX5944"></A> <P> <STRONG>Usage:</STRONG> <CODE>rebuild_foreign_interface_object(in(File))</CODE> <UL> <LI><EM>Description:</EM> Compiles (again) the gluecode file with the foreign source files producing an unique object file. <LI><EM>Call and exit should be <EM>compatible</EM> with:</EM> <CODE>in(File)</CODE> is a source name. (<CODE>streams_basic:sourcename/1</CODE>) </UL> </DL> <P> <A NAME="IDX5945"></A> <A NAME="IDX5946"></A> <DL> <DT><span class="define">PREDICATE:</span> <B>do_interface/1:</B> <DD><A NAME="IDX5947"></A> <P> <STRONG>Usage:</STRONG> <CODE>do_interface(in(Decls))</CODE> <UL> <LI><EM>Description:</EM> Given the declarations in <CODE>Decls</CODE>, this predicate succeeds if these declarations involve the creation of the foreign interface <LI><EM>Call and exit should be <EM>compatible</EM> with:</EM> <CODE>in(Decls)</CODE> is a list of <CODE>term</CODE>s. (<CODE>basic_props:list/2</CODE>) </UL> </DL> <P><HR><P> Go to the <A HREF="ciao_1.html">first</A>, <A HREF="ciao_122.html">previous</A>, <A HREF="ciao_124.html">next</A>, <A HREF="ciao_241.html">last</A> section, <A HREF="ciao_toc.html">table of contents</A>. </BODY> </HTML>