Commit 8e88908b authored by Michael Hanus 's avatar Michael Hanus
Browse files

Documentation updated

parent edabf80a
......@@ -30,12 +30,17 @@ To generate an application, follow the steps below.
a relative file name will be relative to the place where
the cgi programs are stored.
4. Compile the generated programs by `make compile`.
4. Change into the generated directory containing all sources as a
Curry package, e.g., by `cd Blog`.
5. Configure the Makefile (variable WEBSERVERDIR) and execute
5. Install all required packages by `make install`.
6. Compile the generated programs by `make compile`.
7. Configure the Makefile (variable WEBSERVERDIR) and execute
`make deploy` to deploy the web application.
6. After the successful compilation, the application is executable
8. After the successful compilation, the application is executable
in a web browser by loading `<URL of web dir>/spicey.cgi`.
Note that the database is generated with the `cdbi` package.
......
......@@ -2,4 +2,7 @@ This directory contains some documention for the tool:
manual.tex:
A short description to be included in the main manual of the Curry system.
\ No newline at end of file
main.tex:
The manual as a stand-alone LaTeX file.
\documentclass[11pt,fleqn]{article}
\usepackage[T1]{fontenc}
\usepackage{latexsym}
\usepackage{url}
\usepackage{xspace}
\usepackage{graphicx}
\setlength{\textwidth}{16.5cm}
\setlength{\textheight}{23cm}
\renewcommand{\baselinestretch}{1.1}
\setlength{\topmargin}{-1cm}
\setlength{\oddsidemargin}{0cm}
\setlength{\evensidemargin}{0cm}
\setlength{\marginparwidth}{0.0cm}
\setlength{\marginparsep}{0.0cm}
\newlength{\figurewidth}
\setlength{\figurewidth}{\textwidth}
\addtolength{\figurewidth}{-0.4cm}
% font for program texts
\renewcommand{\tt}{\usefont{OT1}{cmtt}{m}{n}\selectfont}
\newcommand{\codefont}{\small\tt}
\usepackage{listings}
\lstset{aboveskip=1.5ex,
belowskip=1.5ex,
showstringspaces=false, % no special string space
mathescape=true,
flexiblecolumns=false,
xleftmargin=2ex,
basewidth=0.52em,
basicstyle=\small\ttfamily}
\lstset{literate={->}{{$\rightarrow{}\!\!\!$}}3
}
\lstnewenvironment{curry}{}{}
\lstnewenvironment{currynomath}{\lstset{mathescape=false}}{} % Curry w/o math
\newcommand{\listline}{\vrule width0pt depth1.75ex}
% program text in normal text
\newcommand{\code}[1]{\mbox{\codefont #1}}
% program text in normal text with apostrophs
\newcommand{\ccode}[1]{``\code{#1}''}
\newcommand{\pindex}[1]{\index{#1@{\tt #1}}} % program elements in index
\newcommand{\todo}[1]{\fbox{\sc To do: #1}}
\newcommand{\CYS}{Curry\xspace} % name of the Curry system described here
\newcommand{\cyshome}{\mbox{\textit{curryhome}}\xspace} % symbolic installation directory
\newcommand{\us}{\char95\xspace} % underscore
\begin{document}
\sloppy
\newcommand{\curryppdocs}{.}
\input{manual.tex}
% Bibliography
\begin{thebibliography}{10}
\bibitem{BrasselHanusMueller08PADL}
B.~Bra{\ss}el, M.~Hanus, and M.~M{\"u}ller.
\newblock High-level database programming in {Curry}.
\newblock In {\em Proc. of the Tenth International Symposium on Practical
Aspects of Declarative Languages (PADL'08)}, pages 316--332. Springer LNCS
4902, 2008.
\bibitem{HanusKoschnicke14TPLP}
M.~Hanus and S.~Koschnicke.
\newblock An {ER-based} framework for declarative web programming.
\newblock {\em Theory and Practice of Logic Programming}, 14(3):269--291, 2014.
\bibitem{HanusKrone17EPTCS}
M.~Hanus and J.~Krone.
\newblock A typeful integration of {SQL} into {Curry}.
\newblock In {\em Proceedings of the 24th International Workshop on Functional
and (Constraint) Logic Programming}, volume 234 of {\em Electronic
Proceedings in Theoretical Computer Science}, pages 104--119. Open Publishing
Association, 2017.
\end{thebibliography}
\end{document}
......@@ -15,8 +15,7 @@ inconsistent state of the database.
\subsection{Installation}
The actual implementation of Spicey is a package
managed by the Curry Package Manager CPM
(see also Section~\ref{sec-cpm}).
managed by the Curry Package Manager CPM.
Thus, to install the newest version of Spicey, use the following commands:
%
\begin{curry}
......@@ -45,7 +44,7 @@ and store it in some program file, e.g., \ccode{MyERD.curry}.
The directory \code{examples} in the package \code{spicey}\footnote{%
If you installed Spicey as described above,
the downloaded \code{spicey} package is located in the directory
\code{\$HOME/.cpm/app_packages/spicey}.}
\code{\$HOME/.cpm/app\us{}packages/spicey}.}
contains two examples for such ERD program files:
\begin{description}
\item[\code{BlogERD.curry}:]
......@@ -81,9 +80,16 @@ the web programs are stored.
In order to avoid such confusion, it might be better to specify
an absolute path name for the database file.
After the generation of this project (see the generated file
\code{README.txt} for information about the generated project structure),
one can compile the generated programs by
Spicey generates the web application as a Curry package in a new
directory. Thus, change into this directory (e.g., \code{cd $ERD$})
and install all required packages by the command
\begin{curry}
> make install
\end{curry}
%
The generated file \code{README.txt} contains some information
about the generated project structure.
One can compile the generated programs by
\begin{curry}
> make compile
\end{curry}
......@@ -104,8 +110,10 @@ in a web browser by selecting the URL \code{<URL of web dir>/spicey.cgi}.
The application generated by Spicey is a schematic initial implementation.
It provides an appropriate basic programming structure but
it can be extended in various ways.
In particular, one can also use embedded SQL statements when
further developing the Curry code, since the underlying database
In particular, one can also use embedded SQL statements
(see \cite{HanusKrone17EPTCS} for details)
when further developing the Curry code, since the underlying database
access operations are generated with the \code{cdbi} package.
The syntax and use of such embedded SQL statements
is described in the Curry preprocessor.
is sketched in \cite{HanusKrone17EPTCS} and
described in the Curry preprocessor.
......@@ -21,6 +21,10 @@
"src-dir": "examples",
"modules": [ "TestSpicey" ]
},
"documentation": {
"src-dir": "docs",
"main": "main.tex"
},
"source": {
"git": "https://git.ps.informatik.uni-kiel.de/curry-packages/spicey.git",
"tag": "$version"
......
......@@ -16,7 +16,7 @@ import Spicey.Scaffolding
systemBanner :: String
systemBanner =
let bannerText = "Spicey Web Framework (Version " ++ packageVersion ++
" of 04/01/18)"
" of 05/01/18)"
bannerLine = take (length bannerText) (repeat '-')
in bannerLine ++ "\n" ++ bannerText ++ "\n" ++ bannerLine
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment