Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/newca12/haskell-atp
Examples from John Harrison's "Handbook of Practical Logic and Automated Reasoning", ported to Haskell
https://github.com/newca12/haskell-atp
haskell-port logic
Last synced: 2 months ago
JSON representation
Examples from John Harrison's "Handbook of Practical Logic and Automated Reasoning", ported to Haskell
- Host: GitHub
- URL: https://github.com/newca12/haskell-atp
- Owner: newca12
- License: gpl-3.0
- Created: 2013-06-22T21:53:36.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2024-06-03T06:56:46.000Z (7 months ago)
- Last Synced: 2024-06-03T08:24:39.403Z (7 months ago)
- Topics: haskell-port, logic
- Language: Haskell
- Size: 2.08 MB
- Stars: 8
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# haskell-atp
## About ##
Port of the Objective Caml code supporting John Harrison's logic [textbook](http://www.cambridge.org/catalogue/catalogue.asp?isbn=9780521899574) Handbook of Practical Logic and Automated Reasoning to Haskell.The original code written by [Sean McLaughlin](https://github.com/seanmcl) need GHC 6.10.4
This repo contains sligth modifications and instructions to fit GHC upto 9.6.5## Build and use the atp binary ##
1. Install GHC and cabal-install via [GHCup](https://www.haskell.org/ghcup) or via [stack](https://docs.haskellstack.org/en/stable) + `stack install cabal-install`
2. Update your package database:cabal update
3. Get the required Haskell libraries:cabal install --lib directory hslogger utf8-string HUnit QuickCheck parsec syb
4. Build an executable
cabal install
5. Make sure ~/.cabal/bin is on your path. The atp executable resides there.
6. Try it !
```
user@dev:$ atp bmeson eq1
Welcome to Haskell ATP!
(∀ x y z. x * y * z = (x * y) * z) ∧
(∀ x. 1 * x = x) ∧ (∀ x. i(x) * x = 1) ⊃
(∀ x. x * i(x) = 1)
[19]
Computation time: 8.9304 sec
```## You can also use ghci ##
```
cabal repl
ghci> :l src/Main.lhs
ghci> :main resolution -f "(exists y. forall x. P(x, y)) ==> forall x. exists y. P(x, y)"
Welcome to Haskell ATP!
(∃ y. ∀ x. P(x, y)) ⊃ (∀ x. ∃ y. P(x, y))
()
Computation time: 0.0013 sec
```