Skip to content

Commit e28e572

Browse files
committed
started pass through draft version guide
1 parent c59e0c7 commit e28e572

File tree

6 files changed

+155
-86
lines changed

6 files changed

+155
-86
lines changed

abstract.tex

+8-7
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,22 @@
44
The first tool, \gringo, is a \emph{grounder} capable of translating
55
logic programs provided by users into equivalent propositional logic programs.
66
The answer sets of such programs can be computed by \clasp,
7-
which is a \emph{solver}.
7+
which is a \emph{solver} processing the output of \gringo.
88
The third tool, \clingo, integrates the functionalities of \gringo\ and \clasp,
9-
thus, acting as a \emph{monolithic} solver for user programs.
9+
thus, acting as a \emph{monolithic} grounder and solver for user programs.
1010
Finally, \iclingo\ extends \clingo\ by an
1111
\emph{incremental} mode that incorporates both grounding and solving.
12-
For one, this document aims at enabling ASP novices
12+
The guide, for one, aims at enabling ASP novices
1313
to make use of the aforementioned tools.
1414
For another, it provides a reference of their features
1515
that ASP adepts might be tempted to exploit.
1616

1717
\vfill
18-
19-
\textbf{Note that this document contains a lot of examples.
20-
For convienience no examples have to be typed in by hand
21-
instead they can directly be safed to disc by clicking them.}
18+
\centering
19+
\textbf{This document includes many illustrative examples.}
20+
\\
21+
\textbf{For convenience,
22+
they can be saved to disk by clicking their file names.}
2223
\end{abstract}
2324

2425
%%% Local Variables:

background.tex

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1-
%\section{Background}\label{sec:background}
1+
\section{Theoretical Background}\label{sec:background}
2+
3+
To be added
24

guide.bib

+15-15
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,6 @@ @STRING{tplp
2222
@STRING{wiley = "John Wiley \& sons" }
2323

2424

25-
@InProceedings{gekasc09a,
26-
author = "M. Gebser and B. Kaufmann and T. Schaub",
27-
title = "Solution Enumeration for Projected {B}oolean Search Problems",
28-
pages = "71-86",
29-
crossref = "cpaior09"
30-
}
31-
32-
@InProceedings{gekasc09b,
33-
author = "M. Gebser and B. Kaufmann and T. Schaub",
34-
title = "The Conflict-Driven Answer Set Solver clasp: Progress
35-
Report",
36-
crossref = "lpnmr09",
37-
pages = "509-514"
38-
}
39-
4025
@InProceedings{angelinesc05c,
4126
author = "C. Anger and M. Gebser and T. Linke and A. Neumann and
4227
T. Schaub",
@@ -303,6 +288,21 @@ @InProceedings{gekanesc08a
303288
pages = "15-19"
304289
}
305290

291+
@InProceedings{gekasc09a,
292+
author = "M. Gebser and B. Kaufmann and T. Schaub",
293+
title = "Solution Enumeration for Projected {B}oolean Search Problems",
294+
crossref = "cpaior09",
295+
pages = "71-86"
296+
}
297+
298+
@InProceedings{gekasc09b,
299+
author = "M. Gebser and B. Kaufmann and T. Schaub",
300+
title = "The Conflict-Driven Answer Set Solver clasp: Progress
301+
Report",
302+
crossref = "lpnmr09",
303+
pages = "509-514"
304+
}
305+
306306
@InProceedings{gellif88a,
307307
author = "M. Gelfond and V. Lifschitz",
308308
title = "The Stable Model Semantics for Logic Programming",

guide.tex

+46-20
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
\documentclass[a4paper,10pt]{article}
1+
\documentclass[a4paper,11pt]{article}
22

33
\usepackage[utf8]{inputenc}
44
\usepackage[english]{babel}
5+
%\usepackage{a4wide}
56
\usepackage{amsthm,amssymb,amsmath}
67
\usepackage{helvet,times,courier}
78
\usepackage{listings}
@@ -15,61 +16,86 @@
1516
\usetikzlibrary{arrows,chains,positioning,automata,decorations,shapes}
1617
\usepackage[color=1 0 0]{attachfile}
1718
\usepackage{fancyvrb}
19+
\usepackage{fancyhdr}
1820
\usepackage{rail}
1921
\input{macro}
2022
\usepackage{makeidx}
2123
\makeindex
2224

25+
\pagestyle{fancy}
26+
\renewcommand{\sectionmark}[1]{\markright{\thesection\quad #1}{}}
27+
\renewcommand{\subsectionmark}[1]{\markright{\thesubsection\quad #1}{}}
28+
29+
\fancyhf{}
30+
\fancyhead[R]{\thepage}
31+
\fancyhead[L]{\textit{\nouppercase{\rightmark}}}
32+
33+
2334
\sloppy
2435
\author{%
2536
Martin Gebser \and
2637
Roland Kaminski \and
27-
Benjamin Kaufmann \and
38+
Benjamin Kaufmann \and
2839
Max Ostrowski \and
2940
Torsten Schaub \and
30-
Sven Thiele
31-
\thanks{\texttt{\{gebser,kaminski,kaufmann,ostrowsk,torsten,sthiele\}@cs.uni-potsdam.de}}}
41+
Sven Thiele}
42+
43+
% \thanks{\texttt{\{gebser,kaminski,kaufmann,ostrowsk,torsten,sthiele\}@cs.uni-potsdam.de}}}
3244
\title{%
33-
\bf A User's Guide to\\
34-
\gringo, \clasp, \clingo, and \iclingo\
35-
\thanks{Tools \gringo, \clasp, \clingo, and \iclingo\ are available at~\cite{potassco}.} \\[0.0cm]
36-
{\normalsize \textnormal{(version 3.x)}}
45+
\textbf{\huge A User's Guide to}
46+
\\
47+
\gringo, \clasp, \clingo, \textbf{and} \iclingo\
48+
\thanks{This guide refers to Version~\textbf{3}.x
49+
of \gringo, \clingo, and \iclingo\ as well as
50+
Version~1.\textbf{3}.x of \clasp.
51+
Please make sure that you have corresponding (or later) versions available.}
52+
\\[4mm]
53+
\large\url{http://potassco.sourceforge.net/}
54+
%Tools \gringo, \clasp, \clingo, and \iclingo\ are available at~\cite{potassco}.} \\[0.0cm]
55+
% {\normalsize \textnormal{(version 3.x)}}
3756
}
3857
\date{\today}
3958

4059
\begin{document}
41-
60+
\pagestyle{plain}
4261
\maketitle
43-
4462
{\hfill\large\it --- Preliminary Draft ---\hfill}
4563

4664
\input{abstract}
47-
4865
\newpage
66+
%{\small
4967
\tableofcontents
5068
\listoffigures
5169
\lstlistoflistings
70+
%}
5271
\newpage
53-
72+
\pagestyle{fancy}
5473
\input{introduction}
74+
\newpage
5575
\input{quickstart}
76+
\newpage
5677
\input{language}
78+
\newpage
5779
\input{examples}
80+
\newpage
5881
\input{options}
82+
\newpage
5983
\input{errors}
84+
\newpage
6085
\input{future}
61-
86+
\newpage
87+
\appendix
88+
%\input{restrictions}
89+
\input{lparse}
90+
\newpage
91+
\input{background}
6292
\newpage
6393
\phantomsection
6494
\addcontentsline{toc}{section}{References}
6595
\bibliographystyle{plain}
6696
\bibliography{guide}
67-
68-
\appendix
69-
\input{background}
70-
%\input{restrictions}
71-
\input{lparse}
72-
97+
\newpage
98+
\phantomsection
99+
\addcontentsline{toc}{section}{Index}
73100
\printindex
74-
75101
\end{document}

introduction.tex

+74-39
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,98 @@
11
\section{Introduction}\label{sec:introduction}
22

33
The ``Potsdam Answer Set Solving Collection'' (Potassco)~\cite{potassco}
4-
by now gathers a variety of tools for Answer Set Programming.
5-
Among them, we find grounder \gringo, solver \clasp, and
6-
combinations thereof within integrated systems \clingo\ and \iclingo.
7-
All these tools are written in \texttt{C++} and published under GNU General Public License(s)~\cite{GNUgpl}.
8-
Source packages as well as precompiled binaries for Linux and Windows are available at~\cite{potassco}.
9-
For building one of the tools from sources,
10-
please download the most recent source package and consult the
11-
included \code{README} or \code{INSTALL} text file, respectively.
12-
Please make sure that the platform to build on has the
4+
by now gathers a variety of tools for Answer Set Programming (ASP)
5+
\cite{ankolisc05a,baral03a,gelleo02a,lifschitz02a,martru99a,niemela99a},
6+
including grounder \gringo, solver \clasp, and
7+
combinations of them within integrated systems \clingo\ and \iclingo.
8+
Their common goal is to provide means enabling users
9+
to rapidly solve difficult computational problems in ASP.
10+
11+
\subsection{Download and Installation}
12+
13+
The Potassco tools \gringo, \clasp, \clingo, and \iclingo\
14+
are written in \texttt{C++} and published under GNU General Public License(s)~\cite{GNUgpl}.
15+
Source packages as well as precompiled binaries for Linux and Windows
16+
are available at~\cite{potassco}.
17+
For building some of the tools from sources,
18+
please download the most recent source package, consult the
19+
included \code{README} % or \code{INSTALL} text file, respectively.
20+
file,
21+
and make sure that the machine to build on has all
1322
required software installed.
14-
If you nonetheless encounter problems in the building process,
15-
please use the potassco mailing list
16-
17-
or consult the supporting pages at \href{http://potassco.sourceforge.net}{potassco.sourceforge.net}.
23+
If you still encounter problems in the building process,
24+
please use the Potassco mailing list
25+
26+
\href{mailto:[email protected]}{\texttt{[email protected]}}
27+
28+
\noindent
29+
or consult the support pages at~\cite{potassco}.
1830

1931
After downloading (and possibly building) a tool,
2032
one can check whether everything works fine by invoking the tool
2133
with flag \code{--version} (to get version information) or
2234
with flag \code{--help} (to see the available command line options).
2335
For instance, assuming that a binary called \gringo\ is in the path
24-
(similarly, with the other tools),
36+
(similarly with the other tools),
2537
the following command line calls should be responded by \gringo:
2638
%
2739
\begin{lstlisting}[numbers=none]
2840
gringo --version
2941
gringo --help
3042
\end{lstlisting}
31-
If grounder \gringo, solver \clasp, as well as integrated systems
32-
\clingo\ and \iclingo\ are all available,
33-
one usually provides the file names of input text files to either
34-
\gringo, \clingo, or \iclingo, while the output of \gringo\ is
35-
typically piped into \clasp.
43+
Note that \gringo, \clasp, \clingo, and \iclingo\
44+
run on the command line (Linux shell, Windows command prompt, or the like).
45+
To facilitate invoking them, their binaries can be ``installed''
46+
simply by putting them into some directory in the system path.
47+
% If grounder \gringo, solver \clasp, as well as integrated systems
48+
% \clingo\ and \iclingo\ are all available,
49+
In an invocation,
50+
one usually provides the file names of input (text) files
51+
as arguments to either \gringo, \clingo, or \iclingo,
52+
while the output of \gringo\ is typically piped into \clasp.
3653
Thus, the standard invocation schemes are as follows:
3754
\begin{lstlisting}[numbers=none]
3855
gringo [ options | files ] | clasp [ options | number ]
3956
clingo [ options | files | number ]
4057
iclingo [ options | files | number ]
4158
\end{lstlisting}
42-
Note that a numerical argument provided to either \clasp, \clingo, or \iclingo\
59+
% Note that
60+
A numerical argument provided to either \clasp, \clingo, or \iclingo\
4361
determines the maximum number of answer sets to be computed,
44-
where \code{0} stands for ``compute all answer sets.''
62+
where \code{0} % stands for
63+
means ``compute all answer sets.''
4564
By default, only one answer set is computed (if it exists).
4665

66+
\subsection{Outline}
67+
4768
This guide introduces the fundamentals of using
4869
\gringo, \clasp, \clingo, and \iclingo.
49-
In particular, it tries to enable the reader to benefit from them
50-
by significantly reducing the ``time to solution'' on difficult problems.
51-
The outline is as follows.
52-
In Section~\ref{sec:quickstart},
53-
an introductory example is given
54-
that serves both as guideline on how to model problems using logic programs
55-
and also as an example on how compact and concise the modeling language of \gringo\ is.
56-
The probably most important part for a user, Section~\ref{sec:language},
70+
In particular, it aims at enabling the reader to benefit from them
71+
by significantly reducing the ``time to solution'' on difficult computational problems.
72+
% The outline is as follows.
73+
To this end,
74+
Section~\ref{sec:quickstart}
75+
provides an introductory example
76+
that serves both as a prototype of problem modeling using logic programs
77+
and also as an appetizer of the modeling language of \gringo.
78+
The main part of this document, Section~\ref{sec:language},
5779
is dedicated to the input languages of our tools,
58-
where the joint input language of \gringo\ and \clingo\
59-
claims the main share (later on, it is extended by \iclingo).
60-
For illustrating the application of our tools,
61-
three well-known example problems are solved in Section~\ref{sec:examples}.
80+
where Section~\ref{subsec:lang:gringo}
81+
details the joint input language of \gringo\ and \clingo.
82+
In Section~\ref{subsec:lang:iclingo}, it is extended with
83+
incremental directives of \iclingo.
84+
The input language of \clasp\ is discussed only briefly in Section~\ref{subsec:lang:clasp},
85+
as it matches the numerical output format of \gringo\ and
86+
is not supposed to be written directly by a user.
87+
For %illustrating the application of our tools,
88+
further illustration,
89+
Section~\ref{sec:examples} describes how three well-known example problems
90+
can be solved with our tools.
6291
Practical aspects are also in the focus of Section~\ref{sec:options} and~\ref{sec:error:warn},
6392
where we elaborate and give some hints on the available command line options
64-
as well as input-related errors and warnings that may be reported.
65-
During the guide we forgo most of the theoretical background in favor
66-
of small intuitive examples and informal descriptions.
93+
as well as input-related errors and warnings. % that may be reported.
94+
We conclude with a summary in Section~\ref{sec:future}.
95+
6796
%For a more theoretical background, the interested reader is referred
6897
%to Appendix~\ref{sec:background} where technical details are covered.
6998

@@ -74,13 +103,19 @@ \section{Introduction}\label{sec:introduction}
74103
lists the most prominent differences to our tools.
75104
Otherwise, \gringo, \clingo, and \iclingo\ should accept most inputs recognized by \lparse,
76105
while the input of solver \clasp\ can also be generated by \lparse\ instead of \gringo.
77-
Throughout this guide, we provide quite a number of examples.
106+
Throughout this document, we provide illustrative examples.
78107
Many of them can actually be run, and instructions on how to accomplish this
79108
(or sometimes meta-remarks)
80109
are provided in margin boxes, where an occurrence of ``\code{\char`\\}''
81-
usually means that a text line broken for space reasons is actually continuous.
110+
usually means that text in a command line, broken for space reasons, is actually continuous.
111+
For the moment,
112+
we omit a self-contained description of the formal semantics of ASP,
113+
and Appendix~\ref{sec:background} currently provides some references
114+
to the literature only; we plan to complete this part in the next version
115+
of this guide.
116+
82117
After all these preliminaries, it is time to start our guided tour
83-
through Potassco~\cite{potassco}.
118+
through the main Potassco~\cite{potassco} tools.
84119
We hope that you will find it enjoyable and helpful!
85120

86121
%%% Local Variables:

macro.tex

+9-4
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,14 @@
4040

4141
% More formatting
4242

43-
\lstset{numbers=left,numberblanklines=false,basicstyle=\ttfamily,xleftmargin=10pt}
44-
\addtolength{\oddsidemargin}{-0.25\marginparwidth}
43+
\lstset{numbers=left,numberblanklines=false,basicstyle=\ttfamily,xleftmargin=0pt}
44+
\addtolength{\oddsidemargin}{-0.5\marginparwidth}
4545

4646
% look whether commentssidepar exists
4747
%\ifx\@commentsidepar\@empty
48-
\newcommand{\marginlabel}[1]{\marginpar{\hspace*{-1.75mm}%
49-
\fbox{\parbox[t]{1.76\marginparwidth}{\footnotesize #1}}}}
48+
\newcommand{\marginlabel}[1]{\marginpar{\hspace*{-1.5mm}%\hspace*{-1.75mm}%
49+
\fbox{\parbox[t]{%1.76
50+
2.3\marginparwidth}{\footnotesize #1}}}}
5051
%\else
5152
%\newcommand{\marginlabel}[1]{\commentsidepar{\hspace*{-1.75mm}%
5253
% \fbox{\parbox[t]{1.76\marginparwidth}{\footnotesize #1}}}}
@@ -67,3 +68,7 @@
6768
% this macro is kinda ugly but the only way I found to workaround warnings
6869
\def\attach{\textattachfile[color=1 0 0]}
6970

71+
%%% Local Variables:
72+
%%% mode: latex
73+
%%% TeX-master: "guide"
74+
%%% End:

0 commit comments

Comments
 (0)