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 | 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 |
| 🔄 Multi-Paradigm | Native support for Object-Oriented, Intent-Oriented, and Context-Oriented programming |
| 🔍 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,layer,activate). - 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 programfuncmain(){print("Welcome to ProXPL!");letname=input("What is your name? ");print("Hello, "+name+"!");// Generate a random lucky numberletlucky=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:
// Primitivesletcount=42;// Integerletprice=19.99;// Floatletactive=true;// Booleanletmessage="Hello!";// String// Collectionsletnumbers=[1,2,3,4,5];// Listletconfig={"host": "localhost","port": 8080};// Dictionary// Type inference works automaticallyletauto=100;// Inferred as Integer// Function definitionfuncfibonacci(n){if(n<=1)returnn;returnfibonacci(n-1)+fibonacci(n-2);}// Loops and iterationfuncmain(){for(leti=0;i<10;i=i+1){print("fib("+to_string(i)+") = "+to_string(fibonacci(i)));}// While loopsletcount=0;while(count<5){print("Count: "+to_string(count));count=count+1;}}main();funcdemonstrate_collections(){// Listsletitems=[1,2,3];push(items,4);// Add elementletfirst=items[0];// Access by indexletsize=length(items);// Get size// Dictionariesletuser={"name": "Alice","age": 30};user["email"]="alice@example.com";// Add keyletname=user["name"];// Access value// Iterationfor(leti=0;i<length(items);i=i+1){print(to_string(items[i]));}}ProXPL supports native tensor operations for AI and scientific computing:
functensor_demo(){// Define tensors using nested bracket syntaxletmatrix=[[1,2],[3,4]];letidentity=[[1,0],[0,1]];// Matrix multiplication using @ operatorletresult=matrix @ identity;print(result);// <tensor 2x2>// Dot product for 1D tensorsletv1=[1,2,3];letv2=[4,5,6];letdot=v1 @ v2;print(dot);// 32}ProXPL uses the use keyword for modular programming:
// Import standard library moduleusestd.math;// Import from installed packageusehttp.client;// Import local file (relative path)uselocal_helper;funcmain(){letresult=std.math.sqrt(16);print("Square root of 16: "+to_string(result));}ProXPL supports native asynchronous programming:
asyncfuncfetchUser(id){// Simulate non-blocking operationreturn{"id": id,"name": "User"+to_string(id)};}asyncfuncmain(){print("Fetching user...");letuser=awaitfetchUser(42);print("Got user: "+user["name"]);}usestd.io;usestd.fs;usestd.sys;funcshowcase_stdlib(){// File I/Oletcontent=read_file("data.txt");write_file("output.txt","Hello from ProXPL!");// String operationslettext="ProXPL is awesome";letupper=to_upper(text);letparts=split(text," ");// Math operationsletresult=sqrt(144);letpower=pow(2,8);letrandom_num=random(1,100);// System operationsletenv_var=env("PATH");letcurrent_time=time();}ProXPL can invoke native C functions from dynamic libraries (.dll, .so) using the extern keyword.
// Load C standard libraryextern"msvcrt.dll""puts"funcc_puts(text);extern"msvcrt.dll""abs"funcc_abs(n);c_puts("Hello from C!");letdist=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.pxcfproject{
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:
- 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.
- Core Pillars: Detailed specifications for ProXPL's 10 paradigm pillars, including Intents, Contexts, and ASR.
- 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:
- Object-Oriented Programming: Classes, Methods, Inheritance, Properties. ✅
- Keywords:
class,new,this,extends,interface. ✅ - Runtime: Optimized VM with Object Support. ✅
v1.6.2 (Current):
- Intent-Oriented Programming: Full VM support for
intentandresolverdynamic dispatch. ✅ - Context-Aware Polymorphism: Dynamic behavioral overrides via
context,layer, andactivate. ✅ - Autonomic Self-Healing (ASR): Zero-cost stack unwinding through
resilientexception blocks. ✅ - Performance Tooling: Benchmark suite for core abstractions. ✅
- Intent-Oriented Programming: Full VM support for
- 📋 v1.7.0 — ProX Studio Alpha, PRM Registry, Testing Framework, Macros.
- 📋 v1.8.0 — WebAssembly Target, String Templates, Operator Overloading, Formatter.
- 📋 v1.9.0 — Channels, Actors, Database Connectivity, LSP v2, Compile-Time Eval.
- 📋 v1.9.5 — Cross-Compilation, Embedded API, Security Hardening, API Freeze.
- 🚀 v2.0.0 — Self-Hosting Compiler, JIT Compiler, Effect System, Production Stable.
- IOP Core: Fully implemented
intent,resolver, andsatisfieswith native VM dispatch. - Context-Aware Polymorphism: Fully implemented
context,layer, andactivate. - Autonomic Self-Healing (ASR): Added
resilientexception recovery blocks without corrupting state. - Performance Benchmarks: New benchmark suite for dynamic dispatch paradigms.
- ASR Refinement: Zero-cost stack unwinding for
resilientblocks usingExceptionHandlerTable. - LLVM Backend: LLVM PassManager configured for O3 (Vectorization and Inlining) and Tail-Call Optimization (TCO).
- 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