A natural language programming language.
Design a programming language that blends the readability of plain English with the precision of formal code, empowering both humans and AI systems to read, write, and reason about programs. Aion targets rapid prototyping of machine‑learning workflows, data manipulation, and agent orchestration while remaining general‑purpose.
- Natural Syntax ≥ Symbolic Syntax – Core constructs use everyday words; symbols are optional.
- Single Source of Truth – Every sentence is executable; no separate docstrings required.
- Explainability First – Programs are self‑documenting and can be narrated step‑by‑step by an AI.
- Interoperability – Transpiles to Python + popular ML libs (PyTorch, Transformers, sklearn).
- Gradual Formality – Authors can start with fuzzy sentences and progressively refine.
- Conversational Workflow – REPL accepts follow‑up questions (“Why did accuracy drop?”) and emits answers.
| English part | Aion concept | Example |
|---|---|---|
| Nouns | Entities | dataset, model, tensor, file |
| Verbs | Actions | load, train, predict, visualise |
| Adjectives/Adverbs | Qualifiers | robust, quickly, deterministic |
| Prepositions & Clauses | Relations / Conditions | from csv “iris.csv”, if accuracy > 90 percent |
Sentences combine these parts to form executable instructions.
- Case‑insensitive keywords (
train,Train, andTRAINare equivalent). - Sentences end with a period or newline. Commas separate clauses.
- Indentation indicates hierarchy within multi‑step blocks, mirroring Python’s significance of whitespace.
- Comments start with
#anywhere in a line.
Let learning‑rate be 3e‑4.
Start with list items [1, 2, 3].
To square a number n: return n multiplied by n.
Plain‑language verbs To, Given, Return introduce the definition body.
If accuracy exceeds 90 percent, announce "We did it!".
Otherwise, lower learning‑rate by half and train again.
For each record in validation‑set:
predict label using network.
count correct predictions.
- Number – int or float detected from context.
- Text – unicode string.
- Boolean – true/false.
- List / Table – ordered / tabular collections.
- Tensor – n‑dimensional numeric array.
- Dataset – wrapper around data source with schema.
- Model – trainable object exposing
fit,predict,save. - Prompt – text template + variables.
Type names double as constructors: Dataset from csv "iris.csv".
| Verb Phrase | Effect |
|---|---|
load dataset from … |
Reads data into memory. |
define model as … |
Instantiates architecture. |
train model with … |
Calls underlying .fit. |
evaluate model on … |
Returns metrics struct. |
generate text using … |
Calls language model. |
save model to … |
Persists weights. |
These verbs map directly to library calls after transpilation.
Aion shells maintain program state. Users (or another AI) can ask:
Why did loss plateau after epoch 3?
The runtime introspects variables and responds in natural language.
Runtime messages use friendly English:
I couldn’t find a variable called "learning‑rate". Did you mean "lr"?
When running under an LLM‑enhanced environment, the interpreter proposes fixes.
- NL Parser – Converts sentences to an Abstract Syntax Tree (AST) using a context‑free grammar plus optional LLM disambiguation.
- Semantic Pass – Resolves references and infers types.
- Code Generator – Emits Python (or other backend) with explicit imports.
- Executor – Runs and streams outputs back into the REPL.
Load dataset iris from csv "iris.csv". Split it into train as 80 percent and test as 20 percent.
Define model as random‑forest with 100 trees and max‑depth 5.
Train model with train. Evaluate model on test, calling the score accuracy.
If accuracy is at least 95 percent, say "Success!". Otherwise, enlarge the forest to 300 trees and train again.
Transpiles to ~25 lines of Python using scikit‑learn.
- Domain Packs – YAML/JSON files declare new nouns/verbs.
- Inline DSL – Embed SQL or Bash blocks guarded by
shell orsql fences. - Plugins – Custom AST nodes compiled to user‑supplied Python.
By default the interpreter runs inside a restricted container, limiting filesystem and network. Dangerous actions require explicit allow clauses: allow network access to "huggingface.co".