Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Xzact-LangNew to Visual Studio Code? Get it now.
Xzact-Lang

Xzact-Lang

Xzact Language

|
4 installs
| (0) | Free
Language support for Xzact — the formal English programming language that compiles to native code and generates compliance artifacts automatically.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

XZACT for Visual Studio Code

Language support for XZACT — the general-purpose compiled programming language with formal English syntax that compiles to native code via C transpilation and generates compliance artifacts automatically as a byproduct of compilation.

What's New in v0.4.0

  • Logical operators: and also, or else — highlighted as control flow
  • For-each loops: For each item in list — native iteration over lists
  • Loop control: stop repeating (break), skip to next repeat (continue)
  • Decrement: decrement variable by N
  • Multi-argument functions: given param1 of type X and param2 of type Y
  • List set-at-index: set list at index to value
  • Character from code point: character from 65 → "A"
  • Windows PowerShell fix: Build/Run commands now use cmd /c to avoid UTF-16 encoding corruption
  • Compiler auto-detection: Finds xzactc.exe in sibling xact-compiler/examples/ directory
  • 14 new snippets: for-each, logical operators, break/continue, decrement, multi-arg functions, countdown loop, and more

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)
  • Logical operators: and also, or else (purple, bold)
  • Loop control: stop repeating, skip to next repeat (red)
  • 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

Snippets

35+ snippets covering all sentence forms. Type a prefix and press Tab:

Prefix Expands to
let-int Integer variable declaration
let-text Text variable declaration
if-block If statement with block body
if-else If-Otherwise block
while While loop
to-do Void function with parameter
to-get Returning function with parameter
to-do-multi Void function with multiple parameters
to-get-multi Returning function with multiple parameters
for-each-list For-each loop over a list
and-also Logical AND condition
or-else Logical OR condition
break Stop repeating (break)
continue Skip to next repeat (continue)
decrement Decrement a variable
countdown Countdown loop with decrement
char-from Character from ASCII code point
set-at Set list element at index
cli-program CLI program template with argument handling
xzact-program Basic program template

Commands

Command Keybinding Description
XZACT: Build Ctrl+Shift+B Compile .xzact → .c → native binary
XZACT: Run Ctrl+Shift+R Build and execute
XZACT: Check Quality — Emit generated C source
XZACT: Show Artifacts — Open the artifact dashboard panel

Artifact Dashboard

Open the XZACT: Show Artifacts panel to see six tabs of compliance output:

  1. Summary — requirement counts, quality score, safety invariants
  2. Traceability — Requirements Traceability Matrix (RTM)
  3. Quality — INCOSE 8-pass quality scores
  4. Test — Auto-generated test stubs
  5. Safety — MUST invariant proof records
  6. IR — Generated C source

Theme

Includes "XZACT Dark" — a theme optimized for XZACT's formal English syntax with distinct modal verb coloring and v0.4.0 scopes for logical operators and loop control.

Setup

Windows (Quick Start)

cd C:\path\to\xact-compiler\examples

# Build the compiler from pre-generated C source (one-time)
gcc -O2 -o xzactc.exe xzactc_bin.c

# Compile and run any .xzact file
cmd /c ".\xzactc.exe hello.xzact > hello.c"
gcc -O2 -o hello.exe hello.c
.\hello.exe

Linux / macOS

cd xact-compiler/examples

# Build the compiler (one-time)
gcc -O2 -o xzactc xzactc_bin.c

# Compile and run
./xzactc hello.xzact > hello.c
gcc -O2 -o hello hello.c
./hello

Extension Installation

Install from .vsix:

code --install-extension Xzact-Lang-0.4.0.vsix

Or use the PowerShell install script:

.\install.ps1

Extension Settings

Setting Default Description
xzact.compilerPath (auto) Path to xzactc binary. Auto-detects sibling xact-compiler/examples/
xzact.backend c Code generation backend (c or llvm)
xzact.pythonPath python3 Python interpreter for the language server
xzact.qualityLevel normal Quality engine strictness

File Extensions

The extension activates for .xzact and .xact files.

Compilation Pipeline

.xzact source → xzactc (self-hosted parser) → C source → GCC → native binary

The compiler is itself written in XZACT and achieves a self-hosting fixed point (gen2 = gen3).

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft