Skip to content

xiaohe27/K-Spec-Gen

Repository files navigation

##Overview This is a project for automatically generating k specification from annotated java program, where the k specification is an input for k-program-verifier which can do program verification. Refer to docs/Annotation-Syntax.md for the syntax of the supported annotations.

###Two Modes of Usage

This software aims to be a service for programmers who want to do program verification using k framewrok, and therefore we've tried our best to present the service in a user-friendly way. We have provided an online interface (with syntax highlighting) for using the service in addition to the traditional command-line interface.

####Web-interface:

  1. Go to url http://k-spec-generator.herokuapp.com/

N.B. Due to the limitation of the free heroku service, the first time to open the url might be slower (5-10 seconds).

  1. Either select a pre-defined example from the top-center pop-up menu, or directly paste the annotated java program into the central textbox.

  2. Click the "Get K-SPEC" button and the generated k specification will be displayed in a new tab.

####Command-line interface:

  1. open the terminal in some directory.

  2. clone the repository from github and go to the root directory of the project.

git clone https://github.com/xiaohe27/K-Spec-Gen.git
cd K-Spec-Gen
  1. build the project via maven.

mvn package

  1. The generated executable is in the path:

<The-Path-To-Proj-Home>/KSpecGen/target/release/kspec-gen/kspec-gen/bin/

  1. If you add the path of the program "kspec-gen" to environment variable, then, it is easy to run it to generate k specification from java file:

kspec-gen <path-to-the-annotated-java-file-or-directory>

There are some simple descriptions about the current test cases in docs/Testing.md.

The project can be located in the github page.

About

Generate k-spec from annotated java file which can be used as the input of k verifier

Resources

Stars

Watchers

Forks

Packages

No packages published