An open API service indexing awesome lists of open source software.

https://github.com/viperproject/vpr-mode

Viper mode for emacs
https://github.com/viperproject/vpr-mode

Last synced: over 1 year ago
JSON representation

Viper mode for emacs

Awesome Lists containing this project

README

          

* Viper mode for Emacs
[[https://www.pm.inf.ethz.ch/research/viper.html][Viper]] language support for Emacs.

* Dependencies

- Z3 (tested with versions 4.8.7 and 4.12.1)
- Boogie (for using [[https://github.com/viperproject/carbon][carbon]] as a backend)
- [[https://github.com/viperproject/viperserver][ViperServer]]

* Installation

This package is under heavy development and does not support all Viper features. Thus, it is not published in any package archives.

To install it, one must clone the repository:

#+BEGIN_SRC shell
git clone git@github.com:viperproject/vpr-mode.git
#+END_SRC

Then, add the following lines in your init.el.

#+BEGIN_SRC emacs-lisp
(add-to-list 'load-path "")

(use-package vpr-mode)
#+END_SRC

Last the following variables must be set

#+begin_src emacs-lisp
(setq vpr-z3-path "")
(setq vpr-viperserver-path "/path/to/viperserver.jar")
(setq vpr-boogie-path "") ; required only for running viper with carbon
#+end_src

If you want the verification to happen on save:

#+BEGIN_SRC emacs-lisp
(add-hook 'after-save-hook #'vpr-verify)
#+END_SRC

Note that the name of the mode is ~vpr-mode~ to not clash with the built-in [[https://www.emacswiki.org/emacs/ViperMode][viper-mode]].
* Usage

Current keybindings are:

- ~C-c C-c~: Start Viper server
- ~C-c C-v~: Verify this file
- ~C-c C-x~: Stop Viper server
- ~C-c C-b~: Alternate the backend between silicon and carbon
- ~C-c C-a~: Edit the arguments given to Viper through a construction buffer

* Who do I talk to?
This project is maintained by [[https://github.com/Dspil][Dionisios Spiliopoulos]]