<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 - Printing the declarations and code in a file</TITLE> </HEAD> <BODY> Go to the <A HREF="ciao_1.html">first</A>, <A HREF="ciao_178.html">previous</A>, <A HREF="ciao_180.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="SEC727" HREF="ciao_toc.html#TOC727">Printing the declarations and code in a file</A></H1> <P> <STRONG>Author(s):</STRONG> Manuel Hermenegildo. <P> <STRONG>Version:</STRONG> 0.5#6 (1999/4/15, 20:33:6 MEST) <P> A simple program for <A NAME="IDX8135"></A> printing assertion information ( <A NAME="IDX8136"></A> predicate declarations, <A NAME="IDX8137"></A> property declarations, <A NAME="IDX8138"></A> type declarations, etc.) and <A NAME="IDX8139"></A> printing code-related information ( <A NAME="IDX8140"></A> imports, <A NAME="IDX8141"></A> exports, <A NAME="IDX8142"></A> libraries used, etc.) on a file. The file should be a single Ciao or Prolog source file. It uses the Ciao compiler's pass one to do it. This program is specially useful for example for checking what assertions the <A NAME="IDX8143"></A> assertion normalizer is producing from the original assertions in the file or to check what the compiler is actually seeing after some of the syntactic expansions (but before goal translations). <UL> <LI><A HREF="ciao_179.html#SEC728">Usage (fileinfo)</A> <LI><A HREF="ciao_179.html#SEC729">More detailed explanation of options (fileinfo)</A> </UL> <H2><A NAME="SEC728" HREF="ciao_toc.html#TOC728">Usage (fileinfo)</A></H2> <PRE> fileinfo -asr <filename.asr> : pretty prints the contents of <filename.asr> fileinfo [-v] [-m] <-a|-f|-c|-e> <filename> [libdir1] ... [libdirN] -v : verbose output (e.g., lists all files read) -m : restrict info to current module -a : print assertions -f : print code and interface (imports/exports, etc.) -c : print code only -e : print only errors - useful to check syntax of assertions in file fileinfo -h : print this information Note that system lib paths *must* be given explicitly, e.g. : fileinfo -m -c foo.pl \ /home/clip/System/ciao/lib \ /home/clip/System/ciao/library \ </PRE> <H2><A NAME="SEC729" HREF="ciao_toc.html#TOC729">More detailed explanation of options (fileinfo)</A></H2> <P> <UL> <LI>If the <CODE>-a</CODE> option is selected, <CODE>fileinfo</CODE> prints the assertions (only code-oriented assertions -- not comment-oriented assertions) in the file <EM>after normalization</EM>. If the <CODE>-f</CODE> option is selected <CODE>fileinfo</CODE> prints the file interface, the declarations contained in the file, and the actual code. The <CODE>-c</CODE> option prints only the code. If the <CODE>-e</CODE> option is selected <CODE>fileinfo</CODE> prints only any sintactic and import-export errors found in the file, including the assertions. <LI><CODE>filename</CODE> must be the name of a Prolog or Ciao source file. <LI>This filename can be followed by other arguments which will be taken to be library directory paths in which to look for files used by the file being analyzed. <LI>If the <CODE>-m</CODE> option is selected, only the information related to the current module is printed. <LI>The <CODE>-v</CODE> option produces verbose output. This is very useful for debugging, since all the files accessed during assertion normalization are listed. <LI>In the <CODE>-asr</CODE> usage, <A NAME="IDX8144"></A> <CODE>fileinfo</CODE> can be used to print the contents of a <CODE>.asr</CODE> file in human-readable form. </UL> <P><HR><P> Go to the <A HREF="ciao_1.html">first</A>, <A HREF="ciao_178.html">previous</A>, <A HREF="ciao_180.html">next</A>, <A HREF="ciao_241.html">last</A> section, <A HREF="ciao_toc.html">table of contents</A>. </BODY> </HTML>