Skip to content

bfpg/sf.bfpg.org

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

Tools for Software Foundations

Software Foundations is a course developed by Benjamin C Pierce and others, and made freely available. It teaches:

  • Mechanised theorem proving using Coq.
  • A broad introduction to Programming Language Theory, completely formalised in Coq.

This site augments the System Requirements section of the course, with links to all the tools you need, and some simple instructions, so you can get into the interesting stuff quickly.

You should go read the course Preface now, and then come back here to set up the tools you'll need.

This site was made by members of the Brisbane Functional Programming Group, for a workshop at YOW! Lambda Jam 2015. We hope to maintain it for as long as we find it interesting.

Generic instructions

Unless you really want to start from scratch, you probably just want to head straight on to the platform-specific recommendations. Come back here if we don't cover your platform, or if you want to better understand what you're installing.

To follow the course, you will need:

  • Coq, version 8.4.

    Coq tends to make breaking changes between point releases, so stick with the version on which Software Foundations was developed. You may take the most recent patch-level of that version, of course.

    You'll need this regardless of which interactive environment you choose below.

  • An interactive environment. Realistically, this is the only way to build non-trivial proofs in Coq.

    We are aware of these options:

    • Proof General, version 4.2, with GNU Emacs version 23.2 or later.

      This is what we use and recommend. It is stable, mature, and reasonably easy to install.

    • CoqIDE, which is part of the Coq distribution. On some platforms, such as Linux and FreeBSD, CoqIDE might be packaged separately.

      This might seem to be the path of least resistance, but you'll soon find yourself wanting a more powerful editor. CoqIDE might not be as reliable as Proof General.

    • Coquille, a vim-pathogen plugin for Vim.

      We don't have much experience with Coquille. It appears to be the newest of these options, but we can't comment on its reliability or functionality.

  • The Software Foundations course material. You may:

  • The Coq documentation. Optional, but recommended, especially:

Making the tools work together

The interactive environments all need to find the coqtop program from the Coq 8.4 distribution, so set your PATH environment variable accordingly.

To use Proof General with Emacs, you'll need to load generic/proof-site.el from the Proof General distribution, by one of the following methods:

  • Adding a line to your .emacs.d/init.el:

    (load "path/to/ProofGeneral-4.2/generic/proof-site.el")

  • Adding a command-line option when you start Emacs:

    emacs --load path/to/ProofGeneral-4.2/generic/proof-site.el

Platform-specific recommendations

These are our recommendations for some common platforms.

We previously provided bundles for Mac and Windows, but have since removed them since they had become rather dated. The documentation for how we originally built the bundles is still available.

Mac OS X

For Mac OS X, we previously provided a bundle that contained everything you needed. You would now need to build your own.

  • sf-mac-2015-05-18.dmg
  • sf-mac-2015-05-18.dmg.sha256sum
  • sf-mac-2015-05-18.dmg.sig

Unpack the DMG, then run the emacs script in the top directory. This will open Emacs with Proof General on the first chapter of Software Foundations. When you finish a chapter, you might find the make script useful for compiling your code so it can be loaded in the next chapter.

The scripts probably won't do everything you'll need. Use them to see how the tools work together, and adapt them to your purpose.

You should now read below to learn the basics of driving Proof General.

Microsoft Windows

For Windows, we previously provided a bundle that contained everything you needed. You would now need to build your own.

  • sf-windows-2015-05-03.zip
  • sf-windows-2015-05-03.zip.sha256sum
  • sf-windows-2015-05-03.zip.sig

Unpack the ZIP, then run emacs.bat in the top directory. This will open Emacs with Proof General on the first chapter of Software Foundations. When you finish a chapter, you might find make.bat useful for compiling your code so it can be loaded in the next chapter.

The .bat files probably won't do everything you'll need. Use them to see how the tools work together, and adapt them to your purpose.

You should now read below to learn the basics of driving Proof General.

Debian and Ubuntu Linux

This should work on Ubuntu Linux 14.04 LTS, Debian Jessie, and more recent versions.

sudo apt-get install git proofgeneral coq
git clone git@github.com:bfpg/software-foundations.git
cd software-foundations/sf
proofgeneral Basics.v

Fedora Linux

This should work on Fedora 19 and more recent.

sudo yum install git emacs-proofgeneral coq
git clone git@github.com:bfpg/software-foundations.git
cd software-foundations/sf
proofgeneral Basics.v

Docker

A Docker image has been prepared for the workshop. It contains Coq, Proof General and the Software Foundations sources, and launches straight into Basics.v when run.

docker pull frasertweedale/sf
docker run --name sf -it frasertweedale/sf

For more information about using the Docker image refer to its documentation.

Working with Emacs and Proof General

There is an Emacs reference card. The Getting Help section might be especially useful. There is also a reference manual.

Proof General has a reference manual. You'll mainly be interested in the script processing commands.

About

How to get set up for a Software Foundations workshop

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published