-
Notifications
You must be signed in to change notification settings - Fork 2
dev
Abdalrhman M Mohamed edited this page Jul 26, 2022
·
3 revisions
To setup the extension for first time use, run the following command:
./configure.sh
This will install Z3, Kind, the language server for Kind, the interpreter, and other dependencies. There are several development workflows depending on which component of the extension should be modified. The steps to follow after modifying each tool is mentioned below.
- Manually download and unzip the glibc and osx assets from the releases page of Z3.
- Copy glibc
z3
executable tolinux/z3
and osxz3
executable tomacos/z3
. - Remove the downloaded and unzipped assets.
- Follow the Package and Publish instructions to publish a new release of the extension.
- Manually download and extract the linux and macos assets from the releases page of Kind 2.
- Copy linux
kind2
executable tolinux/kind2
and macoskind2
executable tomacos/kind2
. - Remove the downloaded and extracted assets.
- Follow the Package and Publish instructions to publish a new release of the extension.
The most likely reasons for the extension to crash after updating kind2
are:
- A bug in the JSON printer of kind.
- A modification in the JSON printer that breaks the Java API JSON parser.
In either case, the following steps can help debug the error:
- Run both the VS Code client and server in debugging mode (TODO: add instructions link).
- Follow the steps that recreate the error/crash up until before the last step in the Extension Development Host instance of VS Code.
- Put a breakpoint in line 179 in
Result.java
. The breakpoint should be inkind2-language-server
VS Code workspace and notkind2-java-api
. To access the file fromkind2-language-server
VS Code workspace, click on any instance ofResult
inKind2LanguageServer.java
and pressF12
. - Execute the last step that reproduces the error/crash in the Extension Development Host instance of VS Code.
- The last step should trigger the breakpoint and cause debugger for
kind2-language-server
to pause execution in line 179 inResults.java
. The variablejson
should contain the JSON output of Kind. - Continue execution step-by-step until you find the line causing the problem or press continue button to let the program continue execution until an exception triggers the debugger to stop.
- Fix the error and follow the steps in the section below to update the extension (if the Java API is modified).
- Publish a new release of the API to Maven Central. Wait for the new release to appear in Maven Central website.
- Update the server's
build.gradle
file to use the new verion of the API. - Release a new version of the server on GitHub.
- Extract the new release to
kind-language-server
. The executable should be inkind2-language-server/bin/kind2-language-server
. - Follow the Package and Publish instructions to publish a new release of the extension.
- Release a new version of the server.
- Extract the new release to
kind-language-server
. The executable should be inkind2-language-server/bin/kind2-language-server
. - Follow the Package and Publish instructions to publish a new release of the extension.
- Run both the VS Code client and server in debugging mode.
- If the error is logical (i.e., not a crash/exception), put a breakpoint in the relevent line(s).
- Follow the steps that reproduces the error/crash in the Extension Development Host instance of VS Code.
- The breakpoint/exception should trigger the debugger to stop.
- Fix the error.
- Follow the Package and Publish instructions to publish a new release of the extension.
- Run only the VS Code client in debugging mode.
- If the error is logical (i.e., not a crash/exception), put a breakpoint in the relevent line(s).
- Follow the steps that reproduces the error/crash in the Extension Development Host instance of VS Code.
- The breakpoint/exception should trigger the debugger to stop.
- Fix the error.