#ifdef BOOK
\documentclass[9pt,b5thesispaper]{swipl}
\setlength\voffset {-15mm}
\setlength\paperheight {220mm}
\setlength\textheight {170mm}
\setlength\textwidth {130mm}
\setlength\paperwidth {170mm}
\setlength\oddsidemargin {0mm}
\setlength\evensidemargin {-10mm}
\def\setuphyperref{\relax}
#else
\documentclass[11pt,twoside]{report}
\def\setuphyperref{\usepackage[pdftex,colorlinks=true,urlcolor=blue]{hyperref}}
#endif
\usepackage{pl}
\usepackage{html}
\usepackage{logo}
\usepackage{plpage}
%\onefile
\sloppy
\makeindex
% Configure latex2html
\htmloutput{Manual} % Output directory
\htmlmainfile{index} % Main document file
\bodycolor{white} % Page colour
\linkimage{home}{home.gif} % Images for links
\linkimage{index}{yellow_pages.gif}
\linkimage{contents}{index.gif}
\linkimage{up}{up.gif}
\linkimage{previous}{prev.gif}
\linkimage{next}{next.gif}
\linkimage{summary}{info.gif}
%\includeonly{ide}
#ifdef ONLINE
\usepackage{txt}
\usepackage{plonline}
\setcounter{secnumdepth}{3}
\sloppy
#else
\usepackage{times}
\usepackage{fancyheadings}
\renewcommand{\runningtitle}{SWI-Prolog \versionshort{} Reference Manual}
\headheight 14pt
\renewcommand{\chaptermark}[1]{\markboth{#1}{#1}} % remember chapter title
\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}
% section number and title
\lhead[\fancyplain{}{\bf\thepage}]{\fancyplain{}{\bf\rightmark}}
\rhead[\fancyplain{}{\bf\leftmark}]{\fancyplain{}{\bf\thepage}}
\footrulewidth 0.2pt
\lfoot[\tiny \runningtitle]{}
\rfoot[]{\tiny \runningtitle}
\cfoot{}
\pagestyle{fancyplain}
#endif
\newcommand{\vmajor}{6}
\newcommand{\vminor}{2}
\newcommand{\vpatch}{2}
\newcommand{\vmonth}{September}
\newcommand{\vyear}{2012}
\newcommand{\versionshort}{\vmajor.\vminor}
\newcommand{\versionlong}{\vmajor.\vminor.\vpatch, \vmonth~\vyear}
\renewcommand{\arabicday}{\versionshort}
\title{SWI-Prolog \versionshort{} Reference Manual}
\author{\email[Jan Wielemaker]{J.Wielemaker@vu.nl} \\
Department of Computer Science \\
VU University Amsterdam \\
De Boelelaan 1081a, 1081 HV~~Amsterdam \vspace{5pt}\\
Human-Computer Studies (HCS, formerly SWI) \\
Kruislaan 419, 1098 VA~~Amsterdam \\
The Netherlands}
\begin{htmlonly}
\maketitle
\begin{abstract}
SWI-Prolog is a comprehensive and portable implementation of the Prolog
programming language. SWI-Prolog aims to be a robust and scalable
implementation supporting a wide range of applications. In particular,
it ships with a wide range of interface libraries, providing interfaces
to other languages, databases, graphics and networking. It provides
extensive support for managing HTML/SGML/XML and RDF documents. The
system is particularly suited for server applications due to robust
support for multi threading and HTTP server libraries.
SWI-Prolog is designed in the `Edinburgh tradition'. In addition to the
ISO Prolog standard it is largely compatible to Quintus, SICStus and YAP
Prolog. SWI-Prolog provides a compatibility framework developed in
cooperation with YAP and instantiated for YAP, SICStus and IF/Prolog.
SWI-Prolog aims at providing a good development environment, including
extensive editor support, graphical source-level debugger, autoloading
and `make' facility and much more. SWI-Prolog editor and the PDT plugin
for Eclipse provide alternative environments.
This document gives an overview of the features, system limits and
built-in predicates.
\end{abstract}
\subsection*{About this document}
This manual is written and maintained using \LaTeX{}. The \LaTeX{}
source is included in the source distribution of SWI-Prolog. The manual
is converted into HTML using a converter distributed with the SWI-Prolog
sources. From the same source we generate the plain-text version and
index used by the online help system (located in the file \file{MANUAL}
in the library directory) as well as the PDF version. Sources, binaries
and documentation can be downloaded from the \url[SWI-Prolog download
page]{http://www.swi-prolog.org/download.html}.
The SWI-Prolog project {\bf home page} is located
\url[here]{http://www.swi-prolog.org}
\includegraphics[width=4cm]{figs/by-sa}\\[0mm]
This work is licensed under the Creative Commons Attribution-ShareAlike
3.0 Unported License. To view a copy of this license, visit
\url{http://creativecommons.org/licenses/by-sa/3.0/} or send a letter to
Creative Commons, 444 Castro Street, Suite 900, Mountain View,
California, 94041, USA.
\end{htmlonly}
\begin{document}
\begin{titlepage}
\newlength{\uvawidth}
\settowidth{\uvawidth}{\LARGE VU University Amsterdam}
\newcommand{\uvaaddress}{%
\parbox[b]{\uvawidth}{%
\begin{center}
\LARGE
University of Amsterdam \\[3mm]
\small
Kruislaan 419, 1098 VA~~Amsterdam \\%
The Netherlands \\%
\end{center}}}
\newcommand{\vuaddress}{%
\parbox[b]{\uvawidth}{%
\begin{center}
\LARGE
VU University Amsterdam \\[3mm]
\small
De Boelelaan 1081a, 1081 HV~~Amsterdam \\%
The Netherlands \\%
\end{center}}}
\mbox{~}
\begin{center}
\vspace{-3cm}
\raisebox{5cm}{
\parbox{\textwidth}{%
\makebox[\textwidth]{%
\raisebox{0mm}{\vuaddress}
\hfill%
\raisebox{0mm}{\uvaaddress}}
}}
\vfil\vfil\vfil
#ifdef ONLINE
{\Huge SWI-Prolog \versionshort} \\[0mm]
#else
\includegraphics[width=\uvawidth]{figs/swipl} \\[0mm]
#endif
{\LARGE Reference Manual} \\[0mm]
{\it Updated for version \versionlong} \\[10mm]
{\large \it Jan Wielemaker} \\[0mm]
{\large \email{J.Wielemaker@vu.nl}} \\[0mm]
{\large http://www.swi-prolog.org}
\end{center}
\vfil
\begin{quote}
SWI-Prolog is a comprehensive and portable implementation of the Prolog
programming language. SWI-Prolog aims to be a robust and scalable
implementation supporting a wide range of applications. In particular,
it ships with a wide range of interface libraries, providing interfaces
to other languages, databases, graphics and networking. It provides
extensive support for managing HTML/SGML/XML and RDF documents. The
system is particularly suited for server applications due to robust
support for multi threading and HTTP server libraries.
SWI-Prolog is designed in the `Edinburgh tradition'. In addition to the
ISO Prolog standard it is largely compatible to Quintus, SICStus and YAP
Prolog. SWI-Prolog provides a compatibility framework developed in
cooperation with YAP and instantiated for YAP, SICStus and IF/Prolog.
SWI-Prolog aims at providing a good development environment, including
extensive editor support, graphical source-level debugger, autoloading
and `make' facility and much more. SWI-Prolog editor and the PDT plugin
for Eclipse provide alternative environments.
This document gives an overview of the features, system limits and
built-in predicates.
\end{quote}
\vfil
\vfil
\newpage
\thispagestyle{empty}
\mbox{~}
\vfill
\begin{quote}
\hspace{-8mm}\includegraphics[width=4cm]{figs/by-sa}\\[0mm]
This work is licensed under the Creative Commons Attribution-ShareAlike
3.0 Unported License. To view a copy of this license, visit
\url{http://creativecommons.org/licenses/by-sa/3.0/} or send a letter to
Creative Commons, 444 Castro Street, Suite 900, Mountain View,
California, 94041, USA.
\end{quote}
\end{titlepage}
\setcounter{page}{1}
\tableofcontents
\include{intro}
\include{overview}
\include{ide}
\include{builtin}
\include{module}
\include{attvar}
\include{chr}
\include{threads}
\include{foreign}
\include{runtime}
\appendix
\include{lib/library}
\include{hack}
\include{dialect}
\include{glossary}
\include{license}
\include{summary}
\bibliographystyle{name}
\bibliography{pl}
\printindex
\end{document}