A systems programming language for building verifiable accounting systems.
Equis is a self-hosted, domain-specific systems language for economic and accounting software. It integrates the Resource-Event-Agent (REA) accounting model into its core semantics, providing automated verification for balanced transactions.
| Feature | Description |
|---|---|
| REA Duality | Mandatory runtime balance verification for all economic events |
| RBAC Enforcement | Role-based access control enforced at agent execution entry points |
| Immutable Audit Trail | Append-only JSON ledger (ledger.ev) for tamper-proof transaction history |
| Transactional Reversal | Automated compensating flows for event-level rollback |
| Self-Hosted Compiler | The Equis compiler is written in Equis |
| LLVM Backend | Compiles to optimized native machine code |
| ARC Memory Model | Hybrid automatic reference counting with deterministic arena allocation |
equis/
├── assets/
│ ├── logo.png
│ └── logo.svg
├── compiler/
│ ├── analyzer.equis # Symbol table & scope management
│ ├── borrow_checker.equis # Ownership & lifetime analysis
│ ├── codegen.equis # LLVM IR code generation
│ ├── constants.equis # AST node & token index definitions
│ ├── lexer.equis # Tokenizer
│ ├── lsp.equis # Language Server Protocol handler
│ ├── main.equis # Compiler entry point
│ ├── main.ll # Pre-compiled LLVM IR (bootstrap artifact)
│ ├── parser.equis # Recursive descent parser
│ ├── runtime.c # C runtime support (ARC, I/O, syscalls)
│ └── semantics.equis # Semantic analysis & REA enforcement
├── docs/
│ ├── architecture.md # Compiler pipeline design
│ ├── benchmarks.md # Performance measurements
│ ├── grammar.ebnf # Formal EBNF grammar
│ ├── grammar.md # Human-readable grammar guide
│ ├── integration_guide.md # CLI setup & global installation
│ ├── operational_semantics.md# Formal duality & ARC proofs
│ ├── specification.md # Language specification
│ └── stdlib_reference.md # Standard library API reference
├── examples/
│ ├── benchmarks/
│ │ └── speed_test.equis # Performance & stress test suite
│ ├── main.equis # Integrated REA accounting workflow
│ └── preempt_test.equis # Multitasking & scheduler verification
├── scripts/
│ └── verify_ddc.sh # Diverse Double-Compilation verifier
├── std/
│ ├── accounting.equis # ERP accounting logic
│ ├── arena.equis # Arena allocator
│ ├── chan.equis # Thread-safe channels
│ ├── collections.equis # Vectors & hash maps
│ ├── compliance.equis # ESG & regulatory checks
│ ├── db.equis # PostgreSQL connector (libpq)
│ ├── dual_net.equis # Distributed duality verification
│ ├── ffi.equis # Foreign function interface
│ ├── fiber.equis # Preemptive fiber scheduler
│ ├── fixed.equis # Fixed-point arithmetic
│ ├── http.equis # HTTP server
│ ├── intern.equis # String interning
│ ├── io.equis # File I/O utilities
│ ├── json.equis # JSON parser & serializer
│ ├── ledger.equis # Double-entry ledger
│ ├── net.equis # Socket networking
│ ├── record.equis # Record utilities
│ ├── rpc.equis # Remote procedure calls
│ ├── string.equis # String manipulation
│ └── sys.equis # System primitives & runtime bindings
├── .github/
│ └── workflows/
│ ├── build.yml # Release build pipeline
│ ├── ci.yml # Continuous integration
│ └── docs.yml # Documentation deployment
├── bootstrap.c # ANSI C bootstrap compiler
├── Makefile # Linux/macOS build system
├── bootstrap.ps1 # Windows bootstrap script
├── eq # Linux/macOS runner script
├── eq.ps1 # PowerShell runner script
├── eq.bat # Windows batch runner shim
├── epm # Package manager (Linux/macOS)
├── epm.ps1 # PowerShell package manager
├── epm.bat # Windows package manager shim
├── install.sh # Linux/macOS installer
├── install.ps1 # Windows installer
├── EQUIS.md # Programmer's language reference
├── CHANGELOG.md # Release history
├── LICENSE # Apache 2.0
└── NOTICE
Equis incorporates accounting semantics directly into the language design:
// Define transacting entities with role-based access
Agent Buyer roles { "CONSUMER" } { id: "B1"; status: "active"; }
Agent Seller roles { "VENDOR" } { id: "S1"; status: "active"; }
// Define trackable assets
Resource Cash { unit: USD; decimals: 2; }
Resource Item { unit: PCS; }
// Binding promise for future execution
Commitment Order_01 evaluated_by MarketRate {
flow {
out 5 Item from Seller to Buyer;
in 50 Cash from Buyer to Seller;
}
}
// Atomic state transition with balanced flows
Event Purchase fulfills Order_01 roles { "CONSUMER" } {
logic { assert(1 > 0); }
flow {
in 5 Item from Seller to Buyer;
out 50 Cash from Buyer to Seller;
}
}
Beyond REA, Equis supports full systems-level programming:
- Pointers & Mutability — Explicit
mutconstraints and raw pointer indexing - Concurrency — Thread-safe channels (
chan_send,chan_recv) and checkpoint-based preemptive fibers - Networking — Sockets support for distributed duality verification
- Database — PostgreSQL connectivity via
libpq - Atomic I/O — File operations with crash-safe semantics
- Linux/macOS:
curl -fsSL https://raw.githubusercontent.com/equis-lang/equis/main/install.sh | bash - Windows:
irm https://raw.githubusercontent.com/equis-lang/equis/main/install.ps1 | iex
git clone https://github.com/equis-lang/equis.git
cd equis
make && sudo make installgit clone https://github.com/equis-lang/equis.git
cd equis
.\bootstrap.ps1The compiler requires only a C compiler (GCC/Clang), Make, and LLVM/Clang.
make bootstrap # Build the compiler from the C bootstrap
make clean # Clean build artifacts
sudo make installeq run examples/main.equis| Document | Description |
|---|---|
| Programmer's Guide | Complete language tutorial and reference |
| Language Specification | Formal semantics and logic rules |
| Grammar (EBNF) | Formal language syntax specification |
| Operational Semantics | Proof sketches for duality and ARC |
| Architecture | Compiler pipeline and IR design |
| Standard Library | Full stdlib API reference |
| Integration Guide | Global CLI setup |
| Tool | Description |
|---|---|
| VS Code Extension | Syntax highlighting, LSP, and file icons |
Package Manager (epm) |
Dependency management for Equis projects |
Copyright (c) 2026 mlintangmz
Licensed under the Apache License 2.0.
