Initialize solitude repository structure with MLIR dialect, Fano ALU simulator, and master README - #1
Merged
Conversation
…and master README.md Co-authored-by: ping-long-github <155590345+ping-long-github@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Create initial directory layout for SiliconLanguage/solitude
Initialize solitude repository structure with MLIR dialect, Fano ALU simulator, and master README
Aug 22, 2026
ping-long-github
marked this pull request as ready for review
August 22, 2026 05:48
There was a problem hiding this comment.
Pull request overview
Bootstraps the SiliconLanguage/solitude repository from a stub into an initial compiler + hardware co-design project skeleton, including an MLIR dialect TableGen stub, a Python-based Fano ALU emulator, and a substantially expanded top-level README.
Changes:
- Adds an initial MLIR TableGen dialect/op skeleton for non-associative multiplication.
- Introduces a Python Fano-plane-based octonion basis-unit multiplication emulator.
- Expands
README.mdwith project framing, repository layout, and build/run instructions; adds.gitkeepplaceholders for the initial directory tree.
Reviewed changes
Copilot reviewed 3 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Replaces stub with full project overview, layout, and basic usage instructions. |
| mlir-dialect/include/Sounio/SounioOps.td | Adds initial TableGen definitions for the Sounio dialect and a mul op. |
| hardware-sim/fano_alu/fano_emulator.py | Adds a Python emulator building the octonion multiplication table from Fano triples. |
| paper/.gitkeep | Preserves empty paper/ directory in git. |
| sounio-compiler/ast/.gitkeep | Preserves empty ast/ directory in git. |
| sounio-compiler/parser/.gitkeep | Preserves empty parser/ directory in git. |
| mlir-dialect/lib/Transform/.gitkeep | Preserves empty Transform/ directory in git. |
| examples/.gitkeep | Preserves empty examples/ directory in git. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+34
to
+36
| def multiply(self, e_a, e_b): | ||
| """Returns (sign, index) of the product of two basis units.""" | ||
| return self.table.get((e_a, e_b), (0, 0)) |
Comment on lines
+7
to
+10
| def Sounio_Dialect : Dialect { | ||
| let name = "sounio"; | ||
| let summary = "A dialect for high-dimensional non-associative tensor algebra."; | ||
| let cppNamespace = "::mlir::sounio"; |
| using the hardwired Fano Plane cyclic triples. | ||
| """ | ||
| def __init__(self): | ||
| # Imaginary units e_1 through e_7 mapped cyclicly. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bootstraps the
SiliconLanguage/solituderepo from a stub into a structured, development-ready compiler + hardware co-design project for high-dimensional non-associative computing.Changes
Repository layout
paper/,sounio-compiler/{ast,parser}/,mlir-dialect/{include/Sounio,lib/Transform}/,hardware-sim/fano_alu/,examples/.gitkeepfiles to preserve empty directories in gitmlir-dialect/include/Sounio/SounioOps.tdsouniodialectSounio_MulOpintentionally omitsCommutativeandAssociativetraits — the core invariant preventing LLVM from legally reordering octonionic multiplicationshardware-sim/fano_alu/fano_emulator.pyFanoALUEmulatorbuilds the full 8×8 octonion multiplication table from the 7 Fano Plane cyclic triples at init timemultiply(e_a, e_b) → (sign, index)for basis-unit productsREADME.mdSounio → Sedenion AST → sounio.nonassoc MLIR → Fano ALU), per-stage technical descriptions, build/run instructions, and publications sectionOriginal prompt
You are an expert systems software engineer, compiler architect, and technical writer. Your task is to set up the repository structure and write the master README.md for the open-source project "SiliconLanguage/solitude" in the current workspace directory.
Follow the instructions below to create the entire layout, write the final files, and produce a world-class README.md.
STEP 1: INITIALIZE REPOSITORY DIRECTORIES
Execute bash commands or write a script to create the following exact directory layout:
mkdir -p solitude/{paper,sounio-compiler/{ast,parser},mlir-dialect/{include/Sounio,lib/Transform},hardware-sim/fano_alu,examples}
This layout must represent the following architecture:
paper/: Holds LaTeX source files and the compiled PDF.sounio-compiler/: Adopts Sounio specs to implement the frontend sedenion-valued AST parser.mlir-dialect/: Custom 'sounio.nonassoc' dialect and optimization passes.hardware-sim/: Python or SystemC models simulating Fano ALUs.examples/: High-dimensional neural network programs.STEP 2: CREATE PLACEHOLDER IMPLEMENTATION FILES
To make the repository feel alive and ready for development, write the following mock/skeleton files:
solitude/mlir-dialect/include/Sounio/SounioOps.td(MLIR TableGen definition showing disabled associativity):==============================================================================
#ifndef SOUNIO_OPS
#define SOUNIO_OPS
include "mlir/IR/OpBase.td"
include "mlir/Interfaces/SideEffectInterfaces.td"
def Sounio_Dialect : Dialect {
let name = "sounio";
let summary = "A dialect for high-dimensional non-associative tensor algebra.";
let cppNamespace = "::mlir::sounio";
}
// Custom Non-Associative multiplication.
// Note the EXPLICIT omission of Commutative and Associative traits.
def Sounio_MulOp : Op<Sounio_Dialect, "mul", [Pure]> {
let summary = "Non-associative octonionic multiplication operation.";
let arguments = (ins AnyTensor:$lhs, AnyTensor:$rhs);
let results = (outs AnyTensor:$result);
}
#endif // SOUNIO_OPS
Create
solitude/hardware-sim/fano_alu/fano_emulator.py(Python simulator for Fano Plane algebraic multiplications):==============================================================================
class FanoALUEmulator:
"""
Simulates a physical Fano ALU executing non-associative octonionic multiplication
using the hardwired Fano Plane cyclic triples.
"""
def init(self):
# Imaginary units e_1 through e_7 mapped cyclicly.
# Fano triples: (1, 2, 3), (1, 4, 5), (1, 7, 6), (2, 4, 6), (2, 5, 7), (3, 4, 7), (3, 6, 5)
self.triples = [
(1, 2, 3), (1, 4, 5), (1, 7, 6),
(2, 4, 6), (2, 5, 7), (3, 4, 7), (3, 6, 5)
]
self._build_multiplication_table()
def _build_multiplication_table(self):
self.table = {}
# Real unit e_0
for i in range(8):
self.table[(0, i)] = (1, i)
self.table[(i, 0)] = (1, i)
self.table[(i, i)] = (-1, 0) # e_i * e_i = -1
self.table[(0, 0)] = (1, 0)
def multiply(self, e_a, e_b):
"""Returns (sign, index) of the product of two basis units."""
return self.table.get((e_a, e_b), (0, 0))
==============================================================================
STEP 3: WRITE THE MASTER README.md
Write the following markdown content into
solitude/README.md. It must be written exactly as presented below, maintaining the complete mathematical equations, the directory structures, the systems code examples, and the aesthetic dark-mode layout:==============================================================================
Solitude (SiliconLanguage/solitude)
solitudeis an integrated compiler and hardware-software co-design stack built to support high-dimensional, non-associative computing. By adopting the Sounio systems language specification, this platform rejects the traditional associative constraint of modern compilers—proving that non-associative algebraic pathways (such as octonions and exceptional Jordan algebras) are hig...