Obtaining and Installing ACL2

[Back to main page of Installation Guide.]

Table of Contents


ACL2 is more than just the executable image. You should obtain the standard books and a local copy of the documentation. Start here and we will take you through the whole process of obtaining and installing ACL2. First, create a directory in which to store ACL2 Version 3.4. We will call this directory dir. For example, dir might be /home/jones/acl2/v3-4.

NOTE: If you intend to obtain an incremental release (e.g. 2.9.4 as opposed to 2.9), please see the ACL2 News for instructions. Otherwise, continue reading here.

Begin by clicking on one of the following links.

The sources come with a books subdirectory (here for the latest non-incremental release) that you may find helpful in your proof development and programming with ACL2. The following two collections of books are not included with the sources. You can extract them in the books/ subdirectory of your ACL2 distribution; see the discussion on certifying books for information on using them.




Pre-built Binary Distributions

Visit the "Recent changes to this page" link on the ACL2 home page to see if there are other shortcuts available.


Obtaining the Sources: Unix, Mac OS X, and Linux

For a Unix, Mac OS X, or Linux system, obtain the sources and place them in directory dir as follows. Now proceed to Creating or Obtaining an Executable Image.


Obtaining the Sources: Other than Unix, Mac OS X, and Linux Systems

For a non-Unix (and non-Linux, non-Mac-OS-X) system, obtain the sources and place them in directory dir. The easiest way to do this is to fetch file http://www.cs.utexas.edu/users/moore/acl2/v3-4/distrib/acl2.tar.gz, and then extract using an appropriate tar utility. For example, for Windows systems you may be able to download a utility such as djtarnt.exe to be used as follows:
djtarnt.exe -x acl2.tar.gz
WARNING: At least one user experienced CR/LF issues when using WinZIP, but we have received the suggestion that people untarring with that utility should probably turn off smart cr/lf conversion.

You will find that the ACL2 distribution contains many files, subdirectories, sub-subdirectories, etc. We mean for you to copy over to your local connected directory the entire structure of files and subdirectories. Thus, when you have completed extracting from acl2.tar.gz, or fetching all files directly is done, your local connected directory should have a subdirectory named acl2-sources under which everything resides.

Now proceed to Creating or Obtaining an Executable Image.



Creating or Obtaining an Executable Image

The next step is to create an executable image. The common approach is to build that image from the sources you have already obtained. However, you may be able to take a short cut by downloading an ACL2 image, in which case you can skip ahead to Summary of Distribution. Otherwise you should click on one of the links just below. Choose the last option if you are using a Common Lisp on which you cannot save an image (e.g., a trial version of Allegro Common Lisp).

PLEASE NOTE: The available memory for ACL2 is determined by the underlying Common Lisp executable. If you need more memory, refer to your Common Lisp's instructions for building an executable.




Short Cut: Pre-Built ACL2 Images

The site http://www.cs.utexas.edu/users/moore/acl2/v3-4/distrib/images/Readme.html contains links to ACL2 executables and packages. Each -md5sum file was created using md5sum. We may add additional links from time to time.

Note that the Debian images may work with other Linux systems as well.

Now proceed to Using ACL2.



Building an Executable Image on a Unix, Mac OS X, or Linux System

We assume you have obtained ACL2 and placed it in directory dir, as described above. If you downloaded a pre-built ACL2 image, you may skip this section. Connect to dir as above and execute

cd acl2-sources
make LISP=xxx

where xxx is the command to run your local Common Lisp.

By default, if no LISP=xxx is specified, LISP=gcl is used. On our hosts, gcl is the name of GNU Common Lisp, which can be obtained as explained in the Requirements document.

This will create executable saved_acl2 in the acl2-sources directory.

The time taken to carry out this process depends on the host processor but may be only a few minutes for a fast processor. The size of the resulting binary image is dependent on which Lisp was used, but it may be in the vicinity of 17 megabytes.

This make works for the Common Lisps listed in Requirements document on systems we have tested. See the file acl2-sources/GNUmakefile for further details. If this make command does not work for you, please see the instructions for non-Unix/Linux systems below.

You can now skip to Using ACL2.




Building an Executable Image on Other than Unix, Mac OS X, and Linux Systems

Next we describe how to create a suitable binary image containing ACL2. If you are using a trial version of Allegro Common Lisp, then you may not be able to save an image. In that case, skip to Running Without Building an Executable Image.

See also Building an Executable Image on Some Particular Systems, in case you want to skip directly to the instructions in one of its subtopics.

Otherwise, proceed as follows.

Your Common Lisp should be one of those listed in Requirements document. Filenames below should default to the dir/acl2-sources directory, e.g., for GCL, connect to dir/acl2-sources before invoking GCL or, after entering GCL, do (si::chdir "dir/acl2-sources/").

  1. Remove file nsaved_acl2 if it exists.

  2. Start up Common Lisp in the acl2-sources directory and submit the following sequence of commands.
      ; Compile
      (load "init.lisp")
      (in-package "ACL2")
      (compile-acl2)
    
    The commands above will compile the ACL2 sources and create compiled object files on your acl2-sources subdirectory.

  3. Now exit your Common Lisp and invoke a fresh copy of it (mainly to avoid saving an image with the garbage created by the compilation process). Again arrange to connect to the acl2-sources subdirectory. In the fresh Lisp type:
      ; Initialization, first pass
      (load "init.lisp")
      (in-package "ACL2")
      (load-acl2)
      (initialize-acl2)
    
    This will load the new object files in the Lisp image and bootstrap ACL2 by reading and processing the source files. But the attempt at initialization will end in an error saying that it is impossible to finish because a certain file was compiled during the processing, thus dirtying the image yet again. (If however the attempt ends with an error during compilation of file TMP1.lisp, see the first troubleshooting tip below.)

  4. So now exit your Common Lisp and invoke a fresh copy of it (again arranging to connect to your acl2-sources subdirectory). Then, in the fresh Lisp type:
      ; Initialization, second pass
      (load "init.lisp")
      (in-package "ACL2")
      (save-acl2 (quote (initialize-acl2))
                 "saved_acl2")
    
    You have now saved an image. Exit Lisp now. Subsequent steps will put the image in the right place.

  5. Remove osaved_acl2 if it exists.

  6. IF saved_acl2 and saved_acl2.dxl both exist THEN: ELSE IF saved_acl2 exists THEN:

  7. Move nsaved_acl2 to saved_acl2.

  8. For Allegro Common Lisp, Versions 5.0 and later, nsaved_acl2.dxl should exist; move it to saved_acl2.dxl

  9. Make sure saved_acl2 is executable.



Building an Executable Image on Some Particular Systems

Subtopics of this section are as follows.


How to build/install ACL2 on GCL on Mac OS X

If you want to build/install ACL2 on Mac OS X, you may find it easier to do so on top of OpenMCL rather than GCL. Otherwise, see the directions for bulding GCL on Mac OS X. Then follow the usual installation instructions to obtain the ACL2 sources and build an executable image on a Unix/Linux system.


Special Case: Building an Executable Image on a Windows System using GCL

You may want to skip this section and instead read Instructions from Jared Davis for building ACL2 on Windows using mingw. Or, you may be able to download a pre-built ACL2 image for GCL/Windows instead of reading this section.

Otherwise here are steps to follow.

  1. FIRST get GCL running on your Windows system using ONE of the following two options. Note that GCL can be unhappy with spaces in filenames, so you should probably save the GCL distribution to a directory whose path is free of spaces.
  2. SECOND, create an appropriate GCL batch file. When we tried running the script gclm/bin/gclm.bat that came with gcl-cvs-20021014-mingw32 from the above ftp site, a separate window popped up, and with an error. Many ACL2 users prefer running in an emacs shell buffer. (We obtained emacs for Windows from ftp://ftp.gnu.org/gnu/windows/emacs/21.2/emacs-21.2-fullbin-i386.tar.gz.) The following modification of gclm.bat seemed to solve the problem (your pathnames may vary).
    @
    % do not delete this line %
    @ECHO off
    set cwd=%cd%
    path C:\gcl\gclm\mingw\bin;%PATH%
    C:\gcl\gclm\lib\gcl-2.6.1\unixport\saved_gcl.exe -dir C:/gcl/gclm/lib/gcl-2.6.1/unixport/ -libdir  C:/gcl/gclm/lib/gcl-2.6.1/ -eval "(setq si::*allow-gzipped-file* t)" %1 %2 %3 %4 %5 %6 %7 %8 %9
    
  3. THIRD, follow the instructions for non-Unix/Linux systems above, though the resulting file may be called saved_acl2.exe rather than saved_acl2.
  4. FINALLY, create a file acl2.bat as explained in http://www.cs.utexas.edu/users/moore/acl2/v3-4/distrib/images/Readme.html.

We hope that the above simply works. If you experience problems, the following hints may help.

TROUBLESHOOTING:




Instructions from Jared Davis for building ACL2 on Windows using mingw

We thank Jared Davis for providing the following instructions for Version_2.8, which we include verbatim and expect apply to future versions.
	      Building ACL2 on Windows from Scratch
   _____________________________________________________________

   Note: The disk space requirements are large.  Not including
   emacs, I had about 275 MB taken up by msys/mingw32/gcl/acl2
   during the build process.  You can probably use much less
   space by removing files after you use them, but I didn't
   bother to do that.

   Here are the steps I took:

   Downloaded emacs 21.3 full distribution and installed
   Downloaded msys 1.10.10, installed to c:\acl2
   Downloaded mingw 3.1.0-1, installed to c:\acl2\mingw
   Downloaded gcl 2.5.3, extracted to c:\acl2\mingw
   Downloaded acl2 2.8, extracted to c:\acl2\sources



   Compiling gcl:

     in msys:

       cd /acl2/ming2/gcl-2.5.3
       ./configure
       make
       make install



   Compiling acl2:

     copy "etags.exe" to /mingw/bin.  you can find this program
     in your emacs folder, under "bin".

     in msys:

       cd /sources
       make



   Certifying ACL2 books:
   This took 111 minutes on my Athlon 2500+

     in msys:

       cd /sources

       mv nsaved_acl2.gcl.exe saved_acl2.exe

       vim books/Makefile-generic, remove "nice" from this line:
	   ACL2=time nice ../../saved_acl2

       make certify-books ACL2=/sources/saved_acl2.exe




Running Without Building an Executable Image

The most convenient way to use ACL2 is first to install an executable image as described above for Unix/Linux and other platforms. However, in some cases this is not possible, for example if you are using a trial version of Allegro Common Lisp. In that case you should follow the steps below each time you want to start up ACL2.

We assume you have obtained ACL2 and placed it in directory dir, as described above for Unix/Linux or other platforms. (If you downloaded a pre-built ACL2 image, then you may skip this section.) Connect to subdirectory acl2-sources of dir, start up your Common Lisp, and compile by executing the following forms. This sequence of steps need only be performed once.

  (load "init.lisp")
  (in-package "ACL2")
  (compile-acl2)
Now each time you want to use ACL2, you need only execute the following forms after starting up Common Lisp in subdirectory acl2-sources of dir.
  (load "init.lisp")
  (in-package "ACL2")
  (load-acl2)
  (initialize-acl2)
Note. The resulting process includes the ACL2 documentation, and hence will probably be considerably larger (perhaps twice the size) than the result of running an executable image created as described above.

Now proceed to read more about Using ACL2.



Summary of Distribution

The distribution includes the following. A list of all files in acl2-sources may be found in the file all-files.txt in that directory.
Readme.html; This file
acl2-sources/
  LICENSE  ; GNU General Public License
  GNUmakefile ; For Unix/Linux make.
  TAGS     ; Handy for looking at source files with emacs
  *.lisp   ; ACL2 source files
  all-files.txt    ; List of all files in this directory and subdirectories
  books/   ; Examples, potentially useful in others' proofs.  See books/Readme.html.
  doc/     ; ACL2 documentation in various formats
  emacs/   ; Miscellaneous emacs and file utilities, especially emacs-acl2.el
  init.lisp; Useful for building the system
  interface/
    emacs/ ; Support for ACL2 "proof trees".  See interface/emacs/README.doc.
    infix/ ; ACL2 infix printer by Mike Smith.  See interface/infix/README.
  saved/   ; Empty directory for backing up copies during make; not important
acl2.tar.gz; gzip'd tar file containing all of acl2-sources/ (see below)
images/    ; Some gzip'd tar'd executables; see images/Readme.html
split/     ; The result of splitting up acl2.tar.gz; see split/Readme.html

The entire acl2.tar.gz is about 8 megabytes, which expands out to over 44 megabytes. Additional space is required to build an image, perhaps 40 to 170 megabytes or more depending on the Lisp, and to certify books.

[Back to Installation Guide.]