Repository navigation
Releases
Atrat 0.8.13-alpha
Atrat 0.8.13-alpha
Atrat 0.8.13-alpha is a working compiler for experiments and prototypes. It is
not production-ready: lifetimes are conservative, non-Copy closures cannot be
captured, modules have aliases and qualified names but no separate compilation
or per-field visibility, and there is no threading or package ecosystem yet.
Safe-code memory safety is tested but has not been audited. Expect breaking
changes.
Highlights
- Ownership fixes at operator boundaries: binary operators borrow their
operands, whilebox/rcconsume their payload. - Fixed
Result.ok()/err()payload tracking on borrowed receivers, closing a
heap-corruption hole for non-Copypayloads. - Added missing shared-borrow checks across concrete, trait,
dyn, enum,
string and list method receivers, sharedmatchand sharedfor. - Reject borrows and assignments rooted in temporaries instead of emitting
dangling references. - Fixed receiver adaptation for
&T/&mut TandRcmethods reached through a
reference. - Fixed field/index assignment evaluation order and compound assignment;
indices are evaluated exactly once. - Reworked
if/elif/whilecondition emission for one evaluation per test,
correct temporary cleanup andwhileside effects every iteration. min/max/integerabsevaluate their arguments once.- Hardened the lexer against malformed numeric separators/exponents, surrogate
\uescapes and a decimal zero at end-of-file. - Added
starts_with,ends_withandcontainstostrandString.
169/169 language tests (80 run, 67 compile-fail, 10 panic-path, 12
multi-file), plus interface, validation-matrix, fuzz and sanitizer suites.
Atrat 0.8.12-alpha
Atrat 0.8.12-alpha is a working compiler for experiments and prototypes. It is
not production-ready. This release adds the stable module-interface and
dependency-graph layer that separate compilation will use. It does not yet
compile modules to separate object files or link them.
Stable module identity
Module IDs are now project-relative paths rather than file-stem load order:
main.atr -> main
util.atr -> util
sub/math.atr -> sub/math
Imported declarations keep deterministic internal prefixes, including a stable
hash fallback when sanitised IDs collide. Moving import statements around no
longer changes module identity.
Deterministic interfaces
atrc interfaces app.atr -o .atrbuild/interfaces writes:
- one JSON interface per module
graph.jsonwith dependency-first order and interface hashes
Interfaces contain:
- public functions, signatures and generic bounds
- struct layouts
- enum variants
- traits, methods and supertraits
- impl signatures
- compiler version and source hash
- dependency interface hashes
Imported types are qualified as module::Type, so two modules may both export
Pair without ambiguity.
atrc graph app.atr # main <- util, sub/math
atrc graph app.atr --json # machine-readable graphPublic interface changes propagate to dependent interface hashes. A private
body change updates only that module's source hash.
Verification
- 154/154 language tests.
- New
tests/interfaces_test.py: ordering, deterministic output, imported-type
qualification, private-body invalidation, public-change propagation and
graph --json. - 1,000-case fuzz smoke: 0 failures.
- Validation matrix: 0 failures.
- ASan+UBSan: 154/154 locally and green in CI.
- Clean wheel install verified with
atrc 0.8.12and interface generation.
Honest limits
- Still one merged C translation unit. This release is build-graph
groundwork, not object-file separate compilation. - No object cache, incremental link, per-field
pub, conditional imports,
package boundary or package manager. - Panics still do not unwind or get caught.
- No lifetimes, associated types, threads/
Arc, formatter, LSP or debugger. - No security audit and no production-readiness claim.
Full readiness audit: https://github.com/jawadCircuit/atrat-lang/blob/main/docs/READINESS.md
Artifacts
atrat_lang-0.8.12-py3-none-any.whlatrat_lang-0.8.12.tar.gz
Atrat 0.8.11-alpha
Atrat 0.8.11-alpha is a working compiler for experiments and prototypes. It is
not production-ready.
Real module aliases
import "util" as u
fn main() -> i32:
print(u.greet("atrat"))
let p: u.Pair = u.Pair { a: 20, b: 22 }
print(p.a + p.b)
return 0
- Each non-root file gets its own internal declaration namespace. Two modules
may export the same function or type name without colliding. - Qualified functions, structs, enum variants, traits, generic bounds,
impl
targets and trait objects work:
u.fn(...),u.Type,u.Color.Red,impl u.Show for u.Pair,
<T: u.Show>,&dyn u.ShowandBox<dyn u.Show>. import "util"withoutaskeeps the legacy unqualified import and also gets
a default alias from the file stem, so bothgreet()andutil.greet()work.- Two unqualified imports exporting the same name are rejected as ambiguous,
with a hint to use an alias. - Cross-file
pubis still enforced for both access forms; a public declaration
still cannot expose a private type or trait.
Verification
- 154/154 tests (72 run, 60 compile-fail, 10 panic-path, 12 multi-file).
- 1,000-case mutation fuzz smoke: 0 failures.
- Validation matrix: 0 failures.
- ASan+UBSan: 154/154 locally with clang and green in CI.
- Clean wheel install verified with
atrc --versionand namespaced projects.
Honest remaining limits
- Still one merged C translation unit. No separate compilation, package
manager, per-fieldpubor conditional imports yet. - Panics still do not unwind and cannot be caught. Cleanup covers registered
owners and materialised temporaries, but values under construction and a
panic raised by a destructor remain outside the guarantee. - No lifetimes, associated types, threads/
Arc, formatter, LSP or debugger. - No formatter, LSP, debugger or security audit.
- No claim of production readiness; expect breaking changes.
Full readiness audit: https://github.com/jawadCircuit/atrat-lang/blob/main/docs/READINESS.md
Artifacts
atrat_lang-0.8.11-py3-none-any.whlatrat_lang-0.8.11.tar.gz
Atrat 0.8.10-alpha
Atrat 0.8.10-alpha is a working compiler for experiments and prototypes. It is
not production-ready.
Partial field moves
struct Person:
name: String
city: String
let p = Person { name: "Ada".clone(), city: "London".clone() }
let name = p.name
print(p.city) # still usable
# print(p.name) # E0303: use of moved field
# let q = p # E0303: partially moved value
p.name = "Grace".clone() # assignment restores it
- The checker tracks a field path for each local, including nested fields.
- Sibling fields remain usable; moved fields cannot be read or moved twice.
- Moving the whole partially moved value is rejected.
- Moves through
Rc, shared/&mutreferences, raw pointers and indexed
elements are rejected. - Codegen copies the field out and zeroes the source place. Generated
destructors are null/zero safe, so the owner drops exactly the remaining
fields. This is equivalent to per-field runtime drop flags for the current
type system. - Owned
Boxpayload fields and materialised temporary aggregates also work.
Cleanup fixes
- Materialised expression temporaries now enter the active drop scope, so early
return,?,break,continueand panic paths drop them exactly once. - Fixed
for-loopbreak/continuecleanup: the loop-body drop scope is now
included, so loop-local owners and equality temporaries are destroyed. tests/sanitizers.pynow auto-detects clang or gcc with ASan+UBSan. Locally,
LLVM MinGW clang runs all 146/146 tests plus lifecycle examples under
sanitizers. Windows ASan has no LeakSanitizer; Linux CI still runs leak
detection.
Verification
- 146/146 tests (72 run, 60 compile-fail, 10 panic-path, 4 multi-file).
- 1,000-case mutation fuzz smoke: 0 failures.
- Validation matrix: 0 failures.
- ASan+UBSan: 146/146 locally with clang and green in CI.
- Clean wheel install verified with
atrc --version, partial moves, nested
moves, enum-field consumption and a panic path exiting with status 101.
Honest remaining limits
- Panics still do not unwind and cannot be caught. Cleanup covers registered
owners and materialised temporaries, but values under construction and a
panic raised by a destructor remain outside the guarantee. - No lifetimes, associated types, threads/
Arc, module namespacing, separate
compilation or package manager yet. - No formatter, LSP, debugger or security audit.
- These are the next multi-release programs, not claims made by this release.
Full readiness audit: https://github.com/jawadCircuit/atrat-lang/blob/main/docs/READINESS.md
Artifacts
atrat_lang-0.8.10-py3-none-any.whlatrat_lang-0.8.10.tar.gz
Atrat 0.8.9-alpha
Atrat 0.8.9-alpha is a working compiler for experiments and prototypes. It is
not production-ready.
Destruction edge cases
- A non-
Copyliteral-pattern match scrutinee is now dropped after the arm. - The match scrutinee is a tracked cleanup owner, so literal arms, early
?,
break/continueand panics drop it exactly once. unwrap_or/ok_ordefaults are evaluated eagerly and an unused owned default
is dropped on the success path.- Moving a non-
Copyfield out of an aggregate is rejected withE0302.
Clone the field or move the whole value. drop(value.field)destroys the field in place; destructive drops through
Rcor a shared reference are rejected.- Non-
Copystruct/enum operands of==/!=are materialised and dropped. - Literal subpatterns that inspect a non-
Copyfield while a sibling field is
bound no longer leak that field.
Verification
- 132/132 end-to-end tests (64 run, 55 compile-fail, 9 panic-path,
4 multi-file), plus mutation fuzz smoke and optimization/compiler matrix. - ASan/UBSan jobs run on Linux CI; the local MinGW toolchain lacks those
runtimes, so local sanitizer execution is skipped and not claimed. - Clean wheel install verified with
atrc --version, a sample program, and a
panic path exiting with status 101.
Honest limitations
- Panics do not unwind and cannot be caught. Panic cleanup destroys registered
live owners, but expression temporaries, destructor panics andexit()are
still gaps (seedocs/READINESS.md). - No explicit lifetime parameters; returned borrows are tied to one reference
parameter and views cannot be rebound. - Nested/returning closures, associated types,
Arc, threads and interior
mutability are not supported. - Modules are a flat recursive include with cross-file
pub; there is no
namespacing or separate compilation, and no package manager. - No formatter, LSP, debugger or security audit.
Full readiness audit: https://github.com/jawadCircuit/atrat-lang/blob/main/docs/READINESS.md
Artifacts
atrat_lang-0.8.9-py3-none-any.whlatrat_lang-0.8.9.tar.gz
Install from the wheel with pip install atrat_lang-0.8.9-py3-none-any.whl and
run atrc --version.
Atrat 0.8.8-alpha — cross-file visibility
Atrat 0.8.8-alpha
Atrat is not fully functional yet. Alpha compiler; the version line remains
0.8.x.
This release starts the module-boundary work: pub is now enforced across
files instead of being parsed and ignored.
Added
- Every AST node carries its originating source file through the merged import
graph. - Cross-file use of a non-
pubfunction, struct, enum, trait, impl method,
supertrait or generic bound is rejected withE0402. - Public declarations cannot expose a private type or trait through parameters,
return types, fields, enum variants or bounds. - Same-file private helpers remain usable by public wrappers.
- Multi-file coverage for public structs, private functions, private structs and
exposed private types.
Tests
119/119:
- 56 successful run cases
- 51 compile-fail cases
- 8 panic-path cases
- 4 multi-file cases
Honest limits
This is visibility, not a complete module system:
- Imports still merge into one flat namespace; two public names can collide.
- No per-field
pub; fields inherit their struct's visibility. - No separate compilation, package boundaries or dependency resolution.
- No module aliases/namespacing beyond
import ... as ...parsing.
Production readiness: no. See docs/READINESS.md and docs/LANGUAGE.md.
Atrat 0.8.7-alpha — panic cleanup
Atrat 0.8.7-alpha
Atrat is not fully functional yet. Alpha compiler; the version line remains
0.8.x.
This release adds panic cleanup. A panic now destroys live owning locals and
function parameters before terminating instead of immediately calling
abort(). It is cleanup, not unwinding: panics still cannot be caught.
Added
- A runtime cleanup registry for live owning locals and function parameters.
Moves and normal scope exits unregister entries. A panic drops the remaining
owners in reverse registration order, then exits with status 101. - Nested-call cleanup: caller arguments are unregistered before a call and
callee parameters are registered on entry, so a panic inside a callee drops
each value exactly once. - Materialised statement temporaries (field access,
len, enum receivers) are
registered and cancelled/dropped with their statement-end lifetime. - Explicit
drop(local)and consuming operations (unwrap,?, moves into
calls/returns/closures) unregister before ownership leaves the binding. - Late match-arm declarations and move unregistrations are emitted before the
arm value, preventing a moved binding from remaining registered. - Normal
mainreturn disposes the registry array.
Tests
116/116:
- 56 successful run cases
- 51 compile-fail cases
- 8 panic-path cases
- 1 multi-file case
New panic tests cover String/Box/Rc/List/struct locals, nested calls, match
bindings moved into a call, loop locals, and Result::unwrap on Err. The
panic test loop now expects exit 101 and rejects ASan/LSan/UBSan diagnostics.
Honest limits
- Panics do not unwind and cannot be caught.
- Expression temporaries that never become locals can still leak on a panic.
- A panic inside a destructor exits without running the remaining cleanup.
exit(code)bypasses Atrat destructors and panic cleanup.- Local MinGW cannot run ASan/UBSan; Linux CI does.
Production readiness: no. See docs/READINESS.md and docs/STDLIB.md.
Atrat 0.8.6-alpha — temporary ownership stabilization
Atrat 0.8.6-alpha
Atrat is not fully functional yet. Alpha compiler; the version line remains
0.8.x.
This is a temporary-ownership stabilization release. It fixes cases where the
compiler accepted code that leaked or generated invalid C, and it adds
regression tests for each case.
Fixed
- Temporary
Box/Rcreceivers leaked.box(...)/rc(...)field,
method and dereference access had no binding to carry a drop flag. They are
now rejected with a request to bind the value first. Bound boxes still
auto-dereference, and temporaryBox<dyn Trait>method calls keep their
dedicated cleanup. dropof owned temporaries emitted invalid C.drop(box(...)),
drop(rc(...)),drop(make_string()), struct literals and list literals now
materialise once, take a valid address and drop exactly once.lenof owned string temporaries emitted invalid C.
len("x".clone())andlen(to_str(n))now work.- Temporary struct field reads were evaluated twice. They now materialise
the aggregate once and drop unused fields at statement end. - Explicit
drop(local)is final. Scope exit no longer invokes the local's
destructor a second time. Partial-place drops keep owner cleanup. - Removed duplicate evaluation in string clone/show paths for temporary fields.
Tests
111/111:
- 56 successful run cases
- 51 compile-fail cases
- 3 panic-path cases
- 1 multi-file case
New regressions include drop-temporary, len-owned-temporary,
temporary-aggregate-field, and temporary Box method/field/deref rejection.
Panics still abort without unwinding; local destructors do not run on panic.
That remains documented as a limitation. Local MinGW cannot run ASan/UBSan;
the Linux CI job does.
Production readiness: no. See docs/READINESS.md and docs/ECOSYSTEM.md.
Atrat 0.8.5-alpha — Box method auto-deref
Atrat 0.8.5-alpha
Atrat is not fully functional yet. Alpha compiler; the version line remains
0.8.x and 1.0 is not claimed.
Box method auto-deref
Method calls on Box<T> now auto-dereference, matching existing field access:
let b: Box<String> = box("hello".clone())
print(b.len()) # same as (*b).len()
var p: Box<Point> = box(Point { x: 1 })
print(p.get()) # reference-receiver method
p.bump() # &mut self method
var list: Box<List<i64>> = box([1, 2])
list.push(3)
A method that would move a non-Copy payload out through a Box is rejected
with E0300 and a clue to borrow/clone the payload or consume the box
explicitly. Copy payloads such as Box<Option<i64>> remain usable.
Tests cover Box<String>, Box<List<T>>, Box<Struct> and
Box<Option<T>>, plus the negative non-Copy move case.
Ecosystem plan — later, not now
Added docs/ECOSYSTEM.md. The short version: a package manager is a 1.0
gate, not a 0.8.x feature. It needs module visibility, separate compilation,
a stable manifest/semver policy, reproducible source hashes and a security
model first. The first MVP, when that time comes, should be local path
dependencies, then Git dependencies, a lockfile, and a static registry index —
not a hosted registry with install scripts.
No package-manager code is included in this release.
Test status
105/105:
- 53 successful run cases
- 48 compile-fail cases
- 3 panic-path cases
- 1 multi-file case
Panic paths still abort without unwinding; local destructors do not run on
panic. This remains documented as a limitation.
Production readiness: no. See docs/READINESS.md.
Atrat 0.8.4-alpha — sanitizer harness fix
Atrat 0.8.4-alpha
Atrat is not fully functional yet. Alpha compiler; version remains 0.8.x.
This is a test-harness fix for 0.8.3. The compiler, language and generated C are
unchanged.
- Fixed
tests/sanitizers.py, which referenced theatrcpath without defining
it after the lifecycle-example addition. - The 0.8.3 ASan/UBSan job ran all 103 tests successfully, then failed while
launching the extra lifecycle examples because of that missing constant. - 103/103 tests pass.
The substantive 0.8.3 changes remain:
- Fixed nested enum match codegen.
- Fixed address-taking through a dereference.
- Added
Result::unwrap_err. - Added destruction/ownership-transfer lifecycle tests and panic-path tests.
- Panics still abort without unwinding; this remains a documented limitation.
- Added
docs/STDLIB.md,docs/REGRESSIONS.mdandexamples/lifecycle.atr.
Production readiness: no. See docs/READINESS.md.