Skip to content
/ Axio Public
forked from tylerweston/ccc

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.

Notifications You must be signed in to change notification settings

Coditary/Axio

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

182 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Axio

All-purpose Xpressive Integrated Optimizer

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.


The Vision: "The eXpressive Machine"

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.

Current Compiler Capabilities (C-Subset Core)

The current core is based on the CCC framework (Flex, Bison, LLVM) and supports a structured C-subset:

Supported Keywords & Types

  • Control Flow: if, while, for, break, continue, return.
  • Data Types: int, float, bool (built-in true/false), and void.

Operations

  • Arithmetic: +, -, *, /, % (including assignments like +=, *=, etc.).
  • Logic & Bitwise: &&, ||, !, &, |, ^, ~.
  • Comparison & Shifts: !=, ==, <, >, <=, >=, <<, >>.
  • Expressions: Full support for Ternary expressions (condition ? true : false).

Optimization & Safety

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.

Usage

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.

Installation

Requirements

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+)

Build Steps

git clone [https://github.com/Coditary/Axio.git](https://github.com/Coditary/Axio.git)
cd Axio/src
make

Roadmap

  • 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.

About

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.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 88.0%
  • Yacc 6.6%
  • Lex 3.0%
  • CMake 1.6%
  • Shell 0.8%