XZACT for Visual Studio Code
Language support for XZACT — the formal English programming language that compiles to native code via LLVM and generates compliance artifacts automatically as a byproduct of compilation.
Features
Syntax Highlighting
Full TextMate grammar for all XZACT sentence forms with distinct colors for:
- Modal verbs:
shall (blue), must (red), should (yellow), may (green)
- Entity declarations, action definitions, relationships, enumerations
- Illegal pronouns (highlighted as errors per LEX-001)
- Type keywords:
text, whole number, decimal number, true/false, date, time
Intelligent Completions
- Sentence-form templates for all 10+ forms (entity, action, conditional, iteration, etc.)
- Type name completions after
of type
- Declared entity and action name suggestions
- Attribute completions after entity references
Real-Time Diagnostics (LSP)
The built-in language server runs the XZACT compiler pipeline on every keystroke:
- LEX-001: Pronoun rejection (compile-time error)
- SEM-001–012: Semantic analysis (undefined entities, type mismatches, unused declarations)
- INCOSE quality passes: ATOM, COMP, CONS, AMB, VERIF, SING, TRACE, COV
- Modal verb semantics (what
shall vs must vs should vs may mean)
- Entity attributes and relationships
- Action definitions with modal context
- Ambiguous term explanations (AMB-001)
Go to Definition
- Jump from entity references to declarations
- Jump from action compositions to definitions
- Jump from enum usage to enum declarations
Document Symbols
- Outline view shows entities (with attributes as children), actions, and enums
Artifact Dashboard
Open the XZACT: Show Artifacts panel to see six tabs of compliance output:
- Summary — requirement counts, quality score, safety invariants
- Traceability — Requirements Traceability Matrix (RTM)
- Quality — INCOSE 8-pass quality scores
- Test — Auto-generated test stubs
- Safety — MUST invariant proof records
- IR — Generated C source or LLVM IR
Snippets
21 snippets covering all sentence forms. Type entity, action, if, when, must-never, while, enum, etc. and press Tab.
Commands
| Command |
Keybinding |
Description |
| XZACT: Build |
Ctrl+Shift+B |
Compile to native binary + artifacts |
| XZACT: Run |
Ctrl+Shift+R |
Compile and execute |
| XZACT: Check Quality |
— |
Quality analysis only (no codegen) |
| XZACT: Show Artifacts |
— |
Open the artifact dashboard panel |
Setup
Prerequisites
- Python 3.10+ with
pygls and lsprotocol installed
- The XZACT compiler (
xact Python package)
Installation
# Install LSP dependencies
pip install pygls lsprotocol
# Set the compiler path (if not a sibling directory)
# In VS Code settings:
# "xzact.compilerPath": "/path/to/xact-compiler"
Extension Settings
| Setting |
Default |
Description |
xzact.pythonPath |
python3 |
Python interpreter for the language server |
xzact.compilerPath |
(auto) |
Path to the xact-compiler directory |
xzact.backend |
llvm |
Code generation backend (llvm or c) |
xzact.qualityLevel |
normal |
Quality engine strictness |
File Extensions
The extension activates for .xzact and .xact files.
Theme
Includes "XZACT Dark" — a theme optimized for XZACT's formal English syntax with distinct modal verb coloring.
| |