-
Notifications
You must be signed in to change notification settings - Fork 40
Installing and Running VerCors
You can install VerCors by either using a release (recommended for beginners), or by building VerCors from its source code.
VerCors requires a java runtime environment (version 11 or later), as well as clang if you want support for C.
Currently we support debian-based systems; let us know if you need something else! Install the dependencies:
sudo apt install clang openjdk-11-jre Obtain the latest deb release of VerCors here, and install it by running:
sudo dpkg -i Vercors_x.y.z_all.debYou can for example obtain the dependencies through homebrew:
brew cask install javaThis should install the latest release of OpenJDK. Clang should already be installed through XCode.
Obtain the latest zip release of VerCors here and unzip it. You can find the run script for VerCors in the bin subdirectory.
You can obtain a java runtime environment e.g. here. Make sure that the environment variable JAVA_HOME points to wherever you unpack the JDK. clang can be obtained as part of the llvm toolchain here. Make sure that clang is added to the path.
Next, download the latest zip release of VerCors here and unzip it. You can find the batch script for VerCors in the bin subdirectory.
VerCors verifies programs that are annotated with JML-style specifications (the underlying theory uses separation logic with permission accounting). Details on the specification language can be found on the VerCors Wiki pages. Furthermore, a large collection of example programs can be found (and verified) in the ./examples directory.
The VerCors toolset can be used by running vercors --silicon <filepath>, with <filepath> the path of the (Java, C, or PVL) file to verify.
When building VerCors, you additionally need these dependencies:
- A Java Development Kit, version 11 or greater, either OpenJDK or Oracle.
- Git (on Windows you need Git Bash, see https://git-scm.com/downloads)
- Scala SBT, version 1.3.0 or greater (see http://www.scala-sbt.org for instructions)
- Clone the VerCors repository using
git clone https://github.com/utwente-fmt/vercors.gitand move into the cloned directory,cd vercors. - Run
sbt compileto compile VerCors. - Test whether the build was successful by running
./bin/vct --test=examples/manual --tool=silicon --lang=pvl,java --progress.
The last command tests the VerCors installation by verifying a large collection of examples (from the ./examples directory). This command should eventually report that all ? tests passed. There are also instructions for importing VerCors into either eclipse or IntelliJ IDEA here.
VerCors verifies programs that are annotated with JML-style specifications (the underlying theory uses separation logic with permission accounting). Details on the specification language can be found on the VerCors Wiki pages. Furthermore, a large collection of example programs can be found (and verified) in the ./examples directory.
The VerCors toolset can be used by running vercors --silicon <filepath>, with <filepath> the path of the (Java, C, or PVL) file to verify.
When writing a program in PVL, the Prototypal Verification Language of VerCors, syntax highlighting can be obtained in the following way:
VerCors provides syntax highlighting support for PVL in TextMate 2 (MacOS X) and Sublime Text (Linux and Windows) as a TextMate Bundle. The bundle is located at ./util/VercorsPVL.tmbundle. On MacOS X for TextMate 2 you can simply double click the .tmbundle file to install it. Sublime Text requires you to copy the bundle content to some directory:
- In Sublime Text, click on the
Preferences > Browse Packages…menu. - Create a new directory and name it
VercorsPVL. - Move the contents of
VercorsPVL.tmbundle(that is, the./Syntaxesdirectory) into the directory you just created. - Restart Sublime Text.
Visual Studio Code (VS Code) also has support for TextMate bundles to do syntax highlighting (VS Code runs on Windows, Linux and OSX). Click here for instructions on how to install this (this has not been tested however).
Tutorial
- Introduction
- Installing and Running VerCors
- Prototypal Verification Language
- Specification Syntax
- Permissions
- Termination
- Axiomatic Data Types
- Arrays and Pointers
- Parallel Blocks
- GPGPU Verification
- Atomics and Locks
- Predicates
- Inheritance
- Exceptions & Goto
- VeyMont
- Platform-Dependent Verification
- Advanced Concepts
- Help My Verification Fails
- Proof Brittleness and Countermeasures
- Unsupported Features
- Annex
- Case Studies
Developing for VerCors