Skip to content

Commit 3cc4ddd

Browse files
committed
Docs: Added documentation for 10 Operational Pillars and updated README
1 parent e77bde9 commit 3cc4ddd

13 files changed

Lines changed: 259 additions & 0 deletions

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,21 @@ ProXPL is implemented entirely in **C/C++** with zero runtime dependencies, maki
5858
| 🎯 **Memory Safety** | Built-in garbage collector with mark-and-sweep algorithm |
5959
| 🌐 **Cross-Platform** | First-class support for Windows, Linux, and macOS |
6060

61+
## 🏛️ The 10 Operational Pillars (v1.2.0)
62+
63+
ProXPL introduces 10 revolutionary concepts that redefine modern systems programming:
64+
65+
1. **[Intent-Oriented Programming](docs/pillars/01_intent_oriented.md)**: Define *what* you want (`intent`), not just *how* to do it (`resolver`).
66+
2. **[Context-Aware Polymorphism](docs/pillars/02_context_aware.md)**: Adapt function behavior dynamically based on execution context (`@context`).
67+
3. **[Autonomic Self-Healing (ASR)](docs/pillars/03_asr.md)**: Built-in failure recovery with `resilient` and `recovery` blocks.
68+
4. **[Intrinsic Security](docs/pillars/04_intrinsic_security.md)**: Taint analysis and `sanitize()` primitives baked into the type system.
69+
5. **[Chrono-Native Logic](docs/pillars/05_chrono_native.md)**: Data with expiration dates (`temporal`, `decay after`).
70+
6. **[Event-Driven Concurrency](docs/pillars/06_distributed_primitives.md)**: Distributed nodes and types (`distributed`, `node`) as first-class citizens.
71+
7. **[AI-Native Integration](docs/pillars/07_ai_native.md)**: Define, train, and run ML models (`model`, `train`, `predict`) natively.
72+
8. **[Quantum-Ready Syntax](docs/pillars/08_quantum_ready.md)**: Future-proof syntax for quantum operations (`quantum`, `superpose`, `entangle`).
73+
9. **[Hardware-Accelerated Math](docs/pillars/09_hardware_math.md)**: GPU kernel offloading (`gpu`, `kernel`) and tensor math.
74+
10. **[Zero-Trust Security](docs/pillars/10_zero_trust.md)**: Mandatory identity verification blocks (`verify identity`) and crypto primitives.
75+
6176
---
6277

6378
## ⚡ Quick Start

docs/DOCUMENTATION_INDEX.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,21 @@
6969
| **[03-classes.md](docs/tutorials/03-classes.md)** | OOP, inheritance, methods | Intermediate | 45m |
7070
| **[04-modules.md](docs/tutorials/04-modules.md)** | Module system, imports | Advanced | 30m |
7171

72+
### The 10 Operational Pillars (docs/pillars/)
73+
74+
| File | Pillar | Concept |
75+
|------|--------|---------|
76+
| **[01_intent_oriented.md](docs/pillars/01_intent_oriented.md)** | Intent-Oriented | Intent/Resolver pattern |
77+
| **[02_context_aware.md](docs/pillars/02_context_aware.md)** | Context-Aware | `@context` polymorphism |
78+
| **[03_asr.md](docs/pillars/03_asr.md)** | Self-Healing | Resilient blocks |
79+
| **[04_intrinsic_security.md](docs/pillars/04_intrinsic_security.md)** | Intrinsic Security | Taint analysis |
80+
| **[05_chrono_native.md](docs/pillars/05_chrono_native.md)** | Chrono-Native | Temporal variables |
81+
| **[06_distributed_primitives.md](docs/pillars/06_distributed_primitives.md)** | Distributed | Node/Distributed types |
82+
| **[07_ai_native.md](docs/pillars/07_ai_native.md)** | AI-Native | Model/Train/Predict |
83+
| **[08_quantum_ready.md](docs/pillars/08_quantum_ready.md)** | Quantum-Ready | Qubit/Superpose |
84+
| **[09_hardware_math.md](docs/pillars/09_hardware_math.md)** | Hardware Math | GPU Kernels |
85+
| **[10_zero_trust.md](docs/pillars/10_zero_trust.md)** | Zero-Trust | Identity Verification |
86+
7287
---
7388

7489
## 🗂️ Documentation by Purpose

docs/DOCUMENTATION_SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ All ProXPL markdown documentation files have been comprehensively updated to pro
2525
| **docs/language-spec.md** | ~30KB | ✅ Complete | Complete language specification with grammar, syntax, examples |
2626
| **src/README.md** | ~12KB | ✅ Complete | Developer guide to codebase with architecture, testing, debugging |
2727
| **DOCUMENTATION_INDEX.md** | ~15KB | ✅ Updated | Navigation hub updated with new file references |
28+
| **docs/pillars/** | ~15KB | ✅ New | Complete documentation for the 10 Operational Pillars (v1.2.0) |
2829
| **DOCUMENTATION_SUMMARY.md** | ~8KB | ✅ Complete | Complete update summary and statistics |
2930

3031
### Already Comprehensive (Reviewed)

docs/pillars/01_intent_oriented.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Pillar 1: Intent-Oriented Programming
2+
3+
## Concept
4+
Intent-Oriented Programming (IOP) shifts focus from *how* to execute a task to *what* the outcome should be. It allows developers to define `intent` interfaces that express a desired capability, and `resolver` implementations that fulfill those intents.
5+
6+
## Syntax
7+
8+
### Intent Declaration
9+
```javascript
10+
intent PaymentProcessor(amount, currency) -> bool;
11+
```
12+
Defines an abstract operation `PaymentProcessor` that takes an amount and currency, returning a boolean success status.
13+
14+
### Resolver Implementation
15+
```javascript
16+
resolver StripePayment for PaymentProcessor {
17+
func resolve(amount, currency) {
18+
// Implementation for Stripe
19+
return true;
20+
}
21+
}
22+
```
23+
Provides a concrete implementation for the intent.
24+
25+
## Usage
26+
The runtime (or compile-time logic) selects the appropriate resolver based on context, configuration, or availability.

docs/pillars/02_context_aware.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Pillar 2: Context-Aware Polymorphism
2+
3+
## Concept
4+
Context-Aware Polymorphism allow functions and behavior to adapt dynamically based on the execution environment (e.g., Mobile vs. Cloud, Dev vs. Prod). This is achieved via the `@context` decorator.
5+
6+
## Syntax
7+
8+
### Context Decorators
9+
```javascript
10+
@context(env="cloud")
11+
func connectDB() {
12+
// Cloud-specific connection
13+
}
14+
15+
@context(env="mobile")
16+
func connectDB() {
17+
// Local SQLite connection
18+
}
19+
```
20+
21+
## Usage
22+
The runtime evaluates the current context (set via start flags or environment variables) and dispatches the correct function variant. This eliminates complex `if-else` chains for environment-specific logic.

docs/pillars/03_asr.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Pillar 3: Autonomic Self-Healing (ASR)
2+
3+
## Concept
4+
Autonomic Self-Healing Integration (ASR) embeds resilience directly into the language syntax. It provides structured blocks for handling failures, restarting logic, and rolling back state without external supervisors.
5+
6+
## Syntax
7+
8+
### Resilient Block
9+
```javascript
10+
resilient(strategy="restart", retries=3) {
11+
// Critical code that might fail
12+
processTransaction();
13+
} recovery {
14+
// Logic to run if all retries fail
15+
logError("Transaction failed");
16+
}
17+
```
18+
19+
### Keywords
20+
- `resilient`: Defines a block monitored for crashes/errors.
21+
- `recovery`: Checkpoint block executed on ultimate failure.
22+
- `restart`: Manually trigger a restart of the block.
23+
- `rollback`: Revert modifications (if transactional memory is supported).
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Pillar 4: Intrinsic Security
2+
3+
## Concept
4+
Intrinsic Security treats data safety as a type-system feature. It introduces Taint Analysis directly into the language, forcing developers to explicitly sanitize untrusted inputs before using them in sensitive contexts.
5+
6+
## Syntax
7+
8+
### Tainted Types
9+
```javascript
10+
policy NoSQLInjection { ... }
11+
```
12+
(Note: Policy definition syntax is reserved for future expansion)
13+
14+
### Usage
15+
```javascript
16+
// 'input()' returns a tainted string by default (conceptually)
17+
let userInput = input("Enter query: ");
18+
19+
// Attempting to use 'userInput' in a sensitive sink (like exec) would warn/error
20+
// exec(userInput); // Error: Tainted data in sensitive sink
21+
22+
// Must sanitize first
23+
let cleanInput = sanitize(userInput);
24+
exec(cleanInput); // Safe
25+
```
26+
27+
### Keywords
28+
- `tainted`: (Internal type attribute) Marks data as untrusted.
29+
- `sanitize(expr)`: Primitive to strip taint from a value.
30+
- `policy`: Define security boundaries.

docs/pillars/05_chrono_native.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Pillar 5: Chrono-Native Logic
2+
3+
## Concept
4+
Chrono-Native Logic treats time as a first-class data attribute. Variables can have a "Time-To-Live" (TTL) and expire automatically, simplifying cache invalidation and session management.
5+
6+
## Syntax
7+
8+
### Temporal Variables
9+
```javascript
10+
// Variable 'session' decays (becomes null/invalid) after 5000ms
11+
temporal session = connect() decay after 5000ms;
12+
```
13+
14+
### Usage
15+
Accessing `session` after 5 seconds will result in a null value or trigger a refresh handler (depending on future runtime implementation). This is enforcing ephemeral data lifecycles at the declaration level.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Pillar 6: Event-Driven Concurrency
2+
3+
## Concept
4+
Event-Driven Concurrency provides native primitives for building distributed, node-based systems. It introduces `node` and `distributed type` declarations to model concurrent actors and shared data structures without external libraries.
5+
6+
## Syntax
7+
8+
### Node Declaration
9+
```javascript
10+
node Server {
11+
// Capabilities and internal state
12+
}
13+
```
14+
15+
### Distributed Type
16+
```javascript
17+
distributed type Ledger {
18+
// A data structure shared/replicated across nodes
19+
}
20+
```
21+
22+
## Usage
23+
These constructs lay the groundwork for building distributed systems where concurrency is managed by the language runtime (actor model or similar) rather than manual thread management.

docs/pillars/07_ai_native.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Pillar 7: AI-Native Integration
2+
3+
## Concept
4+
AI-Native Integration makes Machine Learning a first-class citizen. Instead of importing external libraries like TensorFlow or PyTorch, ProXPL allows defining models, training loops, and predictions directly in the syntax.
5+
6+
## Syntax
7+
8+
### Model Declaration
9+
```javascript
10+
model SentimentAnalysis {
11+
// Model architecture and hyperparameters
12+
}
13+
```
14+
15+
### Operations
16+
```javascript
17+
// Train the model
18+
train SentimentAnalysis with dataset;
19+
20+
// Make predictions
21+
let score = predict("This is great") using SentimentAnalysis;
22+
```
23+
24+
## Usage
25+
This abstracts the complexity of ML pipelines, allowing the compiler to optimize mathematical operations (tensor math) and hardware usage (GPU offloading) automatically.

0 commit comments

Comments
 (0)