Skip to content

Comments

Ixon Expr serialization#309

Merged
gabriel-barrett merged 7 commits intomainfrom
new-serialization
Feb 20, 2026
Merged

Ixon Expr serialization#309
gabriel-barrett merged 7 commits intomainfrom
new-serialization

Conversation

@gabriel-barrett
Copy link
Member

This PR adds serialization for Ixon expressions. There are a few repetitive functions, like put_x_telescope and x_telescope_count. I decided not to stress too much with these things, and leave it for a later optimization to remove them. For instance, we could probably introduce an enum that identifies which telescope it is and have a generic telescope function that uses the tag. Also, we could use non-determinism to not have to compute the size of the telescope in circuit

arthurpaulino
arthurpaulino previously approved these changes Feb 20, 2026
Comment on lines +84 to +92
fn put_u64_le(bs: [G; 8], num_bytes: G) -> ByteStream {
match num_bytes {
0 => ByteStream.Nil,
_ =>
let [b1, b2, b3, b4, b5, b6, b7, b8] = bs;
let rest = [b2, b3, b4, b5, b6, b7, b8, 0];
ByteStream.Cons(b1, store(put_u64_le(rest, num_bytes - 1))),
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do you think this implementation compares against manually writing all 9 cases (from 0 to 8)?

It would prevent recursions, making the trace shorter, avoiding potential exponential leaps (which entail dummy rows).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know tbh. But I think it shouldn't matter too much at this stage

Comment on lines +59 to +64
fn u64_is_zero(x: [G; 8]) -> G {
match x {
[0, 0, 0, 0, 0, 0, 0, 0] => 1,
_ => 0,
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏼

@gabriel-barrett gabriel-barrett merged commit c424667 into main Feb 20, 2026
20 checks passed
@gabriel-barrett gabriel-barrett deleted the new-serialization branch February 20, 2026 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants