# Architecture

As mentioned, JOLT Atlas is built upon JOLT and the differences are the result of replacing the RISC-V computational model with ONNX. While [JOLT can be seen as a CPU](https://jolt.a16zcrypto.com/how/architecture/architecture.html#jolt-as-a-cpu), JOLT Atlas can be seen as a DAG.

<figure><img src="/files/OCH3x1iUQulUgjNvJSlq" alt=""><figcaption></figcaption></figure>

As a DAG, JOLT Atlas doesn't need to store and load from RAM. Instead of registers, JOLT Atlas uses a heap abstraction. The rest of the diagram above remains almost exactly as the original JOLT codebase. The reader can find [the bytecode](https://jolt.a16zcrypto.com/how/architecture/bytecode.html) and [instruction execution](https://jolt.a16zcrypto.com/how/architecture/instruction_execution.html) documentation in their docs.

The prover begins by cryptographically committing to the execution trace $z$ of the ONNX VM on the appropriate input. Then, the prover in JOLT Atlas proves that:

* The state transition function of the ONNX virtual machine encoded in R1CS is enforced. It proves that $z$ is a valid execution trace assuming $z$ satisfies memory-consistency and relevant entries of $z$ are indeed in the relevant lookup tables capturing evaluation of the ONNX instructions. JOLT Atlas applies [Spartan](https://eprint.iacr.org/2019/550) to establish that z satisfies the constraint system.
* Every ONNX instruction is executed correctly. Like JOLT, This is primarily achieved through the [Shout](https://jolt.a16zcrypto.com/how/twist-shout.html#shout) lookup argument.
* At each cycle of the ONNX virtual machine, the current instruction (as indicated by the program counter) is "fetched" from the bytecode and decoded. In Jolt Atlas, this is proven by treating the bytecode as a lookup table, and fetches as lookups. To prove the correctness of these lookups, we also use the [Shout](https://jolt.a16zcrypto.com/how/twist-shout.html) lookup argument.
* The correctness of heap operations using the [Twist](https://jolt.a16zcrypto.com/how/twist-shout.html) memory checking algorithm.
* The correctness of guest program outputs via [the output check](https://jolt.a16zcrypto.com/how/architecture/ram.html#output-check) sumcheck. Memory constraints are different compared to the original JOLT zkVM.

  <br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://devs.novanet.xyz/jolt-atlas-zkml/architecture.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
