PAKCS Libraries
PAKCS: System Libraries
Here is the collection of libraries contained in the
distribution of
PAKCS.
Most of these libraries have been implemented during the development
of larger Curry applications. If you have suggestions for
changes/improvements or if you want to contribute your own library,
please contact Michael Hanus.
General libraries:
- prelude:
This is the standard prelude, i.e., the main library which is added
to every Curry program.
- AllSolutions:
This library contains a collection of functions for
obtaining lists of solutions to constraints.
These operations are useful to encapsulate
non-deterministic operations between I/O actions in
order to connects the worlds of logic and functional programming
and to avoid non-determinism failures on the I/O level.
- Assertion:
This library defines the datatype and functions for the
Curry module tester "currytest".
- Char:
This library contains some useful functions on characters.
- CLPFD:
This library supports constraint programming with
finite domain constraints.
- CLPR:
This library supports constraint programming with
arithmetic constraints over real numbers.
- Combinatorial:
This library contains a collection of common non-deterministic
and/or combinatorial operations.
- CSV:
This library supports reading/writing files in CSV
(comma separated values) format that can be imported and exported
by most spreadsheed and database applications.
- DaVinci:
This library supports the visualization of graphs by the
daVinci graph drawing tool.
- Directory:
This library supports the access to the directory structure of the
underlying operating system.
- Dynamic:
This library supports the manipulation of dynamic predicates,
i.e., predicates that are defined by facts than can change over
time and can be persistently stored.
The ideas of this library are described in
this paper.
- Float:
A collection of operations on floating point numbers.
- Integer:
A collection of common operations on integer numbers.
- IO:
This library contains IO operations, like reading and writing files,
that are not already contained in the prelude.
- IOExts:
This library contains some useful extensions to the IO monad,
in particular, the implementation of a global state.
- List:
This library contains some useful operations on lists which are not
contained in the standard prelude.
- Maybe:
This library contains some useful operations on the Maybe type which are not
contained in the standard prelude.
- Parser:
This library defines (functional logic) parser combinators
to support a simple implementation of parsers in Curry.
It is adapted from Rafael Caballero and Francisco J. Lopez-Fraguas:
A Functional Logic Perspective of Parsing,
Proc. FLOPS'99, Springer LNCS 1722, pp. 85-99, 1999
- Ports:
This library supports the development of concurrent and
distributed applications in Curry by defining ports
for sending and receiving messages, possibly containing
logical variables. A detailed description
of the idea and use of ports can be found
here.
- Read:
This library defines some functions for reading special tokens
(naturals, integers, hexadecimal numbers) from strings.
- ReadShowTerm:
This library contains functions for converting ground data terms
to strings and vice versa.
- System:
This library supports the access to parts of the system environment,
like the current date and time, environment variables,
system calls etc.
- Time:
This library contains definitions and functions to
handle date and time information.
- Tk:
This library contains definitions and functions to
implement graphical user interfaces for Curry programs.
It is based on Tcl/Tk and described in detail
here.
- Unsafe:
This library contains unsafe operations which should not be used.
Data structures and algorithms:
- Dequeue:
An implementation of double-ended queues supporting access at both
ends in constant amortized time.
- Random:
This library provides operations for generating pseudo-random
number sequences.
- SetRBT:
This library provides an efficient implementation of sets
as red-black trees. The implementation is generic in the types
of elements and the set operations require an ordering predicate on elements.
The library also contains a generic sort function
with complexity O(n*log(n)) based on insertion into red-black trees.
- Sort:
A collection of useful functions for sorting and comparing
characters, strings, and lists.
- TableRBT:
This library provides an efficient implementation of tables
(i.e., finite mappings from keys to values) as red-black trees.
The implementation is generic in the types of keys and values
and the table operations require an ordering predicate on keys.
Libraries for web applications:
- CategorizedHtmlList:
This library provides functions to categorize a list of entities
into a HTML page with an index access (e.g., "A-Z") to these entities.
- HTML:
This library supports HTML and CGI programming, i.e.,
the generation of (dynamic) web pages. A detailed description
of this library and its basic ideas can be found
here.
- HTML_Parser:
This library contains a parser for HTML documents.
It does not perform any syntax checks but returns
only a generic representation according to the definition of
HTML documents provided in the library
HTML.
- URL:
This library contains functions related to URLs,
in particular, downloading of documents accessible by a URL.
- XML:
Library for processing data in XML format.
It contains a definition of a datatype for representing
XML terms and a parser and pretty printing for converting
strings into such XML terms and vice versa.
Libraries for meta-programming:
- AbsCurry:
This library contains a definition of an abstract representation
of Curry programs in Curry. It is only included for backward
compatibility and should not be used.
Use the library AbstractCurry instead.
- AbsCurryIO:
This library supports functions to read Curry program in the
old AbsCurry representation (based on reading files in the
new AbstractCurry format).
- AbstractCurry:
This library contains a definition for representing Curry programs
in Curry and an I/O action to read Curry programs and
transform them into this abstract representation.
- AbstractCurryPrinter:
This library contains a pretty printer for AbstractCurry programs
in order to show an AbstractCurry program in standard Curry syntax.
- CurryStringClassifier:
This library contains a simple tool to process strings containing
Curry source code in order to perform simple manipulations of source programs
(e.g., adding type signatures, removing comments).
- Flat:
This library supports meta-programming, i.e., the manipulation of
Curry programs in Curry. For this purpose, the library contains
definitions of datatypes for the representation of so-called
FlatCurry programs and an I/O action to read Curry programs
and transform them into this representation.
Remark:
This library has been revised to the library FlatCurry.
In the near future, it will not be further supported.
- FlatTools:
This library extends the library Flat for meta-programming.
It contains the definition of a show function for a string representation
of FlatCurry programs, a function for showing FlatCurry expressions in
(almost) Curry syntax, and an I/O action for storing a FlatCurry program into
an .flc file (which can be further compiled by the Curry2Prolog
compiler, compare the PAKCS User Manual).
Remark:
This library has been revised to the library FlatCurryTools.
In the near future, it will not be further supported.
- FlatCurry:
This library supports meta-programming, i.e., the manipulation of
Curry programs in Curry. For this purpose, the library contains
definitions of datatypes for the representation of so-called
FlatCurry programs and an I/O action to read Curry programs
and transform them into this representation.
Remark:
This library is a revised version of the library Flat,
i.e., the representation of FlatCurry programs is improved
to simplify the implementation of meta-programming tools
(interpreter, compiler, analyzer etc.).
In the near future, only this representation will be further
supported.
- FlatCurryTools:
This library extends the library FlatCurry for meta-programming.
It contains the definition of a show function for a string representation
of FlatCurry programs, a function for showing FlatCurry expressions in
(almost) Curry syntax, and an I/O action for storing a FlatCurry program into
an .flc file (which can be further compiled by the Curry2Prolog
compiler, compare the PAKCS User Manual).
- FlatXML:
This library contains functions to
convert FlatCurry programs into XML terms and vice versa.
A detailed specification of the XML format used here can be found in
http://www.informatik.uni-kiel.de/~curry/flat/.
Back to Homepage of PAKCS
Michael Hanus