A universal, matrix-driven programming language and compiler architecture based on canonical Semantic/UAST representations.
msplc.exe accepts Semantic .se input and attempts to compile it with the real repository path:
ParseSemanticSE -> CompileMachine(x86_64/windows/win64) -> PE32+
There is no filename/module whitelist. Unsupported input is still attempted and fails with the real parser/backend error.
Run:
msplc.exe helpThe help command explains all commands, the fixed Windows x64 target, examples, exit codes, validation, and selfhosting.
msplc.exe input.se
msplc.exe input.se output.exe
msplc.exe compile input.se -o output.exe
msplc.exe check input.se
msplc.exe help
msplc.exe versionWith no output argument, foo.se becomes foo.exe.
msplc-selfhost.se is now approximately 104 KB and entirely readable text. It contains no appended JSON, base64, embedded EXE, compressed image, or binary seed block.
It contains one readable comment marker:
# msplc-selfhost-readable-v1
The source is validated by the normal SE parser first. In this bootstrap fixed-point mode the currently running compiler reproduces its own executable:
msplc.exe msplc-selfhost.se stage2.exe
stage2.exe msplc-selfhost.se stage3.exe
fc /b msplc.exe stage2.exe
fc /b stage2.exe stage3.exeOrdinary .se files never use this special mode; they go through ParseSemanticSE -> CompileMachine.
This is intentionally a bootstrap fixed point, not a claim that the whole Go implementation has already been re-expressed semantically inside msplc-selfhost.se.
https://github.com/SemanticProgrammingLanguage?tab=repositories
Semantic Programming Language represents programs independently of their original source language.
Source code is lowered into a canonical SemanticProgram and Universal Abstract Syntax Tree (UAST). The same semantic representation can then be validated, transformed, executed, transpiled, or compiled into a native executable.
Source code
↓
Frontend
↓
SemanticProgram / UAST
↓
Semantic transformations and contracts
↓
Native backend
↓
Executable
The reference implementation and bootstrap compiler are provided by the Go package Code-Transpiler.
Go module: github.com/tarekwasfy01/Code-Transpiler
Go package: codetranspiler
GUI: Semantic Programming Language.exe
CLI: sp / CodeTranspiler
Start the application without arguments:
& ".\Semantic Programming Language.exe"The GUI provides access to:
- source-code translation
- Semantic/UAST generation
.seand Semantic JSON processing- native compilation
- script execution
- language and target selection
- compiler capability information
- embedded bundle verification
The commands sp and CodeTranspiler are equivalent:
sp <command> [options]
CodeTranspiler <command> [options]
sp compile input.se -o input.exe
sp compile input.sp -o input.exe
sp compile input.json -o input.exeThe longer executable name can be used identically:
CodeTranspiler compile input.se -o input.exesp compile -source go -target native-x86_64-windows input.go -o program.exesp semantic-export -source go input.go -format se -o program.sesp semantic-validate program.se
sp semantic-info program.se
sp semantic-format program.se --readable -o readable.se
sp semantic-format program.se --compact -o compact.sesp transpile -from python -to go input.py -o output.go
sp transpile -from c -to rust input.c -o output.rs
sp semantic-transpile -target cpp program.se -o output.cppExperimental support for Semantic Modules. The Goal is to make packages from all implemented languages accesible by transpiling and decompiling packages from other languages. Modules can be added to the public module store via the website and github actions: https://www.semantic-programming-language.com/modules.html
CodeTranspiler.exe module import <source|module.se|module.spz>
CodeTranspiler.exe module import --language go <source.go>
CodeTranspiler.exe module list
CodeTranspiler.exe module info <cache-key>
CodeTranspiler.exe module verify <cache-key>
CodeTranspiler.exe module remove <cache-key>
CodeTranspiler.exe semantic module import <target>
CodeTranspiler.exe semantic module import --language go <target>
Manage Semantic Modules in %LOCALAPPDATA%\\Semantic\\Modules.sp run -source python -target embedded input.py
sp run -from c -to go input.csp bundle-info
sp bundle-verify
sp bundle-extract extracted-bundlessp help
CodeTranspiler helpInstall the reference compiler package:
go get github.com/tarekwasfy01/Code-TranspilerImport it in Go:
import codetranspiler "github.com/tarekwasfy01/Code-Transpiler"The Go package provides the bootstrap frontend, canonical SemanticProgram/UAST model, transformation pipeline, target emitters, native backend, GUI and CLI.
A Semantic program is modeled as a typed and attributed graph:
P = (V, E, T, A, C)
Where:
Vcontains UAST nodesEcontains semantic and structural relationsTcontains type informationAcontains semantic attributesCcontains contracts and execution constraints
The canonical representation preserves information such as:
- functions, parameters and multiple results
- variables, bindings and lexical scopes
- structured and primitive types
- operations and evaluation order
- effects and cleanup behavior
- control-flow and data-flow relations
- closures and captured environments
- aggregate layout and bounds contracts
- ABI and runtime requirements
SFPC means Semantic Fixed Point Compression.
SFPC is the transport and validation model for canonical SemanticProgram/UAST documents. It removes only information that can be reconstructed deterministically without changing program meaning.
For a semantic document D and its canonical form C(D):
Decode(Encode(C(D))) = C(D)
The encoded representation also reaches a byte-level fixed point:
Encode(Decode(Encode(C(D)))) = Encode(C(D))
This means that decoding and encoding an already canonical Semantic document produces the same canonical bytes.
For a program graph G:
F(G) = G_explicit ∪ derive(F(G))
closure(B) = G
where B is the smallest explicit basis. Grammar compression encodes a
repeated production A → X₁…Xₙ once and uses references, reducing repeated
cost from k·Σ|Xᵢ| to Σ|Xᵢ| + k·|ref(A)|. .spz compresses that canonical
stream; decoding satisfies Decode(Encode(C(D))) ≡ C(D).
SFGC means Semantic Fixed-Point Grammar Compression.
SFGC represents a canonical Semantic program through explicit facts, stable references, schema defaults and deterministic derivations.
Let:
R(P)be the reduction of programPinto canonical.seX(SE)be expansion back into a SemanticProgramN(P)be canonical normalization
The central contract is:
X(R(P)) ≡ N(P)
R(X(SE)) = SE
A compression rewrite is used only when it reduces the exact UTF-8 representation:
gain(rule, S) = |UTF8(S)| - |UTF8(rule(S))|
Only rewrites with gain > 0 are applied.
SFPC and SFGC do not introduce another intermediate representation. The canonical SemanticProgram/UAST remains the semantic source of truth.
The Code-Transpiler ecosystem registers frontends and target emitters for:
- Go
- R
- Rust
- C
- C++
- Python
- Zig
- Julia
- Nim
- C#
- Java
- Kotlin
- Swift
Available routes and individual language features are capability-gated. Route availability does not imply complete equivalence for every language-specific feature.
| Extension | Description |
|---|---|
.se |
Canonical readable Semantic representation |
.sp |
Compatibility alias for Semantic source |
.spz |
Compressed Semantic transport format |
.semantic.json |
Semantic interchange and debugging format |
.exe |
Native Windows executable output |
.obj |
Native Windows object output |
.bin |
Raw machine-code output |
.asm |
Assembly output |
- one canonical SemanticProgram/UAST
- language-independent semantic contracts
- matrix-driven capability tracking
- deterministic serialization
- fail-closed validation
- explicit unsupported results
- native compilation without mandatory assembly
- preservation of evaluation order and effects
- reproducible Semantic identity
- gradual compiler self-hosting
The Go bootstrap compiler, GUI, CLI and importable package are maintained in:
github.com/tarekwasfy01/Code-Transpiler
Semantic Programming Language is licensed under the terms provided in LICENSE.
Copyright (c) 2026 Tarek Wasfy and Contributors
