# PAKCS Resources

### Summary

This page is intended for newcomers to PAKCS, the Portland Aachen Kiel Curry System. It contains links to distribution sites, to local documentation, to examples, and a short overview of the use of the compiler interpreter.

### Links

#### Downloading and installing PAKCS

> This section tells you where to find the distribution of PAKCS, what to download and what is needed on the host computer. If you are reading this file, you may have already downloaded and installed the PAKCS distribution. Thus, this section may not be of interest to you.
> Q: Where can I run PAKCS?
> A: PAKCS runs under Linux, Solaris, and Mac OS X.
> Q: What software do I need to install to run PAKCS?
> A: The host computer must have installed SICStus Prolog or SWI-Prolog.
> Q: Where can I download PAKCS?
> A: There is an official site at the University of Kiel. There is also a mirror site at Portland State.
> Q: What should I download to run PAKCS?
> A: Look for "Download PAKCS" in a PAKCS website. The distribution consists of a gzipped tar archive of about 3 - 5 Mb (depending on your architecture). It includes all you need to run PAKCS plus several libraries, documentation and examples.
> Q: Do I need a license to run PAKCS?
> A: No. However, you may need a license for both Solaris and SICStus Prolog.
> Q: How do I install PAKCS?
> A: Open the downloaded archive using the Unix command `tar zxf ~/pakcs_....tar.gz`. This will create a directory called `pakcs`. Follow the instructions contained in the file `INSTALL.html` in this directory.

#### Running the first program

> This section tells you how to execute your first Curry program. It assumes a successful installation of PAKCS. PAKCS is installed by a script that also tests the correctness of the installation.
> - Verify that the compiler/interpreter and other tools are in your PATH environment variable. Issue the `which` command to the shell prompt as shown below:

>           [antoy@redstar test]$ which pakcs
>           ~/local/pakcs/bin/pakcs
>           [antoy@redstar test]$

>   You should see a line such as `~/local/pakcs/bin/pakcs`. The exact content is not important. If you see a line containing `no pakcs in ...` you must extend your PATH environment variable. Many details depend on your computer system and you should ask them to your system administrator.

> - Create a file which name extension "`curry`" for example `first.curry`. The file contains the following single line of code:

>           test n = take n [0,2..]

> - Start the compiler/interpreter as follows:

>           [antoy@redstar test]$ pakcs

>   Several lines are output, including the PAKCS logo till you see

>           Type ":h" for help

>           Prelude>

>   "`Prelude>`" is the prompt you get when no file has been loaded yet. As suggested, you may try typing "`:h`" for a list of available commands, or you can load the Curry program you created.

> - Load your Curry program with the command "`:l`" followed by a file name, i.e. "`first`" in this example. It is not necessary to type the file extension "`.curry`":

>           Prelude> :l first

>   Several line of informative messages are printed. No error or warning message should be generated for the above program. The prompt is changed to "`first>`", the name of the program you have just loaded.

> - Execute some function of your program. In this example, only one function by the name of `test` has been defined. This function take an argument which should be a non-negative integer. When the argument is n, the list of the first n (starting from 0) even number is printed. E.g.:

>           first> test 8
>           Result: [0,2,4,6,8,10,12,14] ?

>   The program is now waiting for your input. If you enter a semicolon followed by a carriage return, the program attempts to find another result for your input. In this case, there are no other results, thus you get the message "`No more solutions.`" and the prompt. If you enter carriage return, you get immediately the prompt.

> - At this point you can execute again some function of your program, load another file or quit by entering the command "`:q`".

#### Learning more

> This section contains links to both resource coming with the distribution and external resources for learning Curry and using PAKCS.

> Curry Report

> > This document precisely describes the Curry programming language. It is appropriate as a reference for all the technical aspects of the language, but it may be difficult for the beginner.

> PAKCS User Manual

> > This document describes the use of the PAKCS compiler/interpreter and the differences between the implementation and the Curry Report.

> Tutorial

> > This document, still incomplete at the time of this writing, is an introduction to the Curry programming language suitable for the beginner.

> Libraries

> > The PAKCS distribution comes with a collection of libraries for application programming. The documentation of these libraries is generated by the currydoc tool, which is optionally executed during the installation. It allows a developer to navigate the interfaces of the libraries.

> Examples

> > This document is an index to a collection of small examples contained in the standard distribution. They may be useful to get a sense of the Curry features and how they can be used.

> PAKCS Homepage

> > This site contains the current and latest distributions, links to several resources, information about developers and sponsors, etc.

> Curry Homepage

> > This site is the starting point of information about the programming language Curry of which PAKCS is the most advanced compiler/interpreter.

> CurryWiki

> > This site contains more information about Curry, tools for Curry, alternative implementations etc.

> FLP Patterns

> > This site contains a collection of Functional Logic Patterns, advanced programming solutions to recurring non-trivial problems. It may be interesting to more experienced developers.

> PNW 2001 ACM Context

> > Curry implementations of the set of problems of the Pacific NW Regional selection of the 2001 ACM programming context.

> CurryBrowser

> > This site describes CurryBrowser, a generic analysis environment for Curry implemented in Curry. CurryBrowser supports browsing through the program code of all modules of an application written in Curry. Each module can be shown in different formats (e.g., source code, interface, intermediate code) and, inside each module, various properties of functions defined in this module can be analyzed. This tool is already included in the distribution of PAKCS.

> CurryTest

> > This site describes CurryTest, a simple tool to write and run repeatable unit tests. This tool is already included in the distribution of PAKCS.

> COOSy

> > This site describes COOSy, the Curry Object Observation System, a lightweight approach for debugging Curry programs by observations. This tool is already included in the distribution of PAKCS.

Last updated: Fri May 23 11:37:57 CEST 2008