Benchmark Suite
===============

This directory contains a collection of benchmark programs
for the KiCS2 compiler. All benchmarks can be executed
by the script "showbench" from the parent directory.

First-order functional programming
----------------------------------

  * ReverseUser: naive reverse on user-defined lists
  * Reverse: naive reverse on built-in lists
  * Tak: highly recursive function on natural numbers
  * TakPeano: like Tak but with user-defined numbers in Peano representation

Higher-order functional programming
-----------------------------------

  * ReverseHO: linear reverse with higher-order functions
  * ReverseBuiltin: linear reverse from the Prelude
  * Primes: compute prime numbers via sieve of Eratosthenes
  * PrimesPeano: like Primes but with user-defined numbers in Peano representation
    and user-defined lists
  * PrimesBuiltin: like Primes but with built-in higher-order functions and lists
  * Queens: compute number of safe positions of queens
  * QueensUser: like Queens but with user-defined lists

Non-deterministic programming
-----------------------------

  * PermSort: sort a list by enumerating all permutations
  * PermSortPeano: like PermSort but with Peano numbers
  * NDNums: Complete search strategies: operation that nondeterministically
    enumerates all natural numbers
  * ShareNonDet: Sharing: permutation sort applied to big primes to
    demonstrate sharing over nondeterminism

Logic variables
---------------

  * Half: compute the half of a number in Peano representation by adding an
    unknown number to itself

Unification
-----------

  * Last: compute the last element of a list by solving a list equation
  * RegExp: "grep" a pattern in a long string by a nondeterministic specification
    of pattern matching

Functional patterns
-------------------

  * LastFunPats: definition of the last function
  * PaliFunPats: definition of the palindrome property
  * ExpVarFunPats: computing variables occurring in arithmetic expressions
  * ExpSimpFunPats: simplifying arithmetic expressions

Set functions
-------------

to be implemented