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 systems programming language designed 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 | Description |
|---|---|
| π€ Modern Syntax | JavaScript-like syntax with curly braces, familiar control flow, and clean function definitions |
| π¨ ProXPL Icons | 1100+ File Icons support via the official extension (Material Icon Theme integration) |
| β‘ Fast Execution | Custom stack-based VM executing optimized bytecode with LLVM AOT compilation support |
| π¦ Rich Standard Library | 75+ native functions for I/O, mathematics, string manipulation, collections, and system tasks |
| π‘οΈ Static Type System | Compile-time type checking with type inference reduces runtime errors |
| π§© Module System | Robust use keyword for importing standard libraries, packages, and local files |
| π§ PRM Package Manager | Integrated ProX Repository Manager for dependency management and project scaffolding |
| ποΈ Multi-Phase Compiler | Lexer β Parser (AST) β Type Checker β IR Optimizer β Bytecode/LLVM |
| β© Async/Await | Native asynchronous programming with LLVM Coroutines support |
| π Developer Tools | CLI with watch mode, LSP for IDE integration, comprehensive error reporting |
| π― Memory Safety | Built-in garbage collector with mark-and-sweep algorithm |
| π Cross-Platform | First-class support for Windows, Linux, and macOS |
ProXPL introduces 10 revolutionary concepts that redefine modern systems programming:
- Intent-Oriented Programming: Define what you want (
intent), not just how to do it (resolver). - Context-Aware Polymorphism: Adapt function behavior dynamically based on execution context (
@context). - Autonomic Self-Healing (ASR): Built-in failure recovery with
resilientandrecoveryblocks. - Intrinsic Security: Taint analysis and
sanitize()primitives baked into the type system. - Chrono-Native Logic: Data with expiration dates (
temporal,decay after). - Event-Driven Concurrency: Distributed nodes and types (
distributed,node) as first-class citizens. - AI-Native Integration: Define, train, and run ML models (
model,train,predict) natively. - Quantum-Ready Syntax: Future-proof syntax for quantum operations (
quantum,superpose,entangle). - Hardware-Accelerated Math: GPU kernel offloading (
gpu,kernel) and tensor math. - Zero-Trust Security: Mandatory identity verification blocks (
verify identity) and crypto primitives.
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:
prox 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 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[package]
name = "my-web-server"
version = "1.1.0"
authors = ["Your Name <you@example.com>"]
edition = "2025"
description = "A fast web server built with ProXPL"
license = "MIT"
[dependencies]
http_parser = "2.1.0"
json = "1.5.0"
[build]
target = "native"
optimize = trueProXPL 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/
βββ include/ # Public header files
β βββ vm.h # Virtual machine interface
β βββ compiler.h # Compiler interface
β βββ ast.h # AST node definitions
β βββ stdlib_native.h # Standard library declarations
β βββ gc.h # Garbage collector interface
βββ src/
β βββ main.c # Entry point
β βββ lexer/ # Lexical analysis
β β βββ scanner.c
β βββ parser/ # Syntax analysis
β β βββ parser.c
β β βββ ast.c
β βββ compiler/ # Code generation
β β βββ type_checker.c
β β βββ ir_gen.c
β β βββ ir_opt.c
β β βββ bytecode_gen.c
β β βββ backend_llvm.cpp
β βββ runtime/ # Runtime system
β β βββ vm.c # Virtual machine
β β βββ gc.c # Garbage collector
β β βββ memory.c # Memory management
β β βββ chunk.c # Bytecode storage
β β βββ object.c # Runtime object system
β βββ stdlib/ # Standard library (native)
β β βββ stdlib_core.c
β β βββ stdlib_io.c
β β βββ stdlib_math.c
β β βββ stdlib_string.c
β βββ prm/ # Package manager
β β βββ manifest.c
β β βββ builder.c
β βββ utils/ # Utilities
β βββ error_report.c
βββ lib/std/ # Standard library (ProXPL)
βββ tools/
β βββ lsp/ # Language Server Protocol
β βββ bench/ # Benchmarking tools
β βββ prm_main.c # PRM CLI entry
βββ examples/ # Example programs
βββ tests/ # Test suite
βββ docs/ # Documentation
β βββ language-spec/ # Language specification
β βββ stdlib/ # Standard library docs
β βββ architecture/ # Architecture guides
βββ benchmarks/ # Performance benchmarks
βββ CMakeLists.txt # Build configuration
βββ Makefile # Alternative build system
βββ README.md # This file
Comprehensive documentation is available in the docs/ directory:
- Language Specification: A detailed guide to ProXPL grammar, keywords, operators, data types, and core semantics.
- Standard Library Reference: Detailed documentation for all built-in functions and modules.
- Architecture Guide: A deep dive into the compiler design and Virtual Machine (VM) internals.
- IR Specification: Documentation for the SSA (Static Single Assignment) intermediate representation.
- Build Guide: Platform-specific instructions for building ProXPL from source.
- Coding Standards: Code style guidelines and contribution workflow.
- Benchmarks: Performance metrics, comparisons, and optimization notes.
- Ecosystem Design: Overview of the Standard Library and PRM (ProX Package Manager) architecture.
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 (Current):
- Object-Oriented Programming: Classes, Methods, Inheritance, Properties. β
- Keywords:
class,new,this,extends,interface. β - Runtime: Optimized VM with Object Support. β
- v1.2.0 (Current):
- The 10 Operational Pillars: Full frontend implementation of Intent-Oriented, Context-Aware, ASR, Intrinsic Security, Chrono-Native, Event-Concurreny, AI-Native, Quantum-Ready, Hardware-Math, and Zero-Trust features. β
- Frontend Feature Complete: Lexer, Parser, AST, and Type Checker support all 10 pillars. β
Status: Released (Frontend)
- β 10 Pillars Implementation: Correctly parsing and semantically validating all revolutionary syntax constructs.
- β
AI & Quantum:
model,train,quantum,qubitprimitives. - β
Security:
policy,tainted,encrypt,verifysupport. - β
Distributed:
distributed type,nodedeclarations.
Status: Released
- β Class-based OOP: First-class support for Classes, Objects, Inheritance, and Interfaces.
- β Runtime Architecture: Enhanced VM with Class, Instance, and BoundMethod support.
- β
New Keywords:
class,new,this,extends,interface,static. - β Inheritance: Single inheritance model with superclass method lookup.
- β
Access Control:
pub/privvisibility enforcement. - β
Constructors:
initconstructor method. - β
Exception Handling:
try/catchblocks. - β
Verification: Verified via
tests/oop_v1.0.0.prox.
- π v1.2.0: FFI Stability & ProX Studio Alpha.
- π v1.3.0: Pattern Matching, Enums, Generics.
- π v2.0.0: Async/Await, WebAssembly, JIT.
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