42 lines
1.1 KiB
Ruby
42 lines
1.1 KiB
Ruby
|
class Prover9 < Formula
|
||
|
desc "Automated theorem prover for first-order and equational logic"
|
||
|
homepage "https://www.cs.unm.edu/~mccune/prover9/"
|
||
|
url "https://www.cs.unm.edu/~mccune/prover9/download/LADR-2009-11A.tar.gz"
|
||
|
version "2009-11A"
|
||
|
sha256 "c32bed5807000c0b7161c276e50d9ca0af0cb248df2c1affb2f6fc02471b51d0"
|
||
|
|
||
|
def install
|
||
|
ENV.deparallelize
|
||
|
system "make", "all"
|
||
|
bin.install "bin/prover9", "bin/mace4"
|
||
|
man1.install Dir["manpages/*.1"]
|
||
|
end
|
||
|
|
||
|
test do
|
||
|
(testpath/"x2.in").write <<~EOS
|
||
|
formulas(sos).
|
||
|
e * x = x.
|
||
|
x' * x = e.
|
||
|
(x * y) * z = x * (y * z).
|
||
|
x * x = e.
|
||
|
end_of_list.
|
||
|
formulas(goals).
|
||
|
x * y = y * x.
|
||
|
end_of_list.
|
||
|
EOS
|
||
|
(testpath/"group2.in").write <<~EOS
|
||
|
assign(iterate_up_to, 12).
|
||
|
set(verbose).
|
||
|
formulas(theory).
|
||
|
all x all y all z ((x * y) * z = x * (y * z)).
|
||
|
exists e ((all x (e * x = x)) &
|
||
|
(all x exists y (y * x = e))).
|
||
|
exists a exists b (a * b != b * a).
|
||
|
end_of_list.
|
||
|
EOS
|
||
|
|
||
|
system bin/"prover9", "-f", testpath/"x2.in"
|
||
|
system bin/"mace4", "-f", testpath/"group2.in"
|
||
|
end
|
||
|
end
|