Hakusan is a confluence tool for first-order term rewrite systems.

PREREQUISITE 

Install the following external tools:

  - Z3
    https://github.com/Z3Prover/

  - CeTA (version 3.5)
    http://cl-informatik.uibk.ac.at/isafor/

  - xsltproc

Then set PATH so that z3 and ceta are available.


HOW TO COMPILE

For instance, if you are using Debian/Ubuntu, type the following commands:

  sudo apt install ghc cabal-install
  make
  cp .../CeTA-3.5/examples/{cpf3HTML,lts}.xsl .

The produced file "hakusan" is the tool.

HOW TO USE

  ./hakusan <filename.ari>
     # outputs YES/NO and its proof/disproof.

  ./hakusan -cpf <filename.ari> 
     # outputs YES/NO and its certificate which CeTA can verify.

  ./hakusan -cpf <filename.ari> | tail -n +2 | xsltproc cpf3HTML.xsl -
     # transforms the certificate into a human-readable HTML.

  ./hakusan -smt .../z3 <filename.ari> 
     # -smt specifies a path to an SMT solver


./hakusan -h displays the usage.

HOW TO CERTIFY

  ./hakusan -cpf <filename.ari> | tail -n +2 > a.xml
  ceta a.xml
