This is a Visual Studio Code extension for working with .kyx files. It integrates with a language server to provide language features such as syntax highlighting, auto-completion, diagnostics, hover info, and proof checking via KeYmaeraX and Z3.
- Syntax highlighting for the KYX language
- Code diagnostics for syntax errors
- Auto-completion for KYX keywords, operators, and tactics
- Hover information and symbol outline
- Go to definition for archive entries and tactics
- Proof checking using KeYmaeraX and Z3
Follow these steps to run the extension locally.
git clone https://github.com/ProVE-Lab/vscode-kyx.git
cd vscode-kyxThis project requires typescript. If you haven't already, install this:
npm install -g typescriptInstall packages separately in both client/ and server/ directories:
cd client
npm install
cd ../server
npm installBefore using the proof checking feature, configure the following paths in your VS Code settings:
keymaerax-core.jar(KeYmaeraX)- Z3
To check the path to Z3, run this command:
which z3Steps:
-
Open the Command Palette:
- On macOS:
Cmd + Shift + P - On Windows/Linux:
Ctrl + Shift + P
- On macOS:
-
Type and select: Preferences: Open User Settings (JSON)
-
Add these lines in
settings.json, replacing with your actual paths:
"kyx.keymaeraPath": "/Users/yourname/path/to/keymaerax-core.jar",
"kyx.z3Path": "/usr/local/bin/z3"Open the project folder in VS Code.
Press:
Cmd + shift + B(Mac) orCtrl + shift + B(Windows/Linux)
This compiles both client and server code.
- Press
Cmd + shift + D(Mac) orCtrl + shift + D(Windows) to open the Run & Debug panel. - Click Launch Client.
- A new VS Code window will open — this is the Extension Development Host.
- You can now open or create
.kyxfiles to use the extension's features.
The short video below demonstrates how the Check Proof feature works inside VS Code:
