2020-07-18 01:54:53 +00:00
|
|
|
class Acl2 < Formula
|
|
|
|
desc "The logic and programming language in which you can model computer systems"
|
|
|
|
homepage "https://www.cs.utexas.edu/users/moore/acl2/index.html"
|
|
|
|
url "https://github.com/acl2/acl2/archive/8.3.tar.gz"
|
|
|
|
sha256 "45eedddb36b2eff889f0dba2b96fc7a9b1cf23992fcfdf909bc179f116f2c5ea"
|
|
|
|
license "BSD-3-Clause"
|
|
|
|
|
2020-08-11 07:27:51 +00:00
|
|
|
bottle do
|
|
|
|
sha256 "fb689491e046319cd8ccf2133f8f0944feedb32f04785da0fb79f36da35dfb64" => :catalina
|
|
|
|
sha256 "fd941d803c5fba0fb4b421a03074344b37eed013e383b65bdae4082163b7331e" => :mojave
|
|
|
|
sha256 "b10ec2c8fabb4a01b443108c3ea27a36a565c1adf838291057dba418e8111a23" => :high_sierra
|
|
|
|
end
|
|
|
|
|
2020-07-18 01:54:53 +00:00
|
|
|
depends_on "sbcl"
|
|
|
|
|
|
|
|
def install
|
|
|
|
system "make",
|
|
|
|
"LISP=#{HOMEBREW_PREFIX}/bin/sbcl",
|
|
|
|
"ACL2=#{buildpath}/saved_acl2",
|
2020-07-20 10:42:05 +00:00
|
|
|
"USE_QUICKLISP=0",
|
2020-07-18 01:54:53 +00:00
|
|
|
"all", "basic"
|
|
|
|
system "make",
|
|
|
|
"LISP=#{HOMEBREW_PREFIX}/bin/sbcl",
|
|
|
|
"ACL2_PAR=p",
|
|
|
|
"ACL2=#{buildpath}/saved_acl2p",
|
2020-07-20 10:42:05 +00:00
|
|
|
"USE_QUICKLISP=0",
|
2020-07-18 01:54:53 +00:00
|
|
|
"all", "basic"
|
2020-07-23 09:45:02 +00:00
|
|
|
libexec.install Dir["*"]
|
2020-07-23 10:47:40 +00:00
|
|
|
|
2020-07-23 08:03:40 +00:00
|
|
|
(bin/"acl2").write <<~EOF
|
2020-07-18 01:54:53 +00:00
|
|
|
#!/bin/sh
|
2020-07-23 10:47:40 +00:00
|
|
|
export ACL2_SYSTEM_BOOKS='#{libexec}/books'
|
2020-07-23 09:45:02 +00:00
|
|
|
#{Formula["sbcl"].opt_bin}/sbcl --core '#{libexec}/saved_acl2.core' --userinit /dev/null --eval '(acl2::sbcl-restart)'
|
2020-07-18 01:54:53 +00:00
|
|
|
EOF
|
2020-07-23 08:03:40 +00:00
|
|
|
(bin/"acl2p").write <<~EOF
|
|
|
|
#!/bin/sh
|
2020-07-23 10:47:40 +00:00
|
|
|
export ACL2_SYSTEM_BOOKS='#{libexec}/books'
|
2020-07-23 09:45:02 +00:00
|
|
|
#{Formula["sbcl"].opt_bin}/sbcl --core '#{libexec}/saved_acl2p.core' --userinit /dev/null --eval '(acl2::sbcl-restart)'
|
2020-07-23 08:03:40 +00:00
|
|
|
EOF
|
2020-07-18 01:54:53 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
(testpath/"simple.lisp").write "(+ 2 2)"
|
|
|
|
output = shell_output("#{bin}/acl2 < #{testpath}/simple.lisp | grep 'ACL2 !>'")
|
|
|
|
assert_equal "ACL2 !>4\nACL2 !>Bye.", output.strip
|
|
|
|
end
|
|
|
|
end
|