Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
execution_event.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <cstdint>
4#include <exception>
5#include <vector>
6
17
18namespace bb::avm2::simulation {
19
20// Possible mutually exclusive execution errors.
30
31class TagCheckError : public std::exception {
32 public:
37
38 const char* what() const noexcept override { return "Tag check failed"; }
39
40 private:
41 std::unique_ptr<MemoryTag> expected_tag;
42 std::unique_ptr<MemoryTag> actual_tag;
43};
44
48
49 // Inputs and Outputs for a gadget/subtrace used when allocating registers in the execution trace.
52
53 // Context Id for the next context.
55
56 // Sub-events.
58 ContextEvent before_context_event; // FIXME: currently unused (also might be overkill).
60
62
63 // function to determine whether the event was a context "failure"
64 bool is_failure() const
65 {
66 // WARNING: it is important that we check for error first here because
67 // if instruction fetching fails, we cannot do `wire_instruction.get_exec_opcode()`
69 }
70
71 // function to determine whether the event represents a context "exit"
73};
74
75} // namespace bb::avm2::simulation
TagCheckError(MemoryTag expected_tag, MemoryTag actual_tag)
std::unique_ptr< MemoryTag > expected_tag
std::unique_ptr< MemoryTag > actual_tag
const char * what() const noexcept override
STL namespace.
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13
std::vector< TaggedValue > inputs
ExecutionOpCode get_exec_opcode() const