Build:
======

A gcc compiler with Ada support and and SWI prolog are required to build
SPARK-GPL. The package was build successfully on Ubuntu 10.04/x86_64 (tested
with gcc version 4.4.3, Ubuntu 4.4.3-4ubuntu5 and SWI-Prolog version 5.10.0).

To build the distribution, download it from libre.adacore.com, unpack the
archive and the patch set, change to the SPARK-GPL top-level directory and
apply the patch set:

 $ cd <SPARK_GPL_SOURCE_DIR>
 $ for f in <PATCHSET_DIR>/*.patch; do patch -p1 < $f; done
 $ make PROLOG=swi

The results are placed into the 'bin' directory of the source distribution.

Known Limitations:
==================

- A simplifier build with SWI on Linux cannot handle .vcg (and probably other
  files) with DOS line termination, as contained in the Tokeneer archive. Files
  have to be converted to UNIX line terminators before running sparksimp.

- In my tests on Tokeneer, the simplifier built with SWI was about 15-20%
  slower than the binary contained in the binary distribution of SPARK-GPL

- SIV files generated with the self-built binaries are somewhat less readable,
  as SWI prolog writes out terms without adding additional whitespace (e.g.
  around operators).

Test:
=====

To test the simplifier, the Tokeneer distribution was used (check out AdaCore's
website):

1. Unpack tis_release2.zip and convert to UNIX line terminators
   (e.g. use the 'todos' binary contained in 'tofrodos')
   $ unzip tis_release2.zip
   $ find tis_release2 -type f | xargs todos -d
2. Remove all .siv files
   $ find tis_release2 -name '*.siv' -type f | xargs rm -f
3. Run simplifier (make sure the correct binaries are in the PATH)
   $ cd tis_release2 && sparksimp -sargs -plain
4. Create proof summary
   $ pogs -i -p

This procedure was repeated using the binary distribution and the self-built
binaries (make sure PATH is set accordingly). The resulting proof summaries
were identically for both builds. One would expect the SIV files to be
identical, too. This, however, is not the case, as SWI Prolog seems to write
out terms in a different way than SICstus does (missing spaces around
operators).
