Axio is a multi-paradigm systems language designed for maximum expressivity. By using specialized syntax for dataflow, state machines, and GPU compute, Axio optimizes code through deep contextual awareness.
Axio follows a unique "All-in-One" philosophy to bridge the gap between high-level logic and bare-metal performance:
- All-purpose: Designed to cover everything from Web and Databases to Math and GPU kernels.
- Xpressive: A flexible syntax that adapts to the context (e.g.,
log{3}(x)), allowing you to write code that matches your mental model. - Integrated: Core features like Configs, DB-access, and Networking are native parts of the language, not just external libraries.
- Optimized: By understanding the specific context of your syntax, the compiler performs deep optimizations that general-purpose languages cannot reach.
The current core is based on the CCC framework (Flex, Bison, LLVM) and supports a structured C-subset:
- Control Flow:
if,while,for,break,continue,return. - Data Types:
int,float,bool(built-intrue/false), andvoid.
- Arithmetic:
+,-,*,/,%(including assignments like+=,*=, etc.). - Logic & Bitwise:
&&,||,!,&,|,^,~. - Comparison & Shifts:
!=,==,<,>,<=,>=,<<,>>. - Expressions: Full support for Ternary expressions (
condition ? true : false).
Axio leverages its contextual awareness even in this early stage through:
- Constant Folding: Simplifies binary, unary, and relational operations with constant operands at compile-time.
- Dead Code Elimination: Automatically removes
if,while, and ternary blocks with constant predicates. - Semantic Verification: Traverses the Abstract Syntax Tree (AST) to ensure type safety, correct scope, and function integrity.
- LLVM Powered: Generates optimized LLVM IR for cross-platform execution.
The Axio compiler supports the following command-line options:
| Option | Shortcut | Description |
|---|---|---|
--print-ir |
-i |
Display the generated LLVM IR code. |
--print-ast |
-a |
Visualize the Abstract Syntax Tree. |
--print-lex |
-l |
Display tokens generated by Flex. |
--optimization-level |
-o [0/1] |
Set optimization level (0: None, 1: Default). |
--keep-preprocessed |
-e |
Don't erase preprocessed file upon completion. |
To build Axio on Fedora/Linux, ensure the following are installed:
- Bison (3.6.4+)
- Flex (2.6.4+)
- LLVM (10.0.1+)
- CMake (3.18.2+)
- GCC (10.2.0+)
git clone [https://github.com/Coditary/Axio.git](https://github.com/Coditary/Axio.git)
cd Axio/src
make-
Phase 1: Core C-subset stability (Current).
-
Phase 2: Implementation of eXpressive math syntax (e.g., log{3}(x)).
-
Phase 3: Native State Machine (automaton) blocks and generators.
-
Phase 4: Deep Contextual Optimization for Dataflow & Networking.
-
Phase 5: GPU Compute kernels and Seamless Polyglot FFI.