Skip to content

Commit

Permalink
feat: Add dynamic counterpart to tasm code generator
Browse files Browse the repository at this point in the history
  • Loading branch information
aszepieniec authored and jan-ferdinand committed Aug 12, 2024
1 parent 3f363ae commit 72b6f5b
Show file tree
Hide file tree
Showing 2 changed files with 425 additions and 1 deletion.
16 changes: 15 additions & 1 deletion constraint-evaluation-generator/src/codegen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use twenty_first::prelude::XFieldElement;

use crate::constraints::Constraints;

mod dynamic_tasm;
mod rust;
mod static_tasm;

Expand Down Expand Up @@ -41,6 +42,19 @@ pub(crate) struct StaticTasmBackend {

/// The number of elements written to the output list.
///
/// See [`TasmBackend::doc_comment`] for details.
/// See [`StaticTasmBackend::doc_comment`] for details.
elements_written: usize,
}

#[derive(Debug, Default, Clone, Eq, PartialEq)]
pub(crate) struct DynamicTasmBackend {
/// All [circuit] IDs known to be processed and stored to memory.
///
/// [circuit]: triton_vm::table::constraint_circuit::ConstraintCircuit
scope: HashSet<usize>,

/// The number of elements written to the output list.
///
/// See [`DynamicTasmBackend::doc_comment`] for details.
elements_written: usize,
}
Loading

0 comments on commit 72b6f5b

Please sign in to comment.