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.
AllSolutions
This module 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.
AnsiCodes
Library for formatted output on terminals
Assertion
This module defines the datatype and operations for the Curry module tester "currytest".
CHR
A representation of CHR rules in Curry, an interpreter for CHR rules based on the refined operational semantics of Duck et al. (ICLP 2004), and a compiler into CHR(Prolog).
CLP.FD
Library for finite domain constraint solving.
CLPB
This library provides a Boolean Constraint Solver based on BDDs.
CLPFD
Library for finite domain constraint solving.
The general structure of a specification of an FD problem is as follows:
CLPR
Library for constraint programming with arithmetic constraints over reals.
CSV
Library for reading/writing files in CSV format. Files in CSV (comma separated values) format can be imported and exported by most spreadsheed and database applications.
Char
Library with some useful functions on characters.
Combinatorial
A collection of common non-deterministic and/or combinatorial operations. Many operations are intended to operate on sets. The representation of these sets is not hidden; rather sets are represented as lists. Ideally these lists contains no duplicate elements and the order of their elements cannot be observed. In practice, these conditions are not enforced.
Debug
This library contains some useful operation for debugging programs.
Directory
Library for accessing the directory structure of the underlying operating system.
Distribution
This module contains functions to obtain information concerning the current distribution of the Curry implementation, e.g., compiler version, load paths, front end.
Either
Library with some useful operations for the Either
data type.
ErrorState
A combination of Error and state monad like ErrorT State
in Haskell.
FileGoodies
A collection of useful operations when dealing with files.
FilePath
This library is a direct port of the Haskell library System.FilePath of Neil Mitchell.
Findall
Library with some operations for encapsulating search.
Note that some of these operations are not fully declarative,
i.e., the results depend on the order of evaluation and program rules.
There are newer and better approaches the encpasulate search,
in particular, set functions (see module SetFunctions
),
which should be used.
Float
A collection of operations on floating point numbers.
Format
The library provides some operations to format values of basic
data types with arbitrary flags similarly to the printf
statement of C.
Function
This module provides some utility functions for function application.
FunctionInversion
This module provides some utility functions for inverting functions.
GUI
This library contains definitions and functions to implement graphical user interfaces for Curry programs. It is based on Tcl/Tk and its basic ideas are described in detail in this paper
GetOpt
This Module is a modified version of the Module System.Console.GetOpt by Sven Panne from the ghc-base package it has been adapted for Curry by Bjoern Peemoeller
Global
Library for handling global entities. A global entity has a name declared in the program. Its value can be accessed and modified by IO actions. Furthermore, global entities can be declared as persistent so that their values are stored across different program executions.
GlobalVariable
Library for handling global variables. A global variable has a name declared in the program. Its value (a data term possibly containing free variables) can be accessed and modified by IO actions.
IO
Library for IO operations like reading and writing files that are not already contained in the prelude.
IOExts
Library with some useful extensions to the IO monad.
Integer
A collection of common operations on integer numbers.
Most operations make no assumption on the precision of integers.
Operation bitNot
is necessarily an exception.
JavaScript
A library to represent JavaScript programs.
List
Library with some useful operations on lists.
Maybe
Library with some useful functions on the Maybe
datatype.
NamedSocket
Library to support network programming with sockets that are addressed
by symbolic names. In contrast to raw sockets (see library
Socket
), this library uses the Curry Port Name Server
to provide sockets that are addressed by symbolic names
rather than numbers.
Parser
Library with functional logic parser combinators.
PlProfileData
Library to access profile data of the Prolog system
Ports
Library for distributed programming with ports. This paper contains a description of the basic ideas behind this library.
Prelude
The standard prelude of Curry. All top-level functions defined in this module are always available in any Curry program.
Pretty
This library provides pretty printing combinators.
The interface is that of
Daan Leijen's library
linear-time, bounded implementation
by Olaf Chitil.
Note that the implementation of fill
and fillBreak
is not linear-time bounded
Support of ANSI escape codes for formatting and colorisation of documents
in text terminals (see https://en.wikipedia.org/wiki/ANSIescapecode)
Profile
Preliminary library to support profiling.
Prolog
A library defining a representation for Prolog programs together with a simple pretty printer. It does not cover all aspects of Prolog but might be useful for applications generating Prolog programs.
PropertyFile
A library to read and update files containing properties in the usual
equational syntax, i.e., a property is defined by a line of the form
prop=value
where prop
starts with a letter.
All other lines (e.g., blank lines or lines starting with #
are
considered as comment lines and are ignored.
Read
Library with some functions for reading special tokens.
ReadNumeric
Library with some functions for reading and converting numeric tokens.
ReadShowTerm
Library for converting ground terms to strings and vice versa.
RegExp
A library to defined and match regular expressions. This library is used to translated integrated code in the form of POSIX extended regular expressions into Curry programs.
SetFunctions
This module contains an implementation of set functions. The general idea of set functions is described in:
ShowS
This library provides a type and combinators for show functions using functional lists.
Socket
Library to support network programming with sockets.
In standard applications, the server side uses the operations
listenOn
and socketAccept
to provide some service
on a socket, and the client side uses the operation
connectToSocket
to request a service.
System
Library to access parts of the system environment.
Test.EasyCheck
EasyCheck is a library for automated, property-based testing of
Curry programs. The ideas behind EasyCheck are described in
this paper
The tool currycheck
automatically executes tests defined with
this library. EasyCheck supports the definition of unit tests
(also for I/O operations) and property tests parameterized
over some arguments.
Test.EasyCheckExec
EasyCheck is a library for automated, property-based testing of Curry programs. The ideas behind EasyCheck are described in this paper This module implements the operations to actually execute the tests.
Test.Prop
This module defines the interface of properties that can be checked
with the tool currycheck
, an automatic property-based test tool
based on the EasyCheck library.
The ideas behind EasyCheck are described in
this paper
The tool currycheck
automatically executes tests of properties defined
in this library. CurryCheck supports the definition of unit tests
(also for I/O operations) and property tests parameterized
over some arguments.
Time
Library for handling date and time information.
Unsafe
Library containing unsafe operations. These operations should be carefully used (e.g., for testing or debugging). These operations should not be used in application programs!
Array
Implementation of Arrays with Braun Trees. Conceptually, Braun trees are always infinite. Consequently, there is no test on emptiness.
Dequeue
An implementation of double-ended queues supporting access at both ends in constant amortized time.
FiniteMap
A finite map is an efficient purely functional data structure
to store a mapping from keys to values.
In order to store the mapping efficiently, an irreflexive(!) order predicate
has to be given, i.e., the order predicate le
should not satisfy
(le x x)
for some key x
.
GraphInductive
Library for inductive graphs (port of a Haskell library by Martin Erwig).
Random
Library for pseudo-random number generation in Curry.
RedBlackTree
Library with an implementation of red-black trees:
Serves as the base for both TableRBT and SetRBT
All the operations on trees are generic, i.e., one has to provide
two explicit order predicates ("lessThan
" and "eq
"below)
on elements.
Rewriting.Substitution
Library for representation of substitutions on first-order terms.
Rewriting.Term
Library for representation of first-order terms.
Rewriting.Unification
Library for unification on first-order terms.
Rewriting.UnificationSpec
Library for specifying the unification on first-order terms.
SCC
Computing strongly connected components
SearchTree
This library defines a representation of a search space as a tree and various search strategies on this tree. This module implements strong encapsulation as discussed in the JFLP'04 paper.
SearchTreeGenerators
This library implements some operations to generate search trees for various data types.
SearchTreeTraversal
Implements additional traversals on search trees.
SetRBT
Library with an implementation of sets as red-black trees.
Sort
A collection of useful functions for sorting and comparing characters, strings, and lists.
TableRBT
Library with an implementation of tables as red-black trees:
A table is a finite mapping from keys to values.
All the operations on tables are generic, i.e., one has to provide
an explicit order predicate ("cmp
" below) on elements.
Each inner node in the red-black tree contains a key-value association.
Traversal
Library to support lightweight generic traversals through tree-structured data. See here for a description of the library.
ValueSequence
This library defines a data structure for sequence of values.
It is used in search trees (module SearchTree
) as well as in
set functions (module SetFunctions
).
Using sequence of values (rather than standard lists of values)
is necessary to get the behavior of set functions
w.r.t. finite failures right, as described in the paper
Database
Library for accessing and storing data in databases. The contents of a database is represented in this library as dynamic predicates that are defined by facts than can change over time and can be persistently stored. All functions in this library distinguishes between queries that access the database and transactions that manipulates data in the database. Transactions have a monadic structure. Both queries and transactions can be executed as I/O actions. However, arbitrary I/O actions cannot be embedded in transactions.
Database.CDBI.Connection
This module defines basis data types and functions for accessing database systems using SQL. Currently, only SQLite3 is supported, but this is easy to extend. It also provides execution of SQL-Queries with types. Allowed datatypes for these queries are defined and the conversion to standard SQL-Queries is provided.
Database.CDBI.Criteria
This module provides datatypes, constructor functions and translation functions to specify SQL criteria including options(group-by, having, order-by)
Database.CDBI.Description
Module contains basic datatypes representing a relational data model and designed to provide type safety when working with databases (via CDBI).
Database.CDBI.ER
This is the main CDBI-module. It provides datatypes and functions to do Database-Queries working with Entities (ER-Model)
Database.CDBI.QueryTypes
This module contains datatype declarations, constructor functions selectors and translation functions for complex select queries in particular for those selecting (1 to 5) single columns.
Dynamic
Library for dynamic predicates. This paper contains a description of the basic ideas behind this library.
KeyDB
This module provides a general interface for databases (persistent predicates) where each entry consists of a key and an info part. The key is an integer and the info is arbitrary. All functions are parameterized with a dynamic predicate that takes an integer key as a first parameter.
KeyDatabase
This module provides a general interface for databases (persistent predicates) where each entry consists of a key and an info part. The key is an integer and the info is arbitrary. All functions are parameterized with a dynamic predicate that takes an integer key as a first parameter.
KeyDatabaseSQLite
This module provides a general interface for databases (persistent predicates) where each entry consists of a key and an info part. The key is an integer and the info is arbitrary. All functions are parameterized with a dynamic predicate that takes an integer key as a first parameter.
Bootstrap3Style
This library contains some operations to generate web pages rendered with Bootstrap
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
Library for HTML and CGI programming. This paper contains a description of the basic ideas behind this library.
HtmlParser
This module contains a very simple parser for HTML documents.
Mail
This library contains functions for sending emails. The implementation might need to be adapted to the local environment.
Markdown
Library to translate markdown documents into HTML or LaTeX. The slightly restricted subset of the markdown syntax recognized by this implementation is documented in this page.
URL
Library for dealing with URLs (Uniform Resource Locators).
WUI
A library to support the type-oriented construction of Web User Interfaces (WUIs).
XML
Library for processing XML data.
XmlConv
Provides type-based combinators to construct XML converters. Arbitrary XML data can be represented as algebraic datatypes and vice versa. See here for a description of this library.
AbstractCurry.Build
This library provides some useful operations to write programs that generate AbstractCurry programs in a more compact and readable way.
AbstractCurry.Files
This library defines various I/O actions to read Curry programs and transform them into the AbstractCurry representation and to write AbstractCurry files.
AbstractCurry.Pretty
Pretty-printing of AbstractCurry.
AbstractCurry.Select
This library provides some useful operations to select components in AbstractCurry programs, i.e., it provides a collection of selector functions for AbstractCurry.
AbstractCurry.Transform
This library provides transformation and update operations
on AbstractCurry programs.
Since the transformations are defined recursively on structured types,
they are useful to construct specific transformations on AbstractCurry
programs.
In particular, this library contains the transformation
renameCurryModule
to rename an AbstractCurry module.
AbstractCurry.Types
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.
CurryStringClassifier
The Curry string classifier is a simple tool to process strings containing Curry source code. The source string is classified into the following categories:
FlatCurry.Annotated.Goodies
This library provides selector functions, test and update operations as well as some useful auxiliary functions for FlatCurry data terms. Most of the provided functions are based on general transformation functions that replace constructors with user-defined functions. For recursive datatypes the transformations are defined inductively over the term structure. This is quite usual for transformations on FlatCurry terms, so the provided functions can be used to implement specific transformations without having to explicitly state the recursion. Essentially, the tedious part of such transformations - descend in fairly complex term structures - is abstracted away, which hopefully makes the code more clear and brief.
FlatCurry.Annotated.Pretty
This library provides pretty-printers for AnnotatedFlatCurry modules and all substructures (e.g., expressions). Note that annotations are ignored for pretty-printing.
FlatCurry.Annotated.TypeInference
Library to annotate the expressions of a FlatCurry program with type information.
FlatCurry.Annotated.TypeSubst
Type substitutions on type-annotated AnnotatedFlatCurry
FlatCurry.Annotated.Types
This library contains a version of FlatCurry's abstract syntax tree which can be annotated with arbitrary information due to a polymorphic type parameter. For instance, this could be used to annotate function declarations and expressions with their corresponding type.
FlatCurry.Compact
This module contains functions to reduce the size of FlatCurry programs by combining the main module and all imports into a single program that contains only the functions directly or indirectly called from a set of main functions.
FlatCurry.Files
This library supports meta-programming, i.e., the manipulation of Curry programs in Curry. This library defines I/O actions
FlatCurry.FlexRigid
This library provides a function to compute the rigid/flex status of a FlatCurry expression (right-hand side of a function definition).
FlatCurry.Goodies
This library provides selector functions, test and update operations as well as some useful auxiliary functions for FlatCurry data terms. Most of the provided functions are based on general transformation functions that replace constructors with user-defined functions. For recursive datatypes the transformations are defined inductively over the term structure. This is quite usual for transformations on FlatCurry terms, so the provided functions can be used to implement specific transformations without having to explicitly state the recursion. Essentially, the tedious part of such transformations - descend in fairly complex term structures - is abstracted away, which hopefully makes the code more clear and brief.
FlatCurry.Pretty
This library provides pretty-printers for FlatCurry modules and all substructures (e.g., expressions).
FlatCurry.Read
This library defines operations to read a FlatCurry programs or interfaces together with all its imported modules in the current load path.
FlatCurry.Show
This library contains operations to transform FlatCurry programs into string representations, either in a FlatCurry format or in a Curry-like syntax.
FlatCurry.Types
This library supports meta-programming, i.e., the manipulation of Curry programs in Curry. For this purpose, the library contains definitions of data types for the representation of so-called FlatCurry programs.
FlatCurry.XML
This library contains functions to convert FlatCurry programs into corresponding XML expressions and vice versa. This can be used to store Curry programs in a way independent of a Curry system or to use a Curry system, like PAKCS, as back end by other functional logic programming systems.
Operation is deterministic, i.e., defined by exclusive rules and depend only on deterministic operations | ||
Operation might be non-deterministic, i.e., it is defined by overlapping rules or depend on non-deterministic operations |