uor_addr/composition/e7/
verbs.rs1#![cfg(feature = "alloc")]
4
5use crate::composition::e7::value::E7Carrier;
6use crate::label::{
7 CompositionLabelE7Blake3, CompositionLabelE7Keccak256, CompositionLabelE7Sha256,
8 CompositionLabelE7Sha3_256, CompositionLabelE7Sha512,
9};
10
11addr_verbs! {
12 input: E7Carrier<'_>,
13 { shape: CompositionLabelE7Sha256, verb: compose_e7_inference },
14 { shape: CompositionLabelE7Blake3, verb: compose_e7_inference_blake3 },
15 { shape: CompositionLabelE7Sha3_256, verb: compose_e7_inference_sha3_256 },
16 { shape: CompositionLabelE7Keccak256, verb: compose_e7_inference_keccak256 },
17 { shape: CompositionLabelE7Sha512, verb: compose_e7_inference_sha512 },
18}
19
20#[cfg(test)]
21mod tests {
22 use super::*;
23 use prism::operation::Term;
24
25 #[test]
26 fn verb_term_arena_is_emitted_and_nonempty() {
27 let arena = compose_e7_inference_term_arena::<{ crate::ADDR_INLINE_BYTES }>();
28 assert!(!arena.is_empty());
29 }
30
31 #[test]
32 fn verb_arena_contains_no_sigma_residuals() {
33 let arena = compose_e7_inference_term_arena::<{ crate::ADDR_INLINE_BYTES }>();
34 assert!(!arena.iter().any(|t| matches!(t, Term::FirstAdmit { .. })));
35 assert!(!arena
36 .iter()
37 .any(|t| matches!(t, Term::AxisInvocation { .. })));
38 assert!(arena.iter().any(|t| matches!(t, Term::Nerve { .. })));
39 assert!(arena.iter().any(|t| matches!(t, Term::KInvariants { .. })));
40 }
41}