MyNixOS website logo
Description

Fast combinatorics.

Fast combinatorics code with a high level of safety guaranteed by writing it in ATS.

fast-combinatorics

Build Status

This is a library for fast combinatorics using ATS. As such, make sure a C compiler is installed. It may not work on windows, so if you run into bugs building this please open an issue.

Benchmarks

ComputationVersion (ATS/Haskell)Time
isPrime 2017ATS118.9 ns
isPrime 2017Haskell497.3 ns
φ(2016)ATS5.574 μs
φ(2016)Haskell177.3 μs
τ(3018)ATS7.962 μs
τ(3018)Haskell35.87 μs

Building

The Haskell library comes with the C bundled, however you may wish to build from source if you are hacking on the library. To that end, you can install stack, patsopt, and pats-filter and build with

 $ ./shake.hs

You will also likely want to install GHC as well as cabal.

Documentation

Using the ATS library

One of the nice things about a Haskell wrapper is that some of Haskell's tooling/libraries may be used. You may want to try the REPL:

 $ cabal new-repl

Using the Haskell library

You may wish to read the ATS source code for an indication of what sorts of things ATS allows us to prove things about our programs, particularly proofs of termination.

Metadata

Version

0.1.0.9

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows