Docs Técnicas
IR And Runtime
TREA has both AST runtime support and direct IR runtime support for the currently lowered executable subset.
O conteúdo abaixo vem das fontes técnicas do repositório e é prerenderizado no site para leitura direta por pessoas, crawlers e agentes.
TREA has both AST runtime support and direct IR runtime support for the currently lowered executable subset.
IR
Primary source:
text
crates/domain/atlas-trea/src/ir.rsThe canonical IR version is:
text
trea-ir-v1Artifacts include ir_hash derived from canonical lowered IR.
The IR is responsible for:
- preserving executable meaning in a canonical lowered form;
- supporting stable artifact hashing;
- making compiler and runtime behavior easier to inspect and compare.
Runtime
Primary source:
text
crates/domain/atlas-trea/src/runtime.rsExecution returns:
- effects plan;
- return values;
- runtime cost receipt.
On failure, storage is rolled back.
The runtime is responsible for:
- evaluating expressions and statements;
- mutating contract storage in memory;
- producing events and accounting effects;
- enforcing execution bounds for the supported runtime subset.
It is not responsible for final ledger admissibility.
Direct IR Runtime
Primary source:
text
crates/domain/atlas-trea/src/ir_runtime.rsThe direct IR runtime version is:
text
ir-runtime-v3Execution Sequence
- source is parsed into AST;
- verified source is lowered into canonical IR for artifact construction;
- local execution runs through the current runtime path;
- execution produces an execution result;
- the ledger validates and commits that result separately.
Commit Boundary
A successful runtime execution means:
- the contract ran within the supported runtime subset;
- storage mutations and effects were produced deterministically.
It does not mean:
- the posting route is allowed;
- lifecycle state permits the call;
- accepted version binding is valid for commit;
- the ledger will persist the result.