g2: Haskell symbolic execution engine.

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain] [Publish]

A Haskell symbolic execution engine. For details, please see: https://github.com/BillHallahan/G2

[Skip to Readme]


Change log None available
Dependencies array (>= && <=, base (>=4.8 && <5), bytestring (>= && <=, Cabal (>= && <=, concurrent-extra (>=0.7), containers (==0.5.*), directory (>= && <=, extra (>=1.6.14 && <=1.6.17), filepath (==, g2, ghc (==8.2.2), ghc-paths (==0.1.*), hashable (>= && <=, hpc (>= && <0.6.1), HTTP (>=4000.3.0 && <4001.0), liquid-fixpoint (>=, liquidhaskell (==, MissingH (>= && <1.5), mtl (==2.2.*), parsec (==3.1.*), process (>=1 && <1.7), reducers (==3.12.*), regex-base (==0.93.*), regex-compat (==0.95.*), split (==0.2.3.*), template-haskell (==, temporary-rc (==1.2.*), text (==, time (>=1.6 && <=1.9.3), unordered-containers (==0.2.*) [details]
License BSD-3-Clause
Author William Hallahan, Anton Xue
Maintainer william.hallahan@yale.edu
Category Formal Methods, Symbolic Computation
Source repo head: git clone https://github.com/BillHallahan/G2.git
Uploaded by WilliamHallahan at 2019-06-28T23:40:40Z



Maintainer's Corner

For package maintainers and hackage trustees

Readme for g2-

[back to package description]

G2 Haskell Symbolic Execution Engine


G2 performs lazy symbolic execution of Haskell programs to detect state reachability. It is capable of generating assertion failure counterexamples and solving for higher-order functions.



  1. Install GHC 8.2.2 (other GHC 8 versions might also work)
  2. Install Z3
  3. Either:

a) Pull the Custom Haskell Standard Library into ~/.g2 by running bash base_setup.sh

b) Manually pull the base library. Add a file to the G2 folder, called g2.cfg that contains: base = /path/to/custom/library

Command line:


cabal run G2 ./tests/Samples/Peano.hs add


cabal run G2 -- --liquid ./tests/Liquid/Peano.hs --liquid-func add