MyNixOS website logo
Description

Higher order logic.

This package implements a higher order logic kernel with OpenTheory support.

The hol package

The hol package is a Haskell library that implements a higher order logic kernel. It can read proof files in OpenTheory format, and includes a pretty-printer compatible with the standard theory library.

This software is released under the MIT License.

Install

Installing the hol package requires cabal:

git clone https://github.com/gilith/hol.git
cd hol
cabal install --enable-tests

Test

Use cabal to run the test suite:

cabal test

Run

The hol package contains an executable called hol-pkg, which is run as follows:

Usage: hol-pkg INPUT
where INPUT is one of the following forms:
  FILE.art     : a proof article file
  FILE.thy     : a theory package file
  NAME-VERSION : a specific version of an installed theory package
  NAME ...     : the latest installed version of a list of packages

The hol-pkg program reads the INPUT to generate a set of theorems, which are pretty-printed to standard output together with the symbols they contain. For example,

hol-pkg unit

reads the latest installed version of the unit theory package to generate a set of 5 theorems, resulting in the following output:

3 type operators: (->) bool unit
6 constants: (=) (!) (==>) (?) (?!) ()
5 theorems:
  |- !v. v = ()
  |- !f g. f = g
  |- !e. ?fn. fn () = e
  |- !e. ?!fn. fn () = e
  |- !p. p () ==> !x. p x

Profile

Before starting, make sure the GHC system and the GHC text, transformers and parsec libraries are installed with profiling support. On a Debian system the following command installs them:

 apt-get install ghc-prof libghc-text-prof libghc-transformers-prof libghc-parsec3-prof

Next use cabal to install the other dependent libraries with profiling support:

cabal sandbox init
cabal configure --enable-library-profiling --enable-profiling --enable-benchmarks
cabal install --only-dependencies --enable-library-profiling

Build the hol package library and benchmark program:

cabal configure --enable-library-profiling --enable-profiling --enable-benchmarks
cabal build

Use the opentheory tool to create a benchmark file:

 opentheory info --article -o base.art base

Then use cabal to run the benchmark:

cabal bench

The time and memory allocation profile of the program can be viewed in text format:

less hol-profile.prof

Alternatively the memory allocation profile can be viewed as a graph:

hp2ps -e8in -c hol-profile.hp
ps2pdf hol-profile.ps
xpdf hol-profile.pdf
Metadata

Version

1.4

License

Executables (1)

  • bin/hol-pkg

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