A Modern, High-Performance Programming Language
Clean Syntax • Static Typing • Stack-Based VM • C-Level Performance
Quick Start • Installation • Documentation • Architecture • Contributing
ProXPL (ProX Programming Language) is a modern, statically-typed multi-paradigm systems programming language that seamlessly integrates Object-Oriented, Intent-Oriented, and Context-Oriented features for clarity, performance, and reliability. Born from a vision to combine Python's readability with C's execution speed, ProXPL features a professional compiler architecture, a custom stack-based bytecode VM, a robust static type system, and an integrated package manager (PRM).
ProXPL is implemented entirely in C/C++ with zero runtime dependencies, making it ideal for high-performance systems, embedded applications, game development, and backend services. It serves as an excellent reference for learning compiler design and interpreter implementation.
- 🎯 Familiar Syntax: Clean, expressive syntax inspired by JavaScript and Python
- ⚡ True Performance: Bytecode compilation to a stack-based VM with LLVM backend for AOT compilation
- 🛡️ Type Safety: Static typing with intelligent type inference prevents entire classes of runtime errors
- 🔧 Batteries Included: 75+ built-in standard library functions covering I/O, math, strings, collections, and system operations
- 📦 Integrated Tooling: Built-in package manager (PRM), CLI tools, and LSP support
- 🏗️ Professional Architecture: Clean separation between lexer, parser, type checker, compiler, and VM
| Feature | Category | Status | Notes |
|---|---|---|---|
| 🔤 Modern Syntax | Core Language | ✅ Production | JavaScript-like syntax with curly braces, familiar control flow |
| 🛡️ Static Type System | Core Language | ✅ Production | Compile-time type checking with intelligent type inference |
| ⚡ Stack-Based VM | Runtime | ✅ Production | Custom bytecode interpreter executing 100+ optimized opcodes |
| 🎯 Mark-Sweep GC | Runtime | ✅ Production | Automatic memory management with NaN-boxing & tricolor marking |
| 📦 Rich Standard Library | Standard Library | ✅ Production | 75+ native functions (I/O, fs, math, strings, json, crypto, time) |
| 🧩 Module System | Compiler | ✅ Production | Robust use keyword for standard libraries, packages, and local files |
| 🔄 Object-Oriented (OOP) | Paradigm | ✅ Production | Classes, single inheritance, this, super, methods, fields |
| 🎯 Intent-Oriented (IOP) | Paradigm | ✅ Production | Native intent declarations with dynamic resolver dispatch |
| 🎭 Context-Aware (COP) | Paradigm | ✅ Production | Dynamic execution layers (context, layer, activate) |
| 🛡️ Self-Healing (ASR) | Reliability | ✅ Production | Exception handling & automatic recovery (resilient, recovery) |
| 🔢 Tensor Math | AI/Math | ✅ Production | Native multi-dimensional tensors with @ matrix multiplication |
| 📝 String Templates | Syntax | ✅ Production | Backtick template literals (`Hello, ${name}!`) |
| ➕ Operator Overloading | Core Language | ✅ Production | Custom class operators (+ - * / % @ == != < > [] ()) |
| 🌐 WebAssembly Target | Compiler | ✅ Production | Full Wasm compilation target (proxpl build --target wasm) |
| 🔧 Code Formatter | Tooling | ✅ Production | Official prox fmt formatter with .proxfmt.pxcf config |
| 🧪 Automated Test Suite | Tooling | ✅ Production | CTest integration + tests/run_all_tests.sh (51+ test suites) |
| 🔀 Channels & Actors | Concurrency | 🟡 Beta | Mailboxes, actor message passing (!, ?), task groups |
| ⚡ LLVM AOT Backend | Compiler | 🟡 Beta | LLVM IR generation implemented; standalone native linking in progress |
| 🔒 Taint Security Analysis | Security | 🟡 Beta | Compile-time taint tracking; runtime enforcement in progress |
| 📦 PRM Package Manager | Tooling | 🟡 Beta | Local package management works; central registry scheduled for v1.7.0 |
| 🔍 Language Server (LSP) | Tooling | 🔵 Planned | Basic keyword completion exists; full LSP v2 in active development |
| ⏳ Chrono-Native Logic | Paradigm | 🔵 Planned | Syntax parsed (temporal, decay); runtime planned for v1.9.0 |
| 🌌 Quantum-Ready Syntax | Paradigm | 🔵 Planned | Frontend AST syntax placeholder for future QASM integration |
| 🎮 GPU Acceleration | Hardware | 🔵 Planned | CPU tensor math active; OpenCL/CUDA kernel dispatch in design |
📊 Full transparency report: See FEATURE_STATUS.md for the complete audit of all language features and compiler components.
ProXPL defines 10 core concepts that shape its design philosophy. Here is their current implementation reality:
- Intent-Oriented Programming
✅ Production: Define what you want (intent), not just how to do it (resolver). - Context-Aware Polymorphism
✅ Production: Adapt function behavior dynamically based on execution context (context,layer,activate). - Autonomic Self-Healing (ASR)
✅ Production: Built-in failure recovery withresilientandrecoveryblocks. - Intrinsic Security
🟡 Beta: Compile-time taint analysis andsanitize()primitives. - Chrono-Native Logic
🔵 Planned: Data with expiration dates (temporal,decay after) — syntax parsed, runtime in v1.9.0. - Event-Driven Concurrency
🟡 Beta: Channels, actors (actor,receive), and task groups. - AI-Native Integration
🟡 Beta: Tensor operations (@) production-ready; high-level model training syntax in planning. - Quantum-Ready Syntax
🔵 Planned: Forward-compatible syntax (quantum,superpose,entangle) for future quantum toolchains. - Hardware-Accelerated Math
🔵 Planned: Tensor engine active on CPU; GPU offloading kernel dispatch in design. - Zero-Trust Security
🔵 Planned: Built-in crypto primitives functional in stdlib; language-level identity blocks planned.
Create a file named hello.prox:
// hello.prox
// Your first ProXPL program
func main() {
print("Welcome to ProXPL!");
let name = input("What is your name? ");
print("Hello, " + name + "!");
// Generate a random lucky number
let lucky = random(1, 100);
print("Here is a lucky number for you: " + to_string(lucky));
}
main();Using the ProXPL CLI:
prm run hello.proxOr using the compiled executable:
./proxpl hello.proxWelcome to ProXPL!
What is your name? Alice
Hello, Alice!
Here is a lucky number for you: 42
Download the latest release for your operating system:
- Windows: Download
proxpl.exe - Linux: Download
proxpl - macOS: Download
proxpl-macos
Add the executable to your system PATH for global access.
Requirements:
- C/C++ Compiler (GCC 9+, Clang 10+, or MSVC 2019+)
- CMake 3.15+
- LLVM 10+ (for AOT compilation support)
- Git
Build Instructions:
# Clone the repository
git clone https://github.com/ProgrammerKR/ProXPL.git
cd ProXPL
# Create build directory
mkdir build && cd build
# Configure with CMake
cmake -DCMAKE_BUILD_TYPE=Release ..
# Build the project
make
# Optional: Install system-wide
sudo make installWindows (Visual Studio):
mkdir build && cd build
cmake -G "Visual Studio 16 2019" ..
cmake --build . --config ReleaseThe ProXPL CLI provides watch mode, better logging, and development conveniences:
cd src/cli
npm install
npm linkNow use the prox command globally with enhanced features.
ProXPL supports 12 core data types with static type checking:
// Primitives
let count = 42; // Integer
let price = 19.99; // Float
let active = true; // Boolean
let message = "Hello!"; // String
// Collections
let numbers = [1, 2, 3, 4, 5]; // List
let config = {"host": "localhost", "port": 8080}; // Dictionary
// Type inference works automatically
let auto = 100; // Inferred as Integer// Function definition
func fibonacci(n) {
if (n <= 1) return n;
return fibonacci(n - 1) + fibonacci(n - 2);
}
// Loops and iteration
func main() {
for (let i = 0; i < 10; i = i + 1) {
print("fib(" + to_string(i) + ") = " + to_string(fibonacci(i)));
}
// While loops
let count = 0;
while (count < 5) {
print("Count: " + to_string(count));
count = count + 1;
}
}
main();func demonstrate_collections() {
// Lists
let items = [1, 2, 3];
push(items, 4); // Add element
let first = items[0]; // Access by index
let size = length(items); // Get size
// Dictionaries
let user = {"name": "Alice", "age": 30};
user["email"] = "alice@example.com"; // Add key
let name = user["name"]; // Access value
// Iteration
for (let i = 0; i < length(items); i = i + 1) {
print(to_string(items[i]));
}
}ProXPL supports native tensor operations for AI and scientific computing:
func tensor_demo() {
// Define tensors using nested bracket syntax
let matrix = [[1, 2], [3, 4]];
let identity = [[1, 0], [0, 1]];
// Matrix multiplication using @ operator
let result = matrix @ identity;
print(result); // <tensor 2x2>
// Dot product for 1D tensors
let v1 = [1, 2, 3];
let v2 = [4, 5, 6];
let dot = v1 @ v2;
print(dot); // 32
}ProXPL uses the use keyword for modular programming:
// Import standard library module
use std.math;
// Import from installed package
use http.client;
// Import local file (relative path)
use local_helper;
func main() {
let result = std.math.sqrt(16);
print("Square root of 16: " + to_string(result));
}ProXPL supports native asynchronous programming:
async func fetchUser(id) {
// Simulate non-blocking operation
return {"id": id, "name": "User" + to_string(id)};
}
async func main() {
print("Fetching user...");
let user = await fetchUser(42);
print("Got user: " + user["name"]);
}use std.io;
use std.fs;
use std.sys;
func showcase_stdlib() {
// File I/O
let content = read_file("data.txt");
write_file("output.txt", "Hello from ProXPL!");
// String operations
let text = "ProXPL is awesome";
let upper = to_upper(text);
let parts = split(text, " ");
// Math operations
let result = sqrt(144);
let power = pow(2, 8);
let random_num = random(1, 100);
// System operations
let env_var = env("PATH");
let current_time = time();
}ProXPL can invoke native C functions from dynamic libraries (.dll, .so) using the extern keyword.
// Load C standard library
extern "msvcrt.dll" "puts" func c_puts(text);
extern "msvcrt.dll" "abs" func c_abs(n);
c_puts("Hello from C!");
let dist = c_abs(-100);ProXPL includes PRM (ProX Repository Manager), a built-in package manager for dependency management and project scaffolding.
# Initialize a new project
prm init my-project
# Install a package
prm install http-server
# List installed packages
prm list
# Search for packages
prm search json
# Update dependencies
prm update
# Remove a package
prm remove old-package// project.pxcf
project {
name: "my-web-server"
version: "1.1.0"
author: "Your Name <you@example.com>"
license: "MIT"
}
compiler {
optimize: true
debug: false
target: "native"
}
paths {
src: "./src"
build: "./build"
entry: "src/main.prox"
}
dependencies {
http: "1.3.0"
json: "1.1.0"
}
runtime {
threads: 8
memory_limit: "1GB"
}ProXPL follows a professional multi-phase compiler architecture designed for maintainability, extensibility, and performance.
graph LR
A[Source Code .prox] --> B[Scanner/Lexer]
B --> C[Parser]
C --> D[AST]
D --> E[Type Checker]
E --> F[IR Generator]
F --> G[SSA Optimizer]
G --> H{Compilation Mode}
H -->|Bytecode| I[Bytecode Generator]
H -->|AOT| J[LLVM Backend]
I --> K[Bytecode Chunk]
J --> L[Native Binary]
K --> M[Stack-Based VM]
L --> N[Direct Execution]
M --> O[Runtime Execution]
N --> O
| Component | Location | Responsibility |
|---|---|---|
| Scanner/Lexer | src/lexer/scanner.c |
Tokenizes source code into lexical tokens |
| Parser | src/parser/parser.c |
Builds Abstract Syntax Tree (AST) from tokens |
| Type Checker | src/compiler/type_checker.c |
Validates types and enforces type safety |
| IR Generator | src/compiler/ir_gen.c |
Generates intermediate representation (SSA form) |
| IR Optimizer | src/compiler/ir_opt.c |
Performs optimizations on SSA IR |
| Bytecode Compiler | src/compiler/bytecode_gen.c |
Emits optimized bytecode instructions |
| LLVM Backend | src/compiler/backend_llvm.cpp |
Generates LLVM IR for AOT native compilation |
| Virtual Machine | src/runtime/vm.c |
Stack-based VM that executes bytecode |
| Garbage Collector | src/runtime/gc.c |
Mark-and-sweep GC for automatic memory management |
| Memory Manager | src/runtime/memory.c |
Low-level memory allocation and tracking |
| Standard Library | src/stdlib/ |
Native implementations of 75+ built-in functions |
- Lexical Analysis: Source code is tokenized into meaningful symbols
- Syntax Analysis: Tokens are parsed into an Abstract Syntax Tree
- Semantic Analysis: Type checking and semantic validation
- IR Generation: AST is lowered to SSA-based intermediate representation
- Optimization: IR optimizations (constant folding, dead code elimination, etc.)
- Code Generation:
- Bytecode Path: Generate bytecode for VM execution
- Native Path: Generate LLVM IR → native binary via LLVM
- Execution: Run on the stack-based VM or execute native binary
ProXPL/
├── assets/ # Project assets (icons, logos)
├── benchmarks/ # Performance benchmarking suite
├── docs/ # Comprehensive documentation
│ ├── architecture/ # Architecture guides
│ ├── pillars/ # Core paradigm specifications
│ └── releases/ # Version release notes
├── examples/ # Example programs
│ ├── advanced/ # Advanced integrations
│ ├── algorithms/ # Algorithm examples
│ ├── basics/ # Basic scripts
│ └── ui_and_web/ # UI and web frameworks
├── extension/ # VS Code Extension source
├── include/ # Public C/C++ header files
│ ├── ast.h # AST node definitions
│ ├── compiler.h # Compiler interface
│ ├── gc.h # Garbage collector interface
│ └── vm.h # Virtual machine interface
├── runtime/ # ASR (Autonomic Self-Healing) C++ runtime
├── scripts/ # Build and utility scripts
├── src/ # Compiler and VM source code
│ ├── cli/ # Command-line interface tools
│ ├── compiler/ # Multi-phase compiler implementation
│ ├── prm/ # ProX Repository Manager
│ ├── runtime/ # VM runtime execution core
│ ├── stdlib/ # Native standard library functions
│ └── vm/ # Virtual machine and dispatch
├── std/ # ProXPL standard library modules
├── tests/ # Comprehensive test suite
│ ├── benchmarks/ # Script benchmarks
│ ├── integration/ # E2E integration tests
│ ├── iop/ # Intent, Context, and ASR tests
│ ├── language/ # Core language feature tests
│ └── vm/ # C/C++ runtime unit tests
├── tools/ # Development tools
│ ├── bench/ # Benchmarking tools
│ └── lsp/ # Language Server Protocol
├── CMakeLists.txt # Build configuration
├── Makefile # Alternative build system
└── README.md # This file
Comprehensive documentation is available in the docs/ directory:
- Documentation Hub: Main entry point for all documentation.
- Getting Started: Installation, quickstart, and tutorials.
- Language Specification: Grammar, syntax, and semantics.
- Standard Library Reference: Detailed documentation for 75+ built-in functions.
- Compiler Architecture: Multi-phase compiler design, IR, and bytecode.
- Runtime & VM: Stack-based VM, NaN-boxing, and garbage collection.
- Tooling & VS Code: CLI tools, LSP, formatter, and editor integration.
- Package Manager (PRM): ProX Repository Manager and registry.
- Design & Paradigms: Multi-paradigm architecture and operational pillars.
- Release Notes: Version history and upgrade guides.
- Contributing Guide: Guidelines, standards, and testing.
Run the comprehensive test suite:
# Build with tests enabled
cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTS=ON ..
make
# Run all tests
make test
# Run specific test
./build/tests/lexer_test
./build/tests/parser_test
./build/tests/vm_testProXPL is designed for high performance through multiple optimization layers:
- Zero-cost abstractions: High-level features compile to efficient low-level code
- SSA-based optimizations: Constant folding, dead code elimination, common subexpression elimination
- Bytecode JIT potential: Foundation for future JIT compilation
- LLVM backend: Leverages industry-standard optimizer for native performance
- Efficient GC: Mark-and-sweep with tri-color marking (planned)
See BENCHMARKS.md for detailed performance comparisons.
-
v0.5.0 (Alpha): Core language features (variables, functions, control flow). ✅
-
v0.8.0: Advanced memory management, closures, upvalues. ✅
-
v0.9.0: Standard Library (fs, time, gc), IO improvements. ✅
-
v1.0.0:
- Object-Oriented Programming: Classes, Methods, Inheritance, Properties. ✅
- Keywords:
class,new,this,extends,interface. ✅ - Runtime: Optimized VM with Object Support. ✅
-
v1.6.3:
- WebAssembly Target: Full Wasm compilation target (
proxpl build --target wasm) with JS glue code andprm serve --wasm. ✅ - String Templates: Backtick-delimited template literals (
`Hello, ${name}!`) with${expr}interpolation. ✅ - Operator Overloading: Custom operator methods (
+ - * / % @ == != < > <= >= [] []= () - !) with inheritance. ✅ - Closures v2: Escape analysis, zero-allocation stack execution, and loop variable capture safety. ✅
- ProXPL Formatter: Official
prox fmtcode formatter with.proxfmt.pxcfsupport. ✅ - Enhanced Diagnostics: Compiler error codes (
E0412,E0308), caret indicators, and typo suggestions. ✅
- WebAssembly Target: Full Wasm compilation target (
-
v1.6.4 (Current):
- Channels & Structured Concurrency: Task groups, buffered/unbuffered channels, and cancellation. ✅
- Actor Model: Lightweight actor messaging with
actor,receive,!, and?. ✅ - Database Connectivity: Unified
std.dbdriver interface with connection pooling. ✅ - Serialization: Standardized
std.encoding(JSON, TOML, CSV, Base64). ✅ - LSP v2: Semantic tokens, code actions, rename, and references. ✅
- Compile-Time Evaluation:
comptimefunction and expression evaluation. ✅
- 📋 v1.7.0 — ProX Studio Alpha, PRM Registry, Testing Framework, Macros.
- 📋 v1.9.0 — Distributed Runtime Scaling, Advanced Metaprogramming.
- 📋 v1.9.5 — Cross-Compilation, Embedded API, Security Hardening, API Freeze.
- 🚀 v2.0.0 — Self-Hosting Compiler, JIT Compiler, Effect System, Production Stable.
- Channels & Structured Concurrency: Built-in channels,
task.group, and task cancellation. - Actor Model: Lightweight message passing, actor mailboxes, and supervision support.
- Database (
std.db): Universal database connectivity for SQLite, Postgres, MySQL, and Redis. - Serialization (
std.encoding): Native JSON, TOML, CSV, and Base64 codecs. - LSP v2: Full semantic analysis language server support.
- Compile-Time Eval:
comptimeblocks and functions. - See the full CHANGELOG.md for more details.
We warmly welcome contributions! ProXPL is an excellent project for learning compiler design, language implementation, and systems programming.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Follow the Coding Standards
- Write tests for new features
- Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- 🐛 Bug fixes and stability improvements
- ✨ New standard library functions
- 📝 Documentation and tutorials
- 🧪 Test coverage expansion
- ⚡ Performance optimizations
- 🎨 IDE and editor plugins
- 📦 Community packages
Please read CONTRIBUTING.md for detailed guidelines and CODE_OF_CONDUCT.md for community standards.
This project is licensed under the ProXPL Professional License - see the LICENSE file for details.
Built with ❤️ by the ProXPL Community
Making programming easy, accessible and enjoyable
ProXPL - A Modern Programming Language for the Future